af-mobile-client-vue3 1.1.8 โ†’ 1.1.10

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 (80) hide show
  1. package/.env +6 -6
  2. package/.env.development +4 -4
  3. package/.env.envoiceShow +6 -6
  4. package/.env.production +6 -6
  5. package/.husky/commit-msg +1 -1
  6. package/.husky/pre-commit +1 -1
  7. package/.vscode/settings.json +61 -61
  8. package/mock/modules/user.mock.ts +152 -152
  9. package/package.json +1 -1
  10. package/public/favicon.svg +4 -4
  11. package/public/safari-pinned-tab.svg +32 -32
  12. package/scripts/verifyCommit.js +19 -19
  13. package/src/App.vue +43 -43
  14. package/src/api/user/index.ts +40 -40
  15. package/src/bootstrap.ts +18 -18
  16. package/src/components/core/NavBar/index.vue +12 -12
  17. package/src/components/core/Tabbar/index.vue +38 -38
  18. package/src/components/core/XGridDropOption/index.vue +151 -151
  19. package/src/components/core/XMultiSelect/index.vue +183 -183
  20. package/src/components/data/XCellDetail/index.vue +106 -106
  21. package/src/components/data/XFormItem/index.vue +105 -107
  22. package/src/components/data/XOlMap/XLocationPicker/index.vue +7 -9
  23. package/src/components/data/XOlMap/index.vue +103 -96
  24. package/src/components/data/XReportForm/XReportFormJsonRender.vue +220 -220
  25. package/src/components/data/XReportForm/index.vue +1079 -1079
  26. package/src/components/data/XReportGrid/XAddReport/index.ts +1 -1
  27. package/src/components/data/XReportGrid/XReportDrawer/index.ts +1 -1
  28. package/src/components/data/XSignature/index.vue +285 -285
  29. package/src/components/data/XTag/index.vue +10 -10
  30. package/src/components/layout/NormalDataLayout/index.vue +70 -70
  31. package/src/components/layout/TabBarLayout/index.vue +40 -40
  32. package/src/components.d.ts +53 -53
  33. package/src/env.d.ts +16 -16
  34. package/src/font-style/font.css +3 -3
  35. package/src/hooks/useCommon.ts +9 -9
  36. package/src/layout/PageLayout.vue +4 -5
  37. package/src/layout/SingleLayout.vue +4 -5
  38. package/src/locales/en-US.json +25 -25
  39. package/src/locales/zh-CN.json +25 -25
  40. package/src/plugins/AppData.ts +38 -38
  41. package/src/router/guards.ts +59 -59
  42. package/src/router/index.ts +61 -61
  43. package/src/router/invoiceRoutes.ts +33 -33
  44. package/src/services/api/common.ts +109 -109
  45. package/src/services/api/manage.ts +8 -8
  46. package/src/services/api/search.ts +16 -16
  47. package/src/services/restTools.ts +56 -56
  48. package/src/services/v3Api.ts +11 -11
  49. package/src/stores/modules/routeCache.ts +22 -0
  50. package/src/stores/modules/setting.ts +52 -52
  51. package/src/stores/mutation-type.ts +7 -7
  52. package/src/utils/authority-utils.ts +84 -84
  53. package/src/utils/crypto.ts +39 -39
  54. package/src/utils/i18n.ts +41 -41
  55. package/src/utils/indexedDB.ts +180 -180
  56. package/src/utils/mobileUtil.ts +26 -26
  57. package/src/utils/routerUtil.ts +271 -271
  58. package/src/utils/runEvalFunction.ts +13 -13
  59. package/src/utils/wechatUtil.ts +9 -9
  60. package/src/views/common/LoadError.vue +64 -64
  61. package/src/views/common/NotFound.vue +68 -68
  62. package/src/views/component/EvaluateRecordView/index.vue +40 -40
  63. package/src/views/component/XCellDetailView/index.vue +217 -217
  64. package/src/views/component/XCellListView/index.vue +2 -2
  65. package/src/views/component/XOlMapView/XLocationPicker/index.vue +0 -2
  66. package/src/views/component/XOlMapView/index.vue +3 -5
  67. package/src/views/component/XReportFormIframeView/index.vue +47 -47
  68. package/src/views/component/XReportFormView/index.vue +13 -13
  69. package/src/views/component/XSignatureView/index.vue +50 -50
  70. package/src/views/component/menu.vue +117 -117
  71. package/src/views/component/notice.vue +46 -46
  72. package/src/views/component/topNav.vue +36 -36
  73. package/src/views/invoiceShow/index.vue +61 -61
  74. package/src/views/user/login/ForgetPasswordForm.vue +94 -94
  75. package/src/views/user/login/LoginTitle.vue +68 -68
  76. package/src/views/user/login/index.vue +22 -22
  77. package/src/views/user/my/index.vue +230 -230
  78. package/src/vue-router.d.ts +9 -9
  79. package/tsconfig.json +43 -43
  80. package/src/stores/modules/cachedView.ts +0 -31
