zydx-plus 1.35.597 → 1.35.599
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/dragPopup2/src/dragPopup.vue +10 -1
- package/src/components/editor2/src/editor.vue +33 -20
- package/src/components/mind/src/mind.css +208 -0
- package/src/components/mind/src/mind.vue +264 -683
- package/src/components/mind/src/tool.vue +307 -0
- package/src/components/read/src/read.vue +60 -1
- package/src/components/tagging/src/tagging.css +13 -4
- package/src/components/tagging/src/tagging.vue +83 -17
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -63,6 +63,10 @@ export default {
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
props: {
|
|
66
|
+
isCustomizePosition: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false
|
|
69
|
+
},
|
|
66
70
|
isInitShowBottomRight: {
|
|
67
71
|
type: Boolean,
|
|
68
72
|
default: false
|
|
@@ -307,7 +311,12 @@ export default {
|
|
|
307
311
|
},
|
|
308
312
|
init() {
|
|
309
313
|
let that = this
|
|
310
|
-
if(this.
|
|
314
|
+
if (this.isCustomizePosition) {
|
|
315
|
+
this.x = this.left;
|
|
316
|
+
this.y = this.top
|
|
317
|
+
this.clientWidth = document.documentElement.clientWidth;
|
|
318
|
+
this.clientHeight = document.documentElement.clientHeight;
|
|
319
|
+
} else if(this.fixedStart) {
|
|
311
320
|
if(!this.isInitShowBottomRight) {
|
|
312
321
|
const wid = document.getElementById('app').offsetWidth
|
|
313
322
|
this.x = this.left + (wid-this.initWidth)/2
|
|
@@ -10,21 +10,22 @@
|
|
|
10
10
|
<slot name='titleSuffix'></slot>
|
|
11
11
|
</div>
|
|
12
12
|
<div class="ed-but" v-if="readOnly">
|
|
13
|
+
<slot name='leftToolBtn'></slot>
|
|
13
14
|
<div class="ed-head-but" v-for="(item,index) in toolbars" :key="index">
|
|
14
|
-
<button v-if="item.key === 'but'" class="buts" @click="item.onClick(item,info)"
|
|
15
|
-
:style="{color: (item.active)? '#4B0C77' :'#000'}">{{ item.title }}
|
|
15
|
+
<button v-if="item.key === 'but'" class="buts" @click="item.onClick(item,info)" :disabled="disabled"
|
|
16
|
+
:style="{color: (disabled) ? '#ccc' : (item.active)? '#4B0C77' :'#000'}">{{ item.title }}
|
|
16
17
|
</button>
|
|
17
18
|
<label v-else-if="item.key === 'upImg' || item.key === 'uploadAtt'">
|
|
18
|
-
<input type="file" @change="upload($event,item.key)"
|
|
19
|
-
:accept="(item.key === 'upImg')?'image/*':'.docx,.pptx,.pdf,.xlsx,.mp3,.mp4'" style="display: none;"
|
|
20
|
-
<span class="buts">{{ item.title }}</span>
|
|
21
|
-
</label>
|
|
22
|
-
<button v-else-if="item.key === 'paint'" class="buts" @click="toolTap('paint')">{{ item.title }}</button>
|
|
23
|
-
<button v-else-if="item.key === 'voice'" class="buts" @mousedown.stop="speechDown" @click="voice()"
|
|
24
|
-
:style="{color: (voiceStatus)? '#4B0C77' :'#000'}">{{ voiceStatus ? '关闭语音' : '语音输入' }}
|
|
19
|
+
<input type="file" @change="upload($event,item.key)" :disabled="disabled"
|
|
20
|
+
:accept="(item.key === 'upImg')?'image/*':'.docx,.pptx,.pdf,.xlsx,.mp3,.mp4'" style="display: none;"/>
|
|
21
|
+
<span class="buts" :style="{color: ( disabled) ? '#ccc':'#000'}">{{ item.title }}</span>
|
|
22
|
+
</label >
|
|
23
|
+
<button v-else-if="item.key === 'paint'" class="buts" @click="toolTap('paint')" :disabled="disabled">{{ item.title }}</button>
|
|
24
|
+
<button v-else-if="item.key === 'voice'" class="buts" @mousedown.stop="speechDown" :disabled="disabled" @click="voice()"
|
|
25
|
+
:style="{color: (disabled) ? '#ccc' : (voiceStatus)? '#4B0C77' :'#000'}">{{ voiceStatus ? '关闭语音' : '语音输入' }}
|
|
25
26
|
</button>
|
|
26
|
-
<button v-else-if="item.key === 'ai'" class="buts" @click="showAi">AI助手</button>
|
|
27
|
-
<button v-else class="buts" @click="toolTap(item.key)">{{ item.title }}</button>
|
|
27
|
+
<button v-else-if="item.key === 'ai'" class="buts" :disabled="disabled" @click="showAi">AI助手</button>
|
|
28
|
+
<button v-else class="buts" @click="toolTap(item.key)" :disabled="disabled">{{ item.title }}</button>
|
|
28
29
|
</div>
|
|
29
30
|
<slot name='toolBtn'></slot>
|
|
30
31
|
<button v-if="butText !== '' && readOnly" class="buts" @click="complete">{{ butText }}</button>
|
|
@@ -104,9 +105,9 @@
|
|
|
104
105
|
</div>
|
|
105
106
|
<div class="enclosure-item en-but">
|
|
106
107
|
<div style="display: inline-block; height: 21px;">
|
|
107
|
-
<button class="buts but-f" v-if="!item.name" @click="see(index)">{{downName[0] || '查看附件'}}</button>
|
|
108
|
-
<button class="buts but-f" v-if="!item.name&&downloadShow" @click="download(index)">{{downName[1] || '下载附件'}}</button>
|
|
109
|
-
<button class="buts but-f" v-if="delShow" @click="del(index)">
|
|
108
|
+
<button class="buts but-f" v-if="!item.name" :disabled="disabled" @click="see(index)">{{downName[0] || '查看附件'}}</button>
|
|
109
|
+
<button class="buts but-f" v-if="!item.name&&downloadShow" :disabled="disabled" @click="download(index)">{{downName[1] || '下载附件'}}</button>
|
|
110
|
+
<button class="buts but-f" v-if="delShow" @click="del(index)" :disabled="disabled">
|
|
110
111
|
<span v-if="item.active">{{downName[2] || '删除附件'}}</span>
|
|
111
112
|
<svg v-else xmlns="http://www.w3.org/2000/svg"
|
|
112
113
|
width="14"
|
|
@@ -141,7 +142,8 @@
|
|
|
141
142
|
</g>
|
|
142
143
|
</svg>
|
|
143
144
|
</button>
|
|
144
|
-
<button class="buts but-f" v-if="Object.keys(enclosureButton).length > 0"
|
|
145
|
+
<button class="buts but-f" :disabled="disabled" v-if="Object.keys(enclosureButton).length > 0"
|
|
146
|
+
@click="enclosureButton.onClick(item,index)">{{ enclosureButton.name }}</button>
|
|
145
147
|
</div>
|
|
146
148
|
</div>
|
|
147
149
|
</div>
|
|
@@ -346,6 +348,10 @@ export default {
|
|
|
346
348
|
type: Boolean,
|
|
347
349
|
default: false
|
|
348
350
|
},
|
|
351
|
+
disabled: {
|
|
352
|
+
type: Boolean,
|
|
353
|
+
default: false
|
|
354
|
+
},
|
|
349
355
|
enclosureButton: {
|
|
350
356
|
type: Object,
|
|
351
357
|
default: {}
|
|
@@ -380,14 +386,14 @@ export default {
|
|
|
380
386
|
deep: true
|
|
381
387
|
},
|
|
382
388
|
toolbar: {
|
|
383
|
-
handler: function (e
|
|
389
|
+
handler: function (e) {
|
|
384
390
|
let status = null
|
|
385
391
|
let upload = null
|
|
386
392
|
this.toolbars = []
|
|
387
393
|
e.forEach(x => {
|
|
388
394
|
if(x.key === 'but') {
|
|
389
395
|
status = x
|
|
390
|
-
} if (x.key === 'uploadAtt') {
|
|
396
|
+
} else if (x.key === 'uploadAtt') {
|
|
391
397
|
upload = x
|
|
392
398
|
}else {
|
|
393
399
|
this.toolbars.push(x)
|
|
@@ -400,6 +406,14 @@ export default {
|
|
|
400
406
|
if(this.isShowAiTool) this.toolbars.push({key: 'ai', title: 'AI助手'})
|
|
401
407
|
},
|
|
402
408
|
immediate: true
|
|
409
|
+
},
|
|
410
|
+
disabled: {
|
|
411
|
+
handler: function (e, oldVal) {
|
|
412
|
+
this.editor.setOptions({
|
|
413
|
+
editable: this.readOnly ?(!e):this.readOnly
|
|
414
|
+
})
|
|
415
|
+
},
|
|
416
|
+
deep: true
|
|
403
417
|
}
|
|
404
418
|
},
|
|
405
419
|
mounted() {
|
|
@@ -410,7 +424,7 @@ export default {
|
|
|
410
424
|
this.heightStyleCont = (this.height === '100%') ? {height: 'calc(100% - 44px)'} : {'min-height': `${height}px`}
|
|
411
425
|
this.editor = new Editor({
|
|
412
426
|
content: json2html({node: "root", child: this.dataChange(this.data).html }),
|
|
413
|
-
editable: this.readOnly,
|
|
427
|
+
editable: this.readOnly ?(!this.disabled):this.readOnly ,
|
|
414
428
|
enablePasteRules: true,
|
|
415
429
|
extensions: [
|
|
416
430
|
sid,
|
|
@@ -503,7 +517,6 @@ export default {
|
|
|
503
517
|
const clientX = e.clientX
|
|
504
518
|
const clientY = e.clientX
|
|
505
519
|
this.lastSelectedText = selectedText
|
|
506
|
-
console.log('selectedText', selectedText)
|
|
507
520
|
},
|
|
508
521
|
showAssets() {
|
|
509
522
|
this.$emit('assets')
|
|
@@ -1156,7 +1169,7 @@ export default {
|
|
|
1156
1169
|
}
|
|
1157
1170
|
|
|
1158
1171
|
.ed-head-but label span {
|
|
1159
|
-
line-height:
|
|
1172
|
+
line-height: 14px !important;
|
|
1160
1173
|
}
|
|
1161
1174
|
.ed-head-vertical{
|
|
1162
1175
|
overflow: hidden;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
:deep(.custom-select-options li) {
|
|
2
|
+
padding: 0 10px !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.table-left {
|
|
6
|
+
margin-right: 5px;
|
|
7
|
+
display: flex;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.node-s {
|
|
12
|
+
animation: nodeShow 0.3s;
|
|
13
|
+
display: block !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.node-h {
|
|
17
|
+
animation: nodeHide 0.3s;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@keyframes nodeHide {
|
|
21
|
+
0% {
|
|
22
|
+
opacity: 1;
|
|
23
|
+
transform: translateX(0);
|
|
24
|
+
}
|
|
25
|
+
100% {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
transform: translateX(110%);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes nodeShow {
|
|
32
|
+
0% {
|
|
33
|
+
opacity: 0;
|
|
34
|
+
transform: translateX(110%);
|
|
35
|
+
}
|
|
36
|
+
10% {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
transform: translateX(100%);
|
|
39
|
+
}
|
|
40
|
+
100% {
|
|
41
|
+
opacity: 1;
|
|
42
|
+
transform: translateX(0);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.zIndex {
|
|
47
|
+
position: relative;
|
|
48
|
+
z-index: 30;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.zIndex2 {
|
|
52
|
+
position: relative;
|
|
53
|
+
z-index: 33;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.zIndex3 {
|
|
57
|
+
position: relative;
|
|
58
|
+
z-index: 32;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.zIndex4 {
|
|
62
|
+
position: relative;
|
|
63
|
+
z-index: 31;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.backColor {
|
|
67
|
+
width: 93px;
|
|
68
|
+
height: 30px;
|
|
69
|
+
border: 1px solid #ccc;
|
|
70
|
+
border-radius: 3px;
|
|
71
|
+
margin-left: -40px;
|
|
72
|
+
box-shadow: 0 1px 0 1px rgb(0 0 0 / 4%);
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
background-color: #549688;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.back-col {
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: 0;
|
|
80
|
+
left: 60px;
|
|
81
|
+
z-index: 40;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.node-but {
|
|
85
|
+
display: flex;
|
|
86
|
+
padding: 5px 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.node-but button {
|
|
90
|
+
flex: 1;
|
|
91
|
+
margin-right: 5px;
|
|
92
|
+
background-color: #fff;
|
|
93
|
+
border: 1px solid #ccc;
|
|
94
|
+
border-radius: 3px;
|
|
95
|
+
padding: 5px 10px;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
font-size: 12px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.node-but button:last-child {
|
|
101
|
+
margin: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.style-title {
|
|
105
|
+
font-size: 16px;
|
|
106
|
+
font-weight: bold;
|
|
107
|
+
padding: 5px 0 10px 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.mind {
|
|
111
|
+
width: 100%;
|
|
112
|
+
height: 100%;
|
|
113
|
+
position: relative;
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.mind-table {
|
|
118
|
+
background-color: #fff;
|
|
119
|
+
border-radius: 5px;
|
|
120
|
+
box-shadow: rgba(0, 0, 0, 0.06) 0 2px 16px 0;
|
|
121
|
+
z-index: 10;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.style-li {
|
|
125
|
+
position: relative;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.style-li img {
|
|
129
|
+
position: absolute;
|
|
130
|
+
top: 0;
|
|
131
|
+
right: 0;
|
|
132
|
+
z-index: 1;
|
|
133
|
+
width: 15px;
|
|
134
|
+
height: 15px;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.style-list {
|
|
139
|
+
display: flex;
|
|
140
|
+
padding: 5px 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.node-left {
|
|
144
|
+
display: flex;
|
|
145
|
+
padding-right: 10px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.node-left > span {
|
|
149
|
+
display: inline-block;
|
|
150
|
+
width: 80px;
|
|
151
|
+
line-height: 32px;
|
|
152
|
+
padding-right: 10px;
|
|
153
|
+
box-sizing: border-box;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.padd {
|
|
157
|
+
padding-right: 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.node-style {
|
|
161
|
+
position: absolute;
|
|
162
|
+
right: 0;
|
|
163
|
+
top: 50%;
|
|
164
|
+
background-color: #fff;
|
|
165
|
+
border-bottom-left-radius: 5px;
|
|
166
|
+
border-top-left-radius: 5px;
|
|
167
|
+
padding: 20px;
|
|
168
|
+
box-shadow: rgba(0, 0, 0, 0.06) 0 2px 16px 0;
|
|
169
|
+
z-index: 11;
|
|
170
|
+
width: 320px;
|
|
171
|
+
height: 550px;
|
|
172
|
+
margin-top: -270px;
|
|
173
|
+
display: none;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.mind-table button {
|
|
177
|
+
background-color: #fff;
|
|
178
|
+
border: 1px solid #ccc;
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
font-size: 14px;
|
|
181
|
+
height: 30px;
|
|
182
|
+
line-height: 30px;
|
|
183
|
+
flex: 1;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.mind-table button:last-child {
|
|
187
|
+
margin-right: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.mindMapContainer {
|
|
191
|
+
width: 100%;
|
|
192
|
+
height: 100%;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
:deep(.custom-select) {
|
|
196
|
+
width: 94px;
|
|
197
|
+
margin-left: -40px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.full-screen {
|
|
201
|
+
background: #fff;
|
|
202
|
+
width: 100vw;
|
|
203
|
+
height: 100vh;
|
|
204
|
+
position: fixed;
|
|
205
|
+
top: 0;
|
|
206
|
+
left: 0;
|
|
207
|
+
z-index: 100;
|
|
208
|
+
}
|