zydx-plus 1.12.48 → 1.12.50
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
|
@@ -11,6 +11,10 @@ export default defineComponent({
|
|
|
11
11
|
accordian: {
|
|
12
12
|
type: Boolean,
|
|
13
13
|
default: false
|
|
14
|
+
},
|
|
15
|
+
reset: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false
|
|
14
18
|
}
|
|
15
19
|
},
|
|
16
20
|
data() {
|
|
@@ -41,7 +45,7 @@ export default defineComponent({
|
|
|
41
45
|
if (disabled) return
|
|
42
46
|
let file = event.target.files[0]
|
|
43
47
|
if (file.size > file_size * 1024 * 1024) {
|
|
44
|
-
this.$
|
|
48
|
+
this.$message({
|
|
45
49
|
title: '提示',
|
|
46
50
|
promptContent: `文件大小不能超过${file_size}M`,
|
|
47
51
|
cancelShow: false,
|
|
@@ -49,7 +53,7 @@ export default defineComponent({
|
|
|
49
53
|
return
|
|
50
54
|
}
|
|
51
55
|
if (accept.length && !accept.includes(file.type)) {
|
|
52
|
-
this.$
|
|
56
|
+
this.$message({
|
|
53
57
|
title: '提示',
|
|
54
58
|
promptContent: `请选择${accept.join('、')}格式的文件`,
|
|
55
59
|
cancelShow: false,
|
|
@@ -68,15 +72,23 @@ export default defineComponent({
|
|
|
68
72
|
this.$emit('search', this.$el.querySelector('.search_input').value)
|
|
69
73
|
},
|
|
70
74
|
},
|
|
75
|
+
watch: {
|
|
76
|
+
reset: function (v) {
|
|
77
|
+
if (v) {
|
|
78
|
+
this.active_state = this.buttons.map(() => false)
|
|
79
|
+
this.is_show_search = false
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
71
83
|
render() {
|
|
72
84
|
const { trackClick, onInputChange, showSearch, handleSearch, handleClose, is_show_search } = this
|
|
73
|
-
const render = ({ type, name, accept = '', file_size, flip = null, onClick, disabled, idx }) => {
|
|
85
|
+
const render = ({ type, name, accept = '', file_size, flip = null, ignore = false, onClick, disabled, idx }) => {
|
|
74
86
|
let active_name = flip ? flip : name
|
|
75
87
|
switch (type) {
|
|
76
88
|
case 'button':
|
|
77
89
|
return <button
|
|
78
90
|
class={this.active_state[idx] ? 'z-button active' : 'z-button'}
|
|
79
|
-
onClick={() => { onClick(); trackClick(idx) }
|
|
91
|
+
onClick={() => { onClick(); ignore ? () => null : trackClick(idx) }
|
|
80
92
|
}
|
|
81
93
|
disabled={disabled}
|
|
82
94
|
>
|
|
@@ -116,8 +128,8 @@ export default defineComponent({
|
|
|
116
128
|
<div class="z-button-group">
|
|
117
129
|
{
|
|
118
130
|
this.buttons
|
|
119
|
-
.map(({ onClick, disabled, file_size, accept, flip, type = "button", name }, idx) => {
|
|
120
|
-
return render({ type, name, accept, file_size, flip, onClick, disabled, idx })
|
|
131
|
+
.map(({ onClick, disabled, file_size, accept, flip, ignore, type = "button", name }, idx) => {
|
|
132
|
+
return render({ type, name, accept, file_size, flip, ignore, onClick, disabled, idx })
|
|
121
133
|
}
|
|
122
134
|
)
|
|
123
135
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<we-toolbar v-if="!readOnly && toolbar.length > 0" class="toolbar" :handle="handle" />
|
|
3
3
|
<we-editable class="editable" :style="{'min-height': height + 'px'}" :handle="handle" v-model:html="formData.html" />
|
|
4
|
-
<div class="but">
|
|
4
|
+
<div class="but" v-if="!readOnly && toolbar.length > 0">
|
|
5
5
|
<button class="def-but" @click="confirm">完成</button>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|