@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
@@ -0,0 +1,58 @@
1
+ const js = require('@eslint/js');
2
+ const globals = require('globals');
3
+ const vue = require('eslint-plugin-vue');
4
+ const vueParser = require('vue-eslint-parser');
5
+
6
+ module.exports = [
7
+ js.configs.recommended,
8
+ {
9
+ files: ['**/*.js'],
10
+ languageOptions: {
11
+ ecmaVersion: 'latest',
12
+ sourceType: 'module',
13
+ globals: {
14
+ ...globals.browser,
15
+ ...globals.node
16
+ }
17
+ },
18
+ rules: {
19
+ 'eqeqeq': 'warn',
20
+ 'no-unused-vars': ['warn', {
21
+ vars: 'local',
22
+ args: 'none'
23
+ }],
24
+ 'no-undef': 'warn',
25
+ 'no-useless-escape': 'warn',
26
+ 'no-empty': 'off',
27
+ }
28
+ },
29
+ {
30
+ files: ['**/*.vue'],
31
+ languageOptions: {
32
+ parser: vueParser,
33
+ parserOptions: {
34
+ ecmaVersion: 'latest',
35
+ sourceType: 'module'
36
+ },
37
+ globals: {
38
+ ...globals.browser,
39
+ ...globals.node
40
+ }
41
+ },
42
+ plugins: {
43
+ vue
44
+ },
45
+ rules: {
46
+ 'eqeqeq': 'warn',
47
+ 'no-unused-vars': ['warn', {
48
+ vars: 'local',
49
+ args: 'none'
50
+ }],
51
+ 'no-undef': 'warn',
52
+ 'no-useless-escape': 'warn',
53
+ 'no-empty': 'off',
54
+ 'vue/no-side-effects-in-computed-properties': 'warn',
55
+ 'vue/no-mutating-props': 'warn'
56
+ }
57
+ }
58
+ ];
package/index.html CHANGED
@@ -1,12 +1,12 @@
1
- <!DOCTYPE html>
2
- <html lang="zh-CN">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>tnxvue3</title>
7
- </head>
8
- <body>
9
- <div id="app"></div>
10
- <script type="module" src="./sample/main.js"></script>
11
- </body>
12
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>tnxvue3</title>
7
+ </head>
8
+ <body>
9
+ <div id="app"></div>
10
+ <script type="module" src="./sample/main.js"></script>
11
+ </body>
12
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truenewx/tnxvue3",
3
- "version": "3.0.18",
3
+ "version": "3.4.1",
4
4
  "description": "互联网技术解决方案:Vue3扩展支持",
5
5
  "private": false,
6
6
  "type": "module",
@@ -13,54 +13,30 @@
13
13
  "author": "truenewx",
14
14
  "license": "Apache-2.0",
15
15
  "scripts": {
16
- "dev": "vite",
17
- "build": "vite build",
18
- "preview": "vite preview"
16
+ "tnxvue3-dev": "vite",
17
+ "tnxvue3-build": "vite build",
18
+ "tnxvue3-preview": "vite preview"
19
19
  },
20
20
  "peerDependencies": {
21
- "element-plus": "~2.8.0",
22
- "bootstrap-vue-next": "~0.26.0",
21
+ "element-plus": "~2.11.0",
22
+ "bootstrap-vue-next": "~0.40.0",
23
23
  "vue": "~3.5.0",
24
- "vue-router": "~4.4.0"
24
+ "vue-router": "~4.6.0"
25
25
  },
26
26
  "dependencies": {
27
- "@truenewx/tnxcore": "3.0.16",
28
- "@element-plus/icons-vue": "2.3.1",
27
+ "@truenewx/tnxcore": "3.4.1",
28
+ "@element-plus/icons-vue": "2.3.2",
29
29
  "async-validator": "4.2.5",
30
30
  "mitt": "3.0.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@vitejs/plugin-vue": "5.2.1",
34
- "vite": "6.2.0",
35
- "eslint": "7.32.0",
36
- "eslint-plugin-vue": "8.7.1"
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
- }
33
+ "@vitejs/plugin-vue": "6.0.1",
34
+ "vite": "7.2.2",
35
+ "eslint": "9.39.1",
36
+ "eslint-plugin-vue": "10.5.1",
37
+ "vue-eslint-parser": "10.2.0",
38
+ "@eslint/js": "9.39.1",
39
+ "globals": "16.5.0"
64
40
  },
65
41
  "browserslist": [
66
42
  "> 1%",
@@ -161,33 +161,33 @@ export default {
161
161
  proxy.$parent.$emit('ready', proxy)
162
162
  })
163
163
 
164
- window.removeEventListener("touchmove", function (e) {
164
+ window.removeEventListener("touchmove", (e) => {
165
165
  move(e);
166
166
  });
167
- window.removeEventListener("mousemove", function (e) {
167
+ window.removeEventListener("mousemove", (e) => {
168
168
  move(e);
169
169
  });
170
170
 
171
171
  //鼠标松开
172
- window.removeEventListener("touchend", function () {
172
+ window.removeEventListener("touchend", () => {
173
173
  end();
174
174
  });
175
- window.removeEventListener("mouseup", function () {
175
+ window.removeEventListener("mouseup", () => {
176
176
  end();
177
177
  });
178
178
 
179
- window.addEventListener("touchmove", function (e) {
179
+ window.addEventListener("touchmove", (e) => {
180
180
  move(e);
181
181
  });
182
- window.addEventListener("mousemove", function (e) {
182
+ window.addEventListener("mousemove", (e) => {
183
183
  move(e);
184
184
  });
185
185
 
186
186
  //鼠标松开
187
- window.addEventListener("touchend", function () {
187
+ window.addEventListener("touchend", () => {
188
188
  end();
189
189
  });
190
- window.addEventListener("mouseup", function () {
190
+ window.addEventListener("mouseup", () => {
191
191
  end();
192
192
  });
193
193
  }
@@ -289,7 +289,7 @@ export default {
289
289
  leftBarClass.value = 'border-danger';
290
290
  moveBlockIcon.value = 'icon-close';
291
291
  passFlag.value = false
292
- setTimeout(function () {
292
+ setTimeout(() => {
293
293
  refresh();
294
294
  }, 1000);
295
295
  proxy.$parent.$emit('error', proxy)
@@ -1,19 +1,11 @@
1
1
  // 获取验证图片以及token
2
2
  export function reqGet(data) {
3
- return new Promise(resolve => {
4
- window.tnx.app.rpc.post('/captcha/generate', data, function(res) {
5
- resolve(res);
6
- });
7
- });
3
+ return window.tnx.app.rpc.post('/captcha/generate', data);
8
4
  }
9
5
 
10
6
  // 滑动或者点选验证
11
7
  export function reqCheck(data) {
12
- return new Promise(resolve => {
13
- window.tnx.app.rpc.post('/captcha/check', data, function(res) {
14
- resolve(res);
15
- });
16
- });
8
+ return window.tnx.app.rpc.post('/captcha/check', data);
17
9
  }
18
10
 
19
11
 
@@ -1,4 +1,4 @@
1
- import CryptoES from 'crypto-es';
1
+ import * as CryptoES from 'crypto-es';
2
2
 
3
3
  /**
4
4
  * @word 要加密的内容
@@ -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
  }