@truenewx/tnxvue3 3.4.0 → 3.4.1
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/eslint.config.cjs +58 -0
- package/index.html +12 -12
- package/package.json +16 -40
- package/src/aj-captcha/Verify/VerifySlide.vue +9 -9
- package/src/aj-captcha/api/index.js +2 -10
- package/src/aj-captcha/utils/ase.js +1 -1
- package/src/bootstrap-vue/alert/Alert.vue +79 -79
- package/src/bootstrap-vue/button/Button.vue +40 -40
- package/src/bootstrap-vue/enum-select/EnumSelect.vue +4 -5
- package/src/bootstrap-vue/form/Form.vue +320 -320
- package/src/bootstrap-vue/form/FormGroup.vue +73 -73
- package/src/bootstrap-vue/loading-icon/LoadingIcon.vue +46 -46
- package/src/bootstrap-vue/paged/Paged.vue +119 -119
- package/src/bootstrap-vue/progress/Progress.vue +58 -58
- package/src/bootstrap-vue/query-table/QueryTable.vue +84 -84
- package/src/bootstrap-vue/region-cascader/RegionCascader.vue +119 -119
- package/src/bootstrap-vue/select/Select.vue +375 -375
- package/src/bootstrap-vue/submit-form/SubmitForm.vue +180 -176
- package/src/bootstrap-vue/tags-input/TagsInput.vue +64 -64
- package/src/bootstrap-vue/tnxbsv.css +107 -107
- package/src/bootstrap-vue/tnxbsv.js +109 -92
- package/src/bootstrap-vue/upload/Upload.vue +173 -173
- package/src/element-plus/avatar/Avatar.vue +8 -9
- package/src/element-plus/button/Button.vue +2 -2
- package/src/element-plus/curd/Curd.vue +20 -23
- package/src/element-plus/date-picker/DatePicker.vue +1 -1
- package/src/element-plus/detail-form/DetailForm.vue +1 -1
- package/src/element-plus/dialog/Dialog.vue +18 -20
- package/src/element-plus/drawer/Drawer.vue +10 -9
- package/src/element-plus/edit-table/EditTable.vue +3 -3
- package/src/element-plus/enum-select/EnumSelect.vue +3 -3
- package/src/element-plus/enum-view/EnumView.vue +41 -41
- package/src/element-plus/fetch-cascader/FetchCascader.vue +3 -4
- package/src/element-plus/fetch-select/FetchSelect.vue +10 -11
- package/src/element-plus/fetch-tags/FetchTags.vue +4 -5
- package/src/element-plus/fss-upload/FssUpload.vue +18 -18
- package/src/element-plus/fss-view/FssView.vue +1 -1
- package/src/element-plus/icon/Icon.vue +6 -0
- package/src/element-plus/input-dropdown/InputDropdown.vue +74 -74
- package/src/element-plus/query-form/QueryForm.vue +1 -1
- package/src/element-plus/query-table/QueryTable.vue +22 -26
- package/src/element-plus/region-cascader/RegionCascader.vue +4 -5
- package/src/element-plus/select/Select.vue +2 -2
- package/src/element-plus/steps-nav/StepsNav.vue +3 -4
- package/src/element-plus/submit-form/SubmitForm.vue +36 -39
- package/src/element-plus/tabs/Tabs.vue +1 -1
- package/src/element-plus/tnxel.css +22 -0
- package/src/element-plus/tnxel.js +101 -93
- package/src/element-plus/toolbar/ToolBarItem.js +15 -15
- package/src/element-plus/toolbar/Toolbar.vue +56 -56
- package/src/element-plus/transfer/Transfer.vue +8 -9
- package/src/element-plus/upload/Upload.vue +24 -24
- package/src/tnxvue-router.js +4 -4
- package/src/tnxvue-validator.js +8 -2
- package/src/tnxvue.js +13 -26
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
::placeholder {
|
|
2
|
-
color: var(--bs-tertiary-color) !important;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
::-webkit-input-placeholder {
|
|
6
|
-
color: var(--bs-tertiary-color) !important;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
::-moz-placeholder {
|
|
10
|
-
color: var(--bs-tertiary-color) !important;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.text-placeholder {
|
|
14
|
-
color: var(--bs-tertiary-color);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.btn-light {
|
|
18
|
-
border-color: var(--bs-border-color);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.link {
|
|
22
|
-
cursor: pointer;
|
|
23
|
-
color: var(--bs-link-color);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.form-inline {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-wrap: wrap;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.form-inline .b-form-group {
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-wrap: nowrap;
|
|
34
|
-
height: fit-content;
|
|
35
|
-
margin-right: 1.5rem;
|
|
36
|
-
margin-bottom: 1rem;
|
|
37
|
-
width: fit-content;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.badge {
|
|
41
|
-
border: 1px solid transparent;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.badge.text-bg-light {
|
|
45
|
-
border-color: var(--bs-border-color);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.accordion-button,
|
|
49
|
-
.accordion-body {
|
|
50
|
-
padding: 1rem;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.toast {
|
|
54
|
-
width: fit-content;
|
|
55
|
-
min-width: 5rem;
|
|
56
|
-
text-align: center;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.toast::before {
|
|
60
|
-
content: '';
|
|
61
|
-
position: absolute;
|
|
62
|
-
top: 0;
|
|
63
|
-
left: 0;
|
|
64
|
-
width: 100%;
|
|
65
|
-
height: 100%;
|
|
66
|
-
background-color: rgba(255, 255, 255, 0.3);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.form-check {
|
|
70
|
-
margin-top: 0.125rem;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.form-check > * {
|
|
74
|
-
cursor: pointer;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.tnxbsv-dialog-alert,
|
|
78
|
-
.tnxbsv-dialog-success,
|
|
79
|
-
.tnxbsv-dialog-error,
|
|
80
|
-
.tnxbsv-dialog-confirm {
|
|
81
|
-
display: flex;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.tnxbsv-dialog-alert i,
|
|
85
|
-
.tnxbsv-dialog-success i,
|
|
86
|
-
.tnxbsv-dialog-error i,
|
|
87
|
-
.tnxbsv-dialog-confirm i {
|
|
88
|
-
font-size: 1.5rem;
|
|
89
|
-
line-height: 1;
|
|
90
|
-
margin-right: 0.5rem;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.tnxbsv-dialog-alert i {
|
|
94
|
-
color: var(--bs-info);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.tnxbsv-dialog-success i {
|
|
98
|
-
color: var(--bs-success);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.tnxbsv-dialog-error i {
|
|
102
|
-
color: var(--bs-danger);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.tnxbsv-dialog-confirm i {
|
|
106
|
-
color: var(--bs-secondary-color);
|
|
107
|
-
}
|
|
1
|
+
::placeholder {
|
|
2
|
+
color: var(--bs-tertiary-color) !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
::-webkit-input-placeholder {
|
|
6
|
+
color: var(--bs-tertiary-color) !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
::-moz-placeholder {
|
|
10
|
+
color: var(--bs-tertiary-color) !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.text-placeholder {
|
|
14
|
+
color: var(--bs-tertiary-color);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.btn-light {
|
|
18
|
+
border-color: var(--bs-border-color);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.link {
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
color: var(--bs-link-color);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.form-inline {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-wrap: wrap;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.form-inline .b-form-group {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-wrap: nowrap;
|
|
34
|
+
height: fit-content;
|
|
35
|
+
margin-right: 1.5rem;
|
|
36
|
+
margin-bottom: 1rem;
|
|
37
|
+
width: fit-content;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.badge {
|
|
41
|
+
border: 1px solid transparent;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.badge.text-bg-light {
|
|
45
|
+
border-color: var(--bs-border-color);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.accordion-button,
|
|
49
|
+
.accordion-body {
|
|
50
|
+
padding: 1rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.toast {
|
|
54
|
+
width: fit-content;
|
|
55
|
+
min-width: 5rem;
|
|
56
|
+
text-align: center;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.toast::before {
|
|
60
|
+
content: '';
|
|
61
|
+
position: absolute;
|
|
62
|
+
top: 0;
|
|
63
|
+
left: 0;
|
|
64
|
+
width: 100%;
|
|
65
|
+
height: 100%;
|
|
66
|
+
background-color: rgba(255, 255, 255, 0.3);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.form-check {
|
|
70
|
+
margin-top: 0.125rem;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.form-check > * {
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.tnxbsv-dialog-alert,
|
|
78
|
+
.tnxbsv-dialog-success,
|
|
79
|
+
.tnxbsv-dialog-error,
|
|
80
|
+
.tnxbsv-dialog-confirm {
|
|
81
|
+
display: flex;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.tnxbsv-dialog-alert i,
|
|
85
|
+
.tnxbsv-dialog-success i,
|
|
86
|
+
.tnxbsv-dialog-error i,
|
|
87
|
+
.tnxbsv-dialog-confirm i {
|
|
88
|
+
font-size: 1.5rem;
|
|
89
|
+
line-height: 1;
|
|
90
|
+
margin-right: 0.5rem;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.tnxbsv-dialog-alert i {
|
|
94
|
+
color: var(--bs-info);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.tnxbsv-dialog-success i {
|
|
98
|
+
color: var(--bs-success);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.tnxbsv-dialog-error i {
|
|
102
|
+
color: var(--bs-danger);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.tnxbsv-dialog-confirm i {
|
|
106
|
+
color: var(--bs-secondary-color);
|
|
107
|
+
}
|
|
@@ -83,116 +83,133 @@ export default build('tnxbsv', () => {
|
|
|
83
83
|
window.tnx.dialogInstances.push(dialog);
|
|
84
84
|
return dialog;
|
|
85
85
|
},
|
|
86
|
-
closeDialog(all
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
86
|
+
closeDialog(all) {
|
|
87
|
+
return new Promise((resolve) => {
|
|
88
|
+
if (window.tnx.dialogInstances.length) {
|
|
89
|
+
let dialog = window.tnx.dialogInstances.pop();
|
|
90
|
+
while (dialog) {
|
|
91
|
+
const originalClose = dialog.close;
|
|
92
|
+
if (originalClose) {
|
|
93
|
+
dialog.close = function (cb) {
|
|
94
|
+
originalClose.call(this, () => {
|
|
95
|
+
if (typeof cb === 'function') {
|
|
96
|
+
cb();
|
|
97
|
+
}
|
|
98
|
+
resolve();
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
dialog.close();
|
|
102
|
+
} else {
|
|
103
|
+
resolve();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (all) {
|
|
107
|
+
dialog = window.tnx.dialogInstances.pop();
|
|
108
|
+
} else {
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
99
111
|
}
|
|
112
|
+
} else {
|
|
113
|
+
resolve();
|
|
100
114
|
}
|
|
101
|
-
}
|
|
115
|
+
});
|
|
102
116
|
},
|
|
103
117
|
_closeMessage() {
|
|
104
118
|
this.hideLoading();
|
|
105
119
|
this.removeToast();
|
|
106
120
|
},
|
|
107
|
-
alert(message, title,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return this.dialog(message, title, buttons, options);
|
|
121
|
+
alert(message, title, options) {
|
|
122
|
+
return new Promise(resolve => {
|
|
123
|
+
let buttons = tnxvue.getDefaultDialogButtons('primary', close => {
|
|
124
|
+
return resolve(close);
|
|
125
|
+
});
|
|
126
|
+
message =
|
|
127
|
+
`<div class="tnxbsv-dialog-alert"><i class="bi bi-exclamation-circle-fill"></i><div>${message}</div></div>`;
|
|
128
|
+
this.dialog(message, title, buttons, options);
|
|
129
|
+
});
|
|
117
130
|
},
|
|
118
|
-
success(message,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
131
|
+
success(message, options) {
|
|
132
|
+
return new Promise(resolve => {
|
|
133
|
+
let buttons = tnxvue.getDefaultDialogButtons('primary', close => {
|
|
134
|
+
return resolve(close);
|
|
135
|
+
});
|
|
136
|
+
message =
|
|
137
|
+
`<div class="tnxbsv-dialog-success"><i class="bi bi-check-circle-fill"></i><div>${message}</div></div>`;
|
|
138
|
+
this.dialog(message, '成功', buttons, options);
|
|
139
|
+
});
|
|
123
140
|
},
|
|
124
|
-
error(message,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
141
|
+
error(message, options) {
|
|
142
|
+
return new Promise(resolve => {
|
|
143
|
+
let buttons = tnxvue.getDefaultDialogButtons('primary', close => {
|
|
144
|
+
return resolve(close);
|
|
145
|
+
});
|
|
146
|
+
message =
|
|
147
|
+
`<div class="tnxbsv-dialog-error"><i class="bi bi-x-circle-fill"></i><div>${message}</div></div>`;
|
|
148
|
+
this.dialog(message, '错误', buttons, options);
|
|
149
|
+
});
|
|
129
150
|
},
|
|
130
|
-
confirm(message, title
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
return this.dialog(message, title, buttons, options);
|
|
151
|
+
confirm(message, title = '确认', options) {
|
|
152
|
+
return new Promise(resolve => {
|
|
153
|
+
let buttons = tnxvue.getDefaultDialogButtons('confirm', yes => {
|
|
154
|
+
return resolve(yes);
|
|
155
|
+
});
|
|
156
|
+
message =
|
|
157
|
+
`<div class="tnxbsv-dialog-confirm"><i class="bi bi-question-circle-fill"></i><div>${message}</div></div>`;
|
|
158
|
+
this.dialog(message, title, buttons, options);
|
|
159
|
+
});
|
|
140
160
|
},
|
|
141
|
-
toast(message, timeout,
|
|
142
|
-
if (typeof timeout === 'function') {
|
|
143
|
-
options = callback || {};
|
|
144
|
-
callback = timeout;
|
|
145
|
-
timeout = undefined;
|
|
146
|
-
}
|
|
147
|
-
|
|
161
|
+
toast(message, timeout, options = {}) {
|
|
148
162
|
this._closeMessage();
|
|
149
163
|
|
|
150
164
|
const div = document.createElement('div');
|
|
151
165
|
document.body.appendChild(div);
|
|
152
166
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
visible.value = false;
|
|
163
|
-
// 延迟移除组件,确保动画效果完成
|
|
167
|
+
return new Promise(resolve => {
|
|
168
|
+
const Vue = window.tnx.libs.Vue;
|
|
169
|
+
const ToastComponent = {
|
|
170
|
+
components: {
|
|
171
|
+
BToast: BootstrapVue.BToast
|
|
172
|
+
},
|
|
173
|
+
setup() {
|
|
174
|
+
const visible = Vue.ref(true);
|
|
175
|
+
Vue.onMounted(() => {
|
|
164
176
|
setTimeout(() => {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
177
|
+
visible.value = false;
|
|
178
|
+
// 延迟移除组件,确保动画效果完成
|
|
179
|
+
setTimeout(() => {
|
|
180
|
+
window.tnx.toastInstance?.unmount();
|
|
181
|
+
try {
|
|
182
|
+
document.body.removeChild(div);
|
|
183
|
+
} catch (e) {
|
|
184
|
+
// 忽略异常
|
|
185
|
+
}
|
|
186
|
+
resolve();
|
|
187
|
+
}, 500);
|
|
188
|
+
}, timeout || 1500);
|
|
189
|
+
});
|
|
190
|
+
return {visible};
|
|
191
|
+
},
|
|
192
|
+
render() {
|
|
193
|
+
return Vue.h(BootstrapVue.BToast, {
|
|
194
|
+
modelValue: this.visible,
|
|
195
|
+
variant: options.type || 'success',
|
|
196
|
+
static: true,
|
|
197
|
+
noCloseButton: true,
|
|
198
|
+
class: 'position-fixed',
|
|
199
|
+
style: {
|
|
200
|
+
top: '50%',
|
|
201
|
+
left: '50%',
|
|
202
|
+
transform: 'translate(-50%, -50%)',
|
|
203
|
+
zIndex: window.tnx.util.dom.minTopZIndex(),
|
|
204
|
+
}
|
|
205
|
+
}, () => message);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
192
208
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
209
|
+
const instance = window.tnx.createVueInstance(ToastComponent);
|
|
210
|
+
instance.mount(div);
|
|
211
|
+
window.tnx.toastInstance = instance;
|
|
212
|
+
});
|
|
196
213
|
},
|
|
197
214
|
removeToast() {
|
|
198
215
|
if (window.tnx.toastInstance) {
|