-
-
-
-
-
+
import('@/views/Components/Editor/Editor.vue'),
- // name: 'Editor',
- // meta: {
- // title: t('router.richText')
- // }
- // }
- // ]
- // },
+ {
+ path: 'editor-demo',
+ component: getParentLayout(),
+ redirect: '/components/editor-demo/editor',
+ name: 'EditorDemo',
+ meta: {
+ title: t('router.editor'),
+ alwaysShow: true
+ },
+ children: [
+ {
+ path: 'editor',
+ component: () => import('@/views/Components/Editor/Editor.vue'),
+ name: 'Editor',
+ meta: {
+ title: t('router.richText')
+ }
+ }
+ ]
+ }
// {
// path: 'search',
// component: () => import('@/views/Components/Search.vue'),
diff --git a/src/views/Components/Form/DefaultForm.vue b/src/views/Components/Form/DefaultForm.vue
index 5f03e60..86ca79a 100644
--- a/src/views/Components/Form/DefaultForm.vue
+++ b/src/views/Components/Form/DefaultForm.vue
@@ -1343,7 +1343,50 @@ const schema = reactive([
field: 'field63',
component: 'TimeSelect',
label: t('formDemo.default')
- }
+ },
+ {
+ field: 'field64',
+ component: 'Divider',
+ label: t('formDemo.richText')
+ },
+ {
+ field: 'field65',
+ component: 'Editor',
+ value: 'hello world',
+ label: t('formDemo.default'),
+ componentProps: {
+ editorConfig: {
+ placeholder: '请输入内容...'
+ }
+ },
+ colProps: {
+ span: 24
+ }
+ },
+ {
+ field: 'field66',
+ component: 'Divider',
+ label: t('formDemo.inputPassword')
+ },
+ {
+ field: 'field67',
+ component: 'InputPassword',
+ label: t('formDemo.default'),
+ componentProps: {
+ strength: true
+ }
+ },
+ {
+ field: 'field68',
+ component: 'Divider',
+ label: `${t('formDemo.form')} t('formDemo.slot')}`,
+ },
+ {
+ field: 'field69',
+ component: 'Input',
+ value: 'test',
+ label: `default`,
+ },
])
const { register, formRef, methods } = useForm({
@@ -1360,68 +1403,8 @@ const changeToggle = () => {
-
-
-
+
diff --git a/types/custom-types.d.ts b/types/custom-types.d.ts
deleted file mode 100644
index 3ef553c..0000000
--- a/types/custom-types.d.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { SlateDescendant } from '@wangeditor/editor'
-
-declare module 'slate' {
- interface CustomTypes {
- // 扩展 text
- Text: {
- text: string
- bold?: boolean
- italic?: boolean
- code?: boolean
- through?: boolean
- underline?: boolean
- sup?: boolean
- sub?: boolean
- color?: string
- bgColor?: string
- fontSize?: string
- fontFamily?: string
- }
-
- // 扩展 Element 的 type 属性
- Element: {
- type: string
- children: SlateDescendant[]
- }
- }
-}