af-mobile-client-vue3 1.0.75 → 1.0.77

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 CHANGED
@@ -1,108 +1,108 @@
1
- {
2
- "name": "af-mobile-client-vue3",
3
- "type": "module",
4
- "version": "1.0.75",
5
- "description": "Vue + Vite component lib",
6
- "license": "MIT",
7
- "engines": {
8
- "node": ">=18.12.0",
9
- "pnpm": ">=8.15.0"
10
- },
11
- "scripts": {
12
- "dev": "cross-env MOCK_SERVER_PORT=8086 vite",
13
- "build": "vue-tsc --noEmit && vite build",
14
- "build:dev": "vue-tsc --noEmit && vite build --mode=development",
15
- "preview": "vite preview",
16
- "lint": "eslint . && vue-tsc --noEmit",
17
- "lint:fix": "eslint . --fix",
18
- "test": "vitest",
19
- "release": "bumpp --commit --push --tag"
20
- },
21
- "dependencies": {
22
- "@micro-zoe/micro-app": "1.0.0-rc.4",
23
- "@unhead/vue": "^1.8.11",
24
- "@vant/area-data": "^1.5.1",
25
- "@vant/touch-emulator": "^1.4.0",
26
- "@vant/use": "^1.6.0",
27
- "@vueuse/core": "^10.9.0",
28
- "animate.css": "^4.1.1",
29
- "axios": "^1.6.7",
30
- "crypto-js": "^4.2.0",
31
- "echarts": "^5.5.0",
32
- "lodash-es": "^4.17.21",
33
- "nprogress": "^0.2.0",
34
- "pinia": "^2.1.7",
35
- "pinia-plugin-persistedstate": "^3.2.1",
36
- "pnpm": "^9.4.0",
37
- "qs": "^6.11.2",
38
- "resize-detector": "^0.3.0",
39
- "store": "^2.0.12",
40
- "vant": "^4.9.0",
41
- "vconsole": "^3.15.1",
42
- "vue": "^3.4.21",
43
- "vue-router": "^4.3.0"
44
- },
45
- "devDependencies": {
46
- "@antfu/eslint-config": "2.8.0",
47
- "@types/crypto-js": "^4.2.2",
48
- "@types/lodash-es": "^4.17.12",
49
- "@types/node": "^20.11.25",
50
- "@types/nprogress": "^0.2.3",
51
- "@types/store": "^2.0.5",
52
- "@unocss/eslint-plugin": "^0.58.5",
53
- "@unocss/preset-rem-to-px": "^0.58.5",
54
- "@vitejs/plugin-legacy": "^5.3.1",
55
- "@vitejs/plugin-vue": "^5.0.4",
56
- "autoprefixer": "^10.4.18",
57
- "bumpp": "^9.4.0",
58
- "commitizen": "^4.3.0",
59
- "consola": "^3.2.3",
60
- "cross-env": "^7.0.3",
61
- "cz-emoji-chinese": "^0.3.1",
62
- "eslint": "npm:eslint-ts-patch@8.57.0-0",
63
- "eslint-ts-patch": "8.57.0-0",
64
- "husky": "^9.0.11",
65
- "less": "^4.2.0",
66
- "mockjs": "^1.1.0",
67
- "postcss-mobile-forever": "^4.1.1",
68
- "rollup": "^4.12.1",
69
- "terser": "^5.29.1",
70
- "typescript": "^5.4.2",
71
- "unocss": "^0.58.5",
72
- "unplugin-auto-import": "^0.17.5",
73
- "unplugin-vue-components": "^0.26.0",
74
- "unplugin-vue-router": "^0.8.4",
75
- "vite": "^5.1.5",
76
- "vite-plugin-compression": "^0.5.1",
77
- "vite-plugin-mock-dev-server": "^1.4.7",
78
- "vite-plugin-pwa": "^0.19.2",
79
- "vite-plugin-sitemap": "^0.5.3",
80
- "vite-plugin-svg-icons": "^2.0.1",
81
- "vite-plugin-vconsole": "^2.1.1",
82
- "vite-plugin-vue-layouts": "^0.11.0",
83
- "vitest": "^1.3.1",
84
- "vue-tsc": "^2.0.6"
85
- },
86
- "pnpm": {
87
- "peerDependencyRules": {
88
- "ignoreMissing": [
89
- "postcss",
90
- "esbuild"
91
- ],
92
- "allowedVersions": {
93
- "rollup": "^4.x"
94
- }
95
- }
96
- },
97
- "config": {
98
- "commitizen": {
99
- "path": "./node_modules/cz-emoji-chinese"
100
- },
101
- "cz-emoji-chinese": {
102
- "skipQuestions": [
103
- "body",
104
- "scope"
105
- ]
106
- }
107
- }
108
- }
1
+ {
2
+ "name": "af-mobile-client-vue3",
3
+ "type": "module",
4
+ "version": "1.0.77",
5
+ "description": "Vue + Vite component lib",
6
+ "license": "MIT",
7
+ "engines": {
8
+ "node": ">=18.12.0",
9
+ "pnpm": ">=8.15.0"
10
+ },
11
+ "scripts": {
12
+ "dev": "cross-env MOCK_SERVER_PORT=8086 vite",
13
+ "build": "vue-tsc --noEmit && vite build",
14
+ "build:dev": "vue-tsc --noEmit && vite build --mode=development",
15
+ "preview": "vite preview",
16
+ "lint": "eslint . && vue-tsc --noEmit",
17
+ "lint:fix": "eslint . --fix",
18
+ "test": "vitest",
19
+ "release": "bumpp --commit --push --tag"
20
+ },
21
+ "dependencies": {
22
+ "@micro-zoe/micro-app": "1.0.0-rc.4",
23
+ "@unhead/vue": "^1.8.11",
24
+ "@vant/area-data": "^1.5.1",
25
+ "@vant/touch-emulator": "^1.4.0",
26
+ "@vant/use": "^1.6.0",
27
+ "@vueuse/core": "^10.9.0",
28
+ "animate.css": "^4.1.1",
29
+ "axios": "^1.6.7",
30
+ "crypto-js": "^4.2.0",
31
+ "echarts": "^5.5.0",
32
+ "lodash-es": "^4.17.21",
33
+ "nprogress": "^0.2.0",
34
+ "pinia": "^2.1.7",
35
+ "pinia-plugin-persistedstate": "^3.2.1",
36
+ "pnpm": "^9.4.0",
37
+ "qs": "^6.11.2",
38
+ "resize-detector": "^0.3.0",
39
+ "store": "^2.0.12",
40
+ "vant": "^4.9.0",
41
+ "vconsole": "^3.15.1",
42
+ "vue": "^3.4.21",
43
+ "vue-router": "^4.3.0"
44
+ },
45
+ "devDependencies": {
46
+ "@antfu/eslint-config": "2.8.0",
47
+ "@types/crypto-js": "^4.2.2",
48
+ "@types/lodash-es": "^4.17.12",
49
+ "@types/node": "^20.11.25",
50
+ "@types/nprogress": "^0.2.3",
51
+ "@types/store": "^2.0.5",
52
+ "@unocss/eslint-plugin": "^0.58.5",
53
+ "@unocss/preset-rem-to-px": "^0.58.5",
54
+ "@vitejs/plugin-legacy": "^5.3.1",
55
+ "@vitejs/plugin-vue": "^5.0.4",
56
+ "autoprefixer": "^10.4.18",
57
+ "bumpp": "^9.4.0",
58
+ "commitizen": "^4.3.0",
59
+ "consola": "^3.2.3",
60
+ "cross-env": "^7.0.3",
61
+ "cz-emoji-chinese": "^0.3.1",
62
+ "eslint": "npm:eslint-ts-patch@8.57.0-0",
63
+ "eslint-ts-patch": "8.57.0-0",
64
+ "husky": "^9.0.11",
65
+ "less": "^4.2.0",
66
+ "mockjs": "^1.1.0",
67
+ "postcss-mobile-forever": "^4.1.1",
68
+ "rollup": "^4.12.1",
69
+ "terser": "^5.29.1",
70
+ "typescript": "^5.4.2",
71
+ "unocss": "^0.58.5",
72
+ "unplugin-auto-import": "^0.17.5",
73
+ "unplugin-vue-components": "^0.26.0",
74
+ "unplugin-vue-router": "^0.8.4",
75
+ "vite": "^5.1.5",
76
+ "vite-plugin-compression": "^0.5.1",
77
+ "vite-plugin-mock-dev-server": "^1.4.7",
78
+ "vite-plugin-pwa": "^0.19.2",
79
+ "vite-plugin-sitemap": "^0.5.3",
80
+ "vite-plugin-svg-icons": "^2.0.1",
81
+ "vite-plugin-vconsole": "^2.1.1",
82
+ "vite-plugin-vue-layouts": "^0.11.0",
83
+ "vitest": "^1.3.1",
84
+ "vue-tsc": "^2.0.6"
85
+ },
86
+ "pnpm": {
87
+ "peerDependencyRules": {
88
+ "ignoreMissing": [
89
+ "postcss",
90
+ "esbuild"
91
+ ],
92
+ "allowedVersions": {
93
+ "rollup": "^4.x"
94
+ }
95
+ }
96
+ },
97
+ "config": {
98
+ "commitizen": {
99
+ "path": "./node_modules/cz-emoji-chinese"
100
+ },
101
+ "cz-emoji-chinese": {
102
+ "skipQuestions": [
103
+ "body",
104
+ "scope"
105
+ ]
106
+ }
107
+ }
108
+ }
@@ -63,6 +63,8 @@ onBeforeMount(() => {
63
63
 
64
64
  const resultLabel = computed({
65
65
  get() {
66
+ if (!resultValue.value)
67
+ return ''
66
68
  const res = props.columns.filter((item) => {
67
69
  const data = props.offOption ? item : item[props.option.value]
68
70
  return data === resultValue.value[0]
@@ -1,85 +1,87 @@
1
- <script setup lang="ts">
2
- import { ref } from 'vue'
3
- import { getDictItemByValue } from '@af-mobile-client-vue3/utils/dictUtil'
4
-
5
- const { dictName, dictValue } = withDefaults(defineProps<{
6
- dictName?: string
7
- dictValue: any
8
- isColor?: boolean
9
- }>(), {
10
- dictName: '',
11
- isColor: true,
12
- })
13
-
14
- // 字面值
15
- const label = ref('')
16
-
17
- // 样式类名
18
- const className = ref('')
19
-
20
- initComponent()
21
-
22
- // 组件初始化
23
- function initComponent() {
24
- if (!dictValue) {
25
- label.value = '-'
26
- return
27
- }
28
- if (!dictName || dictName === '') {
29
- label.value = dictValue.toString()
30
- return
31
- }
32
- getDictItemByValue(dictName, dictValue, (result) => {
33
- if (result == null) {
34
- label.value = dictValue.toString()
35
- }
36
- else {
37
- label.value = result.label
38
- className.value = `badge-${result.status}`
39
- }
40
- })
41
- }
42
- </script>
43
-
44
- <template>
45
- <span :class="className !== '' ? className : undefined">{{ label }}</span>
46
- </template>
47
-
48
- <style scoped lang="less">
49
- .badge-blue {
50
- color: #1890ff;
51
- }
52
- .badge-green {
53
- color: #52c41a;
54
- }
55
- .badge-orange {
56
- color: #fa8c16;
57
- }
58
- .badge-cyan {
59
- color: #13c2c2;
60
- }
61
- .badge-yellow {
62
- color: #fadb14;
63
- }
64
- .badge-red {
65
- color: #f5222d;
66
- }
67
- .badge-pink {
68
- color: #eb2f96;
69
- }
70
- .badge-purple {
71
- color: #722ed1;
72
- }
73
- .badge-geekblue {
74
- color: #2f54eb;
75
- }
76
- .badge-volcano {
77
- color: #fa541c;
78
- }
79
- .badge-gold {
80
- color: #faad14;
81
- }
82
- .badge-lime {
83
- color: #a0d911;
84
- }
85
- </style>
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ import { getDictItemByValue } from '@af-mobile-client-vue3/utils/dictUtil'
4
+
5
+ const { serviceName, dictName, dictValue } = withDefaults(defineProps<{
6
+ serviceName?: string
7
+ dictName?: string
8
+ dictValue: any
9
+ isColor?: boolean
10
+ }>(), {
11
+ serviceName: undefined,
12
+ dictName: '',
13
+ isColor: true,
14
+ })
15
+
16
+ // 字面值
17
+ const label = ref('')
18
+
19
+ // 样式类名
20
+ const className = ref('')
21
+
22
+ initComponent()
23
+
24
+ // 组件初始化
25
+ function initComponent() {
26
+ if (!dictValue) {
27
+ label.value = '-'
28
+ return
29
+ }
30
+ if (!dictName || dictName === '') {
31
+ label.value = dictValue.toString()
32
+ return
33
+ }
34
+ getDictItemByValue(dictName, serviceName, dictValue, (result) => {
35
+ if (result == null) {
36
+ label.value = dictValue.toString()
37
+ }
38
+ else {
39
+ label.value = result.label
40
+ className.value = `badge-${result.status}`
41
+ }
42
+ })
43
+ }
44
+ </script>
45
+
46
+ <template>
47
+ <span :class="className !== '' ? className : undefined">{{ label }}</span>
48
+ </template>
49
+
50
+ <style scoped lang="less">
51
+ .badge-blue {
52
+ color: #1890ff;
53
+ }
54
+ .badge-green {
55
+ color: #52c41a;
56
+ }
57
+ .badge-orange {
58
+ color: #fa8c16;
59
+ }
60
+ .badge-cyan {
61
+ color: #13c2c2;
62
+ }
63
+ .badge-yellow {
64
+ color: #fadb14;
65
+ }
66
+ .badge-red {
67
+ color: #f5222d;
68
+ }
69
+ .badge-pink {
70
+ color: #eb2f96;
71
+ }
72
+ .badge-purple {
73
+ color: #722ed1;
74
+ }
75
+ .badge-geekblue {
76
+ color: #2f54eb;
77
+ }
78
+ .badge-volcano {
79
+ color: #fa541c;
80
+ }
81
+ .badge-gold {
82
+ color: #faad14;
83
+ }
84
+ .badge-lime {
85
+ color: #a0d911;
86
+ }
87
+ </style>