af-mobile-client-vue3 1.3.1 → 1.3.3

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,114 +1,114 @@
1
- {
2
- "name": "af-mobile-client-vue3",
3
- "type": "module",
4
- "version": "1.3.1",
5
- "packageManager": "pnpm@10.13.1",
6
- "description": "Vue + Vite component lib",
7
- "engines": {
8
- "node": ">=20.19.0"
9
- },
10
- "scripts": {
11
- "dev": "cross-env MOCK_SERVER_PORT=8086 vite",
12
- "compress": "node ./compress.js",
13
- "build:dev": "vue-tsc --noEmit && vite build --mode development",
14
- "build:pro": "vue-tsc --noEmit && vite build --mode production && pnpm run compress",
15
- "preview": "vite preview",
16
- "lint": "eslint .",
17
- "lint:fix": "eslint . --fix",
18
- "release": "bumpp --commit --push --tag",
19
- "typecheck": "vue-tsc --noEmit",
20
- "commitlint": "commitlint --edit",
21
- "prepare": "simple-git-hooks"
22
- },
23
- "dependencies": {
24
- "@iconify/vue": "4.3.0",
25
- "@micro-zoe/micro-app": "1.0.0-rc.26",
26
- "@unhead/vue": "2.0.12",
27
- "@vant/area-data": "^2.0.0",
28
- "@vant/touch-emulator": "^1.4.0",
29
- "@vant/use": "^1.6.0",
30
- "@vueuse/core": "^13.5.0",
31
- "axios": "^1.10.0",
32
- "crypto-js": "^4.2.0",
33
- "dayjs": "^1.11.13",
34
- "echarts": "^5.6.0",
35
- "lodash-es": "^4.17.21",
36
- "nprogress": "^0.2.0",
37
- "ol": "^10.5.0",
38
- "pinia": "^3.0.3",
39
- "pinia-plugin-persistedstate": "^4.4.1",
40
- "resize-detector": "^0.3.0",
41
- "vant": "^4.9.21",
42
- "vconsole": "^3.15.1",
43
- "vue": "^3.5.17",
44
- "vue-i18n": "^11.1.10",
45
- "vue-router": "^4.5.1",
46
- "vue3-hash-calendar": "^1.1.3"
47
- },
48
- "devDependencies": {
49
- "@antfu/eslint-config": "4.17.0",
50
- "@commitlint/cli": "^19.8.1",
51
- "@commitlint/config-conventional": "^19.8.1",
52
- "@commitlint/types": "^19.8.1",
53
- "@iconify/json": "2.2.318",
54
- "@iconify/utils": "^2.3.0",
55
- "@intlify/unplugin-vue-i18n": "^6.0.8",
56
- "@types/crypto-js": "^4.2.2",
57
- "@types/lodash-es": "^4.17.12",
58
- "@types/node": "^24.0.14",
59
- "@types/nprogress": "^0.2.3",
60
- "@unocss/eslint-config": "66.3.3",
61
- "@vitejs/plugin-legacy": "^7.0.1",
62
- "@vitejs/plugin-vue": "^6.0.0",
63
- "autoprefixer": "^10.4.21",
64
- "bumpp": "^10.2.0",
65
- "consola": "^3.4.2",
66
- "cross-env": "^7.0.3",
67
- "eslint": "^9.31.0",
68
- "eslint-plugin-format": "^1.0.1",
69
- "less": "^4.4.0",
70
- "lint-staged": "^16.1.2",
71
- "mockjs": "^1.1.0",
72
- "postcss-mobile-forever": "^5.0.0",
73
- "rollup": "^4.45.1",
74
- "simple-git-hooks": "^2.13.0",
75
- "tar": "^7.4.3",
76
- "terser": "^5.43.1",
77
- "typescript": "^5.8.3",
78
- "unocss": "66.3.3",
79
- "vite": "^7.0.5",
80
- "vite-plugin-compression": "^0.5.1",
81
- "vite-plugin-mock-dev-server": "^1.9.1",
82
- "vite-plugin-pwa": "^1.0.1",
83
- "vite-plugin-sitemap": "^0.8.2",
84
- "vite-plugin-vconsole": "^2.1.1",
85
- "vite-plugin-vue-devtools": "^7.7.7",
86
- "vue-tsc": "^3.0.2"
87
- },
88
- "pnpm": {
89
- "allowedDeprecatedVersions": {
90
- "glob": "7.2.3",
91
- "inflight": "1.0.6",
92
- "sourcemap-codec": "1.4.8"
93
- },
94
- "peerDependencyRules": {
95
- "allowedVersions": {}
96
- },
97
- "onlyBuiltDependencies": [
98
- "core-js",
99
- "esbuild",
100
- "simple-git-hooks",
101
- "unrs-resolver"
102
- ]
103
- },
104
- "resolutions": {
105
- "vite": "^7.0.5"
106
- },
107
- "simple-git-hooks": {
108
- "pre-commit": "pnpm lint-staged",
109
- "commit-msg": "pnpm commitlint $1"
110
- },
111
- "lint-staged": {
112
- "*": "eslint --fix"
113
- }
114
- }
1
+ {
2
+ "name": "af-mobile-client-vue3",
3
+ "type": "module",
4
+ "version": "1.3.3",
5
+ "packageManager": "pnpm@10.13.1",
6
+ "description": "Vue + Vite component lib",
7
+ "engines": {
8
+ "node": ">=20.19.0"
9
+ },
10
+ "scripts": {
11
+ "dev": "cross-env MOCK_SERVER_PORT=8086 vite",
12
+ "compress": "node ./compress.js",
13
+ "build:dev": "vue-tsc --noEmit && vite build --mode development && pnpm run compress",
14
+ "build:pro": "vue-tsc --noEmit && vite build --mode production && pnpm run compress",
15
+ "preview": "vite preview",
16
+ "lint": "eslint .",
17
+ "lint:fix": "eslint . --fix",
18
+ "release": "bumpp --commit --push --tag",
19
+ "typecheck": "vue-tsc --noEmit",
20
+ "commitlint": "commitlint --edit",
21
+ "prepare": "simple-git-hooks"
22
+ },
23
+ "dependencies": {
24
+ "@iconify/vue": "4.3.0",
25
+ "@micro-zoe/micro-app": "1.0.0-rc.26",
26
+ "@unhead/vue": "2.0.12",
27
+ "@vant/area-data": "^2.0.0",
28
+ "@vant/touch-emulator": "^1.4.0",
29
+ "@vant/use": "^1.6.0",
30
+ "@vueuse/core": "^13.5.0",
31
+ "axios": "^1.10.0",
32
+ "crypto-js": "^4.2.0",
33
+ "dayjs": "^1.11.13",
34
+ "echarts": "^5.6.0",
35
+ "lodash-es": "^4.17.21",
36
+ "nprogress": "^0.2.0",
37
+ "ol": "^10.5.0",
38
+ "pinia": "^3.0.3",
39
+ "pinia-plugin-persistedstate": "^4.4.1",
40
+ "resize-detector": "^0.3.0",
41
+ "vant": "^4.9.21",
42
+ "vconsole": "^3.15.1",
43
+ "vue": "^3.5.17",
44
+ "vue-i18n": "^11.1.10",
45
+ "vue-router": "^4.5.1",
46
+ "vue3-hash-calendar": "^1.1.3"
47
+ },
48
+ "devDependencies": {
49
+ "@antfu/eslint-config": "4.17.0",
50
+ "@commitlint/cli": "^19.8.1",
51
+ "@commitlint/config-conventional": "^19.8.1",
52
+ "@commitlint/types": "^19.8.1",
53
+ "@iconify/json": "2.2.318",
54
+ "@iconify/utils": "^2.3.0",
55
+ "@intlify/unplugin-vue-i18n": "^6.0.8",
56
+ "@types/crypto-js": "^4.2.2",
57
+ "@types/lodash-es": "^4.17.12",
58
+ "@types/node": "^24.0.14",
59
+ "@types/nprogress": "^0.2.3",
60
+ "@unocss/eslint-config": "66.3.3",
61
+ "@vitejs/plugin-legacy": "^7.0.1",
62
+ "@vitejs/plugin-vue": "^6.0.0",
63
+ "autoprefixer": "^10.4.21",
64
+ "bumpp": "^10.2.0",
65
+ "consola": "^3.4.2",
66
+ "cross-env": "^7.0.3",
67
+ "eslint": "^9.31.0",
68
+ "eslint-plugin-format": "^1.0.1",
69
+ "less": "^4.4.0",
70
+ "lint-staged": "^16.1.2",
71
+ "mockjs": "^1.1.0",
72
+ "postcss-mobile-forever": "^5.0.0",
73
+ "rollup": "^4.45.1",
74
+ "simple-git-hooks": "^2.13.0",
75
+ "tar": "^7.4.3",
76
+ "terser": "^5.43.1",
77
+ "typescript": "^5.8.3",
78
+ "unocss": "66.3.3",
79
+ "vite": "^7.0.5",
80
+ "vite-plugin-compression": "^0.5.1",
81
+ "vite-plugin-mock-dev-server": "^1.9.1",
82
+ "vite-plugin-pwa": "^1.0.1",
83
+ "vite-plugin-sitemap": "^0.8.2",
84
+ "vite-plugin-vconsole": "^2.1.1",
85
+ "vite-plugin-vue-devtools": "^7.7.7",
86
+ "vue-tsc": "^3.0.2"
87
+ },
88
+ "pnpm": {
89
+ "allowedDeprecatedVersions": {
90
+ "glob": "7.2.3",
91
+ "inflight": "1.0.6",
92
+ "sourcemap-codec": "1.4.8"
93
+ },
94
+ "peerDependencyRules": {
95
+ "allowedVersions": {}
96
+ },
97
+ "onlyBuiltDependencies": [
98
+ "core-js",
99
+ "esbuild",
100
+ "simple-git-hooks",
101
+ "unrs-resolver"
102
+ ]
103
+ },
104
+ "resolutions": {
105
+ "vite": "^7.0.5"
106
+ },
107
+ "simple-git-hooks": {
108
+ "pre-commit": "pnpm lint-staged",
109
+ "commit-msg": "pnpm commitlint $1"
110
+ },
111
+ "lint-staged": {
112
+ "*": "eslint --fix"
113
+ }
114
+ }
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ import type { ComputedRef } from 'vue'
2
3
  import { rootRouteList } from '@af-mobile-client-vue3/config/routes'
