@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.
Files changed (55) hide show
  1. package/eslint.config.cjs +58 -0
  2. package/index.html +12 -12
  3. package/package.json +16 -40
  4. package/src/aj-captcha/Verify/VerifySlide.vue +9 -9
  5. package/src/aj-captcha/api/index.js +2 -10
  6. package/src/aj-captcha/utils/ase.js +1 -1
  7. package/src/bootstrap-vue/alert/Alert.vue +79 -79
  8. package/src/bootstrap-vue/button/Button.vue +40 -40
  9. package/src/bootstrap-vue/enum-select/EnumSelect.vue +4 -5
  10. package/src/bootstrap-vue/form/Form.vue +320 -320
  11. package/src/bootstrap-vue/form/FormGroup.vue +73 -73
  12. package/src/bootstrap-vue/loading-icon/LoadingIcon.vue +46 -46
  13. package/src/bootstrap-vue/paged/Paged.vue +119 -119
  14. package/src/bootstrap-vue/progress/Progress.vue +58 -58
  15. package/src/bootstrap-vue/query-table/QueryTable.vue +84 -84
  16. package/src/bootstrap-vue/region-cascader/RegionCascader.vue +119 -119
  17. package/src/bootstrap-vue/select/Select.vue +375 -375
  18. package/src/bootstrap-vue/submit-form/SubmitForm.vue +180 -176
  19. package/src/bootstrap-vue/tags-input/TagsInput.vue +64 -64
  20. package/src/bootstrap-vue/tnxbsv.css +107 -107
  21. package/src/bootstrap-vue/tnxbsv.js +113 -79
  22. package/src/bootstrap-vue/upload/Upload.vue +173 -173
  23. package/src/element-plus/avatar/Avatar.vue +8 -9
  24. package/src/element-plus/button/Button.vue +2 -2
  25. package/src/element-plus/curd/Curd.vue +20 -23
  26. package/src/element-plus/date-picker/DatePicker.vue +1 -1
  27. package/src/element-plus/detail-form/DetailForm.vue +1 -1
  28. package/src/element-plus/dialog/Dialog.vue +18 -20
  29. package/src/element-plus/drawer/Drawer.vue +10 -9
  30. package/src/element-plus/edit-table/EditTable.vue +3 -3
  31. package/src/element-plus/enum-select/EnumSelect.vue +3 -3
  32. package/src/element-plus/enum-view/EnumView.vue +41 -41
  33. package/src/element-plus/fetch-cascader/FetchCascader.vue +3 -4
  34. package/src/element-plus/fetch-select/FetchSelect.vue +10 -11
  35. package/src/element-plus/fetch-tags/FetchTags.vue +4 -5
  36. package/src/element-plus/fss-upload/FssUpload.vue +18 -18
  37. package/src/element-plus/fss-view/FssView.vue +1 -1
  38. package/src/element-plus/icon/Icon.vue +15 -0
  39. package/src/element-plus/input-dropdown/InputDropdown.vue +74 -74
  40. package/src/element-plus/query-form/QueryForm.vue +1 -1
  41. package/src/element-plus/query-table/QueryTable.vue +22 -26
  42. package/src/element-plus/region-cascader/RegionCascader.vue +4 -5
  43. package/src/element-plus/select/Select.vue +2 -2
  44. package/src/element-plus/steps-nav/StepsNav.vue +3 -4
  45. package/src/element-plus/submit-form/SubmitForm.vue +36 -39
  46. package/src/element-plus/tabs/Tabs.vue +1 -1
  47. package/src/element-plus/tnxel.css +22 -0
  48. package/src/element-plus/tnxel.js +125 -106
  49. package/src/element-plus/toolbar/ToolBarItem.js +15 -15
  50. package/src/element-plus/toolbar/Toolbar.vue +56 -56
  51. package/src/element-plus/transfer/Transfer.vue +8 -9
  52. package/src/element-plus/upload/Upload.vue +24 -24
  53. package/src/tnxvue-router.js +4 -4
  54. package/src/tnxvue-validator.js +8 -2
  55. package/src/tnxvue.js +14 -28
