zydx-plus 1.19.85 → 1.19.87
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 +1 -1
- package/src/components/editor2/src/editor.vue +57 -12
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -24,12 +24,48 @@
|
|
|
24
24
|
<p v-if="editorShow">附件列表:</p>
|
|
25
25
|
<div class="enclosure-list" v-for="(item,index) in uploadAttData">
|
|
26
26
|
<div class="enclosure-item">
|
|
27
|
-
<span>{{ index + 1 }}. {{ (
|
|
27
|
+
<span>{{ index + 1 }}. {{ (item.name)? item.name : item.fileName }}</span>
|
|
28
28
|
</div>
|
|
29
29
|
<div class="enclosure-item en-but">
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
<div style="display: inline-block; height: 21px;">
|
|
31
|
+
<button class="but but-f" v-if="!item.name" @click="see(index)">查看</button>
|
|
32
|
+
<button class="but but-f" v-if="!item.name" @click="download(index)">下载</button>
|
|
33
|
+
<button class="but but-f" v-if="delShow" :style="{'line-height': delStast? '17px':'21px'}" @click="del(index)">
|
|
34
|
+
<span v-if="delStast">删除</span>
|
|
35
|
+
<svg v-else xmlns="http://www.w3.org/2000/svg"
|
|
36
|
+
width="14"
|
|
37
|
+
height="14"
|
|
38
|
+
viewBox="0 0 24 24">
|
|
39
|
+
<g fill="none"
|
|
40
|
+
stroke="black"
|
|
41
|
+
stroke-linecap="round"
|
|
42
|
+
stroke-width="2">
|
|
43
|
+
<path stroke-dasharray="60"
|
|
44
|
+
stroke-dashoffset="60"
|
|
45
|
+
stroke-opacity=".3"
|
|
46
|
+
d="M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3Z">
|
|
47
|
+
<animate fill="freeze"
|
|
48
|
+
attributeName="stroke-dashoffset"
|
|
49
|
+
dur="1.3s"
|
|
50
|
+
values="60;0" />
|
|
51
|
+
</path>
|
|
52
|
+
<path stroke-dasharray="15"
|
|
53
|
+
stroke-dashoffset="15"
|
|
54
|
+
d="M12 3C16.9706 3 21 7.02944 21 12">
|
|
55
|
+
<animate fill="freeze"
|
|
56
|
+
attributeName="stroke-dashoffset"
|
|
57
|
+
dur="0.3s"
|
|
58
|
+
values="15;0" />
|
|
59
|
+
<animateTransform attributeName="transform"
|
|
60
|
+
dur="1.5s"
|
|
61
|
+
repeatCount="indefinite"
|
|
62
|
+
type="rotate"
|
|
63
|
+
values="0 12 12;360 12 12" />
|
|
64
|
+
</path>
|
|
65
|
+
</g>
|
|
66
|
+
</svg>
|
|
67
|
+
</button>
|
|
68
|
+
</div>
|
|
33
69
|
</div>
|
|
34
70
|
</div>
|
|
35
71
|
</div>
|
|
@@ -51,7 +87,8 @@ export default {
|
|
|
51
87
|
uploadAttData: [],
|
|
52
88
|
editor: null,
|
|
53
89
|
heightStyle: {},
|
|
54
|
-
heightStyleCont: {}
|
|
90
|
+
heightStyleCont: {},
|
|
91
|
+
delStast: true
|
|
55
92
|
};
|
|
56
93
|
},
|
|
57
94
|
beforeUnmount() {
|
|
@@ -102,17 +139,13 @@ export default {
|
|
|
102
139
|
type: Boolean,
|
|
103
140
|
default: true
|
|
104
141
|
},
|
|
105
|
-
seeShow: {
|
|
106
|
-
type: Boolean,
|
|
107
|
-
default: true
|
|
108
|
-
},
|
|
109
142
|
titleShow: {
|
|
110
143
|
type: Boolean,
|
|
111
144
|
default: true
|
|
112
145
|
},
|
|
113
146
|
uploadType: {
|
|
114
147
|
type: Boolean,
|
|
115
|
-
default:
|
|
148
|
+
default: true
|
|
116
149
|
},
|
|
117
150
|
info: {
|
|
118
151
|
type: String,
|
|
@@ -123,7 +156,7 @@ export default {
|
|
|
123
156
|
default: true
|
|
124
157
|
}
|
|
125
158
|
},
|
|
126
|
-
emits: ['see','complete','update:data'],
|
|
159
|
+
emits: ['see','del','complete','update:data'],
|
|
127
160
|
watch:{
|
|
128
161
|
data(e) {
|
|
129
162
|
this.editor.commands.setContent(json2html({node: "root",child: (e.html === undefined)? [] : e.html}))
|
|
@@ -151,7 +184,15 @@ export default {
|
|
|
151
184
|
},
|
|
152
185
|
methods: {
|
|
153
186
|
del(index) {
|
|
154
|
-
this.uploadAttData.
|
|
187
|
+
if(this.uploadAttData[index].name === undefined) {
|
|
188
|
+
this.delStast = false
|
|
189
|
+
this.$emit('del', this.uploadAttData[index], () => {
|
|
190
|
+
this.delStast = true
|
|
191
|
+
this.uploadAttData.splice(index, 1)
|
|
192
|
+
})
|
|
193
|
+
}else {
|
|
194
|
+
this.uploadAttData.splice(index, 1)
|
|
195
|
+
}
|
|
155
196
|
},
|
|
156
197
|
see(index) {
|
|
157
198
|
this.$emit('see', this.uploadAttData[index])
|
|
@@ -346,5 +387,9 @@ export default {
|
|
|
346
387
|
padding: 2px 5px;
|
|
347
388
|
cursor: pointer;
|
|
348
389
|
min-width: 60px;
|
|
390
|
+
height: 21px;
|
|
391
|
+
}
|
|
392
|
+
.but-f{
|
|
393
|
+
float: left;
|
|
349
394
|
}
|
|
350
395
|
</style>
|