3
4
  import { NavBar as VanNavBar } from 'vant/es'
4
5
  import { computed } from 'vue'
@@ -15,7 +16,7 @@ const showNavBar = computed(() => route.meta.navBar)
15
16
  * Get page title
16
17
  * Located in src/locales/json
17
18
  */
18
- const title = computed(() => {
19
+ const title: ComputedRef<string> = computed(() => {
19
20
  if (!route.meta)
20
21
  return ''
21
22
 
@@ -31,6 +31,7 @@ const {
31
31
  scanOptions,
32
32
  customAdd = false,
33
33
  customEdit = false,
34
+ hideAllActions = false,
34
35
  } = defineProps<{
35
36
  configName?: string
36
37
  fixQueryForm?: object
@@ -44,6 +45,8 @@ const {
44
45
  // 是否自定义新增、编辑按钮
45
46
  customAdd?: boolean
46
47
  customEdit?: boolean
48
+ // 是否隐藏所有操作按钮
49
+ hideAllActions?: boolean
47
50
  }>()
48
51
 
49
52
  const emit = defineEmits<{
@@ -151,7 +154,7 @@ const currInst = getCurrentInstance()
151
154
 
152
155
  // 列表底部的文字显示
153
156
  function finishedBottomText() {
154
- if (buttonState.value?.add && buttonState.value.add === true && (filterButtonPermissions('add').state === false || ((filterButtonPermissions('add').state === true && userState.f.resources.f_role_name.includes((filterButtonPermissions('add').roleStr))))))
157
+ if (!hideAllActions && buttonState.value?.add && buttonState.value.add === true && (filterButtonPermissions('add').state === false || ((filterButtonPermissions('add').state === true && userState.f.resources.f_role_name.includes((filterButtonPermissions('add').roleStr))))))
155
158
  return '已加载全部内容,如需新增请点击右上角的 + 号'
156
159
  else
157
160
  return '已加载全部内容'
@@ -560,7 +563,7 @@ defineExpose({
560
563
  />
561
564
  </VanCol>
562
565
  <!-- 新增按钮,放在查询框后、查询条件下拉按钮前 -->
563
- <VanCol v-if="buttonState?.add && buttonState.add === true && (filterButtonPermissions('add').state === false || ((filterButtonPermissions('add').state === true && userState.f.resources.f_role_name.includes((filterButtonPermissions('add').roleStr)))))" class="add-col">
566
+ <VanCol v-if="!hideAllActions && buttonState?.add && buttonState.add === true && (filterButtonPermissions('add').state === false || ((filterButtonPermissions('add').state === true && userState.f.resources.f_role_name.includes((filterButtonPermissions('add').roleStr)))))" class="add-col">
564
567
  <VanButton
565
568
  icon="add"
566
569
  type="primary"
@@ -629,7 +632,7 @@ defineExpose({
629
632
  />
630
633
  </p>
631
634
  </div>
632
- <div class="action-buttons">
635
+ <div v-if="!hideAllActions" class="action-buttons">
633
636
  <VanButton
634
637
  v-for="btn in btnList"
635
638
  :key="btn.dataIndex"
@@ -704,7 +707,7 @@ defineExpose({
704
707
  </VanRow>
705
708
  <!-- 添加详情插槽 -->
706
709
  <slot name="item-detail" :item="item" />
707
- <VanRow v-if="allActions.length > 0" gutter="20" class="card_item_bottom">
710
+ <VanRow v-if="!hideAllActions && allActions.length > 0" gutter="20" class="card_item_bottom">
708
711
  <VanCol span="4">
709
712
  <VanPopover
710
713
  v-if="getActionGroups(item, index).more.length"
@@ -24,7 +24,7 @@ router.beforeEach((to: EnhancedRouteLocation) => {
24
24
  routeCacheStore.addRoute(to)
25
25
 
26
26
  // 页面 title
27
- setPageTitle(to.meta.title)
27
+ setPageTitle(to.meta.title as string)
28
28
  })
29
29
 
30
30
  router.afterEach(() => {