@truenewx/tnxvue3 3.4.0 → 3.4.2

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 (65) hide show
  1. package/package.json +23 -42
  2. package/src/bootstrap-vue/alert/Alert.vue +79 -79
  3. package/src/bootstrap-vue/button/Button.vue +40 -40
  4. package/src/bootstrap-vue/enum-select/EnumSelect.vue +4 -5
  5. package/src/bootstrap-vue/form/Form.vue +320 -320
  6. package/src/bootstrap-vue/form/FormGroup.vue +73 -73
  7. package/src/bootstrap-vue/loading-icon/LoadingIcon.vue +46 -46
  8. package/src/bootstrap-vue/paged/Paged.vue +119 -119
  9. package/src/bootstrap-vue/progress/Progress.vue +58 -58
  10. package/src/bootstrap-vue/query-table/QueryTable.vue +84 -84
  11. package/src/bootstrap-vue/region-cascader/RegionCascader.vue +119 -119
  12. package/src/bootstrap-vue/select/Select.vue +375 -375
  13. package/src/bootstrap-vue/submit-form/SubmitForm.vue +180 -176
  14. package/src/bootstrap-vue/tags-input/TagsInput.vue +64 -64
  15. package/src/bootstrap-vue/tnxbsv.css +107 -107
  16. package/src/bootstrap-vue/tnxbsv.js +109 -92
  17. package/src/bootstrap-vue/upload/Upload.vue +173 -173
  18. package/src/{aj-captcha → element-plus/aj-captcha}/Verify/VerifySlide.vue +9 -9
  19. package/src/element-plus/aj-captcha/api/index.js +11 -0
  20. package/src/{aj-captcha → element-plus/aj-captcha}/utils/ase.js +1 -1
  21. package/src/element-plus/avatar/Avatar.vue +8 -9
  22. package/src/element-plus/button/Button.vue +2 -2
  23. package/src/element-plus/curd/Curd.vue +20 -23
  24. package/src/element-plus/date-picker/DatePicker.vue +1 -1
  25. package/src/element-plus/detail-form/DetailForm.vue +1 -1
  26. package/src/element-plus/dialog/Dialog.vue +18 -20
  27. package/src/element-plus/drawer/Drawer.vue +10 -9
  28. package/src/element-plus/edit-table/EditTable.vue +3 -3
  29. package/src/element-plus/enum-select/EnumSelect.vue +3 -3
  30. package/src/element-plus/enum-view/EnumView.vue +41 -41
  31. package/src/element-plus/fetch-cascader/FetchCascader.vue +3 -4
  32. package/src/element-plus/fetch-select/FetchSelect.vue +10 -11
  33. package/src/element-plus/fetch-tags/FetchTags.vue +4 -5
  34. package/src/element-plus/fss-upload/FssUpload.vue +18 -18
  35. package/src/element-plus/fss-view/FssView.vue +1 -1
  36. package/src/element-plus/icon/Icon.vue +6 -0
  37. package/src/element-plus/input-dropdown/InputDropdown.vue +74 -74
  38. package/src/element-plus/query-form/QueryForm.vue +1 -1
  39. package/src/element-plus/query-table/QueryTable.vue +22 -26
  40. package/src/element-plus/region-cascader/RegionCascader.vue +4 -5
  41. package/src/element-plus/select/Select.vue +11 -7
  42. package/src/element-plus/steps-nav/StepsNav.vue +3 -4
  43. package/src/element-plus/submit-form/SubmitForm.vue +36 -39
  44. package/src/element-plus/tabs/Tabs.vue +1 -1
  45. package/src/element-plus/tnxel.css +22 -0
  46. package/src/element-plus/tnxel.js +105 -94
  47. package/src/element-plus/toolbar/ToolBarItem.js +15 -15
  48. package/src/element-plus/toolbar/Toolbar.vue +56 -56
  49. package/src/element-plus/transfer/Transfer.vue +8 -9
  50. package/src/element-plus/upload/Upload.vue +24 -24
  51. package/src/tdesign/desktop/tnxtdd.ts +16 -0
  52. package/src/tdesign/foundation/validator.ts +367 -0
  53. package/src/tdesign/mobile/tnxtdm.ts +16 -0
  54. package/src/tdesign/tnxtd.ts +20 -0
  55. package/src/{tnxvue-router.js → tnxvue-router.ts} +66 -48
  56. package/src/tnxvue.ts +248 -0
  57. package/src/types.d.ts +7 -0
  58. package/tsconfig.json +21 -0
  59. package/index.html +0 -12
  60. package/src/aj-captcha/api/index.js +0 -19
  61. package/src/tnxvue-validator.js +0 -365
  62. package/src/tnxvue.js +0 -439
  63. /package/src/{aj-captcha → element-plus/aj-captcha}/Verify/VerifyPoints.vue +0 -0
  64. /package/src/{aj-captcha → element-plus/aj-captcha}/Verify.vue +0 -0
  65. /package/src/{aj-captcha → element-plus/aj-captcha}/utils/util.js +0 -0
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@truenewx/tnxvue3",
3
- "version": "3.4.0",
3
+ "version": "3.4.2",
4
4
  "description": "互联网技术解决方案:Vue3扩展支持",
