@gx-design-vue/create-gx-cli 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/package.json +1 -1
  2. package/src/main.js +9 -3
  3. package/template-mobile-vant-cli/.editorconfig +0 -19
  4. package/template-mobile-vant-cli/.env.development +0 -19
  5. package/template-mobile-vant-cli/.env.pro +0 -19
  6. package/template-mobile-vant-cli/.env.production +0 -19
  7. package/template-mobile-vant-cli/.eslintignore +0 -16
  8. package/template-mobile-vant-cli/.eslintrc.js +0 -64
  9. package/template-mobile-vant-cli/.prettierignore +0 -9
  10. package/template-mobile-vant-cli/.stylelintignore +0 -3
  11. package/template-mobile-vant-cli/build/cdn.ts +0 -5
  12. package/template-mobile-vant-cli/build/generateModifyVars.ts +0 -7
  13. package/template-mobile-vant-cli/build/optimizer.ts +0 -18
  14. package/template-mobile-vant-cli/build/plugin/autoImport.ts +0 -26
  15. package/template-mobile-vant-cli/build/plugin/html.ts +0 -26
  16. package/template-mobile-vant-cli/build/plugin/index.ts +0 -50
  17. package/template-mobile-vant-cli/build/plugin/mock.ts +0 -20
  18. package/template-mobile-vant-cli/build/script/postBuild.ts +0 -14
  19. package/template-mobile-vant-cli/index.html +0 -24
  20. package/template-mobile-vant-cli/mock/_createProductionServer.ts +0 -19
  21. package/template-mobile-vant-cli/mock/api/index.ts +0 -66
  22. package/template-mobile-vant-cli/mock/utils.ts +0 -9
  23. package/template-mobile-vant-cli/package.json +0 -64
  24. package/template-mobile-vant-cli/postcss.config.js +0 -8
  25. package/template-mobile-vant-cli/prettier.config.js +0 -18
  26. package/template-mobile-vant-cli/public/favicon.ico +0 -0
  27. package/template-mobile-vant-cli/public/js/flexible.js +0 -44
  28. package/template-mobile-vant-cli/src/App.vue +0 -5
  29. package/template-mobile-vant-cli/src/components/PageContainer/ProSkeleton.tsx +0 -30
  30. package/template-mobile-vant-cli/src/components/PageContainer/index.tsx +0 -114
  31. package/template-mobile-vant-cli/src/components/PageContainer/style.module.less +0 -14
  32. package/template-mobile-vant-cli/src/core/gx-design/index.ts +0 -7
  33. package/template-mobile-vant-cli/src/core/index.ts +0 -12
  34. package/template-mobile-vant-cli/src/core/vant-design/index.ts +0 -4
  35. package/template-mobile-vant-cli/src/design/config.less +0 -0
  36. package/template-mobile-vant-cli/src/design/index.less +0 -3
  37. package/template-mobile-vant-cli/src/design/reset.less +0 -155
  38. package/template-mobile-vant-cli/src/design/root.less +0 -3
  39. package/template-mobile-vant-cli/src/design/vant.less +0 -2
  40. package/template-mobile-vant-cli/src/global.less +0 -1
  41. package/template-mobile-vant-cli/src/hooks/web/index.ts +0 -5
  42. package/template-mobile-vant-cli/src/hooks/web/usePageLoading.ts +0 -55
  43. package/template-mobile-vant-cli/src/layout/BasicLayout.vue +0 -16
  44. package/template-mobile-vant-cli/src/layout/basicLayout.less +0 -11
  45. package/template-mobile-vant-cli/src/main.ts +0 -27
  46. package/template-mobile-vant-cli/src/pages/home.vue +0 -71
  47. package/template-mobile-vant-cli/src/router/index.ts +0 -24
  48. package/template-mobile-vant-cli/src/router/routes.ts +0 -20
  49. package/template-mobile-vant-cli/src/router/typings.ts +0 -8
  50. package/template-mobile-vant-cli/src/services/index.ts +0 -31
  51. package/template-mobile-vant-cli/src/settings/index.ts +0 -10
  52. package/template-mobile-vant-cli/src/store/index.ts +0 -17
  53. package/template-mobile-vant-cli/src/store/modules/global.ts +0 -30
  54. package/template-mobile-vant-cli/src/utils/cryptoJS.ts +0 -39
  55. package/template-mobile-vant-cli/src/utils/env.ts +0 -52
  56. package/template-mobile-vant-cli/src/utils/pageTitle.ts +0 -12
  57. package/template-mobile-vant-cli/src/utils/request/XHR.ts +0 -131
  58. package/template-mobile-vant-cli/src/utils/request/axiosCancel.ts +0 -60
  59. package/template-mobile-vant-cli/src/utils/request/checkStatus.ts +0 -11
  60. package/template-mobile-vant-cli/src/utils/request/index.ts +0 -143
  61. package/template-mobile-vant-cli/src/utils/request/typings.ts +0 -114
  62. package/template-mobile-vant-cli/src/utils/storage.ts +0 -191
  63. package/template-mobile-vant-cli/src/utils/util.ts +0 -32
  64. package/template-mobile-vant-cli/src/utils/validate.ts +0 -28
  65. package/template-mobile-vant-cli/stylelint.config.js +0 -106
  66. package/template-mobile-vant-cli/tsconfig.json +0 -43
  67. package/template-mobile-vant-cli/types/auto-imports.d.ts +0 -61
  68. package/template-mobile-vant-cli/types/components.d.ts +0 -15
  69. package/template-mobile-vant-cli/types/global.d.ts +0 -36
  70. package/template-mobile-vant-cli/types/gx-components.d.ts +0 -13
  71. package/template-mobile-vant-cli/types/module.d.ts +0 -7
  72. package/template-mobile-vant-cli/types/response.d.ts +0 -12
  73. package/template-mobile-vant-cli/vite.config.ts +0 -113
  74. package/template-mobile-vant-html/css/global.css +0 -293
  75. package/template-mobile-vant-html/css/global.css.map +0 -1
  76. package/template-mobile-vant-html/css/global.less +0 -293
  77. package/template-mobile-vant-html/css/index.css +0 -20
  78. package/template-mobile-vant-html/css/index.css.map +0 -1
  79. package/template-mobile-vant-html/css/index.less +0 -21
  80. package/template-mobile-vant-html/image/disconnected.svg +0 -60
  81. package/template-mobile-vant-html/image/empty.svg +0 -52
  82. package/template-mobile-vant-html/image/error.svg +0 -53
  83. package/template-mobile-vant-html/image/loading.svg +0 -1
  84. package/template-mobile-vant-html/index.html +0 -91
  85. package/template-mobile-vant-html/js/index.js +0 -29
  86. package/template-mobile-vant-html/js/plugin/day.min.js +0 -1
  87. package/template-mobile-vant-html/js/plugin/fastclick.js +0 -730
  88. package/template-mobile-vant-html/js/plugin/jquery.min.js +0 -2
  89. package/template-mobile-vant-html/js/plugin/rem.js +0 -28
  90. package/template-mobile-vant-html/js/utils/appUtil.js +0 -70
  91. package/template-mobile-vant-html/js/utils/config.js +0 -3
  92. package/template-mobile-vant-html/js/utils/request.js +0 -61
  93. package/template-mobile-vant-html/js/utils/utils.js +0 -65
  94. package/template-mobile-vant-html/js/utils/validate.js +0 -292
