fx-platform-ui 0.0.13-alpha1 → 0.0.13-alpha10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/fx-platform-ui.mjs +52129 -19765
- package/lib/fx-platform-ui.umd.js +76 -32
- package/lib/packages/components/editor/src/hook/index.d.ts +1 -0
- package/lib/packages/components/editor/src/hook/useEditorState.d.ts +28 -0
- package/lib/packages/components/editor/src/index.vue.d.ts +30 -0
- package/lib/packages/components/editor/src/plat-editor-emits.d.ts +1 -0
- package/lib/packages/components/editor/src/plat-editor-props.d.ts +37 -0
- package/lib/packages/components/editor/src/type/index.d.ts +10 -0
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/component.ts +2 -2
- package/packages/components/editor/src/index.vue +15 -14
- package/packages/components/editor/src/plat-editor-emits.ts +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="fx-editor">
|
|
3
|
-
<editor
|
|
3
|
+
<editor :disabled="disabled"></editor>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
8
|
import { onMounted, watch, ref } from 'vue'
|
|
9
9
|
//在js中引入所需的主题和组件
|
|
10
|
-
import tinymce from 'tinymce/tinymce'
|
|
10
|
+
// import tinymce from 'tinymce/tinymce'
|
|
11
11
|
import 'tinymce/skins/content/default/content.css'
|
|
12
12
|
import Editor from '@tinymce/tinymce-vue'
|
|
13
13
|
import 'tinymce/themes/silver'
|
|
@@ -32,23 +32,24 @@ import 'tinymce/plugins/autolink'
|
|
|
32
32
|
import 'tinymce/plugins/anchor'
|
|
33
33
|
|
|
34
34
|
import { platEditorProps } from './plat-editor-props'
|
|
35
|
+
import { platEditorEmits } from './plat-editor-emits'
|
|
35
36
|
import { useEditorState } from './hook'
|
|
36
37
|
defineOptions({
|
|
37
38
|
name: 'PlEditor'
|
|
38
39
|
})
|
|
39
40
|
const props = defineProps(platEditorProps)
|
|
40
|
-
const emit = defineEmits(
|
|
41
|
+
const emit = defineEmits(platEditorEmits)
|
|
41
42
|
|
|
42
|
-
const { init, modelValue } = useEditorState(props)
|
|
43
|
+
// const { init, modelValue } = useEditorState(props)
|
|
43
44
|
const editorBorder = ref('1px solid #d9d9d9')
|
|
44
45
|
|
|
45
|
-
watch(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
)
|
|
46
|
+
// watch(
|
|
47
|
+
// () => modelValue.value,
|
|
48
|
+
// (val) => {
|
|
49
|
+
// emit('update:value', val)
|
|
50
|
+
// emit('change', val)
|
|
51
|
+
// }
|
|
52
|
+
// )
|
|
52
53
|
|
|
53
54
|
// 添加红色边框
|
|
54
55
|
const addValidate = (border = '1px solid #ff4d4f') => {
|
|
@@ -69,9 +70,9 @@ const instance = {
|
|
|
69
70
|
defineExpose(instance)
|
|
70
71
|
|
|
71
72
|
//在onMounted中初始化编辑器
|
|
72
|
-
onMounted(() => {
|
|
73
|
-
|
|
74
|
-
})
|
|
73
|
+
// onMounted(() => {
|
|
74
|
+
// tinymce.init({})
|
|
75
|
+
// })
|
|
75
76
|
</script>
|
|
76
77
|
<style lang="less" scoped>
|
|
77
78
|
:deep(.tox-tinymce) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const platEditorEmits = ['
|
|
1
|
+
export const platEditorEmits = ['update:value', 'change']
|