@truenewx/tnxvue3 3.0.18 → 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 +113 -79
- 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 +15 -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 +125 -106
- 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 +14 -28
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<BTable class="tnxbsv-query-table"
|
|
3
|
-
:id="id"
|
|
4
|
-
:items="result.records || []"
|
|
5
|
-
:fields="fields"
|
|
6
|
-
:busy="result.records === null"
|
|
7
|
-
>
|
|
8
|
-
<template v-for="(_, slot) of $slots" v-slot:[slot]="scope">
|
|
9
|
-
<slot :name="slot" v-bind="scope"></slot>
|
|
10
|
-
</template>
|
|
11
|
-
<template #custom-foot>
|
|
12
|
-
<tr>
|
|
13
|
-
<td colspan="100%">
|
|
14
|
-
<Paged :value="result.paged"
|
|
15
|
-
:query="query"
|
|
16
|
-
:page-size-changeable="pageSizeChangeable"
|
|
17
|
-
:aria-controls="id"
|
|
18
|
-
/>
|
|
19
|
-
</td>
|
|
20
|
-
</tr>
|
|
21
|
-
</template>
|
|
22
|
-
</BTable>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script>
|
|
26
|
-
import {BTable} from 'bootstrap-vue-next';
|
|
27
|
-
import Paged from '../paged/Paged.vue';
|
|
28
|
-
|
|
29
|
-
export default {
|
|
30
|
-
name: 'TnxbsvQueryTable',
|
|
31
|
-
components: {BTable, Paged},
|
|
32
|
-
props: {
|
|
33
|
-
id: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: () => {
|
|
36
|
-
return 'query-table-' + window.tnx.util.string.uuid32();
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
url: {
|
|
40
|
-
type: String,
|
|
41
|
-
required: true,
|
|
42
|
-
},
|
|
43
|
-
params: {
|
|
44
|
-
type: Object,
|
|
45
|
-
required: true,
|
|
46
|
-
},
|
|
47
|
-
fields: {
|
|
48
|
-
type: Array,
|
|
49
|
-
required: true,
|
|
50
|
-
},
|
|
51
|
-
init: Boolean,
|
|
52
|
-
pageSizeChangeable: Boolean,
|
|
53
|
-
},
|
|
54
|
-
data() {
|
|
55
|
-
return {
|
|
56
|
-
result: {
|
|
57
|
-
records: null,
|
|
58
|
-
paged: null,
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
},
|
|
62
|
-
mounted() {
|
|
63
|
-
if (this.init) {
|
|
64
|
-
this.query();
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
methods: {
|
|
68
|
-
query(paging) {
|
|
69
|
-
let params = Object.assign({}, this.params, paging);
|
|
70
|
-
this.result.records = null;
|
|
71
|
-
window.tnx.app.rpc.get(this.url, params
|
|
72
|
-
this.result = result;
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
</script>
|
|
78
|
-
|
|
79
|
-
<style>
|
|
80
|
-
.tnxbsv-query-table th,
|
|
81
|
-
.tnxbsv-query-table td {
|
|
82
|
-
vertical-align: middle;
|
|
83
|
-
}
|
|
84
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<BTable class="tnxbsv-query-table"
|
|
3
|
+
:id="id"
|
|
4
|
+
:items="result.records || []"
|
|
5
|
+
:fields="fields"
|
|
6
|
+
:busy="result.records === null"
|
|
7
|
+
>
|
|
8
|
+
<template v-for="(_, slot) of $slots" v-slot:[slot]="scope">
|
|
9
|
+
<slot :name="slot" v-bind="scope"></slot>
|
|
10
|
+
</template>
|
|
11
|
+
<template #custom-foot>
|
|
12
|
+
<tr>
|
|
13
|
+
<td colspan="100%">
|
|
14
|
+
<Paged :value="result.paged"
|
|
15
|
+
:query="query"
|
|
16
|
+
:page-size-changeable="pageSizeChangeable"
|
|
17
|
+
:aria-controls="id"
|
|
18
|
+
/>
|
|
19
|
+
</td>
|
|
20
|
+
</tr>
|
|
21
|
+
</template>
|
|
22
|
+
</BTable>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import {BTable} from 'bootstrap-vue-next';
|
|
27
|
+
import Paged from '../paged/Paged.vue';
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
name: 'TnxbsvQueryTable',
|
|
31
|
+
components: {BTable, Paged},
|
|
32
|
+
props: {
|
|
33
|
+
id: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: () => {
|
|
36
|
+
return 'query-table-' + window.tnx.util.string.uuid32();
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
url: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true,
|
|
42
|
+
},
|
|
43
|
+
params: {
|
|
44
|
+
type: Object,
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
fields: {
|
|
48
|
+
type: Array,
|
|
49
|
+
required: true,
|
|
50
|
+
},
|
|
51
|
+
init: Boolean,
|
|
52
|
+
pageSizeChangeable: Boolean,
|
|
53
|
+
},
|
|
54
|
+
data() {
|
|
55
|
+
return {
|
|
56
|
+
result: {
|
|
57
|
+
records: null,
|
|
58
|
+
paged: null,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
mounted() {
|
|
63
|
+
if (this.init) {
|
|
64
|
+
this.query();
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
query(paging) {
|
|
69
|
+
let params = Object.assign({}, this.params, paging);
|
|
70
|
+
this.result.records = null;
|
|
71
|
+
window.tnx.app.rpc.get(this.url, params).then(result => {
|
|
72
|
+
this.result = result;
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style>
|
|
80
|
+
.tnxbsv-query-table th,
|
|
81
|
+
.tnxbsv-query-table td {
|
|
82
|
+
vertical-align: middle;
|
|
83
|
+
}
|
|
84
|
+
</style>
|
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<TnxbsvCascader v-model="model"
|
|
3
|
-
:options="region.subs"
|
|
4
|
-
:props="{
|
|
5
|
-
value: 'code',
|
|
6
|
-
label: 'caption',
|
|
7
|
-
children: 'subs',
|
|
8
|
-
}"
|
|
9
|
-
:placeholder="placeholder"
|
|
10
|
-
:disabled="disabled"
|
|
11
|
-
:clearable="empty"
|
|
12
|
-
:parent-selectable="parentSelectable"
|
|
13
|
-
/>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
import TnxbsvCascader from '../cascader/Cascader.vue';
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
name: 'TnxbsvRegionCascader',
|
|
21
|
-
components: {TnxbsvCascader},
|
|
22
|
-
props: {
|
|
23
|
-
modelValue: String,
|
|
24
|
-
scope: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: () => 'CN',
|
|
27
|
-
},
|
|
28
|
-
maxLevel: {
|
|
29
|
-
type: [Number, String],
|
|
30
|
-
default: 3,
|
|
31
|
-
},
|
|
32
|
-
minLevel: {
|
|
33
|
-
type: [Number, String],
|
|
34
|
-
default: 3,
|
|
35
|
-
},
|
|
36
|
-
empty: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: false,
|
|
39
|
-
},
|
|
40
|
-
placeholder: String,
|
|
41
|
-
disabled: Boolean,
|
|
42
|
-
change: Function, // 选中值变化后的事件处理函数,由于比element的change事件传递更多参数,所以以prop的形式指定,以尽量节省性能
|
|
43
|
-
app: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: () => window.tnx.componentDefaultApp,
|
|
46
|
-
},
|
|
47
|
-
parentSelectable: Boolean,
|
|
48
|
-
},
|
|
49
|
-
data() {
|
|
50
|
-
return {
|
|
51
|
-
model: this.modelValue,
|
|
52
|
-
region: {},
|
|
53
|
-
};
|
|
54
|
-
},
|
|
55
|
-
watch: {
|
|
56
|
-
model(value) {
|
|
57
|
-
this.$emit('update:modelValue', value);
|
|
58
|
-
this.triggerChange(value);
|
|
59
|
-
},
|
|
60
|
-
modelValue() {
|
|
61
|
-
this.model = this.getModel();
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
mounted() {
|
|
65
|
-
window.tnx.app.rpc.loadRegion(this.scope, parseInt(this.maxLevel),
|
|
66
|
-
this.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
});
|
|
71
|
-
},
|
|
72
|
-
methods: {
|
|
73
|
-
triggerChange(value) {
|
|
74
|
-
if (this.change) {
|
|
75
|
-
let item = this.getItem(this.region.subs, value);
|
|
76
|
-
this.change(item);
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
getItem(items, value) {
|
|
80
|
-
if (items && value !== undefined) {
|
|
81
|
-
for (let item of items) {
|
|
82
|
-
if (item.code === value) {
|
|
83
|
-
return item;
|
|
84
|
-
}
|
|
85
|
-
let sub = this.getItem(item.subs, value);
|
|
86
|
-
if (sub) {
|
|
87
|
-
return sub;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return undefined;
|
|
92
|
-
},
|
|
93
|
-
getModel() {
|
|
94
|
-
if (this.region) {
|
|
95
|
-
let items = this.region.subs;
|
|
96
|
-
if (items && items.length) {
|
|
97
|
-
let item = this.getItem(items, this.modelValue);
|
|
98
|
-
if (item) {
|
|
99
|
-
return item.code;
|
|
100
|
-
} else { // 如果当前值找不到匹配的选项,则需要考虑是设置为空还是默认选项
|
|
101
|
-
if (!this.empty) { // 如果不能为空,则默认选中第一个叶子节点选项
|
|
102
|
-
let firstItem = items[0];
|
|
103
|
-
while (firstItem.subs && firstItem.subs.length) {
|
|
104
|
-
firstItem = firstItem.subs[0];
|
|
105
|
-
}
|
|
106
|
-
return firstItem ? firstItem.code : null;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return null;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
</script>
|
|
116
|
-
|
|
117
|
-
<style>
|
|
118
|
-
|
|
119
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<TnxbsvCascader v-model="model"
|
|
3
|
+
:options="region.subs"
|
|
4
|
+
:props="{
|
|
5
|
+
value: 'code',
|
|
6
|
+
label: 'caption',
|
|
7
|
+
children: 'subs',
|
|
8
|
+
}"
|
|
9
|
+
:placeholder="placeholder"
|
|
10
|
+
:disabled="disabled"
|
|
11
|
+
:clearable="empty"
|
|
12
|
+
:parent-selectable="parentSelectable"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import TnxbsvCascader from '../cascader/Cascader.vue';
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
name: 'TnxbsvRegionCascader',
|
|
21
|
+
components: {TnxbsvCascader},
|
|
22
|
+
props: {
|
|
23
|
+
modelValue: String,
|
|
24
|
+
scope: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: () => 'CN',
|
|
27
|
+
},
|
|
28
|
+
maxLevel: {
|
|
29
|
+
type: [Number, String],
|
|
30
|
+
default: 3,
|
|
31
|
+
},
|
|
32
|
+
minLevel: {
|
|
33
|
+
type: [Number, String],
|
|
34
|
+
default: 3,
|
|
35
|
+
},
|
|
36
|
+
empty: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false,
|
|
39
|
+
},
|
|
40
|
+
placeholder: String,
|
|
41
|
+
disabled: Boolean,
|
|
42
|
+
change: Function, // 选中值变化后的事件处理函数,由于比element的change事件传递更多参数,所以以prop的形式指定,以尽量节省性能
|
|
43
|
+
app: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: () => window.tnx.componentDefaultApp,
|
|
46
|
+
},
|
|
47
|
+
parentSelectable: Boolean,
|
|
48
|
+
},
|
|
49
|
+
data() {
|
|
50
|
+
return {
|
|
51
|
+
model: this.modelValue,
|
|
52
|
+
region: {},
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
watch: {
|
|
56
|
+
model(value) {
|
|
57
|
+
this.$emit('update:modelValue', value);
|
|
58
|
+
this.triggerChange(value);
|
|
59
|
+
},
|
|
60
|
+
modelValue() {
|
|
61
|
+
this.model = this.getModel();
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
mounted() {
|
|
65
|
+
window.tnx.app.rpc.loadRegion(this.scope, parseInt(this.maxLevel), {
|
|
66
|
+
app: this.app,
|
|
67
|
+
}).then(region => {
|
|
68
|
+
this.region = region;
|
|
69
|
+
this.model = this.getModel();
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
triggerChange(value) {
|
|
74
|
+
if (this.change) {
|
|
75
|
+
let item = this.getItem(this.region.subs, value);
|
|
76
|
+
this.change(item);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
getItem(items, value) {
|
|
80
|
+
if (items && value !== undefined) {
|
|
81
|
+
for (let item of items) {
|
|
82
|
+
if (item.code === value) {
|
|
83
|
+
return item;
|
|
84
|
+
}
|
|
85
|
+
let sub = this.getItem(item.subs, value);
|
|
86
|
+
if (sub) {
|
|
87
|
+
return sub;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return undefined;
|
|
92
|
+
},
|
|
93
|
+
getModel() {
|
|
94
|
+
if (this.region) {
|
|
95
|
+
let items = this.region.subs;
|
|
96
|
+
if (items && items.length) {
|
|
97
|
+
let item = this.getItem(items, this.modelValue);
|
|
98
|
+
if (item) {
|
|
99
|
+
return item.code;
|
|
100
|
+
} else { // 如果当前值找不到匹配的选项,则需要考虑是设置为空还是默认选项
|
|
101
|
+
if (!this.empty) { // 如果不能为空,则默认选中第一个叶子节点选项
|
|
102
|
+
let firstItem = items[0];
|
|
103
|
+
while (firstItem.subs && firstItem.subs.length) {
|
|
104
|
+
firstItem = firstItem.subs[0];
|
|
105
|
+
}
|
|
106
|
+
return firstItem ? firstItem.code : null;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
</script>
|
|
116
|
+
|
|
117
|
+
<style>
|
|
118
|
+
|
|
119
|
+
</style>
|