@truenewx/tnxvue3 3.0.0-alpha.25 → 3.0.0-alpha.27
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truenewx/tnxvue3",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.27",
|
|
4
4
|
"description": "互联网技术解决方案:Vue3扩展支持",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"vue-router": "~4.4.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@truenewx/tnxcore": "3.0.0-alpha.
|
|
27
|
+
"@truenewx/tnxcore": "3.0.0-alpha.15",
|
|
28
28
|
"@element-plus/icons-vue": "2.3.1",
|
|
29
29
|
"async-validator": "4.2.5",
|
|
30
30
|
"mitt": "3.0.1"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-tooltip :content="tooltipContent" :placement="tooltipPlacement" :disabled="disabled || !tooltipContent"
|
|
3
|
-
|
|
3
|
+
v-if="disabled === false || disabledTip !== false">
|
|
4
4
|
<el-dropdown split-button :type="type" :class="className" :disabled="disabled" :title="title" :size="size"
|
|
5
|
-
|
|
5
|
+
:style="$attrs.style" @click="clickButton" @command="clickItem" v-if="dropdownItems.length">
|
|
6
6
|
<i :class="icon" style="margin-right: 0.5rem;" v-if="icon"></i>
|
|
7
7
|
<template v-if="!hiddenCaption">
|
|
8
8
|
<slot v-if="$slots.default"></slot>
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
<template #dropdown>
|
|
12
12
|
<el-dropdown-menu>
|
|
13
13
|
<el-dropdown-item v-for="dropdownItem of dropdownItems" :key="dropdownItem.path"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
:icon="dropdownItem.icon" :disabled="dropdownItem.disabled"
|
|
15
|
+
:title="dropdownItem.title"
|
|
16
|
+
:command="dropdownItem">
|
|
17
17
|
{{ dropdownItem.caption || (dropdownItem.menuItem ? dropdownItem.menuItem.caption : '') }}
|
|
18
18
|
</el-dropdown-item>
|
|
19
19
|
</el-dropdown-menu>
|
|
20
20
|
</template>
|
|
21
21
|
</el-dropdown>
|
|
22
22
|
<el-button :type="type" :class="className" :disabled="disabled" :title="title" @click="clickButton" :size="size"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
:loading="loading" :plain="plain" :link="link" :bg="bg" :autofocus="autofocus"
|
|
24
|
+
:round="round"
|
|
25
|
+
:circle="circle" :style="$attrs.style" v-else>
|
|
26
26
|
<tnxel-icon :value="icon" v-if="icon"/>
|
|
27
27
|
<span v-if="!hiddenCaption && ($slots.default || menuItem)">
|
|
28
28
|
<slot>{{ menuItem ? menuItem.caption : '' }}</slot>
|
|
@@ -56,7 +56,6 @@ export default {
|
|
|
56
56
|
loading: Boolean,
|
|
57
57
|
plain: Boolean,
|
|
58
58
|
link: Boolean,
|
|
59
|
-
text: Boolean,
|
|
60
59
|
bg: Boolean,
|
|
61
60
|
autofocus: Boolean,
|
|
62
61
|
round: Boolean,
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tnxel-edit-table-container" :id="id">
|
|
3
|
+
<el-table ref="table"
|
|
4
|
+
class="tnxel-edit-table"
|
|
5
|
+
:class="{'padding-none': !padding}"
|
|
6
|
+
:data="data"
|
|
7
|
+
:highlight-current-row="selectable"
|
|
8
|
+
border
|
|
9
|
+
@current-change="onSelectRow"
|
|
10
|
+
>
|
|
11
|
+
<slot></slot>
|
|
12
|
+
<el-table-column label="排序" align="center" width="60px" v-if="sortable">
|
|
13
|
+
<template #default="scope">
|
|
14
|
+
<tnxel-button
|
|
15
|
+
type="primary" link
|
|
16
|
+
icon="Top"
|
|
17
|
+
:class="{'text-transparent': scope.$index === 0}"
|
|
18
|
+
@click="sortUp(scope.$index)"
|
|
19
|
+
/>
|
|
20
|
+
<tnxel-button
|
|
21
|
+
type="primary" link
|
|
22
|
+
icon="Bottom"
|
|
23
|
+
class="ms-0"
|
|
24
|
+
:class="{'text-transparent': scope.$index === data.length - 1}"
|
|
25
|
+
@click="sortDown(scope.$index)"
|
|
26
|
+
/>
|
|
27
|
+
</template>
|
|
28
|
+
</el-table-column>
|
|
29
|
+
<el-table-column label="移除" align="center" width="60px" v-if="removable">
|
|
30
|
+
<template #default="scope">
|
|
31
|
+
<tnxel-button
|
|
32
|
+
type="primary" link
|
|
33
|
+
icon="CircleClose"
|
|
34
|
+
:tooltip="scope.row.removeTip"
|
|
35
|
+
@click="toRemoveRow(scope.$index)"
|
|
36
|
+
/>
|
|
37
|
+
</template>
|
|
38
|
+
</el-table-column>
|
|
39
|
+
</el-table>
|
|
40
|
+
<div class="tnxel-edit-table-footer" v-if="addable">
|
|
41
|
+
<tnxel-button type="primary" link icon="Plus" @click="toAddRow">{{ addText }}</tnxel-button>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script>
|
|
47
|
+
import Button from '../button/Button.vue';
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
components: {
|
|
51
|
+
'tnxel-button': Button,
|
|
52
|
+
},
|
|
53
|
+
name: 'TnxelEditTable',
|
|
54
|
+
props: {
|
|
55
|
+
data: Array,
|
|
56
|
+
addable: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: true,
|
|
59
|
+
},
|
|
60
|
+
removable: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: true,
|
|
63
|
+
},
|
|
64
|
+
addText: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: '添加行',
|
|
67
|
+
},
|
|
68
|
+
newRow: {
|
|
69
|
+
type: Function,
|
|
70
|
+
default() {
|
|
71
|
+
return () => {
|
|
72
|
+
return {};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
selectable: Boolean, // 可否选择行
|
|
77
|
+
padding: Boolean, // 单元格中是否有边距
|
|
78
|
+
sortable: Boolean, // 可否调整行的顺序
|
|
79
|
+
rules: [String, Object], // 加载字段校验规则的URL地址,或规则集对象
|
|
80
|
+
rulesApp: { // 加载字段校验规则的应用名称
|
|
81
|
+
type: String,
|
|
82
|
+
default: () => window.tnx.componentDefaultApp, // 设置为方法以延时加载,确保更改的值生效
|
|
83
|
+
},
|
|
84
|
+
rulesLoaded: Function, // 规则集加载后的附加处理函数,仅在rule为字符串类型的URL地址时有效
|
|
85
|
+
},
|
|
86
|
+
data() {
|
|
87
|
+
return {
|
|
88
|
+
id: window.tnx.util.string.uuid32(),
|
|
89
|
+
selectedRow: null,
|
|
90
|
+
validationRules: {},
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
watch: {
|
|
94
|
+
data(newData, oldData) {
|
|
95
|
+
if (!oldData) {
|
|
96
|
+
this.$nextTick(() => {
|
|
97
|
+
this.initElements();
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
rules() {
|
|
102
|
+
this.initRules();
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
mounted() {
|
|
106
|
+
if (this.selectable) {
|
|
107
|
+
window.tnx.util.dom.replaceKeyEvent(document, () => {
|
|
108
|
+
if (this.selectedRow) {
|
|
109
|
+
this.data.remove(record => record === this.selectedRow);
|
|
110
|
+
}
|
|
111
|
+
}, {key: 'Delete'});
|
|
112
|
+
}
|
|
113
|
+
this.$nextTick(() => {
|
|
114
|
+
setTimeout(() => {
|
|
115
|
+
this.initElements();
|
|
116
|
+
this.initRules();
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
methods: {
|
|
121
|
+
initElements() {
|
|
122
|
+
this.focusRowFirstInput(0);
|
|
123
|
+
// 为富文本输入框添加默认title
|
|
124
|
+
let table = this.$refs.table.$el;
|
|
125
|
+
let textareas = table.getElementsByTagName('textarea');
|
|
126
|
+
for (let textarea of textareas) {
|
|
127
|
+
if (!textarea.title) {
|
|
128
|
+
textarea.addEventListener('input', event => {
|
|
129
|
+
event.target.title = event.target.value;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
initRules() {
|
|
135
|
+
if (this.rules) {
|
|
136
|
+
if (typeof this.rules === 'string') {
|
|
137
|
+
window.tnx.app.rpc.getMeta(this.rules, meta => {
|
|
138
|
+
if (this.rulesLoaded) {
|
|
139
|
+
this.rulesLoaded(meta.$rules);
|
|
140
|
+
} else {
|
|
141
|
+
this.$emit('rules-loaded', meta.$rules);
|
|
142
|
+
}
|
|
143
|
+
this.validationRules = meta.$rules;
|
|
144
|
+
this.bindRules();
|
|
145
|
+
}, this.rulesApp);
|
|
146
|
+
} else {
|
|
147
|
+
this.validationRules = this.rules;
|
|
148
|
+
this.bindRules();
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
this.validationRules = {};
|
|
152
|
+
this.bindRules();
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
loopColumns(consumer) {
|
|
156
|
+
let columns = this.$slots.default();
|
|
157
|
+
if (Array.isArray(columns)) {
|
|
158
|
+
let containers = document.getElementsByClassName('tnxel-edit-table-container');
|
|
159
|
+
for (let container of containers) {
|
|
160
|
+
if (container.id === this.id) {
|
|
161
|
+
let cols = container.querySelectorAll('.el-table__header colgroup col');
|
|
162
|
+
if (cols.length >= columns.length) {
|
|
163
|
+
for (let i = 0; i < columns.length; i++) {
|
|
164
|
+
let column = columns[i];
|
|
165
|
+
let props = column.props;
|
|
166
|
+
let fieldName = props.prop;
|
|
167
|
+
let columnName = cols[i].getAttribute('name');
|
|
168
|
+
consumer(fieldName, columnName);
|
|
169
|
+
}
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return false;
|
|
177
|
+
},
|
|
178
|
+
loopValidatableElements(consumer) {
|
|
179
|
+
this.loopColumns((fieldName, columnName) => {
|
|
180
|
+
if (this.validationRules[fieldName]) {
|
|
181
|
+
let tds = this.$refs.table.$el.getElementsByClassName(columnName);
|
|
182
|
+
for (let td of tds) {
|
|
183
|
+
let elements = td.getElementsByTagName('input');
|
|
184
|
+
if (elements.length === 0) {
|
|
185
|
+
elements = td.getElementsByTagName('textarea');
|
|
186
|
+
}
|
|
187
|
+
for (let element of elements) {
|
|
188
|
+
consumer(fieldName, element);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
},
|
|
194
|
+
bindRules() {
|
|
195
|
+
this.loopValidatableElements((fieldName, element) => {
|
|
196
|
+
element.addEventListener('blur', event => {
|
|
197
|
+
let element = event.target;
|
|
198
|
+
this.validateElement(fieldName, element);
|
|
199
|
+
});
|
|
200
|
+
element.addEventListener('focus', event => {
|
|
201
|
+
this.removeErrorIcon(event.target);
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
this.loopColumns((fieldName, columnName) => {
|
|
205
|
+
let rules = this.validationRules[fieldName];
|
|
206
|
+
if (rules) {
|
|
207
|
+
for (let rule of rules) {
|
|
208
|
+
if (rule.required) {
|
|
209
|
+
let th = this.$refs.table.$el.querySelector('th.' + columnName);
|
|
210
|
+
if (th) {
|
|
211
|
+
th.classList.add('is-required');
|
|
212
|
+
}
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
validateElement(fieldName, element) {
|
|
220
|
+
this.removeErrorIcon(element);
|
|
221
|
+
element.parentElement.classList.remove('is-error');
|
|
222
|
+
|
|
223
|
+
let rules = {};
|
|
224
|
+
rules[fieldName] = this.validationRules[fieldName];
|
|
225
|
+
let model = {};
|
|
226
|
+
model[fieldName] = element.value;
|
|
227
|
+
let successful = true;
|
|
228
|
+
window.tnx.app.validator.validate(rules, model, errors => {
|
|
229
|
+
if (errors) {
|
|
230
|
+
successful = false;
|
|
231
|
+
let message = '';
|
|
232
|
+
for (let error of errors) {
|
|
233
|
+
message += error.message + '\n';
|
|
234
|
+
}
|
|
235
|
+
message = message.trim();
|
|
236
|
+
element.parentElement.classList.add('is-error');
|
|
237
|
+
let icon = document.createElement('i');
|
|
238
|
+
icon.classList.add('error-icon');
|
|
239
|
+
icon.classList.add('el-icon'); // TODO
|
|
240
|
+
icon.classList.add('text-danger');
|
|
241
|
+
icon.title = message;
|
|
242
|
+
icon.style.top = (element.parentElement.offsetHeight - 16) / 2 + 'px';
|
|
243
|
+
element.parentElement.appendChild(icon);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
return successful;
|
|
247
|
+
},
|
|
248
|
+
validateTable() {
|
|
249
|
+
let successful = true;
|
|
250
|
+
this.loopValidatableElements((fieldName, element) => {
|
|
251
|
+
let validated = this.validateElement(fieldName, element);
|
|
252
|
+
successful = validated && successful;
|
|
253
|
+
});
|
|
254
|
+
return successful;
|
|
255
|
+
},
|
|
256
|
+
removeErrorIcon(inputElement) {
|
|
257
|
+
let sibling = inputElement.nextSibling;
|
|
258
|
+
while (sibling) {
|
|
259
|
+
if (sibling.classList && sibling.classList.contains('error-icon')) {
|
|
260
|
+
sibling.remove();
|
|
261
|
+
}
|
|
262
|
+
sibling = sibling.nextSibling;
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
onSelectRow(row) {
|
|
266
|
+
if (this.selectable) {
|
|
267
|
+
this.selectedRow = row;
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
focusRowFirstInput(rowIndex) {
|
|
271
|
+
let table = this.$refs.table.$el;
|
|
272
|
+
let rows = table.getElementsByClassName('el-table__row');
|
|
273
|
+
if (rows.length) {
|
|
274
|
+
let row = rows[rowIndex];
|
|
275
|
+
if (row) {
|
|
276
|
+
let cells = row.getElementsByClassName('cell');
|
|
277
|
+
for (let cell of cells) {
|
|
278
|
+
let input = cell.querySelector('input:first-child');
|
|
279
|
+
if (input) {
|
|
280
|
+
input.focus();
|
|
281
|
+
return true;
|
|
282
|
+
} else {
|
|
283
|
+
let textarea = cell.querySelector('textarea:first-child');
|
|
284
|
+
if (textarea) {
|
|
285
|
+
textarea.focus();
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return false;
|
|
293
|
+
},
|
|
294
|
+
toAddRow() {
|
|
295
|
+
let row = this.newRow();
|
|
296
|
+
this.data.push(row);
|
|
297
|
+
this.$nextTick(() => {
|
|
298
|
+
this.focusRowFirstInput(this.data.length - 1);
|
|
299
|
+
});
|
|
300
|
+
},
|
|
301
|
+
toRemoveRow(index) {
|
|
302
|
+
let row = this.data[index];
|
|
303
|
+
this.data.splice(index, 1);
|
|
304
|
+
this.$emit('removed', row, index);
|
|
305
|
+
this.$nextTick(() => {
|
|
306
|
+
if (!this.focusRowFirstInput(index)) {
|
|
307
|
+
this.focusRowFirstInput(index - 1);
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
},
|
|
311
|
+
sortDown(index) {
|
|
312
|
+
if (0 <= index && index < this.data.length - 1) {
|
|
313
|
+
let deleted = this.data.splice(index, 1);
|
|
314
|
+
this.data.splice(index + 1, 0, deleted[0]);
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
sortUp(index) {
|
|
318
|
+
if (0 < index && index < this.data.length) {
|
|
319
|
+
let deleted = this.data.splice(index, 1);
|
|
320
|
+
this.data.splice(index - 1, 0, deleted[0]);
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
</script>
|
|
326
|
+
|
|
327
|
+
<style>
|
|
328
|
+
.tnxel-edit-table-container .el-table.padding-none .el-table__body-wrapper .el-table__cell,
|
|
329
|
+
.tnxel-edit-table-container .el-table.padding-none .el-table__body-wrapper td .cell,
|
|
330
|
+
.tnxel-edit-table-container .el-table--border.padding-none .el-table__body-wrapper td.el-table__cell:first-child .cell {
|
|
331
|
+
padding: 0;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.tnxel-edit-table-container .el-table.padding-none .el-table__body-wrapper .el-input__wrapper,
|
|
335
|
+
.tnxel-edit-table-container .el-table.padding-none .el-table__body-wrapper .el-select__wrapper {
|
|
336
|
+
border-radius: 0;
|
|
337
|
+
height: 32px;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.tnxel-edit-table-container .el-table.padding-none .el-table__body-wrapper .el-textarea__wrapper {
|
|
341
|
+
border-radius: 0;
|
|
342
|
+
height: 40px;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.tnxel-edit-table-container .tnxel-edit-table .is-center .el-input__inner {
|
|
346
|
+
text-align: center;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.tnxel-edit-table-container .tnxel-edit-table .is-right .el-input__inner {
|
|
350
|
+
text-align: right;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.tnxel-edit-table-container .tnxel-edit-table .el-cascader .el-input__inner {
|
|
354
|
+
text-align: left;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.tnxel-edit-table-container .el-table.padding-none .el-table__body-wrapper .el-input__inner:focus,
|
|
358
|
+
.tnxel-edit-table-container .el-table.padding-none .el-table__body-wrapper .el-textarea__inner:focus {
|
|
359
|
+
border-color: var(--el-color-primary);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.tnxel-edit-table-container .el-table .is-error .el-input__inner,
|
|
363
|
+
.tnxel-edit-table-container .el-table .is-error .el-textarea__inner {
|
|
364
|
+
border-color: var(--el-color-danger);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.tnxel-edit-table-container .el-table th.is-required:not(.is-no-asterisk) .cell:after {
|
|
368
|
+
content: "*";
|
|
369
|
+
color: var(--el-color-danger);
|
|
370
|
+
margin-left: 4px;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.tnxel-edit-table-container .el-table .is-error .error-icon {
|
|
374
|
+
position: absolute;
|
|
375
|
+
top: 12px;
|
|
376
|
+
right: 10px;
|
|
377
|
+
font-size: 16px;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.tnxel-edit-table-container .el-table .el-input__inner:focus + .error-icon,
|
|
381
|
+
.tnxel-edit-table-container .el-table .el-textarea__inner:focus + .error-icon {
|
|
382
|
+
display: none;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.tnxel-edit-table-container .el-table .el-button.text-transparent {
|
|
386
|
+
cursor: default;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.tnxel-edit-table-container .el-table .disabled {
|
|
390
|
+
cursor: not-allowed;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.tnxel-edit-table-container .tnxel-edit-table-footer {
|
|
394
|
+
border-left: 1px solid var(--el-border-color);
|
|
395
|
+
border-right: 1px solid var(--el-border-color);
|
|
396
|
+
border-bottom: 1px solid var(--el-border-color);
|
|
397
|
+
height: 32px;
|
|
398
|
+
display: flex;
|
|
399
|
+
align-items: center;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.tnxel-edit-table-container .tnxel-edit-table-footer .el-button {
|
|
403
|
+
width: 100%;
|
|
404
|
+
}
|
|
405
|
+
</style>
|
|
@@ -24,14 +24,17 @@
|
|
|
24
24
|
<DocumentCopy v-else-if="value === 'DocumentCopy'"/>
|
|
25
25
|
<Download v-else-if="value === 'Download'"/>
|
|
26
26
|
<Edit v-else-if="value === 'Edit'"/>
|
|
27
|
+
<Files v-else-if="value === 'Files'"/>
|
|
27
28
|
<Finished v-else-if="value === 'Finished'"/>
|
|
28
29
|
<Folder v-else-if="value === 'Folder'"/>
|
|
30
|
+
<Histogram v-else-if="value === 'Histogram'"/>
|
|
29
31
|
<HomeFilled v-else-if="value === 'HomeFilled'"/>
|
|
30
32
|
<InfoFilled v-else-if="value === 'InfoFilled'"/>
|
|
31
33
|
<List v-else-if="value === 'List'"/>
|
|
32
34
|
<Memo v-else-if="value === 'Memo'"/>
|
|
33
35
|
<Minus v-else-if="value === 'Minus'"/>
|
|
34
36
|
<MoreFilled v-else-if="value === 'MoreFilled'"/>
|
|
37
|
+
<Notebook v-else-if="value === 'Notebook'"/>
|
|
35
38
|
<OfficeBuilding v-else-if="value === 'OfficeBuilding'"/>
|
|
36
39
|
<Picture v-else-if="value === 'Picture'"/>
|
|
37
40
|
<PictureFilled v-else-if="value === 'PictureFilled'"/>
|
|
@@ -83,8 +86,10 @@ import {
|
|
|
83
86
|
DocumentCopy,
|
|
84
87
|
Download,
|
|
85
88
|
Edit,
|
|
89
|
+
Files,
|
|
86
90
|
Finished,
|
|
87
91
|
Folder,
|
|
92
|
+
Histogram,
|
|
88
93
|
HomeFilled,
|
|
89
94
|
InfoFilled,
|
|
90
95
|
List,
|
|
@@ -92,6 +97,7 @@ import {
|
|
|
92
97
|
Memo,
|
|
93
98
|
Minus,
|
|
94
99
|
MoreFilled,
|
|
100
|
+
Notebook,
|
|
95
101
|
OfficeBuilding,
|
|
96
102
|
Picture,
|
|
97
103
|
PictureFilled,
|
|
@@ -141,14 +147,17 @@ const components = {
|
|
|
141
147
|
DocumentCopy,
|
|
142
148
|
Download,
|
|
143
149
|
Edit,
|
|
150
|
+
Files,
|
|
144
151
|
Finished,
|
|
145
152
|
Folder,
|
|
153
|
+
Histogram,
|
|
146
154
|
HomeFilled,
|
|
147
155
|
InfoFilled,
|
|
148
156
|
List,
|
|
149
157
|
Memo,
|
|
150
158
|
Minus,
|
|
151
159
|
MoreFilled,
|
|
160
|
+
Notebook,
|
|
152
161
|
Loading,
|
|
153
162
|
OfficeBuilding,
|
|
154
163
|
Picture,
|
|
@@ -20,6 +20,7 @@ import DetailForm from './detail-form/DetailForm.vue';
|
|
|
20
20
|
import Dialog from './dialog/Dialog.vue';
|
|
21
21
|
import Drawer from './drawer/Drawer.vue';
|
|
22
22
|
import DropdownItem from './dropdown-item/DropdownItem.vue';
|
|
23
|
+
import EditTable from './edit-table/EditTable.vue';
|
|
23
24
|
import EnumSelect from './enum-select/EnumSelect.vue';
|
|
24
25
|
import EnumView from './enum-view/EnumView.vue';
|
|
25
26
|
import FetchCascader from './fetch-cascader/FetchCascader.vue';
|
|
@@ -64,6 +65,7 @@ export default build('tnxel', () => {
|
|
|
64
65
|
Dialog,
|
|
65
66
|
Drawer,
|
|
66
67
|
DropdownItem,
|
|
68
|
+
EditTable,
|
|
67
69
|
EnumSelect,
|
|
68
70
|
EnumView,
|
|
69
71
|
FetchCascader,
|
|
@@ -519,7 +519,8 @@ export default {
|
|
|
519
519
|
}
|
|
520
520
|
},
|
|
521
521
|
_onError(error, file, fileList) {
|
|
522
|
-
|
|
522
|
+
this.files.remove(f => f.uid === file.uid);
|
|
523
|
+
$('#' + this.id + ' .el-upload').removeClass('d-none');
|
|
523
524
|
let message;
|
|
524
525
|
try {
|
|
525
526
|
message = JSON.parse(error.message);
|
|
@@ -662,7 +663,7 @@ export default {
|
|
|
662
663
|
display: flex;
|
|
663
664
|
align-items: center;
|
|
664
665
|
min-height: 32px;
|
|
665
|
-
color: var(--el-text-color-
|
|
666
|
+
color: var(--el-text-color-placeholder);
|
|
666
667
|
}
|
|
667
668
|
|
|
668
669
|
.tnxel-upload-container div.upload-trigger {
|