@truenewx/tnxvue3 3.0.0-alpha.17 → 3.0.0-alpha.19
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 +2 -2
- package/src/element-plus/dropdown-item/DropdownItem.vue +3 -0
- package/src/element-plus/fss-upload/FssUpload.vue +2 -2
- package/src/element-plus/icon/Icon.vue +6 -0
- package/src/element-plus/select/Select.vue +3 -3
- package/src/element-plus/tnxel.css +18 -25
- package/src/element-plus/tnxel.js +16 -11
- package/src/tnxvue.js +10 -8
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.19",
|
|
4
4
|
"description": "互联网技术解决方案:Vue3扩展支持",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"element-plus": "~2.8.0",
|
|
23
|
-
"vue": "~3.
|
|
23
|
+
"vue": "~3.5.0",
|
|
24
24
|
"vue-router": "~4.4.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
@@ -161,7 +161,7 @@ export default {
|
|
|
161
161
|
fileList.push({
|
|
162
162
|
name: meta.name,
|
|
163
163
|
url: vm._getFullReadUrl(meta.thumbnailReadUrl || meta.readUrl),
|
|
164
|
-
previewUrl: vm.
|
|
164
|
+
previewUrl: vm.tnx.fss.getClientConfig().baseUrl + meta.downloadUrl,
|
|
165
165
|
locationUrl: meta.locationUrl,
|
|
166
166
|
});
|
|
167
167
|
}
|
|
@@ -241,7 +241,7 @@ export default {
|
|
|
241
241
|
file.downloadUrl = result.downloadUrl;
|
|
242
242
|
// 构建Upload组件用到的文件字段
|
|
243
243
|
file.url = result.readUrl;
|
|
244
|
-
file.previewUrl = (
|
|
244
|
+
file.previewUrl = this.tnx.fss.getClientConfig().baseUrl + result.downloadUrl;
|
|
245
245
|
|
|
246
246
|
this.fileList = fileList;
|
|
247
247
|
this.emitInput();
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
<Close v-else-if="value === 'Close'"/>
|
|
18
18
|
<CloseBold v-else-if="value === 'CloseBold'"/>
|
|
19
19
|
<CopyDocument v-else-if="value === 'CopyDocument'"/>
|
|
20
|
+
<DArrowRight v-else-if="value === 'DArrowRight'"/>
|
|
20
21
|
<Delete v-else-if="value === 'Delete'"/>
|
|
21
22
|
<DeleteFilled v-else-if="value === 'DeleteFilled'"/>
|
|
22
23
|
<Document v-else-if="value === 'Document'"/>
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
<Folder v-else-if="value === 'Folder'"/>
|
|
27
28
|
<HomeFilled v-else-if="value === 'HomeFilled'"/>
|
|
28
29
|
<InfoFilled v-else-if="value === 'InfoFilled'"/>
|
|
30
|
+
<List v-else-if="value === 'List'"/>
|
|
29
31
|
<MoreFilled v-else-if="value === 'MoreFilled'"/>
|
|
30
32
|
<OfficeBuilding v-else-if="value === 'OfficeBuilding'"/>
|
|
31
33
|
<Picture v-else-if="value === 'Picture'"/>
|
|
@@ -70,6 +72,7 @@ import {
|
|
|
70
72
|
Close,
|
|
71
73
|
CloseBold,
|
|
72
74
|
CopyDocument,
|
|
75
|
+
DArrowRight,
|
|
73
76
|
Delete,
|
|
74
77
|
DeleteFilled,
|
|
75
78
|
Document,
|
|
@@ -79,6 +82,7 @@ import {
|
|
|
79
82
|
Folder,
|
|
80
83
|
HomeFilled,
|
|
81
84
|
InfoFilled,
|
|
85
|
+
List,
|
|
82
86
|
Loading,
|
|
83
87
|
MoreFilled,
|
|
84
88
|
OfficeBuilding,
|
|
@@ -122,6 +126,7 @@ const components = {
|
|
|
122
126
|
Close,
|
|
123
127
|
CloseBold,
|
|
124
128
|
CopyDocument,
|
|
129
|
+
DArrowRight,
|
|
125
130
|
Delete,
|
|
126
131
|
DeleteFilled,
|
|
127
132
|
Document,
|
|
@@ -131,6 +136,7 @@ const components = {
|
|
|
131
136
|
Folder,
|
|
132
137
|
HomeFilled,
|
|
133
138
|
InfoFilled,
|
|
139
|
+
List,
|
|
134
140
|
MoreFilled,
|
|
135
141
|
Loading,
|
|
136
142
|
OfficeBuilding,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<el-checkbox-group class="tnxel-select tnxel-checkbox-group" v-model="model" :theme="theme" :size="size"
|
|
3
3
|
:disabled="disabled" :key="groupKey" v-if="selector === 'checkbox'">
|
|
4
4
|
<template v-if="items">
|
|
5
|
-
<el-checkbox v-for="item in items" :key="item[valueName]" :
|
|
5
|
+
<el-checkbox v-for="item in items" :key="item[valueName]" :value="item[valueName]"
|
|
6
6
|
:data-value="item[valueName]"
|
|
7
7
|
:disabled="item.disabled === true || typeof item.disabled === 'string'"
|
|
8
8
|
:title="typeof item.disabled === 'string' ? item.disabled : item.title">
|
|
@@ -196,7 +196,7 @@ export default {
|
|
|
196
196
|
},
|
|
197
197
|
emptyValue: {
|
|
198
198
|
type: [String, Number, Boolean, Array],
|
|
199
|
-
default: null
|
|
199
|
+
default: '', // 设为null会告警,暂时先设为空字符,在非字符串类型的情况下是否有问题,有待检验
|
|
200
200
|
},
|
|
201
201
|
emptyClass: String,
|
|
202
202
|
placeholder: String,
|
|
@@ -331,7 +331,7 @@ export default {
|
|
|
331
331
|
} else { // 如果当前值找不到匹配的选项,则需要考虑是设置为空还是默认选项
|
|
332
332
|
if (!this.empty) { // 如果不能为空,则默认选中第一个可用选项
|
|
333
333
|
let firstItem = this.firstEnabledItem;
|
|
334
|
-
if (firstItem[this.valueName]) {
|
|
334
|
+
if (firstItem && firstItem[this.valueName]) {
|
|
335
335
|
return firstItem[this.valueName];
|
|
336
336
|
}
|
|
337
337
|
}
|
|
@@ -268,21 +268,13 @@
|
|
|
268
268
|
|
|
269
269
|
.el-dropdown-menu__item .el-icon {
|
|
270
270
|
text-align: center;
|
|
271
|
-
margin-right:
|
|
271
|
+
margin-right: 6px;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
.el-dropdown-menu__item .el-icon:before {
|
|
275
275
|
width: calc(100vw); /* 尽可能撑开,以与高度保持一致 */
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
.el-alert {
|
|
279
|
-
margin-bottom: 1rem;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.el-alert.w-100 .el-alert__content {
|
|
283
|
-
width: 100%;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
278
|
.el-form-item {
|
|
287
279
|
margin-bottom: 1rem;
|
|
288
280
|
}
|
|
@@ -300,12 +292,6 @@
|
|
|
300
292
|
padding-right: 1rem;
|
|
301
293
|
}
|
|
302
294
|
|
|
303
|
-
.el-form--label-right .el-form-item__label:before {
|
|
304
|
-
content: '*';
|
|
305
|
-
color: transparent;
|
|
306
|
-
margin-right: 4px;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
295
|
.el-form--label-top .el-form-item__label {
|
|
310
296
|
padding-bottom: 0;
|
|
311
297
|
margin-bottom: 0.25rem;
|
|
@@ -638,8 +624,11 @@ el-card {
|
|
|
638
624
|
}
|
|
639
625
|
|
|
640
626
|
.el-alert {
|
|
641
|
-
|
|
642
|
-
|
|
627
|
+
margin-bottom: 1rem;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.el-alert.w-100 .el-alert__content {
|
|
631
|
+
width: 100%;
|
|
643
632
|
}
|
|
644
633
|
|
|
645
634
|
.el-alert .el-alert__icon {
|
|
@@ -650,21 +639,21 @@ el-card {
|
|
|
650
639
|
padding: 0;
|
|
651
640
|
}
|
|
652
641
|
|
|
653
|
-
.el-message-
|
|
654
|
-
padding:
|
|
655
|
-
border-bottom: 1px solid var(--el-border-color);
|
|
642
|
+
.el-message-box {
|
|
643
|
+
padding: 0;
|
|
656
644
|
}
|
|
657
645
|
|
|
658
|
-
.el-message-
|
|
659
|
-
padding
|
|
646
|
+
.el-message-box__header {
|
|
647
|
+
padding: 12px 1rem;
|
|
648
|
+
border-bottom: 1px solid var(--el-border-color);
|
|
660
649
|
}
|
|
661
650
|
|
|
662
651
|
.el-message-box__title {
|
|
663
|
-
font-size:
|
|
652
|
+
font-size: 14px;
|
|
664
653
|
}
|
|
665
654
|
|
|
666
655
|
.el-message-box__headerbtn {
|
|
667
|
-
margin-top:
|
|
656
|
+
margin-top: 4px;
|
|
668
657
|
}
|
|
669
658
|
|
|
670
659
|
.el-message-box__content {
|
|
@@ -811,7 +800,7 @@ el-card {
|
|
|
811
800
|
left: 1rem;
|
|
812
801
|
}
|
|
813
802
|
|
|
814
|
-
.el-icon {
|
|
803
|
+
.el-icon:not(.el-message-box__status) {
|
|
815
804
|
font-size: unset;
|
|
816
805
|
}
|
|
817
806
|
|
|
@@ -836,6 +825,10 @@ i svg {
|
|
|
836
825
|
border-radius: 0;
|
|
837
826
|
}
|
|
838
827
|
|
|
828
|
+
.el-dialog {
|
|
829
|
+
--el-dialog-padding-primary: 0;
|
|
830
|
+
}
|
|
831
|
+
|
|
839
832
|
.el-dialog__header {
|
|
840
833
|
margin-right: 0;
|
|
841
834
|
}
|
|
@@ -44,11 +44,11 @@ import Upload from './upload/Upload.vue';
|
|
|
44
44
|
|
|
45
45
|
import './tnxel.css';
|
|
46
46
|
|
|
47
|
+
const $ = tnxbs.libs.$;
|
|
48
|
+
|
|
47
49
|
export const build = tnxvue.build;
|
|
48
50
|
|
|
49
51
|
export default build('tnxel', () => {
|
|
50
|
-
const $ = tnxbs.libs.$;
|
|
51
|
-
|
|
52
52
|
const components = Object.assign({}, tnxvue.components, {
|
|
53
53
|
Avatar,
|
|
54
54
|
Alert,
|
|
@@ -215,7 +215,13 @@ export default build('tnxel', () => {
|
|
|
215
215
|
const util = this.util;
|
|
216
216
|
setTimeout(function () {
|
|
217
217
|
const topZIndex = util.dom.minTopZIndex(2);
|
|
218
|
-
|
|
218
|
+
if (selector.endsWith(':last')) {
|
|
219
|
+
selector = selector.substring(0, selector.length - ':last'.length);
|
|
220
|
+
}
|
|
221
|
+
let element = $(selector);
|
|
222
|
+
if (element.length > 0) {
|
|
223
|
+
element = $(element[element.length - 1]);
|
|
224
|
+
}
|
|
219
225
|
const zIndex = Number(element.css('zIndex'));
|
|
220
226
|
if (isNaN(zIndex) || topZIndex > zIndex) {
|
|
221
227
|
element.css('zIndex', topZIndex);
|
|
@@ -291,9 +297,9 @@ export default build('tnxel', () => {
|
|
|
291
297
|
options.callback = function (action) {
|
|
292
298
|
let yes = undefined;
|
|
293
299
|
if (action === 'confirm') {
|
|
294
|
-
yes = options.reverse
|
|
300
|
+
yes = !options.reverse;
|
|
295
301
|
} else if (action === 'cancel') {
|
|
296
|
-
yes = options.reverse
|
|
302
|
+
yes = !!options.reverse;
|
|
297
303
|
}
|
|
298
304
|
callback(yes);
|
|
299
305
|
}
|
|
@@ -385,12 +391,11 @@ export default build('tnxel', () => {
|
|
|
385
391
|
|
|
386
392
|
tnxel.install = tnxel.util.function.around(tnxel.install, function (install, vm) {
|
|
387
393
|
install.call(tnxel, vm);
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
394
|
+
// 始终安装ElementPlus,以避免对于不同Vue实例未安装的问题
|
|
395
|
+
vm.use(ElementPlus, {
|
|
396
|
+
locale: ElementPlus_zh_CN,
|
|
397
|
+
});
|
|
398
|
+
tnxel.libs = Object.assign({}, tnxel.libs, {ElementPlus});
|
|
394
399
|
});
|
|
395
400
|
|
|
396
401
|
tnxel.router.beforeLeave =
|
package/src/tnxvue.js
CHANGED
|
@@ -111,18 +111,18 @@ export default build('tnxvue', () => {
|
|
|
111
111
|
return [];
|
|
112
112
|
} else if (type === 'confirm') {
|
|
113
113
|
return [{
|
|
114
|
-
text: '
|
|
114
|
+
text: '确定',
|
|
115
|
+
type: theme || 'primary',
|
|
115
116
|
click(close) {
|
|
116
117
|
if (typeof callback === 'function') {
|
|
117
|
-
return callback.call(this,
|
|
118
|
+
return callback.call(this, true, close);
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
}, {
|
|
121
|
-
text: '
|
|
122
|
-
type: theme || 'primary',
|
|
122
|
+
text: '取消',
|
|
123
123
|
click(close) {
|
|
124
124
|
if (typeof callback === 'function') {
|
|
125
|
-
return callback.call(this,
|
|
125
|
+
return callback.call(this, false, close);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
}];
|
|
@@ -154,10 +154,12 @@ export default build('tnxvue', () => {
|
|
|
154
154
|
});
|
|
155
155
|
|
|
156
156
|
tnxvue.app.isProduction = function () {
|
|
157
|
-
|
|
158
|
-
return
|
|
157
|
+
try {
|
|
158
|
+
return !(process && process.env && process.env.NODE_ENV !== 'production');
|
|
159
|
+
} catch (e) {
|
|
160
|
+
// process未定义时会出错,此时为生产模式
|
|
161
|
+
return true;
|
|
159
162
|
}
|
|
160
|
-
return true;
|
|
161
163
|
};
|
|
162
164
|
|
|
163
165
|
tnxvue.app.toDevUrl = function (url, portIndex, replacement) {
|