adtec-core-package 1.1.0 → 1.1.2
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/package.json
CHANGED
|
@@ -25,7 +25,7 @@ const props = withDefaults(
|
|
|
25
25
|
/**
|
|
26
26
|
* html 内容
|
|
27
27
|
*/
|
|
28
|
-
modelValue: string
|
|
28
|
+
// modelValue: string
|
|
29
29
|
/**
|
|
30
30
|
* 工具栏显示
|
|
31
31
|
*/
|
|
@@ -40,12 +40,13 @@ const props = withDefaults(
|
|
|
40
40
|
editorConfig?: any
|
|
41
41
|
}>(),
|
|
42
42
|
{
|
|
43
|
-
modelValue: '',
|
|
43
|
+
// modelValue: '',
|
|
44
44
|
showToolbar: true,
|
|
45
45
|
borderWidth: '1px',
|
|
46
46
|
editorConfig: {},
|
|
47
47
|
},
|
|
48
48
|
)
|
|
49
|
+
const model = defineModel({ type: String })
|
|
49
50
|
//默认的配置
|
|
50
51
|
const defaultConfig = {
|
|
51
52
|
placeholder: '请输入内容...',
|
|
@@ -53,23 +54,25 @@ const defaultConfig = {
|
|
|
53
54
|
toolbarExcludeKeys: ['attachment', 'code-block', 'video', 'ai'],
|
|
54
55
|
onChange: (editor: AiEditor) => {
|
|
55
56
|
setFooter()
|
|
57
|
+
model.value = editor.getHtml()
|
|
56
58
|
},
|
|
57
59
|
}
|
|
58
60
|
watch(
|
|
59
|
-
() =>
|
|
61
|
+
() => model,
|
|
60
62
|
() => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
if (model.value !== aiEditor?.getHtml()) {
|
|
64
|
+
aiEditor && aiEditor.setContent(model.value || '')
|
|
65
|
+
}
|
|
63
66
|
},
|
|
64
67
|
)
|
|
65
68
|
onMounted(() => {
|
|
66
69
|
const config = {
|
|
67
70
|
element: divRef.value as Element,
|
|
68
|
-
content:
|
|
71
|
+
content: model,
|
|
69
72
|
...defaultConfig,
|
|
70
73
|
...props.editorConfig,
|
|
71
74
|
onCreated: (editor: AiEditor) => {
|
|
72
|
-
editor.setContent(
|
|
75
|
+
editor.setContent(model.value || '')
|
|
73
76
|
},
|
|
74
77
|
}
|
|
75
78
|
// 隐藏工具栏
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</el-select> </el-form-item
|
|
52
52
|
></el-form>
|
|
53
53
|
</el-search>
|
|
54
|
-
<el-title title="指标列表" style="border-bottom: var(--border)"> </el-title>
|
|
54
|
+
<el-title title="指标列表" level="1" style="border-bottom: var(--border)"> </el-title>
|
|
55
55
|
<el-table
|
|
56
56
|
style="height: 100%; margin-bottom: 8px; margin-top: 8px"
|
|
57
57
|
border
|