zydx-plus 1.13.54 → 1.13.56
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,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<we-toolbar v-if="!readOnly && toolbar.length > 0" class="toolbar" :handle="handle" />
|
|
3
|
-
<we-editable class="editable" :style="{'min-height': height + 'px'}" :handle="handle" v-model:
|
|
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
|
-
<button class="def-but" @click="confirm">完成</button>
|
|
5
|
+
<button class="def-but" v-if="butShow" @click="confirm">完成</button>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
8
8
|
<script>
|
|
@@ -39,6 +39,10 @@ export default defineComponent({
|
|
|
39
39
|
type: Boolean,
|
|
40
40
|
default: true
|
|
41
41
|
},
|
|
42
|
+
butShow: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: true
|
|
45
|
+
},
|
|
42
46
|
toolbar: {
|
|
43
47
|
type: Array,
|
|
44
48
|
default: []
|
|
@@ -100,14 +104,13 @@ export default defineComponent({
|
|
|
100
104
|
})
|
|
101
105
|
// 不要使用 reactive/ref,应该使用 shallowReactive/shallowRef 来接收 json array 数据
|
|
102
106
|
const formData = shallowReactive({html: ''})
|
|
103
|
-
console.log(opts)
|
|
104
107
|
setTimeout(() => {
|
|
105
108
|
for (let i = 0; i < props.menusText.length; i++) {
|
|
106
109
|
let indexs = findIndexByKey(menuModule.menus,props.menusText[i]['key'])
|
|
107
110
|
menuModule.menus[indexs].factory(props.menusText[i])
|
|
108
111
|
}
|
|
109
112
|
},0)
|
|
110
|
-
|
|
113
|
+
// 根据key值查询数组索引
|
|
111
114
|
function findIndexByKey(arr, value) {
|
|
112
115
|
for (let i = 0; i < arr.length; i++) {
|
|
113
116
|
if (arr[i]['key'] === value) {
|