@truenewx/tnxvue3 3.0.0-alpha.8 → 3.0.0
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 +6 -4
- package/src/aj-captcha/utils/ase.js +7 -6
- package/src/element-plus/button/Button.vue +51 -16
- package/src/element-plus/date-picker/DatePicker.vue +1 -1
- package/src/element-plus/dialog/Dialog.vue +6 -3
- package/src/element-plus/dropdown-item/DropdownItem.vue +3 -0
- package/src/element-plus/edit-table/EditTable.vue +602 -0
- package/src/element-plus/enum-select/EnumSelect.vue +29 -9
- package/src/element-plus/enum-view/EnumView.vue +41 -0
- package/src/element-plus/fss-upload/FssUpload.vue +2 -2
- package/src/element-plus/icon/Icon.vue +73 -1
- package/src/element-plus/input-dropdown/InputDropdown.vue +74 -0
- package/src/element-plus/input-number/InputNumber.vue +17 -13
- package/src/element-plus/query-table/QueryTable.vue +1 -1
- package/src/element-plus/select/Select.vue +64 -22
- package/src/element-plus/steps-nav/StepsNav.vue +3 -3
- package/src/element-plus/submit-form/SubmitForm.vue +22 -6
- package/src/element-plus/tabs/Tabs.vue +13 -1
- package/src/element-plus/tnxel.css +31 -37
- package/src/element-plus/tnxel.js +38 -17
- package/src/element-plus/toolbar/ToolBarItem.js +15 -0
- package/src/element-plus/toolbar/ToolBarItem.vue +53 -0
- package/src/element-plus/toolbar/Toolbar.vue +56 -0
- package/src/element-plus/upload/Upload.vue +26 -25
- package/src/tnxvue-router.js +32 -22
- package/src/tnxvue.js +71 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truenewx/tnxvue3",
|
|
3
|
-
"version": "3.0.0
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "互联网技术解决方案:Vue3扩展支持",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,14 +20,13 @@
|
|
|
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": {
|
|
27
|
-
"@truenewx/tnxcore": "3.0.0
|
|
27
|
+
"@truenewx/tnxcore": "3.0.0",
|
|
28
28
|
"@element-plus/icons-vue": "2.3.1",
|
|
29
29
|
"async-validator": "4.2.5",
|
|
30
|
-
"crypto-js": "4.2.0",
|
|
31
30
|
"mitt": "3.0.1"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
@@ -65,6 +64,9 @@
|
|
|
65
64
|
],
|
|
66
65
|
"no-undef": "warn",
|
|
67
66
|
"no-useless-escape": "warn",
|
|
67
|
+
"no-empty": "off",
|
|
68
|
+
"vue/no-side-effects-in-computed-properties": "warn",
|
|
69
|
+
"vue/no-mutating-props": "warn",
|
|
68
70
|
"vue/no-v-model-argument": "off",
|
|
69
71
|
"vue/multi-word-component-names": "off"
|
|
70
72
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import CryptoES from 'crypto-es';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* @word 要加密的内容
|
|
4
5
|
* @keyWord String 服务器随机返回的关键字
|
|
5
6
|
* */
|
|
6
|
-
export function aesEncrypt(word,keyWord="XwKsGlMcdPMEhR1B"){
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
export function aesEncrypt(word, keyWord = "XwKsGlMcdPMEhR1B") {
|
|
8
|
+
let key = CryptoES.enc.Utf8.parse(keyWord);
|
|
9
|
+
let srcs = CryptoES.enc.Utf8.parse(word);
|
|
10
|
+
let encrypted = CryptoES.AES.encrypt(srcs, key, {mode: CryptoES.mode.ECB, padding: CryptoES.pad.Pkcs7});
|
|
11
|
+
return encrypted.toString();
|
|
11
12
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-tooltip
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<el-tooltip
|
|
3
|
+
:content="tooltipContent"
|
|
4
|
+
:placement="tooltipPlacement"
|
|
5
|
+
:show-after="tooltipShowAfter"
|
|
6
|
+
:disabled="finalDisabled || !tooltipContent">
|
|
7
|
+
<el-dropdown split-button :type="type" :class="className" :disabled="finalDisabled" :title="title" :size="size"
|
|
8
|
+
:style="$attrs.style" @click="clickButton" @command="clickItem" v-if="dropdownItems.length">
|
|
6
9
|
<i :class="icon" style="margin-right: 0.5rem;" v-if="icon"></i>
|
|
7
10
|
<template v-if="!hiddenCaption">
|
|
8
11
|
<slot v-if="$slots.default"></slot>
|
|
@@ -11,18 +14,30 @@
|
|
|
11
14
|
<template #dropdown>
|
|
12
15
|
<el-dropdown-menu>
|
|
13
16
|
<el-dropdown-item v-for="dropdownItem of dropdownItems" :key="dropdownItem.path"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
:icon="dropdownItem.icon" :disabled="dropdownItem.disabled"
|
|
18
|
+
:title="dropdownItem.title"
|
|
19
|
+
:command="dropdownItem">
|
|
17
20
|
{{ dropdownItem.caption || (dropdownItem.menuItem ? dropdownItem.menuItem.caption : '') }}
|
|
18
21
|
</el-dropdown-item>
|
|
19
22
|
</el-dropdown-menu>
|
|
20
23
|
</template>
|
|
21
24
|
</el-dropdown>
|
|
22
|
-
<el-button :type="type"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
<el-button :type="type"
|
|
26
|
+
:class="className"
|
|
27
|
+
:disabled="finalDisabled"
|
|
28
|
+
:title="title"
|
|
29
|
+
@click="clickButton"
|
|
30
|
+
:size="size"
|
|
31
|
+
:loading="loading"
|
|
32
|
+
:plain="plain"
|
|
33
|
+
:link="link"
|
|
34
|
+
:text="text"
|
|
35
|
+
:bg="bg"
|
|
36
|
+
:autofocus="autofocus"
|
|
37
|
+
:round="round"
|
|
38
|
+
:circle="circle"
|
|
39
|
+
:style="$attrs.style"
|
|
40
|
+
v-else>
|
|
26
41
|
<tnxel-icon :value="icon" v-if="icon"/>
|
|
27
42
|
<span v-if="!hiddenCaption && ($slots.default || menuItem)">
|
|
28
43
|
<slot>{{ menuItem ? menuItem.caption : '' }}</slot>
|
|
@@ -52,7 +67,13 @@ export default {
|
|
|
52
67
|
},
|
|
53
68
|
type: String,
|
|
54
69
|
icon: String,
|
|
55
|
-
size:
|
|
70
|
+
size: {
|
|
71
|
+
type: String,
|
|
72
|
+
validator: value => {
|
|
73
|
+
return ['small', 'default', 'large'].includes(value);
|
|
74
|
+
},
|
|
75
|
+
default: 'default',
|
|
76
|
+
},
|
|
56
77
|
loading: Boolean,
|
|
57
78
|
plain: Boolean,
|
|
58
79
|
link: Boolean,
|
|
@@ -69,6 +90,11 @@ export default {
|
|
|
69
90
|
type: String,
|
|
70
91
|
default: 'top',
|
|
71
92
|
},
|
|
93
|
+
tooltipShowAfter: Number,
|
|
94
|
+
disabled: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: false,
|
|
97
|
+
},
|
|
72
98
|
disabledTip: {
|
|
73
99
|
type: [String, Boolean],
|
|
74
100
|
default: '没有操作权限',
|
|
@@ -84,7 +110,7 @@ export default {
|
|
|
84
110
|
}
|
|
85
111
|
return {
|
|
86
112
|
menuItem: menuItem,
|
|
87
|
-
|
|
113
|
+
finalDisabled: this.disabled,
|
|
88
114
|
dropdownItems: [],
|
|
89
115
|
}
|
|
90
116
|
},
|
|
@@ -106,7 +132,13 @@ export default {
|
|
|
106
132
|
return undefined;
|
|
107
133
|
},
|
|
108
134
|
title() {
|
|
109
|
-
|
|
135
|
+
if (this.finalDisabled) {
|
|
136
|
+
if (this.disabledTip === false) {
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
return this.disabledTip;
|
|
140
|
+
}
|
|
141
|
+
return this.$attrs.title;
|
|
110
142
|
}
|
|
111
143
|
},
|
|
112
144
|
created() {
|
|
@@ -116,6 +148,9 @@ export default {
|
|
|
116
148
|
granted() {
|
|
117
149
|
this.init();
|
|
118
150
|
},
|
|
151
|
+
disabled() {
|
|
152
|
+
this.init();
|
|
153
|
+
},
|
|
119
154
|
dropdown() {
|
|
120
155
|
this.buildDropdownItems();
|
|
121
156
|
},
|
|
@@ -123,11 +158,11 @@ export default {
|
|
|
123
158
|
methods: {
|
|
124
159
|
init() {
|
|
125
160
|
if (this.granted !== null) {
|
|
126
|
-
this.
|
|
161
|
+
this.finalDisabled = this.disabled || !this.granted;
|
|
127
162
|
} else if (this.menu && this.path) {
|
|
128
163
|
let vm = this;
|
|
129
164
|
this.menu.loadGrantedItems(function () {
|
|
130
|
-
vm.
|
|
165
|
+
vm.finalDisabled = this.disabled || !vm.menu.isGranted(vm.path);
|
|
131
166
|
vm.buildDropdownItems();
|
|
132
167
|
});
|
|
133
168
|
}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<script>
|
|
34
|
-
import $ from '
|
|
34
|
+
import $ from 'cash-dom';
|
|
35
35
|
import DialogContent from './DialogContent.vue';
|
|
36
36
|
|
|
37
37
|
const util = window.tnx.util;
|
|
@@ -42,7 +42,10 @@ export default {
|
|
|
42
42
|
'tnxel-dialog-content': DialogContent,
|
|
43
43
|
},
|
|
44
44
|
props: {
|
|
45
|
-
id:
|
|
45
|
+
id: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: () => window.tnx.util.string.uuid32(),
|
|
48
|
+
},
|
|
46
49
|
modelValue: Boolean,
|
|
47
50
|
container: String,
|
|
48
51
|
title: String,
|
|
@@ -153,7 +156,7 @@ export default {
|
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
158
|
if (!$dialog || !$dialog.length) {
|
|
156
|
-
$dialog = $('.
|
|
159
|
+
$dialog = $('.tnxel-dialog[data-v-id="' + this.id + '"]');
|
|
157
160
|
}
|
|
158
161
|
if ($dialog.length) {
|
|
159
162
|
let top = window.tnx.util.dom.getTopVerticallyCenteredOnPage($dialog[0]);
|