@truenewx/tnxvue3 3.0.0-alpha.17 → 3.0.0-alpha.18
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/element-plus/dialog/Dialog.vue +1 -1
- 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 +1 -1
- package/src/element-plus/tnxel.css +13 -9
- package/src/element-plus/tnxel.js +16 -11
- package/src/tnxvue.js +10 -8
package/package.json
CHANGED
|
@@ -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,
|
|
@@ -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,7 +268,7 @@
|
|
|
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 {
|
|
@@ -650,21 +650,21 @@ el-card {
|
|
|
650
650
|
padding: 0;
|
|
651
651
|
}
|
|
652
652
|
|
|
653
|
-
.el-message-
|
|
654
|
-
padding:
|
|
655
|
-
border-bottom: 1px solid var(--el-border-color);
|
|
653
|
+
.el-message-box {
|
|
654
|
+
padding: 0;
|
|
656
655
|
}
|
|
657
656
|
|
|
658
|
-
.el-message-
|
|
659
|
-
padding
|
|
657
|
+
.el-message-box__header {
|
|
658
|
+
padding: 12px 1rem;
|
|
659
|
+
border-bottom: 1px solid var(--el-border-color);
|
|
660
660
|
}
|
|
661
661
|
|
|
662
662
|
.el-message-box__title {
|
|
663
|
-
font-size:
|
|
663
|
+
font-size: 14px;
|
|
664
664
|
}
|
|
665
665
|
|
|
666
666
|
.el-message-box__headerbtn {
|
|
667
|
-
margin-top:
|
|
667
|
+
margin-top: 4px;
|
|
668
668
|
}
|
|
669
669
|
|
|
670
670
|
.el-message-box__content {
|
|
@@ -811,7 +811,7 @@ el-card {
|
|
|
811
811
|
left: 1rem;
|
|
812
812
|
}
|
|
813
813
|
|
|
814
|
-
.el-icon {
|
|
814
|
+
.el-icon:not(.el-message-box__status) {
|
|
815
815
|
font-size: unset;
|
|
816
816
|
}
|
|
817
817
|
|
|
@@ -836,6 +836,10 @@ i svg {
|
|
|
836
836
|
border-radius: 0;
|
|
837
837
|
}
|
|
838
838
|
|
|
839
|
+
.el-dialog {
|
|
840
|
+
--el-dialog-padding-primary: 0;
|
|
841
|
+
}
|
|
842
|
+
|
|
839
843
|
.el-dialog__header {
|
|
840
844
|
margin-right: 0;
|
|
841
845
|
}
|
|
@@ -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) {
|