5
5
  "private": false,
6
6
  "type": "module",
7
- "main": "src/tnxvue.js",
7
+ "main": "src/tnxvue.ts",
8
+ "types": "src/types.d.ts",
8
9
  "keywords": [
9
10
  "truenewx",
10
11
  "tnxvue3",
@@ -13,54 +14,34 @@
13
14
  "author": "truenewx",
14
15
  "license": "Apache-2.0",
15
16
  "scripts": {
16
- "dev": "vite",
17
- "build": "vite build",
18
- "preview": "vite preview"
17
+ "tnxvue3-dev": "vite",
18
+ "tnxvue3-build": "vite build",
19
+ "tnxvue3-preview": "vite preview"
19
20
  },
20
21
  "peerDependencies": {
21
- "element-plus": "~2.9.0",
22
- "bootstrap-vue-next": "~0.28.0",
22
+ "@element-plus/icons-vue": "~2.3.0",
23
+ "async-validator": "~4.2.0",
24
+ "element-plus": "~2.11.0",
25
+ "bootstrap-vue-next": "~0.40.0",
26
+ "tdesign-icons-vue-next": "~0.4.0",
27
+ "tdesign-mobile-vue": "~1.11.0",
28
+ "tdesign-vue-next": "~1.17.0",
29
+ "validator": "~13.15.0",
23
30
  "vue": "~3.5.0",
24
- "vue-router": "~4.5.0"
31
+ "vue-router": "~4.6.0"
25
32
  },
26
33
  "dependencies": {
27
- "@truenewx/tnxcore": "3.4.0",
28
- "@element-plus/icons-vue": "2.3.1",
29
- "async-validator": "4.2.5",
34
+ "@truenewx/tnxcore": "3.4.1",
30
35
  "mitt": "3.0.1"
31
36
  },
32
37
  "devDependencies": {
33
- "@vitejs/plugin-vue": "5.2.3",
34
- "vite": "6.2.2",
35
- "eslint": "9.22.0",
36
- "eslint-plugin-vue": "9.33.0"
37
- },
38
- "eslintConfig": {
39
- "root": true,
40
- "env": {
41
- "node": true
42
- },
43
- "extends": [
44
- "plugin:vue/vue3-essential",
45
- "eslint:recommended"
46
- ],
47
- "rules": {
48
- "eqeqeq": "warn",
49
- "no-unused-vars": [
50
- "warn",
51
- {
52
- "vars": "local",
53
- "args": "none"
54
- }
55
- ],
56
- "no-undef": "warn",
57
- "no-useless-escape": "warn",
58
- "no-empty": "off",
59
- "vue/no-side-effects-in-computed-properties": "warn",
60
- "vue/no-mutating-props": "warn",
61
- "vue/no-v-model-argument": "off",
62
- "vue/multi-word-component-names": "off"
63
- }
38
+ "@vitejs/plugin-vue": "6.0.1",
39
+ "vite": "7.2.2",
40
+ "eslint": "9.39.1",
41
+ "eslint-plugin-vue": "10.5.1",
42
+ "vue-eslint-parser": "10.2.0",
43
+ "@eslint/js": "9.39.1",
44
+ "globals": "16.5.0"
64
45
  },
65
46
  "browserslist": [
66
47
  "> 1%",
@@ -1,79 +1,79 @@
1
- <template>
2
- <BAlert class="tnxbsv-alert" :model-value="modelValue" :variant="type">
3
- <div class="d-flex">
4
- <div class="tnxbsv-alert-icon">
5
- <i :class="iconClass"/>
6
- </div>
7
- <div class="tnxbsv-alert-content">
8
- <slot></slot>
9
- </div>
10
- </div>
11
- </BAlert>
12
- </template>
13
-
14
- <script>
15
- import {BAlert} from 'bootstrap-vue-next';
16
-
17
- export default {
18
- name: 'TnxbsvAlert',
19
- components: {BAlert},
20
- props: {
21
- modelValue: {
22
- type: Boolean,
23
- default: true,
24
- },
25
- type: {
26
- type: String,
27
- default: 'light',
28
- },
29
- icon: String,
30
- },
31
- data() {
32
- return {};
33
- },
34
- computed: {
35
- iconClass() {
36
- if (this.icon) {
37
- return this.icon;
38
- }
39
- let iconClass = '';
40
- switch (this.type) {
41
- case 'success':
42
- iconClass += 'bi-check-circle-fill text-success';
43
- break;
44
- case 'danger':
45
- iconClass += 'bi-x-circle-fill text-danger';
46
- break;
47
- case 'warning':
48
- iconClass += 'bi-exclamation-circle-fill text-warning';
49
- break;
50
- case 'light':
51
- iconClass += 'text-secondary';
52
- break;
53
- default:
54
- iconClass += 'text-' + this.type;
55
- }
56
- if (!iconClass.startsWith('bi-')) {
57
- iconClass = 'bi-info-circle-fill ' + iconClass;
58
- }
59
- iconClass = 'bi ' + iconClass;
60
- return iconClass;
61
- },
62
- },
63
- methods: {}
64
- }
65
- </script>
66
-
67
- <style>
68
- .tnxbsv-alert-icon {
69
- line-height: 1.3125rem;
70
- }
71
-
72
- .tnxbsv-alert-content {
73
- margin-left: 0.5rem;
74
- font-size: 0.875rem;
75
- display: flex;
76
- flex-direction: column;
77
- justify-content: center;
78
- }
79
- </style>
1
+ <template>
2
+ <BAlert class="tnxbsv-alert" :model-value="modelValue" :variant="type">
3
+ <div class="d-flex">
4
+ <div class="tnxbsv-alert-icon">
5
+ <i :class="iconClass"/>
6
+ </div>
7
+ <div class="tnxbsv-alert-content">
8
+ <slot></slot>
9
+ </div>
10
+ </div>
11
+ </BAlert>
12
+ </template>
13
+
14
+ <script>
15
+ import {BAlert} from 'bootstrap-vue-next';
16
+
17
+ export default {
18
+ name: 'TnxbsvAlert',
19
+ components: {BAlert},
20
+ props: {
21
+ modelValue: {
22
+ type: Boolean,
23
+ default: true,
24
+ },
25
+ type: {
26
+ type: String,
27
+ default: 'light',
28
+ },
29
+ icon: String,
30
+ },
31
+ data() {
32
+ return {};
33
+ },
34
+ computed: {
35
+ iconClass() {
36
+ if (this.icon) {
37
+ return this.icon;
38
+ }
39
+ let iconClass = '';
40
+ switch (this.type) {
41
+ case 'success':
42
+ iconClass += 'bi-check-circle-fill text-success';
43
+ break;
44
+ case 'danger':
45
+ iconClass += 'bi-x-circle-fill text-danger';
46
+ break;
47
+ case 'warning':
48
+ iconClass += 'bi-exclamation-circle-fill text-warning';
49
+ break;
50
+ case 'light':
51
+ iconClass += 'text-secondary';
52
+ break;
53
+ default:
54
+ iconClass += 'text-' + this.type;
55
+ }
56
+ if (!iconClass.startsWith('bi-')) {
57
+ iconClass = 'bi-info-circle-fill ' + iconClass;
58
+ }
59
+ iconClass = 'bi ' + iconClass;
60
+ return iconClass;
61
+ },
62
+ },
63
+ methods: {}
64
+ }
65
+ </script>
66
+
67
+ <style>
68
+ .tnxbsv-alert-icon {
69
+ line-height: 1.3125rem;
70
+ }
71
+
72
+ .tnxbsv-alert-content {
73
+ margin-left: 0.5rem;
74
+ font-size: 0.875rem;
75
+ display: flex;
76
+ flex-direction: column;
77
+ justify-content: center;
78
+ }
79
+ </style>
@@ -1,40 +1,40 @@
1
- <template>
2
- <BButton class="tnxbsv-button" :variant="type || 'light'" :loading="loading" :disabled="loading">
3
- <i class="me-1" :class="icon" v-if="icon"></i>
4
- <div>
5
- <slot></slot>
6
- </div>
7
- <template #loading>
8
- <LoadingIcon class="me-1" theme="inherit"/>
9
- <div>
10
- <slot></slot>
11
- </div>
12
- </template>
13
- </BButton>
14
- </template>
15
-
16
- <script>
17
- import {BButton} from 'bootstrap-vue-next';
18
- import LoadingIcon from '../loading-icon/LoadingIcon.vue';
19
-
20
- export default {
21
- name: 'TnxbsvButton',
22
- components: {BButton, LoadingIcon},
23
- props: {
24
- type: String,
25
- icon: String,
26
- loading: Boolean,
27
- },
28
- data() {
29
- return {};
30
- },
31
- methods: {}
32
- }
33
- </script>
34
-
35
- <style>
36
- .tnxbsv-button {
37
- display: flex;
38
- align-items: center;
39
- }
40
- </style>
1
+ <template>
2
+ <BButton class="tnxbsv-button" :variant="type || 'light'" :loading="loading" :disabled="loading">
3
+ <i class="me-1" :class="icon" v-if="icon"></i>
4
+ <div>
5
+ <slot></slot>
6
+ </div>
7
+ <template #loading>
8
+ <LoadingIcon class="me-1" theme="inherit"/>
9
+ <div>
10
+ <slot></slot>
11
+ </div>
12
+ </template>
13
+ </BButton>
14
+ </template>
15
+
16
+ <script>
17
+ import {BButton} from 'bootstrap-vue-next';
18
+ import LoadingIcon from '../loading-icon/LoadingIcon.vue';
19
+
20
+ export default {
21
+ name: 'TnxbsvButton',
22
+ components: {BButton, LoadingIcon},
23
+ props: {
24
+ type: String,
25
+ icon: String,
26
+ loading: Boolean,
27
+ },
28
+ data() {
29
+ return {};
30
+ },
31
+ methods: {}
32
+ }
33
+ </script>
34
+
35
+ <style>
36
+ .tnxbsv-button {
37
+ display: flex;
38
+ align-items: center;
39
+ }
40
+ </style>
@@ -92,12 +92,11 @@ export default {
92
92
  }];
93
93
  this.initModel();
94
94
  } else {
95
- let vm = this;
96
- window.tnx.app.rpc.resolveEnumItems(this.type, this.subtype, function (items) {
97
- vm.items = items;
98
- vm.initModel();
99
- }, {
95
+ window.tnx.app.rpc.resolveEnumItems(this.type, this.subtype, {
100
96
  app: this.app,
97
+ }).then(items => {
98
+ this.items = items;
99
+ this.initModel();
101
100
  });
102
101
  }
103
102
  }