diff --git a/src/plugin/admin/app/common/Layui.php b/src/plugin/admin/app/common/Layui.php index 2d650a0..3853d51 100644 --- a/src/plugin/admin/app/common/Layui.php +++ b/src/plugin/admin/app/common/Layui.php @@ -207,6 +207,55 @@ EOF; +EOF; + } + + /** + * 富文本 + * @param $options + * @return void + */ + public function richText($options) + { + [$label, $field, $value, $props, $verify_string, $required_string, $class] = $this->options($options); + + $placeholder_string = !empty($props['placeholder']) ? ' placeholder="'.$props['placeholder'].'"' : ''; + $disabled_string = !empty($props['disabled']) ? ' disabled' : ''; + $id = $field; + + $this->htmlContent .= << + $label +
+ +
+ + +EOF; + + $options_string = ''; + foreach ($props as $key => $item) { + if (is_array($item)) { + $item = json_encode($item, JSON_UNESCAPED_UNICODE); + $options_string .= "\n $key: $item,"; + } else { + $options_string .= "\n $key: \"$item\","; + } + } + $this->jsContent .= << diff --git a/src/plugin/admin/app/view/table/modify.html b/src/plugin/admin/app/view/table/modify.html index a546b45..df2409e 100644 --- a/src/plugin/admin/app/view/table/modify.html +++ b/src/plugin/admin/app/view/table/modify.html @@ -136,7 +136,7 @@