@@ -1,30 +0,0 @@
1
- import type { FunctionalComponent } from 'vue'
2
- import { Skeleton } from 'vant'
3
- import styles from './style.module.less'
4
-
5
- import 'vant/es/skeleton/style'
6
-
7
- const Proskeleton: FunctionalComponent<{ line: number; loading: boolean }> = (props, { slots }) => {
8
-
9
- const renderMapItem = () => {
10
- const show = []
11
- for(let i = 0; i < props.line; i += 1) {
12
- show.push(
13
- <div class={styles.skeletonItem}>
14
- <Skeleton row={3} loading />
15
- </div>
16
- )
17
- }
18
- return show
19
- }
20
-
21
- return (
22
- <>
23
- {
24
- props.loading ? renderMapItem() : <>{ slots.default?.() }</>
25
- }
26
- </>
27
- )
28
- }
29
-
30
- export default Proskeleton
@@ -1,114 +0,0 @@
1
- import { defineComponent, toRefs, watch } from 'vue'
2
- import { usePageLoading } from '@gx-mobile/hooks/web'
3
- import ProSkeleton from './ProSkeleton'
4
- import styles from './style.module.less'
5
- import type { SetLoadingParams } from '@gx-mobile/hooks/web/usePageLoading'
6
-
7
- export type PageLoadingTpe = 'toast' | 'skeleton'
8
-
9
- type ChangeLoadingParams<T> = Omit<SetLoadingParams<T>, 'type'> & {
10
- hiddenSlot?: boolean;
11
- }
12
-
13
- const PageContainer = defineComponent({
14
- name: 'GProPageContainer',
15
- inheritAttrs: false,
16
- props: {
17
- loading: Boolean as PropType<boolean>,
18
- hiddenSlot: {
19
- type: Boolean as PropType<boolean>,
20
- default: true
21
- },
22
- loadingMsg: {
23
- type: String as PropType<string>,
24
- default: '加载中'
25
- },
26
- loadingType: {
27
- type: String as PropType<PageLoadingTpe>,
28
- default: 'toast'
29
- },
30
- bgcolor: {
31
- type: String as PropType<string>,
32
- default: '#fafafa'
33
- }
34
- },
35
- emits: [ 'update:loading' ],
36
- setup(props, { slots, expose, emit }) {
37
- const { loading: loadingRef, loadingType, loadingMsg, hiddenSlot } = toRefs(props)
38
-
39
- const initStatus = ref(true)
40
-
41
- const hiddenSlotRef = ref(props.hiddenSlot)
42
-
43
- const [ loading, setLoading ] = usePageLoading({
44
- defaultType: loadingType.value,
45
- defaultMessage: loadingMsg.value,
46
- defaultLoading: loadingRef.value
47
- })
48
-
49
- watch(() => loading.value, (val) => {
50
- if (initStatus.value && val) initStatus.value = false
51
- emit('update:loading', val)
52
- }, {
53
- deep: true,
54
- immediate: true
55
- })
56
-
57
- watch(() => loadingRef.value, (val) => {
58
- if (loadingType.value === 'toast') {
59
- setLoading({
60
- value: val,
61
- type: loadingType.value,
62
- message: loadingMsg.value
63
- })
64
- } else if (initStatus.value || !val) {
65
- setLoading({
66
- value: val,
67
- type: loadingType.value,
68
- message: loadingMsg.value
69
- })
70
- }
71
- })
72
-
73
- watch(() => hiddenSlot.value, (val) => {
74
- hiddenSlotRef.value = val
75
- }, {
76
- immediate: true
77
- })
78
-
79
- const changeLoading = ({
80
- value,
81
- message,
82
- hiddenSlot
83
- }: ChangeLoadingParams<boolean>) => {
84
- if (loadingType.value === 'toast') {
85
- hiddenSlotRef.value = hiddenSlot
86
- setLoading({ value, message, type: loadingType.value })
87
- }
88
- }
89
-
90
- expose({
91
- toggleLoading: changeLoading
92
- })
93
-
94
- return () => {
95
- return (
96
- <div class={styles.pageContainer} style={{ backgroundColor: props.bgcolor }}>
97
- <div class={styles.pageContainerWrapper}>
98
- {
99
- loadingType.value === 'skeleton'
100
- ? (
101
- <ProSkeleton line={3} loading={loading.value}>
102
- {slots.default?.()}
103
- </ProSkeleton>
104
- )
105
- : ((!loading.value || !hiddenSlotRef.value) && <>{slots.default?.()}</>)
106
- }
107
- </div>
108
- </div>
109
- )
110
- }
111
- }
112
- })
113
-
114
- export default PageContainer
@@ -1,14 +0,0 @@
1
- .pageContainer {
2
- width: 100%;
3
- min-height: 100vh;
4
- padding: 15px;
5
- background: var(--van-doc-background-3);
6
-
7
- .pageContainerWrapper {
8
- position: relative;
9
- }
10
-
11
- .skeletonItem + .skeletonItem {
12
- margin-top: 50px;
13
- }
14
- }
@@ -1,7 +0,0 @@
1
- import PageContainer from '@/components/PageContainer'
2
-
3
- const vantDesign = (app) => {
4
- app.component('g-pro-page-container', PageContainer)
5
- }
6
-
7
- export default vantDesign
@@ -1,12 +0,0 @@
1
- import dayjs from 'dayjs'
2
- import 'dayjs/locale/zh-cn'
3
-
4
- dayjs.locale('zh-cn')
5
-
6
- import vantDesign from './vant-design'
7
- import gxDesign from './gx-design'
8
-
9
- export function setupGlobCommon(app) {
10
- gxDesign(app)
11
- vantDesign(app)
12
- }
@@ -1,4 +0,0 @@
1
- const vantDesign = (app) => {
2
- }
3
-
4
- export default vantDesign
File without changes
@@ -1,3 +0,0 @@
1
- @import './root';
2
- @import './reset';
3
- @import './vant';
@@ -1,155 +0,0 @@
1
- /****reset****/
2
- body,
3
- div,
4
- table,
5
- tr,
6
- td,
7
- th,
8
- h1,
9
- h2,
10
- h3,
11
- h4,
12
- h5,
13
- h6,
14
- form,
15
- input,
16
- button,
17
- label,
18
- select,
19
- textarea,
20
- p,
21
- u,
22
- i,
23
- em,
24
- ul,
25
- ol,
26
- li,
27
- dl,
28
- dd,
29
- dt,
30
- img,
31
- article,
32
- aside,
33
- details,
34
- figcaption,
35
- figure,
36
- footer,
37
- header,
38
- menu,
39
- nav,
40
- section,
41
- pre {
42
- box-sizing: border-box;
43
- margin: 0;
44
- padding: 0;
45
- font-size: 100%;
46
- vertical-align: baseline;
47
- border: 0;
48
- outline: 0;
49
- }
50
-
51
- li {
52
- list-style: none;
53
- }
54
-
55
- h1,
56
- h2,
57
- h3,
58
- h4,
59
- h5,
60
- h6 {
61
- font-size: 100%;
62
- }
63
-
64
- table {
65
- border-collapse: collapse;
66
- border-spacing: 0;
67
- width: 100%;
68
- }
69
-
70
- a,
71
- input,
72
- select,
73
- textarea,
74
- area,
75
- button {
76
- outline: none;
77
- font-family: inherit;
78
- font-size: inherit;
79
- border: none;
80
- background: none;
81
- color: inherit;
82
- }
83
-
84
- a {
85
- text-decoration: none;
86
- }
87
-
88
- a:hover {
89
- text-decoration: none;
90
- }
91
-
92
- textarea {
93
- overflow: auto;
94
- resize: none;
95
- }
96
-
97
- input[type='button'],
98
- input[type='submit'],
99
- input[type='reset'] {
100
- cursor: pointer;
101
- -webkit-appearance: none;
102
- }
103
-
104
- html,
105
- body {
106
- overflow-x: hidden;
107
- width: 100%;
108
- height: 100%;
109
- background: #ffffff;
110
- }
111
-
112
- * {
113
- -webkit-overflow-scrolling: touch;
114
- }
115
-
116
- html {
117
- -webkit-tap-highlight-color: transparent;
118
- }
119
-
120
- body {
121
- text-align: left;
122
- padding-bottom: constant(safe-area-inset-bottom);
123
- padding-bottom: env(safe-area-inset-bottom);
124
-
125
- #app {
126
- height: 100%;
127
- -webkit-font-smoothing: antialiased;
128
- -moz-osx-font-smoothing: grayscale;
129
- overflow-x: hidden;
130
- box-sizing: border-box;
131
- }
132
- }
133
-
134
- .fl {
135
- float: left;
136
- }
137
-
138
- .fr {
139
- float: right;
140
- }
141
-
142
- .clearfix {
143
- zoom: 1;
144
- &::before,
145
- &::after {
146
- display: table;
147
- content: ' ';
148
- }
149
- &::after {
150
- clear: both;
151
- height: 0;
152
- font-size: 0;
153
- visibility: hidden;
154
- }
155
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --gx-mobile-layout-bg: #ffffff;
3
- }
@@ -1,2 +0,0 @@
1
- :root {
2
- }
@@ -1 +0,0 @@
1
- @import './design/index';
@@ -1,5 +0,0 @@
1
- import usePageLoading from './usePageLoading'
2
-
3
- export {
4
- usePageLoading
5
- }
@@ -1,55 +0,0 @@
1
- import type { Ref } from 'vue'
2
- import { ref, watch } from 'vue'
3
- import { closeToast, showLoadingToast } from 'vant'
4
- import type { PageLoadingTpe } from '@/components/PageContainer'
5
-
6
- export type SetLoadingParams<T> = { value: T; type?: PageLoadingTpe; message?: string }
7
-
8
- type ChangeLoadingFn<T> = ({ value, type, message }: SetLoadingParams<T>) => void
9
-
10
- export default function usePageLoading<T, R = Ref<T>>({
11
- defaultType,
12
- defaultMessage,
13
- defaultLoading
14
- }: {
15
- defaultType?: PageLoadingTpe;
16
- defaultMessage?: string;
17
- defaultLoading?: T | (() => T);
18
- }): [ R, ChangeLoadingFn<T> ] {
19
-
20
- const initValue: T =
21
- typeof defaultLoading === 'function' ? (defaultLoading as any)() : defaultLoading
22
-
23
- const pageLoading = ref(initValue) as Ref<T>
24
-
25
- const loadingMessage = ref(defaultMessage)
26
-
27
- const loadingType = ref(defaultType)
28
-
29
- watch(() => pageLoading.value, (val) => {
30
- if (val) {
31
- if (loadingType.value === 'toast') {
32
- showLoadingToast({
33
- duration: 0,
34
- forbidClick: true,
35
- message: loadingMessage.value || '加载中'
36
- })
37
- } else {
38
- closeToast()
39
- }
40
- } else {
41
- closeToast()
42
- }
43
- }, {
44
- deep: true,
45
- immediate: true
46
- })
47
-
48
- const changeLoading = ({ value, type, message }: SetLoadingParams<T>) => {
49
- pageLoading.value = value
50
- loadingMessage.value = message
51
- if (type) loadingType.value = type
52
- }
53
-
54
- return [ pageLoading as unknown as R, changeLoading ]
55
- }
@@ -1,16 +0,0 @@
1
- <template>
2
- <div :class="$style['basic-layout']">
3
- <RouterView>
4
- <template #default="{ Component }">
5
- <component :is="Component" />
6
- </template>
7
- </RouterView>
8
- </div>
9
- </template>
10
-
11
- <script setup lang="ts">
12
- </script>
13
-
14
- <style lang="less" module>
15
- @import './basicLayout';
16
- </style>
@@ -1,11 +0,0 @@
1
- .basic-layout {
2
- height: 100%;
3
- }
4
-
5
- @media screen and (min-width: 800px) {
6
- .basic-layout {
7
- width: 10rem;
8
- max-width: 10rem;
9
- margin: 0 auto;
10
- }
11
- }
@@ -1,27 +0,0 @@
1
- import { createApp } from 'vue'
2
- import { setupRouter } from '@/router'
3
- import { setupStore } from './store'
4
- import { setupGlobCommon } from './core'
5
- import App from './App.vue'
6
-
7
- import 'uno.css'
8
-
9
- import 'vant/es/toast/style'
10
-
11
- import './global.less'
12
-
13
- function startApp() {
14
- const app = createApp(App)
15
-
16
- // 配置store
17
- setupStore(app)
18
-
19
- // 配置路由
20
- setupRouter(app)
21
-
22
- setupGlobCommon(app)
23
-
24
- app.mount('#app')
25
- }
26
-
27
- startApp()
@@ -1,71 +0,0 @@
1
- <template>
2
- <g-pro-page-container
3
- ref="pageContainer"
4
- v-model:loading="loading"
5
- :loadingMsg="loadingMsg"
6
- :hiddenSlot="hiddenSlot"
7
- >
8
- <div style="display: flex;flex-direction: column;gap: 20px;">
9
- <p>以下刷新只针对toast</p>
10
- <van-button @click="init(true)">刷新(隐藏子组件)</van-button>
11
- <van-button @click="init(false)">刷新(不隐藏子组件)</van-button>
12
- <van-button @click="changeLoading('切换中')">切换loading提示语</van-button>
13
- <van-button @click="toggleLoading(true)">刷新-调用方法-隐藏</van-button>
14
- <van-button @click="toggleLoading(false)">刷新-调用方法-不隐藏</van-button>
15
- <van-button @click="toggleLoading(false, '切换中')">刷新-调用方法-不隐藏-切换提示语</van-button>
16
- </div>
17
- </g-pro-page-container>
18
- </template>
19
-
20
- <script setup lang="ts">
21
- import { isBoolean } from '@gx-design-vue/pro-utils'
22
-
23
- const loading = ref(false)
24
- const pageContainer = ref()
25
- const loadingMsg = ref('加载中')
26
- const hiddenSlot = ref(true)
27
-
28
- onMounted(() => {
29
- init()
30
- })
31
-
32
- const init = (val?: boolean) => {
33
- loadingMsg.value = '加载中'
34
- loading.value = true
35
-
36
- if (isBoolean(val)) hiddenSlot.value = val
37
-
38
- setTimeout(() => {
39
- loading.value = false
40
- }, 1000)
41
- }
42
-
43
- const changeLoading = (message: string) => {
44
- loadingMsg.value = message
45
- loading.value = true
46
- hiddenSlot.value = false
47
-
48
- setTimeout(() => {
49
- loading.value = false
50
- }, 1000)
51
- }
52
-
53
- const toggleLoading = (hiddenSlot: boolean, message?: string) => {
54
- pageContainer.value?.toggleLoading({
55
- value: true,
56
- hiddenSlot,
57
- message
58
- })
59
-
60
- setTimeout(() => {
61
- pageContainer.value?.toggleLoading({
62
- value: false,
63
- hiddenSlot
64
- })
65
- }, 1000)
66
- }
67
-
68
- </script>
69
-
70
- <style lang="less" scoped>
71
- </style>
@@ -1,24 +0,0 @@
1
- import type { App } from 'vue'
2
- import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
3
- import settings from '@/settings'
4
- import getPageTitle from '@/utils/pageTitle'
5
- import { constantRoutes } from './routes'
6
-
7
- export const router = createRouter({
8
- history: createWebHashHistory(),
9
- routes: constantRoutes as unknown as RouteRecordRaw[]
10
- })
11
-
12
- const doRouterPermission = () => {
13
- router.afterEach((to) => {
14
- const { meta }: any = to
15
- document.title = getPageTitle(settings.title, meta.title || '')
16
- })
17
- }
18
-
19
- // 配置路由器
20
- export function setupRouter(app: App<Element>) {
21
- app.use(router);
22
-
23
- doRouterPermission()
24
- }
@@ -1,20 +0,0 @@
1
- import type { AppRouteModule } from './typings'
2
- import BasicLayout from '@/layout/BasicLayout.vue'
3
-
4
- export const constantRoutes: AppRouteModule[] = [
5
- {
6
- path: '/',
7
- component: BasicLayout,
8
- redirect: '/home',
9
- children: [
10
- {
11
- path: '/home',
12
- name: 'Home',
13
- meta: {
14
- title: '首页'
15
- },
16
- component: () => import('@/pages/home.vue')
17
- }
18
- ]
19
- }
20
- ]
@@ -1,8 +0,0 @@
1
- import type { RouteRecordRaw } from 'vue-router'
2
-
3
- interface AppRouteRecordRaw {
4
- hidden?: boolean;
5
- homePage?: number;
6
- }
7
-
8
- export type AppRouteModule = AppRouteRecordRaw & RouteRecordRaw;
@@ -1,31 +0,0 @@
1
- import request from '@/utils/request'
2
-
3
- // get 请求
4
- export function getMock(params) {
5
- return request({
6
- url: '/get/mock',
7
- method: 'get',
8
- isMock: true,
9
- params
10
- })
11
- }
12
-
13
- // post 请求
14
- export function postMock(data) {
15
- return request({
16
- url: '/post/mock',
17
- method: 'post',
18
- isMock: true,
19
- data
20
- })
21
- }
22
-
23
- // formData 请求
24
- export function formDataMock(data) {
25
- return request({
26
- url: '/formData/mock',
27
- method: 'post',
28
- isMock: true,
29
- data
30
- })
31
- }
@@ -1,10 +0,0 @@
1
- export default {
2
- title: 'gx-design-mobile',
3
- tokenName: 'token',
4
- contentType: 'application/json;charset=UTF-8',
5
- requestPrefix: '',
6
- //最长请求时间
7
- requestTimeout: 10000,
8
- //操作正常code,支持String、Array、int多种类型
9
- successCode: [ 200, 0 ]
10
- }
@@ -1,17 +0,0 @@
1
- import type { App } from 'vue'
2
- import { createPinia } from 'pinia'
3
- import { useStoreGlobal } from './modules/global'
4
-
5
- export {
6
- useStoreGlobal
7
- }
8
-
9
- export function useStore() {
10
- return {
11
- global: useStoreGlobal()
12
- }
13
- }
14
-
15
- export function setupStore(app: App<Element>) {
16
- app.use(createPinia())
17
- }