zydx-plus 1.18.79 → 1.18.80
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<we-toolbar v-
|
|
2
|
+
<we-toolbar v-show="!readOnly && toolbar.length > 0" class="toolbar" :handle="handle" />
|
|
3
3
|
<we-editable class="editable" :style="{'min-height': height + 'px'}" :handle="handle" v-model:json="formData.html" />
|
|
4
4
|
<div class="but" v-if="!readOnly && toolbar.length > 0">
|
|
5
5
|
<button class="def-but" v-if="butShow" @click="confirm">完成</button>
|
|
@@ -64,12 +64,19 @@ export default defineComponent({
|
|
|
64
64
|
watch: {
|
|
65
65
|
html() {
|
|
66
66
|
this.formData.html = this.html
|
|
67
|
+
},
|
|
68
|
+
readOnly(e) {
|
|
69
|
+
this.opts.editable.config.readOnly = e
|
|
67
70
|
}
|
|
68
71
|
},
|
|
69
72
|
methods: {
|
|
70
73
|
confirm() {
|
|
71
74
|
this.syncContent() //强制同步数据
|
|
72
75
|
this.$emit('confirm', this.formData.html)
|
|
76
|
+
},
|
|
77
|
+
getContent() {
|
|
78
|
+
this.syncContent() //强制同步数据
|
|
79
|
+
return this.formData.html
|
|
73
80
|
}
|
|
74
81
|
},
|
|
75
82
|
mounted() {
|
|
@@ -124,7 +131,7 @@ export default defineComponent({
|
|
|
124
131
|
}
|
|
125
132
|
return -1
|
|
126
133
|
}
|
|
127
|
-
return { handle, formData, syncContent }
|
|
134
|
+
return { opts, handle, formData, syncContent }
|
|
128
135
|
}
|
|
129
136
|
})
|
|
130
137
|
</script>
|