af-mobile-client-vue3 1.0.91 → 1.0.94

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/.env.development CHANGED
@@ -1,4 +1,4 @@
1
- NODE_ENV=development
2
- VITE_APP_PUBLIC_PATH=/
3
- VITE_APP_PREVIEW=true
4
- VITE_APP_API_BASE_URL=/api
1
+ NODE_ENV=development
2
+ VITE_APP_PUBLIC_PATH=/
3
+ VITE_APP_PREVIEW=true
4
+ VITE_APP_API_BASE_URL=/api
@@ -1,91 +1,91 @@
1
- import path from 'node:path'
2
- import process from 'node:process'
3
- import vue from '@vitejs/plugin-vue'
4
- import legacy from '@vitejs/plugin-legacy'
5
- import UnoCSS from 'unocss/vite'
6
- import viteCompression from 'vite-plugin-compression'
7
- import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
8
- import { VitePWA } from 'vite-plugin-pwa'
9
- import Sitemap from 'vite-plugin-sitemap'
10
- import mockDevServerPlugin from 'vite-plugin-mock-dev-server'
11
- import { createViteVConsole } from './vconsole'
12
-
13
- export function createVitePlugins() {
14
- const root = process.cwd()
15
-
16
- return [
17
- vue({
18
- template: {
19
- compilerOptions: {
20
- // 注册自定义组件micro-app 防止控制台警告
21
- isCustomElement: tag => tag.startsWith('micro-app'),
22
- },
23
- },
24
- }),
25
-
26
- // https://github.com/jbaubree/vite-plugin-sitemap
27
- Sitemap(),
28
-
29
- // https://github.com/pengzhanbo/vite-plugin-mock-dev-server
30
- mockDevServerPlugin(),
31
-
32
- // svg icon
33
- createSvgIconsPlugin({
34
- // 指定图标文件夹
35
- iconDirs: [path.resolve(root, 'src/icons/svg')],
36
- // 指定 symbolId 格式
37
- symbolId: 'icon-[dir]-[name]',
38
- }),
39
-
40
- // 生产环境 gzip 压缩资源
41
- viteCompression({
42
- algorithm: 'gzip',
43
- // 文件大于10240b(10kb)时才压缩文件
44
- threshold: 10240,
45
- // 禁止在控制台输出压缩结果
46
- verbose: false,
47
- // 压缩完文件后删除源文件
48
- deleteOriginFile: false,
49
- }),
50
-
51
- legacy({
52
- targets: ['defaults', 'not IE 11'],
53
- }),
54
-
55
- // https://github.com/antfu/unocss
56
- // see uno.config.ts for config
57
- UnoCSS(),
58
-
59
- // https://github.com/vadxq/vite-plugin-vconsole
60
- createViteVConsole(),
61
-
62
- // https://github.com/antfu/vite-plugin-pwa
63
- VitePWA({
64
- registerType: 'autoUpdate',
65
- includeAssets: ['favicon.svg', 'safari-pinned-tab.svg'],
66
- manifest: {
67
- name: 'af-mobile-client-vue3',
68
- short_name: 'af-mobile-client-vue3',
69
- theme_color: '#ffffff',
70
- icons: [
71
- {
72
- src: '/pwa-192x192.png',
73
- sizes: '192x192',
74
- type: 'image/png',
75
- },
76
- {
77
- src: '/pwa-512x512.png',
78
- sizes: '512x512',
79
- type: 'image/png',
80
- },
81
- {
82
- src: '/pwa-512x512.png',
83
- sizes: '512x512',
84
- type: 'image/png',
85
- purpose: 'any maskable',
86
- },
87
- ],
88
- },
89
- }),
90
- ]
91
- }
1
+ import path from 'node:path'
2
+ import process from 'node:process'
3
+ import vue from '@vitejs/plugin-vue'
4
+ import legacy from '@vitejs/plugin-legacy'
5
+ import UnoCSS from 'unocss/vite'
6
+ import viteCompression from 'vite-plugin-compression'
7
+ import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
8
+ import { VitePWA } from 'vite-plugin-pwa'
9
+ import Sitemap from 'vite-plugin-sitemap'
10
+ import mockDevServerPlugin from 'vite-plugin-mock-dev-server'
11
+ import { createViteVConsole } from './vconsole'
12
+
13
+ export function createVitePlugins() {
14
+ const root = process.cwd()
15
+
16
+ return [
17
+ vue({
18
+ template: {
19
+ compilerOptions: {
20
+ // 注册自定义组件micro-app 防止控制台警告
21
+ isCustomElement: tag => tag.startsWith('micro-app'),
22
+ },
23
+ },
24
+ }),
25
+
26
+ // https://github.com/jbaubree/vite-plugin-sitemap
27
+ Sitemap(),
28
+
29
+ // https://github.com/pengzhanbo/vite-plugin-mock-dev-server
30
+ mockDevServerPlugin(),
31
+
32
+ // svg icon
33
+ createSvgIconsPlugin({
34
+ // 指定图标文件夹
35
+ iconDirs: [path.resolve(root, 'src/icons/svg')],
36
+ // 指定 symbolId 格式
37
+ symbolId: 'icon-[dir]-[name]',
38
+ }),
39
+
40
+ // 生产环境 gzip 压缩资源
41
+ viteCompression({
42
+ algorithm: 'gzip',
43
+ // 文件大于10240b(10kb)时才压缩文件
44
+ threshold: 10240,
45
+ // 禁止在控制台输出压缩结果
46
+ verbose: false,
47
+ // 压缩完文件后删除源文件
48
+ deleteOriginFile: false,
49
+ }),
50
+
51
+ legacy({
52
+ targets: ['defaults', 'not IE 11'],
53
+ }),
54
+
55
+ // https://github.com/antfu/unocss
56
+ // see uno.config.ts for config
57
+ UnoCSS(),
58
+
59
+ // https://github.com/vadxq/vite-plugin-vconsole
60
+ createViteVConsole(),
61
+
62
+ // https://github.com/antfu/vite-plugin-pwa
63
+ VitePWA({
64
+ registerType: 'autoUpdate',
65
+ includeAssets: ['favicon.svg', 'safari-pinned-tab.svg'],
66
+ manifest: {
67
+ name: 'af-mobile-client-vue3',
68
+ short_name: 'af-mobile-client-vue3',
69
+ theme_color: '#ffffff',
70
+ icons: [
71
+ {
72
+ src: '/pwa-192x192.png',
73
+ sizes: '192x192',
74
+ type: 'image/png',
75
+ },
76
+ {
77
+ src: '/pwa-512x512.png',
78
+ sizes: '512x512',
79
+ type: 'image/png',
80
+ },
81
+ {
82
+ src: '/pwa-512x512.png',
83
+ sizes: '512x512',
84
+ type: 'image/png',
85
+ purpose: 'any maskable',
86
+ },
87
+ ],
88
+ },
89
+ }),
90
+ ]
91
+ }
package/index.html CHANGED
@@ -1,17 +1,17 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="theme-color" content="#ffffff" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover, user-scalable=no"/>
7
- <link rel="icon" href="/favicon.ico" />
8
- </head>
9
- <body>
10
- <div id="system-app"></div>
11
- <script type="module" src="/src/main.ts"></script>
12
- <noscript>
13
- This website requires JavaScript to function properly.
14
- Please enable JavaScript to continue.
15
- </noscript>
16
- </body>
17
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="theme-color" content="#ffffff" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover, user-scalable=no"/>
7
+ <link rel="icon" href="/favicon.ico" />
8
+ </head>
9
+ <body>
10
+ <div id="system-app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ <noscript>
13
+ This website requires JavaScript to function properly.
14
+ Please enable JavaScript to continue.
15
+ </noscript>
16
+ </body>
17
+ </html>
package/package.json CHANGED
@@ -1,108 +1,108 @@
1
- {
2
- "name": "af-mobile-client-vue3",
3
- "type": "module",
4
- "version": "1.0.91",
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.94",
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.24",
23
+ "@vant/area-data": "^2.0.0",
24
+ "@unhead/vue": "^2.0.5",
25
+ "@vant/touch-emulator": "^1.4.0",
26
+ "@vant/use": "^1.6.0",
27
+ "@vueuse/core": "^13.1.0",
28
+ "animate.css": "^4.1.1",
29
+ "axios": "^1.8.4",
30
+ "crypto-js": "^4.2.0",
31
+ "echarts": "^5.6.0",
32
+ "lodash-es": "^4.17.21",
33
+ "nprogress": "^0.2.0",
34
+ "pinia": "^3.0.2",
35
+ "pinia-plugin-persistedstate": "^4.2.0",
36
+ "qs": "^6.14.0",
37
+ "resize-detector": "^0.3.0",
38
+ "store": "^2.0.12",
39
+ "vant": "^4.9.18",
40
+ "vconsole": "^3.15.1",
41
+ "vue": "^3.5.13",
42
+ "vue-router": "^4.5.0"
43
+ },
44
+ "devDependencies": {
45
+ "@antfu/eslint-config": "^4.12.0",
46
+ "@types/crypto-js": "^4.2.2",
47
+ "@types/lodash-es": "^4.17.12",
48
+ "@types/node": "^22.14.1",
49
+ "@types/nprogress": "^0.2.3",
50
+ "@types/store": "^2.0.5",
51
+ "@unocss/eslint-plugin": "^66.1.0-beta.11",
52
+ "@unocss/preset-rem-to-px": "66.1.0-beta.11",
53
+ "@vitejs/plugin-legacy": "^6.0.2",
54
+ "@vitejs/plugin-vue": "^5.2.3",
55
+ "autoprefixer": "^10.4.21",
56
+ "bumpp": "^10.1.0",
57
+ "commitizen": "^4.3.1",
58
+ "consola": "^3.4.2",
59
+ "cross-env": "^7.0.3",
60
+ "cz-emoji-chinese": "^0.3.1",
61
+ "eslint": "^9.24.0",
62
+ "eslint-ts-patch": "^8.57.0-0",
63
+ "husky": "^9.1.7",
64
+ "less": "^4.3.0",
65
+ "mockjs": "^1.1.0",
66
+ "postcss-mobile-forever": "^5.0.0",
67
+ "rollup": "^4.40.0",
68
+ "terser": "^5.39.0",
69
+ "typescript": "^5.8.3",
70
+ "unocss": "^66.1.0-beta.11",
71
+ "unplugin-auto-import": "^19.1.2",
72
+ "unplugin-vue-components": "^28.4.1",
73
+ "unplugin-vue-router": "^0.12.0",
74
+ "vite": "^6.2.6",
75
+ "vite-plugin-compression": "^0.5.1",
76
+ "vite-plugin-mock-dev-server": "^1.8.5",
77
+ "vite-plugin-pwa": "^1.0.0",
78
+ "vite-plugin-sitemap": "^0.7.1",
79
+ "vite-plugin-svg-icons": "^2.0.1",
80
+ "vite-plugin-vconsole": "^2.1.1",
81
+ "vite-plugin-vue-devtools": "^7.7.2",
82
+ "vite-plugin-vue-layouts": "^0.11.0",
83
+ "vitest": "^3.1.1",
84
+ "vue-tsc": "^2.2.8"
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,40 +1,40 @@
1
- import { http } from '@af-mobile-client-vue3/utils/http'
2
-
3
- import { loginApi } from '@af-mobile-client-vue3/services/api/Login'
4
- import { get, post } from '@af-mobile-client-vue3/services/restTools'
5
-
6
- export interface BasicResponseModel<T = any> {
7
- code: number
8
- msg: string
9
- data: T
10
- }
11
-
12
- export function login(data: any) {
13
- return post(
14
- loginApi.Login,
15
- data,
16
- )
17
- }
18
-
19
- export function OALogin(data: any) {
20
- return get(`/af-system/user/${data.username}/${data.password}/智慧OA`)
21
- }
22
-
23
- /**
24
- * @description: 获取用户信息
25
- */
26
- export function getUserInfo() {
27
- return get(
28
- '/getUserInfo',
29
- )
30
- }
31
-
32
- /**
33
- * @description: 用户登出
34
- */
35
- export function doLogout() {
36
- return http.request({
37
- url: loginApi.Logout,
38
- method: 'DELETE',
39
- })
40
- }
1
+ import { http } from '@af-mobile-client-vue3/utils/http'
2
+
3
+ import { loginApi } from '@af-mobile-client-vue3/services/api/Login'
4
+ import { get, post } from '@af-mobile-client-vue3/services/restTools'
5
+
6
+ export interface BasicResponseModel<T = any> {
7
+ code: number
8
+ msg: string
9
+ data: T
10
+ }
11
+
12
+ export function login(data: any) {
13
+ return post(
14
+ loginApi.Login,
15
+ data,
16
+ )
17
+ }
18
+
19
+ export function OALogin(data: any) {
20
+ return get(`/af-system/user/${data.username}/${data.password}/智慧OA`)
21
+ }
22
+
23
+ /**
24
+ * @description: 获取用户信息
25
+ */
26
+ export function getUserInfo() {
27
+ return get(
28
+ '/getUserInfo',
29
+ )
30
+ }
31
+
32
+ /**
33
+ * @description: 用户登出
34
+ */
35
+ export function doLogout() {
36
+ return http.request({
37
+ url: loginApi.Logout,
38
+ method: 'DELETE',
39
+ })
40
+ }
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { ref } from 'vue'
3
2
  import { getDictItemByValue } from '@af-mobile-client-vue3/utils/dictUtil'
3
+ import { ref } from 'vue'
4
4
 
5
5
  const { serviceName, dictName, dictValue } = withDefaults(defineProps<{
6
6
  serviceName?: string
@@ -32,7 +32,7 @@ const { configName, serviceName, fixQueryForm } = withDefaults(defineProps<{
32
32
  serviceName: undefined,
33
33
  })
34
34
 
35
- const emit = defineEmits(['toDetail', 'addOption', 'handleCall', 'handleLocation'])
35
+ const emit = defineEmits([])
36
36
 
37
37
  const router = useRouter()
38
38
 
@@ -93,7 +93,7 @@ const pageSize = 20
93
93
 
94
94
  const searchValue = ref('')
95
95
 
96
- const inputSpan = ref(20)
96
+ const inputSpan = ref(16)
97
97
 
98
98
  // 数据加载状态
99
99
  const loading = ref(false)
@@ -313,9 +313,9 @@ function addOption() {
313
313
  // emit('addOption', totalCount.value)
314
314
  }
315
315
 
316
- // 处理拨打电话
317
- function handleCall(item: any) {
318
- emit('handleCall', item)
316
+ // 处理按钮点击
317
+ function handleButtonClick(btn, item) {
318
+ emit(`${btn.btnIcon}`, item)
319
319
  }
320
320
  </script>
321
321
 
@@ -332,7 +332,7 @@ function handleCall(item: any) {
332
332
  @search="onRefresh"
333
333
  />
334
334
  </VanCol>
335
- <VanCol span="4" class="search-icon">
335
+ <VanCol span="8" class="search-icon">
336
336
  <XCellListFilter
337
337
  v-model:sortord-val="sortordVal"
338
338
  v-model:order-val="orderVal"
@@ -384,10 +384,12 @@ function handleCall(item: any) {
384
384
  </div>
385
385
  <div class="action-buttons">
386
386
  <VanButton
387
+ v-for="btn in btnList"
388
+ :key="btn.dataIndex"
387
389
  class="action-button"
388
- icon="phone"
390
+ :icon="btn.btnIcon"
389
391
  size="small"
390
- @click.stop="handleCall(item)"
392
+ @click.stop="handleButtonClick(btn, item)"
391
393
  />
392
394
  </div>
393
395
  </div>
@@ -680,9 +682,10 @@ function handleCall(item: any) {
680
682
  .search-icon {
681
683
  display: flex;
682
684
  align-items: center;
683
- justify-content: center;
685
+ justify-content: flex-end;
684
686
  height: 100%;
685
- padding: var(--van-search-padding);
687
+ padding: 0;
688
+ flex-shrink: 0;
686
689
  }
687
690
  }
688
691