@@ -1,73 +1,73 @@
1
- <template>
2
- <div class="tnxbsv-form-group b-form-group" :prop="prop">
3
- <div class="tnxbsv-form-group__label-wrapper">
4
- <slot name="label">
5
- <label class="form-label" :style="labelStyle">{{ label }}</label>
6
- </slot>
7
- </div>
8
- <div class="tnxbsv-form-group__content-wrapper">
9
- <slot></slot>
10
- </div>
11
- </div>
12
- </template>
13
-
14
- <script>
15
- export default {
16
- name: 'TnxbsvFormGroup',
17
- props: {
18
- label: String,
19
- labelWidth: [String, Number],
20
- prop: String,
21
- },
22
- data() {
23
- return {
24
- model: {},
25
- };
26
- },
27
- computed: {
28
- labelStyle() {
29
- let style = {};
30
- if (this.labelWidth) {
31
- let width;
32
- if (typeof this.labelWidth === 'string') {
33
- // 如果是纯数字内容,则附加px单位
34
- if (/^\d+$/.test(this.labelWidth)) {
35
- width = this.labelWidth + 'px';
36
- } else {
37
- width = this.labelWidth;
38
- }
39
- } else {
40
- width = this.labelWidth + 'px';
41
- }
42
- style.width = width;
43
- }
44
- return style;
45
- },
46
- },
47
- methods: {}
48
- }
49
- </script>
50
-
51
- <style>
52
- .tnxbsv-form-group {
53
- display: flex;
54
- }
55
-
56
- .tnxbsv-form-group__label-wrapper {
57
- padding-top: 0.375rem;
58
- }
59
-
60
- .tnxbsv-form-group__content-wrapper {
61
- flex-grow: 1;
62
- min-height: 2.375rem;
63
- display: flex;
64
- flex-direction: column;
65
- justify-content: center;
66
- }
67
-
68
- .inline-feedback .tnxbsv-form-group__content-wrapper {
69
- flex-direction: row;
70
- align-items: center;
71
- justify-content: unset;
72
- }
73
- </style>
1
+ <template>
2
+ <div class="tnxbsv-form-group b-form-group" :prop="prop">
3
+ <div class="tnxbsv-form-group__label-wrapper">
4
+ <slot name="label">
5
+ <label class="form-label" :style="labelStyle">{{ label }}</label>
6
+ </slot>
7
+ </div>
8
+ <div class="tnxbsv-form-group__content-wrapper">
9
+ <slot></slot>
10
+ </div>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ export default {
16
+ name: 'TnxbsvFormGroup',
17
+ props: {
18
+ label: String,
19
+ labelWidth: [String, Number],
20
+ prop: String,
21
+ },
22
+ data() {
23
+ return {
24
+ model: {},
25
+ };
26
+ },
27
+ computed: {
28
+ labelStyle() {
29
+ let style = {};
30
+ if (this.labelWidth) {
31
+ let width;
32
+ if (typeof this.labelWidth === 'string') {
33
+ // 如果是纯数字内容,则附加px单位
34
+ if (/^\d+$/.test(this.labelWidth)) {
35
+ width = this.labelWidth + 'px';
36
+ } else {
37
+ width = this.labelWidth;
38
+ }
39
+ } else {
40
+ width = this.labelWidth + 'px';
41
+ }
42
+ style.width = width;
43
+ }
44
+ return style;
45
+ },
46
+ },
47
+ methods: {}
48
+ }
49
+ </script>
50
+
51
+ <style>
52
+ .tnxbsv-form-group {
53
+ display: flex;
54
+ }
55
+
56
+ .tnxbsv-form-group__label-wrapper {
57
+ padding-top: 0.375rem;
58
+ }
59
+
60
+ .tnxbsv-form-group__content-wrapper {
61
+ flex-grow: 1;
62
+ min-height: 2.375rem;
63
+ display: flex;
64
+ flex-direction: column;
65
+ justify-content: center;
66
+ }
67
+
68
+ .inline-feedback .tnxbsv-form-group__content-wrapper {
69
+ flex-direction: row;
70
+ align-items: center;
71
+ justify-content: unset;
72
+ }
73
+ </style>
@@ -1,46 +1,46 @@
1
- <template>
2
- <span class="tnxbsv-loading-icon spinner-border" :class="extraClass" role="status">
3
- <span class="visually-hidden">{{ text }}</span>
4
- </span>
5
- </template>
6
-
7
- <script>
8
-
9
- export default {
10
- name: 'TnxbsvLoadingIcon',
11
- props: {
12
- small: {
13
- type: Boolean,
14
- default: true,
15
- },
16
- theme: {
17
- type: String,
18
- default: 'secondary',
19
- },
20
- text: {
21
- type: String,
22
- default: '加载中...',
23
- }
24
- },
25
- data() {
26
- return {};
27
- },
28
- computed: {
29
- extraClass() {
30
- let extraClass = '';
31
- if (this.theme && this.theme !== 'inherit') {
32
- extraClass += ' text-' + this.theme;
33
- }
34
- if (this.small) {
35
- extraClass += ' spinner-border-sm';
36
- }
37
- return extraClass.trim();
38
- },
39
- },
40
- methods: {}
41
- }
42
- </script>
43
-
44
- <style>
45
-
46
- </style>
1
+ <template>
2
+ <span class="tnxbsv-loading-icon spinner-border" :class="extraClass" role="status">
3
+ <span class="visually-hidden">{{ text }}</span>
4
+ </span>
5
+ </template>
6
+
7
+ <script>
8
+
9
+ export default {
10
+ name: 'TnxbsvLoadingIcon',
11
+ props: {
12
+ small: {
13
+ type: Boolean,
14
+ default: true,
15
+ },
16
+ theme: {
17
+ type: String,
18
+ default: 'secondary',
19
+ },
20
+ text: {
21
+ type: String,
22
+ default: '加载中...',
23
+ }
24
+ },
25
+ data() {
26
+ return {};
27
+ },
28
+ computed: {
29
+ extraClass() {
30
+ let extraClass = '';
31
+ if (this.theme && this.theme !== 'inherit') {
32
+ extraClass += ' text-' + this.theme;
33
+ }
34
+ if (this.small) {
35
+ extraClass += ' spinner-border-sm';
36
+ }
37
+ return extraClass.trim();
38
+ },
39
+ },
40
+ methods: {}
41
+ }
42
+ </script>
43
+
44
+ <style>
45
+
46
+ </style>
@@ -1,119 +1,119 @@
1
- <template>
2
- <div class="tnxbsv-paged" :class="'justify-content-' + align" v-if="value">
3
- <div class="paged-text" v-if="showPageSize || showTotal">
4
- <div class="page-size-wrapper" v-if="showPageSize">
5
- <span>每页</span>
6
- <Select v-model="pageSize" :items="pageSizeItems" v-if="pageSizeChangeable"/>
7
- <span class="mx-1" v-else>{{ pageSize }}</span>
8
- <span>条</span>
9
- </div>
10
- <div class="total-wrapper" v-if="showTotal">
11
- <span>共</span>
12
- <span class="mx-1">{{ value.total }}</span>
13
- <span>条</span>
14
- </div>
15
- </div>
16
- <BPagination v-model="pageNo"
17
- :total-rows="value.total"
18
- :per-page="value.pageSize"
19
- :aria-controls="ariaControls"
20
- :aria-label="ariaLabel"
21
- />
22
- </div>
23
- </template>
24
-
25
- <script>
26
- import {BPagination} from 'bootstrap-vue-next';
27
- import Select from '../select/Select.vue';
28
-
29
- export default {
30
- name: 'TnxbsvPaged',
31
- components: {BPagination, Select},
32
- props: {
33
- value: Object,
34
- pageSizeChangeable: Boolean,
35
- showPageSize: {
36
- type: Boolean,
37
- default: true,
38
- },
39
- showTotal: {
40
- type: Boolean,
41
- default: true,
42
- },
43
- align: {
44
- type: String,
45
- default: 'end', // start | center | end
46
- },
47
- ariaControls: String,
48
- ariaLabel: String,
49
- query: Function,
50
- },
51
- data() {
52
- return {
53
- pageSize: this.value?.pageSize || 20,
54
- pageNo: this.value?.pageNo || 1,
55
- };
56
- },
57
- computed: {
58
- pageSizeItems() {
59
- return [{
60
- value: 10,
61
- text: '10',
62
- }, {
63
- value: 20,
64
- text: '20',
65
- }, {
66
- value: 50,
67
- text: '50',
68
- }];
69
- },
70
- },
71
- watch: {
72
- pageNo() {
73
- this.toQuery();
74
- },
75
- pageSize() {
76
- this.toQuery();
77
- },
78
- },
79
- methods: {
80
- toQuery() {
81
- if (this.query) {
82
- this.query({
83
- pageSize: this.pageSize,
84
- pageNo: this.pageNo,
85
- });
86
- }
87
- },
88
- }
89
- }
90
- </script>
91
-
92
- <style>
93
- .tnxbsv-paged {
94
- width: 100%;
95
- display: flex;
96
- align-items: center;
97
- }
98
-
99
- .tnxbsv-paged .paged-text {
100
- display: flex;
101
- align-items: center;
102
- color: var(--bs-secondary-color);
103
- white-space: nowrap;
104
- }
105
-
106
- .tnxbsv-paged .paged-text .page-size-wrapper,
107
- .tnxbsv-paged .paged-text .total-wrapper {
108
- margin-right: 0.5rem;
109
- }
110
-
111
- .tnxbsv-paged .form-select {
112
- width: 4.5rem;
113
- margin: 0 0.5rem;
114
- }
115
-
116
- .tnxbsv-paged ul {
117
- margin-bottom: 0;
118
- }
119
- </style>
1
+ <template>
2
+ <div class="tnxbsv-paged" :class="'justify-content-' + align" v-if="value">
3
+ <div class="paged-text" v-if="showPageSize || showTotal">
4
+ <div class="page-size-wrapper" v-if="showPageSize">
5
+ <span>每页</span>
6
+ <Select v-model="pageSize" :items="pageSizeItems" v-if="pageSizeChangeable"/>
7
+ <span class="mx-1" v-else>{{ pageSize }}</span>
8
+ <span>条</span>
9
+ </div>
10
+ <div class="total-wrapper" v-if="showTotal">
11
+ <span>共</span>
12
+ <span class="mx-1">{{ value.total }}</span>
13
+ <span>条</span>
14
+ </div>
15
+ </div>
16
+ <BPagination v-model="pageNo"
17
+ :total-rows="value.total"
18
+ :per-page="value.pageSize"
19
+ :aria-controls="ariaControls"
20
+ :aria-label="ariaLabel"
21
+ />
22
+ </div>
23
+ </template>
24
+
25
+ <script>
26
+ import {BPagination} from 'bootstrap-vue-next';
27
+ import Select from '../select/Select.vue';
28
+
29
+ export default {
30
+ name: 'TnxbsvPaged',
31
+ components: {BPagination, Select},
32
+ props: {
33
+ value: Object,
34
+ pageSizeChangeable: Boolean,
35
+ showPageSize: {
36
+ type: Boolean,
37
+ default: true,
38
+ },
39
+ showTotal: {
40
+ type: Boolean,
41
+ default: true,
42
+ },
43
+ align: {
44
+ type: String,
45
+ default: 'end', // start | center | end
46
+ },
47
+ ariaControls: String,
48
+ ariaLabel: String,
49
+ query: Function,
50
+ },
51
+ data() {
52
+ return {
53
+ pageSize: this.value?.pageSize || 20,
54
+ pageNo: this.value?.pageNo || 1,
55
+ };
56
+ },
57
+ computed: {
58
+ pageSizeItems() {
59
+ return [{
60
+ value: 10,
61
+ text: '10',
62
+ }, {
63
+ value: 20,
64
+ text: '20',
65
+ }, {
66
+ value: 50,
67
+ text: '50',
68
+ }];
69
+ },
70
+ },
71
+ watch: {
72
+ pageNo() {
73
+ this.toQuery();
74
+ },
75
+ pageSize() {
76
+ this.toQuery();
77
+ },
78
+ },
79
+ methods: {
80
+ toQuery() {
81
+ if (this.query) {
82
+ this.query({
83
+ pageSize: this.pageSize,
84
+ pageNo: this.pageNo,
85
+ });
86
+ }
87
+ },
88
+ }
89
+ }
90
+ </script>
91
+
92
+ <style>
93
+ .tnxbsv-paged {
94
+ width: 100%;
95
+ display: flex;
96
+ align-items: center;
97
+ }
98
+
99
+ .tnxbsv-paged .paged-text {
100
+ display: flex;
101
+ align-items: center;
102
+ color: var(--bs-secondary-color);
103
+ white-space: nowrap;
104
+ }
105
+
106
+ .tnxbsv-paged .paged-text .page-size-wrapper,
107
+ .tnxbsv-paged .paged-text .total-wrapper {
108
+ margin-right: 0.5rem;
109
+ }
110
+
111
+ .tnxbsv-paged .form-select {
112
+ width: 4.5rem;
113
+ margin: 0 0.5rem;
114
+ }
115
+
116
+ .tnxbsv-paged ul {
117
+ margin-bottom: 0;
118
+ }
119
+ </style>
@@ -1,58 +1,58 @@
1
- <template>
2
- <div class="tnxbs-progress">
3
- <BProgress :variant="type" :key="type" :value="value" :max="max" :show-value="showValue">
4
- <div class="progress-bar" :style="{width: percent}">
5
- {{ showProgress ? percent : '' }}
6
- </div>
7
- </BProgress>
8
- <span class="tnxbs-progress-value" v-if="showValue">{{ value }}/{{ max }}</span>
9
- </div>
10
- </template>
11
-
12
- <script>
13
- import {BProgress} from 'bootstrap-vue-next';
14
-
15
- export default {
16
- name: 'TnxbsvProgress',
17
- components: {BProgress},
18
- props: {
19
- type: String,
20
- value: {
21
- type: Number,
22
- default: 0
23
- },
24
- max: Number,
25
- precision: {
26
- type: Number,
27
- default: 0,
28
- },
29
- showValue: Boolean,
30
- showProgress: Boolean,
31
- },
32
- data() {
33
- return {};
34
- },
35
- computed: {
36
- percent() {
37
- return (this.value / this.max).toPercent(this.precision);
38
- }
39
- },
40
- methods: {}
41
- }
42
- </script>
43
-
44
- <style>
45
- .tnxbs-progress {
46
- display: flex;
47
- align-items: center;
48
- }
49
-
50
- .tnxbs-progress .progress {
51
- flex-grow: 1;
52
- }
53
-
54
- .tnxbs-progress .tnxbs-progress-value {
55
- margin-left: 0.5rem;
56
- color: var(--bs-body-color);
57
- }
58
- </style>
1
+ <template>
2
+ <div class="tnxbs-progress">
3
+ <BProgress :variant="type" :key="type" :value="value" :max="max" :show-value="showValue">
4
+ <div class="progress-bar" :style="{width: percent}">
5
+ {{ showProgress ? percent : '' }}
6
+ </div>
7
+ </BProgress>
8
+ <span class="tnxbs-progress-value" v-if="showValue">{{ value }}/{{ max }}</span>
9
+ </div>
10
+ </template>
11
+
12
+ <script>
13
+ import {BProgress} from 'bootstrap-vue-next';
14
+
15
+ export default {
16
+ name: 'TnxbsvProgress',
17
+ components: {BProgress},
18
+ props: {
19
+ type: String,
20
+ value: {
21
+ type: Number,
22
+ default: 0
23
+ },
24
+ max: Number,
25
+ precision: {
26
+ type: Number,
27
+ default: 0,
28
+ },
29
+ showValue: Boolean,
30
+ showProgress: Boolean,
31
+ },
32
+ data() {
33
+ return {};
34
+ },
35
+ computed: {
36
+ percent() {
37
+ return (this.value / this.max).toPercent(this.precision);
38
+ }
39
+ },
40
+ methods: {}
41
+ }
42
+ </script>
43
+
44
+ <style>
45
+ .tnxbs-progress {
46
+ display: flex;
47
+ align-items: center;
48
+ }
49
+
50
+ .tnxbs-progress .progress {
51
+ flex-grow: 1;
52
+ }
53
+
54
+ .tnxbs-progress .tnxbs-progress-value {
55
+ margin-left: 0.5rem;
56
+ color: var(--bs-body-color);
57
+ }
58
+ </style>