@@ -1,70 +1,70 @@
1
- <script setup lang="ts">
2
- import {
3
- Col as VanCol,
4
- Icon as VanIcon,
5
- Row as VanRow,
6
- } from 'vant'
7
-
8
- const { title } = withDefaults(defineProps<{
9
- // ๆ ‡้ข˜
10
- title: string
11
- }>(), {
12
- })
13
-
14
- // back
15
- const onClickLeft = () => history.back()
16
- </script>
17
-
18
- <template>
19
- <!-- ๅธธ่ง„ๆ•ฐๆฎๅธƒๅฑ€ -->
20
- <main class="layout_main">
21
- <!-- ๅธƒๅฑ€ๅคด้ƒจ -->
22
- <div class="layout_header">
23
- <VanRow class="header_row" justify="space-between">
24
- <VanCol class="header_row_left_col">
25
- <VanIcon class="header_row_icon" name="arrow-left" @click="onClickLeft" />
26
- <span class="header_row_title">{{ title }}</span>
27
- </VanCol>
28
- <VanCol class="header_row_right_col">
29
- <!-- ๅณไพงๅŒบๅŸŸ -->
30
- <slot name="layout_header_row_right_col" />
31
- </VanCol>
32
- </VanRow>
33
- </div>
34
- <!-- ๅธƒๅฑ€ไธปไฝ“ -->
35
- <div class="layout_content">
36
- <slot name="layout_content" />
37
- </div>
38
- </main>
39
- </template>
40
-
41
- <style scoped lang="less">
42
- .layout_main {
43
- display: flex;
44
- flex-flow: column;
45
- width: 100%;
46
- height: 100vh;
47
- .layout_header {
48
- padding: var(--base-interval-1);
49
- .header_row {
50
- align-items: center;
51
- .header_row_left_col {
52
- flex-grow: 1;
53
- .header_row_title {
54
- margin-left: var(--van-padding-xs);
55
- font-size: 20px;
56
- font-weight: bold;
57
- }
58
- }
59
- .header_row_icon {
60
- font-size: 18px;
61
- }
62
- }
63
- }
64
- .layout_content {
65
- flex: 1;
66
- margin-top: var(--van-padding-base);
67
- height: 0;
68
- }
69
- }
70
- </style>
1
+ <script setup lang="ts">
2
+ import {
3
+ Col as VanCol,
4
+ Icon as VanIcon,
5
+ Row as VanRow,
6
+ } from 'vant'
7
+
8
+ const { title } = withDefaults(defineProps<{
9
+ // ๆ ‡้ข˜
10
+ title: string
11
+ }>(), {
12
+ })
13
+
14
+ // back
15
+ const onClickLeft = () => history.back()
16
+ </script>
17
+
18
+ <template>
19
+ <!-- ๅธธ่ง„ๆ•ฐๆฎๅธƒๅฑ€ -->
20
+ <main class="layout_main">
21
+ <!-- ๅธƒๅฑ€ๅคด้ƒจ -->
22
+ <div class="layout_header">
23
+ <VanRow class="header_row" justify="space-between">
24
+ <VanCol class="header_row_left_col">
25
+ <VanIcon class="header_row_icon" name="arrow-left" @click="onClickLeft" />
26
+ <span class="header_row_title">{{ title }}</span>
27
+ </VanCol>
28
+ <VanCol class="header_row_right_col">
29
+ <!-- ๅณไพงๅŒบๅŸŸ -->
30
+ <slot name="layout_header_row_right_col" />
31
+ </VanCol>
32
+ </VanRow>
33
+ </div>
34
+ <!-- ๅธƒๅฑ€ไธปไฝ“ -->
35
+ <div class="layout_content">
36
+ <slot name="layout_content" />
37
+ </div>
38
+ </main>
39
+ </template>
40
+
41
+ <style scoped lang="less">
42
+ .layout_main {
43
+ display: flex;
44
+ flex-flow: column;
45
+ width: 100%;
46
+ height: 100vh;
47
+ .layout_header {
48
+ padding: var(--base-interval-1);
49
+ .header_row {
50
+ align-items: center;
51
+ .header_row_left_col {
52
+ flex-grow: 1;
53
+ .header_row_title {
54
+ margin-left: var(--van-padding-xs);
55
+ font-size: 20px;
56
+ font-weight: bold;
57
+ }
58
+ }
59
+ .header_row_icon {
60
+ font-size: 18px;
61
+ }
62
+ }
63
+ }
64
+ .layout_content {
65
+ flex: 1;
66
+ margin-top: var(--van-padding-base);
67
+ height: 0;
68
+ }
69
+ }
70
+ </style>
@@ -1,40 +1,40 @@
1
- <script setup lang="ts">
2
- import {
3
- Tabbar as VanTabbar,
4
- TabbarItem as VanTabbarItem,
5
- } from 'vant'
6
- import { defineProps } from 'vue'
7
-
8
- const { barList, callbacks } = defineProps<{
9
- barList?: Array<{ icon: string, text: string, method: string }>
10
- callbacks?: object
11
- }>()
12
-
13
- function handleClick(index) {
14
- const methodName = (barList[index] as any).method
15
- callbacks[methodName]()
16
- }
17
- </script>
18
-
19
- <template>
20
- <VanTabbar class="van-bar">
21
- <VanTabbarItem v-for="(item, index) in barList" :key="index" :icon="(item as any).icon" @click="handleClick(index)">
22
- {{ (item as any).text }}
23
- </VanTabbarItem>
24
- </VanTabbar>
25
- </template>
26
-
27
- <style scoped lang="less">
28
- .van-bar {
29
- height: 8vh;
30
- background-color: #f7f8fa;
31
- color: black;
32
- }
33
- .van-tabbar-item:hover {
34
- color: var(--van-text-color-2);
35
- }
36
- :deep(.van-tabbar-item--active) {
37
- background-color: #f7f8fa;
38
- color: black;
39
- }
40
- </style>
1
+ <script setup lang="ts">
2
+ import {
3
+ Tabbar as VanTabbar,
4
+ TabbarItem as VanTabbarItem,
5
+ } from 'vant'
6
+ import { defineProps } from 'vue'
7
+
8
+ const { barList, callbacks } = defineProps<{
9
+ barList?: Array<{ icon: string, text: string, method: string }>
10
+ callbacks?: object
11
+ }>()
12
+
13
+ function handleClick(index) {
14
+ const methodName = (barList[index] as any).method
15
+ callbacks[methodName]()
16
+ }
17
+ </script>
18
+
19
+ <template>
20
+ <VanTabbar class="van-bar">
21
+ <VanTabbarItem v-for="(item, index) in barList" :key="index" :icon="(item as any).icon" @click="handleClick(index)">
22
+ {{ (item as any).text }}
23
+ </VanTabbarItem>
24
+ </VanTabbar>
25
+ </template>
26
+
27
+ <style scoped lang="less">
28
+ .van-bar {
29
+ height: 8vh;
30
+ background-color: #f7f8fa;
31
+ color: black;
32
+ }
33
+ .van-tabbar-item:hover {
34
+ color: var(--van-text-color-2);
35
+ }
36
+ :deep(.van-tabbar-item--active) {
37
+ background-color: #f7f8fa;
38
+ color: black;
39
+ }
40
+ </style>
@@ -1,53 +1,53 @@
1
- /* eslint-disable */
2
- /* prettier-ignore */
3
- // @ts-nocheck
4
- // Generated by unplugin-vue-components
5
- // Read more: https://github.com/vuejs/core/pull/3399
6
- export {}
7
-
8
- declare module 'vue' {
9
- export interface GlobalComponents {
10
- BeautifulLoading: typeof import('./components/core/BeautifulLoading/index.vue')['default']
11
- MicroAppView: typeof import('./components/core/App/MicroAppView.vue')['default']
12
- NavBar: typeof import('./components/core/NavBar/index.vue')['default']
13
- NormalDataLayout: typeof import('./components/layout/NormalDataLayout/index.vue')['default']
14
- RouterLink: typeof import('vue-router')['RouterLink']
15
- RouterView: typeof import('vue-router')['RouterView']
16
- SvgIcon: typeof import('./components/core/SvgIcon/index.vue')['default']
17
- Tabbar: typeof import('./components/core/Tabbar/index.vue')['default']
18
- TabBarLayout: typeof import('./components/layout/TabBarLayout/index.vue')['default']
19
- Uploader: typeof import('./components/core/Uploader/index.vue')['default']
20
- VanArea: typeof import('vant/es')['Area']
21
- VanButton: typeof import('vant/es')['Button']
22
- VanCalendar: typeof import('vant/es')['Calendar']
23
- VanCell: typeof import('vant/es')['Cell']
24
- VanCellGroup: typeof import('vant/es')['CellGroup']
25
- VanCheckbox: typeof import('vant/es')['Checkbox']
26
- VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup']
27
- VanDatePicker: typeof import('vant/es')['DatePicker']
28
- VanField: typeof import('vant/es')['Field']
29
- VanForm: typeof import('vant/es')['Form']
30
- VanLoading: typeof import('vant/es')['Loading']
31
- VanNavBar: typeof import('vant/es')['NavBar']
32
- VanPicker: typeof import('vant/es')['Picker']
33
- VanPopup: typeof import('vant/es')['Popup']
34
- VanRadio: typeof import('vant/es')['Radio']
35
- VanRadioGroup: typeof import('vant/es')['RadioGroup']
36
- VanRate: typeof import('vant/es')['Rate']
37
- VanRow: typeof import('vant/es')['Row']
38
- VanSlider: typeof import('vant/es')['Slider']
39
- VanSpace: typeof import('vant/es')['Space']
40
- VanStepper: typeof import('vant/es')['Stepper']
41
- VanSwitch: typeof import('vant/es')['Switch']
42
- VanTimePicker: typeof import('vant/es')['TimePicker']
43
- XBadge: typeof import('./components/data/XBadge/index.vue')['default']
44
- XCellDetail: typeof import('./components/data/XCellDetail/index.vue')['default']
45
- XCellList: typeof import('./components/data/XCellList/index.vue')['default']
46
- XForm: typeof import('./components/data/XForm/index.vue')['default']
47
- XFormItem: typeof import('./components/data/XFormItem/index.vue')['default']
48
- XMultiSelect: typeof import('./components/core/XMultiSelect/index.vue')['default']
49
- XReportForm: typeof import('./components/data/XReportForm/index.vue')['default']
50
- XReportFormJsonRender: typeof import('./components/data/XReportForm/XReportFormJsonRender.vue')['default']
51
- XSelect: typeof import('./components/core/XSelect/index.vue')['default']
52
- }
53
- }
1
+ /* eslint-disable */
2
+ /* prettier-ignore */
3
+ // @ts-nocheck
4
+ // Generated by unplugin-vue-components
5
+ // Read more: https://github.com/vuejs/core/pull/3399
6
+ export {}
7
+
8
+ declare module 'vue' {
9
+ export interface GlobalComponents {
10
+ BeautifulLoading: typeof import('./components/core/BeautifulLoading/index.vue')['default']
11
+ MicroAppView: typeof import('./components/core/App/MicroAppView.vue')['default']
12
+ NavBar: typeof import('./components/core/NavBar/index.vue')['default']
13
+ NormalDataLayout: typeof import('./components/layout/NormalDataLayout/index.vue')['default']
14
+ RouterLink: typeof import('vue-router')['RouterLink']
15
+ RouterView: typeof import('vue-router')['RouterView']
16
+ SvgIcon: typeof import('./components/core/SvgIcon/index.vue')['default']
17
+ Tabbar: typeof import('./components/core/Tabbar/index.vue')['default']
18
+ TabBarLayout: typeof import('./components/layout/TabBarLayout/index.vue')['default']
19
+ Uploader: typeof import('./components/core/Uploader/index.vue')['default']
20
+ VanArea: typeof import('vant/es')['Area']
21
+ VanButton: typeof import('vant/es')['Button']
22
+ VanCalendar: typeof import('vant/es')['Calendar']
23
+ VanCell: typeof import('vant/es')['Cell']
24
+ VanCellGroup: typeof import('vant/es')['CellGroup']
25
+ VanCheckbox: typeof import('vant/es')['Checkbox']
26
+ VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup']
27
+ VanDatePicker: typeof import('vant/es')['DatePicker']
28
+ VanField: typeof import('vant/es')['Field']
29
+ VanForm: typeof import('vant/es')['Form']
30
+ VanLoading: typeof import('vant/es')['Loading']
31
+ VanNavBar: typeof import('vant/es')['NavBar']
32
+ VanPicker: typeof import('vant/es')['Picker']
33
+ VanPopup: typeof import('vant/es')['Popup']
34
+ VanRadio: typeof import('vant/es')['Radio']
35
+ VanRadioGroup: typeof import('vant/es')['RadioGroup']
36
+ VanRate: typeof import('vant/es')['Rate']
37
+ VanRow: typeof import('vant/es')['Row']
38
+ VanSlider: typeof import('vant/es')['Slider']
39
+ VanSpace: typeof import('vant/es')['Space']
40
+ VanStepper: typeof import('vant/es')['Stepper']
41
+ VanSwitch: typeof import('vant/es')['Switch']
42
+ VanTimePicker: typeof import('vant/es')['TimePicker']
43
+ XBadge: typeof import('./components/data/XBadge/index.vue')['default']
44
+ XCellDetail: typeof import('./components/data/XCellDetail/index.vue')['default']
45
+ XCellList: typeof import('./components/data/XCellList/index.vue')['default']
46
+ XForm: typeof import('./components/data/XForm/index.vue')['default']
47
+ XFormItem: typeof import('./components/data/XFormItem/index.vue')['default']
48
+ XMultiSelect: typeof import('./components/core/XMultiSelect/index.vue')['default']
49
+ XReportForm: typeof import('./components/data/XReportForm/index.vue')['default']
50
+ XReportFormJsonRender: typeof import('./components/data/XReportForm/XReportFormJsonRender.vue')['default']
51
+ XSelect: typeof import('./components/core/XSelect/index.vue')['default']
52
+ }
53
+ }
package/src/env.d.ts CHANGED
@@ -1,16 +1,16 @@
1
- /// <reference types="vite/client" />
2
-
3
- declare module '*.vue' {
4
- import type { DefineComponent } from 'vue'
5
-
6
- // eslint-disable-next-line ts/no-empty-object-type
7
- const component: DefineComponent<{}, {}, any>
8
- export default component
9
- }
10
-
11
- interface Window {
12
- mount: any
13
- remount: any
14
- unmount: any
15
- readonly __MICRO_APP_ENVIRONMENT__: any
16
- }
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module '*.vue' {
4
+ import type { DefineComponent } from 'vue'
5
+
6
+ // eslint-disable-next-line ts/no-empty-object-type
7
+ const component: DefineComponent<{}, {}, any>
8
+ export default component
9
+ }
10
+
11
+ interface Window {
12
+ mount: any
13
+ remount: any
14
+ unmount: any
15
+ readonly __MICRO_APP_ENVIRONMENT__: any
16
+ }
@@ -1,4 +1,4 @@
1
- @font-face {
2
- font-family: 'PingFangSC-Regular-woff2';
3
- src: url('./PingFangSC-Regular.woff2') format('woff2');
1
+ @font-face {
2
+ font-family: 'PingFangSC-Regular-woff2';
3
+ src: url('./PingFangSC-Regular.woff2') format('woff2');
4
4
  }
@@ -1,9 +1,9 @@
1
- export function formatDate(date) {
2
- const year = date.getFullYear()
3
- const month = (date.getMonth() + 1).toString().padStart(2, '0') // ๆœˆไปฝๅŠ 1๏ผŒๅนถ่กฅ้›ถ
4
- const day = date.getDate().toString().padStart(2, '0') // ๆ—ฅๆœŸ่กฅ้›ถ
5
- const hours = date.getHours().toString().padStart(2, '0') // ๅฐๆ—ถ่กฅ้›ถ
6
- const minutes = date.getMinutes().toString().padStart(2, '0') // ๅˆ†้’Ÿ่กฅ้›ถ
7
- const seconds = date.getSeconds().toString().padStart(2, '0') // ็ง’ๆ•ฐ่กฅ้›ถ
8
- return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
9
- }
1
+ export function formatDate(date) {
2
+ const year = date.getFullYear()
3
+ const month = (date.getMonth() + 1).toString().padStart(2, '0') // ๆœˆไปฝๅŠ 1๏ผŒๅนถ่กฅ้›ถ
4
+ const day = date.getDate().toString().padStart(2, '0') // ๆ—ฅๆœŸ่กฅ้›ถ
5
+ const hours = date.getHours().toString().padStart(2, '0') // ๅฐๆ—ถ่กฅ้›ถ
6
+ const minutes = date.getMinutes().toString().padStart(2, '0') // ๅˆ†้’Ÿ่กฅ้›ถ
7
+ const seconds = date.getSeconds().toString().padStart(2, '0') // ็ง’ๆ•ฐ่กฅ้›ถ
8
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
9
+ }
@@ -1,16 +1,15 @@
1
1
  <script setup lang="ts">
2
2
  import Tabbar from '@af-mobile-client-vue3/components/core/Tabbar/index.vue'
3
- import useCachedViewStore from '@af-mobile-client-vue3/stores/modules/cachedView'
3
+ import useRouteCache from '@af-mobile-client-vue3/stores/modules/routeCache'
4
4
  import useRouteTransitionNameStore from '@af-mobile-client-vue3/stores/modules/routeTransitionName'
5
5
  import { getFunction } from '@af-mobile-client-vue3/utils/common'
6
6
  import { storeToRefs } from 'pinia'
7
7
  import { computed } from 'vue'
8
8
  import { useRoute } from 'vue-router'
9
9
 
10
- const cachedViews = computed(() => {
11
- return useCachedViewStore().cachedViewList
10
+ const keepAliveRouteNames = computed(() => {
11
+ return useRouteCache().routeCaches as string[]
12
12
  })
13
-
14
13
  const routeTransitionNameStore = useRouteTransitionNameStore()
15
14
  const { routeTransitionName } = storeToRefs(routeTransitionNameStore)
16
15
 
@@ -32,7 +31,7 @@ const routeState = useRoute()
32
31
  <!-- transition ๅŒ…่ฃน router-view ๆŽงๅˆถๅฐไผšๆœ‰่ญฆๅ‘Š๏ผŒrouter-viewๅœจๅค–ๅฑ‚ไผšๅฏผ่‡ดๅŠจ็”ปๅผ€ๅง‹ๆ—ถไผš้—ช่ฟ‡ไธ€ๅธงไธŠไธ€็บง้กต้ขใ€‚ๅ…ˆๅฟฝ็•ฅ่ญฆๅ‘Š่ฟ™ๆ ทๅ†™ -->
33
32
  <transition :name="routeTransitionName">
34
33
  <router-view v-slot="{ Component, route }">
35
- <keep-alive :include="cachedViews">
34
+ <keep-alive :include="keepAliveRouteNames">
36
35
  <div :key="route.name" class="app-wrapper">
37
36
  <component :is="Component" />
38
37
  </div>
@@ -1,13 +1,12 @@
1
1
  <script setup lang="ts">
2
- import useCachedViewStore from '@af-mobile-client-vue3/stores/modules/cachedView'
2
+ import useRouteCache from '@af-mobile-client-vue3/stores/modules/routeCache'
3
3
  import useRouteTransitionNameStore from '@af-mobile-client-vue3/stores/modules/routeTransitionName'
4
4
  import { storeToRefs } from 'pinia'
5
5
  import { computed } from 'vue'
6
6
 
7
- const cachedViews = computed(() => {
8
- return useCachedViewStore().cachedViewList
7
+ const keepAliveRouteNames = computed(() => {
8
+ return useRouteCache().routeCaches as string[]
9
9
  })
10
-
11
10
  const routeTransitionNameStore = useRouteTransitionNameStore()
12
11
  const { routeTransitionName } = storeToRefs(routeTransitionNameStore)
13
12
  </script>
@@ -16,7 +15,7 @@ const { routeTransitionName } = storeToRefs(routeTransitionNameStore)
16
15
  <div class="pageLayout">
17
16
  <router-view v-slot="{ Component, route }">
18
17
  <transition :name="routeTransitionName">
19
- <keep-alive :include="cachedViews">
18
+ <keep-alive :include="keepAliveRouteNames">
20
19
  <div :key="route.name" class="app-wrapper">
21
20
  <component :is="Component" />
22
21
  </div>
@@ -1,25 +1,25 @@
1
- {
2
- "home": {
3
- "darkMode": "๐ŸŒ— Dark Mode",
4
- "mockGuide": "๐Ÿ’ฟ Mock Guide",
5
- "language": "๐Ÿ“š Language",
6
- "404Demo": "๐Ÿ™… Page 404 Demo",
7
- "echartsDemo": "๐Ÿ“Š Echarts Demo",
8
- "persistPiniaState": "๐Ÿ Persistent Pinia state",
9
- "unocssExample": "๐ŸŽจ Unocss example"
10
- },
11
- "mock": {
12
- "fromAsyncData": "Data from asynchronous requests",
13
- "noData": "No data",
14
- "pull": "Pull",
15
- "reset": "Reset"
16
- },
17
- "charts": {
18
- "January": "Jan",
19
- "February": "Feb",
20
- "March": "Mar",
21
- "April": "Apr",
22
- "May": "May",
23
- "June": "Jun"
24
- }
25
- }
1
+ {
2
+ "home": {
3
+ "darkMode": "๐ŸŒ— Dark Mode",
4
+ "mockGuide": "๐Ÿ’ฟ Mock Guide",
5
+ "language": "๐Ÿ“š Language",
6
+ "404Demo": "๐Ÿ™… Page 404 Demo",
7
+ "echartsDemo": "๐Ÿ“Š Echarts Demo",
8
+ "persistPiniaState": "๐Ÿ Persistent Pinia state",
9
+ "unocssExample": "๐ŸŽจ Unocss example"
10
+ },
11
+ "mock": {
12
+ "fromAsyncData": "Data from asynchronous requests",
13
+ "noData": "No data",
14
+ "pull": "Pull",
15
+ "reset": "Reset"
16
+ },
17
+ "charts": {
18
+ "January": "Jan",
19
+ "February": "Feb",
20
+ "March": "Mar",
21
+ "April": "Apr",
22
+ "May": "May",
23
+ "June": "Jun"
24
+ }
25
+ }
@@ -1,25 +1,25 @@
1
- {
2
- "home": {
3
- "darkMode": "๐ŸŒ— ๆš—้ป‘ๆจกๅผ",
4
- "mockGuide": "๐Ÿ’ฟ Mock ๆŒ‡ๅ—",
5
- "language": "๐Ÿ“š ่ฏญ่จ€",
6
- "echartsDemo": "๐Ÿ“Š Echarts ๆผ”็คบ",
7
- "persistPiniaState": "๐Ÿ ๆŒไน…ๅŒ– Pinia ็Šถๆ€",
8
- "404Demo": "๐Ÿ™… 404้กต ๆผ”็คบ",
9
- "unocssExample": "๐ŸŽจ Unocss ็คบไพ‹"
10
- },
11
- "mock": {
12
- "fromAsyncData": "ๆฅ่‡ชๅผ‚ๆญฅ่ฏทๆฑ‚็š„ๆ•ฐๆฎ",
13
- "pull": "่ฏทๆฑ‚",
14
- "reset": "ๆธ…็ฉบ",
15
- "noData": "ๆš‚ๆ— ๆ•ฐๆฎ"
16
- },
17
- "charts": {
18
- "January": "1ๆœˆ",
19
- "February": "2ๆœˆ",
20
- "March": "3ๆœˆ",
21
- "April": "4ๆœˆ",
22
- "May": "5ๆœˆ",
23
- "June": "6ๆœˆ"
24
- }
25
- }
1
+ {
2
+ "home": {
3
+ "darkMode": "๐ŸŒ— ๆš—้ป‘ๆจกๅผ",
4
+ "mockGuide": "๐Ÿ’ฟ Mock ๆŒ‡ๅ—",
5
+ "language": "๐Ÿ“š ่ฏญ่จ€",
6
+ "echartsDemo": "๐Ÿ“Š Echarts ๆผ”็คบ",
7
+ "persistPiniaState": "๐Ÿ ๆŒไน…ๅŒ– Pinia ็Šถๆ€",
8
+ "404Demo": "๐Ÿ™… 404้กต ๆผ”็คบ",
9
+ "unocssExample": "๐ŸŽจ Unocss ็คบไพ‹"
10
+ },
11
+ "mock": {
12
+ "fromAsyncData": "ๆฅ่‡ชๅผ‚ๆญฅ่ฏทๆฑ‚็š„ๆ•ฐๆฎ",
13
+ "pull": "่ฏทๆฑ‚",
14
+ "reset": "ๆธ…็ฉบ",
15
+ "noData": "ๆš‚ๆ— ๆ•ฐๆฎ"
16
+ },
17
+ "charts": {
18
+ "January": "1ๆœˆ",
19
+ "February": "2ๆœˆ",
20
+ "March": "3ๆœˆ",
21
+ "April": "4ๆœˆ",
22
+ "May": "5ๆœˆ",
23
+ "June": "6ๆœˆ"
24
+ }
25
+ }
@@ -1,38 +1,38 @@
1
- import type { App } from 'vue'
2
- import { manageApi } from '@af-mobile-client-vue3/services/api/manage'
3
- import { APP_WEB_CONFIG_KEY } from '@af-mobile-client-vue3/stores/mutation-type'
4
- import { handleTree } from '@af-mobile-client-vue3/utils/dataUtil'
5
- import { indexedDB } from '@af-mobile-client-vue3/utils/indexedDB'
6
- import { createStorage } from '@af-mobile-client-vue3/utils/Storage'
7
-
8
- const Storage = createStorage({ storage: localStorage })
9
-
10
- export const GetAppDataService = {
11
- install(app: App<Element>) {
12
- app.provide('$appdata', GetAppDataService)
13
- },
14
- async load() {
15
- },
16
- // ่ฟ”ๅ›žๆ ‘ๅฝข็œๅธ‚ๅŒบ
17
- async getDivisionsOhChinaForTree() {
18
- // ่Žทๅ–็œๅธ‚ๅŒบๆ•ฐๆฎ
19
- return new Promise((resolve, reject) => {
20
- try {
21
- indexedDB.getByWeb('divisionsOhChina', manageApi.getDivisionsOhChina, {}, (res) => {
22
- resolve(res)
23
- }, (processRes) => {
24
- return handleTree(processRes, 'code', 'parentcode', null)
25
- })
26
- }
27
- catch (e) {
28
- reject(e)
29
- }
30
- })
31
- },
32
- getWebConfigByKey(key: string) {
33
- const object = Storage.get(APP_WEB_CONFIG_KEY)
34
- return object[key]
35
- },
36
- }
37
-
38
- export default GetAppDataService
1
+ import type { App } from 'vue'
2
+ import { manageApi } from '@af-mobile-client-vue3/services/api/manage'
3
+ import { APP_WEB_CONFIG_KEY } from '@af-mobile-client-vue3/stores/mutation-type'
4
+ import { handleTree } from '@af-mobile-client-vue3/utils/dataUtil'
5
+ import { indexedDB } from '@af-mobile-client-vue3/utils/indexedDB'
6
+ import { createStorage } from '@af-mobile-client-vue3/utils/Storage'
7
+
8
+ const Storage = createStorage({ storage: localStorage })
9
+
10
+ export const GetAppDataService = {
11
+ install(app: App<Element>) {
12
+ app.provide('$appdata', GetAppDataService)
13
+ },
14
+ async load() {
15
+ },
16
+ // ่ฟ”ๅ›žๆ ‘ๅฝข็œๅธ‚ๅŒบ
17
+ async getDivisionsOhChinaForTree() {
18
+ // ่Žทๅ–็œๅธ‚ๅŒบๆ•ฐๆฎ
19
+ return new Promise((resolve, reject) => {
20
+ try {
21
+ indexedDB.getByWeb('divisionsOhChina', manageApi.getDivisionsOhChina, {}, (res) => {
22
+ resolve(res)
23
+ }, (processRes) => {
24
+ return handleTree(processRes, 'code', 'parentcode', null)
25
+ })
26
+ }
27
+ catch (e) {
28
+ reject(e)
29
+ }
30
+ })
31
+ },
32
+ getWebConfigByKey(key: string) {
33
+ const object = Storage.get(APP_WEB_CONFIG_KEY)
34
+ return object[key]
35
+ },
36
+ }
37
+
38
+ export default GetAppDataService