@gx-design-vue/create-gx-cli 0.0.1
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/LICENSE +21 -0
- package/README.md +22 -0
- package/bin/create-gx-cli +4 -0
- package/package.json +31 -0
- package/src/cli.js +78 -0
- package/src/main.js +75 -0
- package/template-mobile-ts/.editorconfig +19 -0
- package/template-mobile-ts/.env.development +19 -0
- package/template-mobile-ts/.env.pro +19 -0
- package/template-mobile-ts/.env.production +19 -0
- package/template-mobile-ts/.eslintignore +16 -0
- package/template-mobile-ts/.eslintrc.js +64 -0
- package/template-mobile-ts/.prettierignore +9 -0
- package/template-mobile-ts/.stylelintignore +3 -0
- package/template-mobile-ts/README.md +16 -0
- package/template-mobile-ts/build/cdn.ts +5 -0
- package/template-mobile-ts/build/optimizer.ts +18 -0
- package/template-mobile-ts/build/plugin/autoImport.ts +26 -0
- package/template-mobile-ts/build/plugin/html.ts +26 -0
- package/template-mobile-ts/build/plugin/index.ts +38 -0
- package/template-mobile-ts/build/plugin/mock.ts +20 -0
- package/template-mobile-ts/index.html +24 -0
- package/template-mobile-ts/mock/_createProductionServer.ts +19 -0
- package/template-mobile-ts/mock/api/index.ts +66 -0
- package/template-mobile-ts/mock/utils.ts +9 -0
- package/template-mobile-ts/package.json +57 -0
- package/template-mobile-ts/pnpm-lock.yaml +3890 -0
- package/template-mobile-ts/postcss.config.js +11 -0
- package/template-mobile-ts/prettier.config.js +18 -0
- package/template-mobile-ts/public/favicon.ico +0 -0
- package/template-mobile-ts/public/js/flexible.js +44 -0
- package/template-mobile-ts/src/App.vue +5 -0
- package/template-mobile-ts/src/components/PageContainer/ProSkeleton.tsx +30 -0
- package/template-mobile-ts/src/components/PageContainer/index.tsx +113 -0
- package/template-mobile-ts/src/components/PageContainer/style.module.less +14 -0
- package/template-mobile-ts/src/core/gx-design/index.ts +7 -0
- package/template-mobile-ts/src/core/index.ts +12 -0
- package/template-mobile-ts/src/core/vant-design/index.ts +9 -0
- package/template-mobile-ts/src/design/index.less +3 -0
- package/template-mobile-ts/src/design/reset.less +155 -0
- package/template-mobile-ts/src/design/root.less +3 -0
- package/template-mobile-ts/src/design/vant.less +2 -0
- package/template-mobile-ts/src/global.less +1 -0
- package/template-mobile-ts/src/hooks/web/index.ts +5 -0
- package/template-mobile-ts/src/hooks/web/usePageLoading.ts +58 -0
- package/template-mobile-ts/src/layout/BasicLayout.vue +16 -0
- package/template-mobile-ts/src/layout/basicLayout.less +11 -0
- package/template-mobile-ts/src/main.ts +25 -0
- package/template-mobile-ts/src/router/index.ts +25 -0
- package/template-mobile-ts/src/router/routes.ts +20 -0
- package/template-mobile-ts/src/router/typings.ts +8 -0
- package/template-mobile-ts/src/services/index.ts +31 -0
- package/template-mobile-ts/src/store/index.ts +17 -0
- package/template-mobile-ts/src/store/modules/global.ts +33 -0
- package/template-mobile-ts/src/utils/cryptoJS.ts +25 -0
- package/template-mobile-ts/src/utils/index.ts +52 -0
- package/template-mobile-ts/src/utils/pageTitle.ts +12 -0
- package/template-mobile-ts/src/utils/request.ts +105 -0
- package/template-mobile-ts/src/utils/util.ts +32 -0
- package/template-mobile-ts/src/utils/validate.ts +292 -0
- package/template-mobile-ts/src/views/home.vue +82 -0
- package/template-mobile-ts/stylelint.config.js +106 -0
- package/template-mobile-ts/tsconfig.json +43 -0
- package/template-mobile-ts/types/auto-imports.d.ts +61 -0
- package/template-mobile-ts/types/components.d.ts +17 -0
- package/template-mobile-ts/types/global.d.ts +20 -0
- package/template-mobile-ts/types/gx-components.d.ts +13 -0
- package/template-mobile-ts/types/module.d.ts +9 -0
- package/template-mobile-ts/types/response.d.ts +12 -0
- package/template-mobile-ts/vite.config.ts +100 -0
- package/template-vue-ts/.vscode/extensions.json +3 -0
- package/template-vue-ts/README.md +18 -0
- package/template-vue-ts/index.html +13 -0
- package/template-vue-ts/package.json +20 -0
- package/template-vue-ts/public/vite.svg +1 -0
- package/template-vue-ts/src/App.vue +30 -0
- package/template-vue-ts/src/assets/vue.svg +1 -0
- package/template-vue-ts/src/components/HelloWorld.vue +38 -0
- package/template-vue-ts/src/main.ts +5 -0
- package/template-vue-ts/src/style.css +81 -0
- package/template-vue-ts/src/vite-env.d.ts +1 -0
- package/template-vue-ts/tsconfig.json +18 -0
- package/template-vue-ts/tsconfig.node.json +9 -0
- package/template-vue-ts/vite.config.ts +7 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { MockMethod } from 'vite-plugin-mock'
|
|
2
|
+
import dayjs from 'dayjs'
|
|
3
|
+
import { builder } from '../utils'
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
{
|
|
7
|
+
url: '/mock-server/get/mock',
|
|
8
|
+
method: 'get',
|
|
9
|
+
response: () => {
|
|
10
|
+
return builder({
|
|
11
|
+
data: {
|
|
12
|
+
title: '测试表单',
|
|
13
|
+
startTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
|
14
|
+
endTime: dayjs().add(1, 'year').format('YYYY-MM-DD HH:mm:ss'),
|
|
15
|
+
goal: '赚钱',
|
|
16
|
+
standard: '厉害',
|
|
17
|
+
client: 'sf12358',
|
|
18
|
+
invites: 'gx12358',
|
|
19
|
+
weight: '80',
|
|
20
|
+
publicType: '2',
|
|
21
|
+
publicUsers: '1'
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
url: '/mock-server/get/mock',
|
|
28
|
+
method: 'post',
|
|
29
|
+
response: () => {
|
|
30
|
+
return builder({
|
|
31
|
+
data: {
|
|
32
|
+
title: '测试表单',
|
|
33
|
+
startTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
|
34
|
+
endTime: dayjs().add(1, 'year').format('YYYY-MM-DD HH:mm:ss'),
|
|
35
|
+
goal: '赚钱',
|
|
36
|
+
standard: '厉害',
|
|
37
|
+
client: 'sf12358',
|
|
38
|
+
invites: 'gx12358',
|
|
39
|
+
weight: '80',
|
|
40
|
+
publicType: '2',
|
|
41
|
+
publicUsers: '1'
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
url: '/mock-server/formData/mock',
|
|
48
|
+
method: 'post',
|
|
49
|
+
response: () => {
|
|
50
|
+
return builder({
|
|
51
|
+
data: {
|
|
52
|
+
title: '测试表单',
|
|
53
|
+
startTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
|
54
|
+
endTime: dayjs().add(1, 'year').format('YYYY-MM-DD HH:mm:ss'),
|
|
55
|
+
goal: '赚钱',
|
|
56
|
+
standard: '厉害',
|
|
57
|
+
client: 'sf12358',
|
|
58
|
+
invites: 'gx12358',
|
|
59
|
+
weight: '80',
|
|
60
|
+
publicType: '2',
|
|
61
|
+
publicUsers: '1'
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
] as MockMethod[]
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vue-vant-mobile",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite",
|
|
7
|
+
"build": "vue-tsc && vite build",
|
|
8
|
+
"build:pro": "vue-tsc && vite build --mode pro",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"axios": "^1.1.3",
|
|
13
|
+
"crypto-js": "^4.1.1",
|
|
14
|
+
"dayjs": "^1.11.6",
|
|
15
|
+
"mockjs": "^1.1.0",
|
|
16
|
+
"pinia": "^2.0.23",
|
|
17
|
+
"qs": "^6.11.0",
|
|
18
|
+
"vant": "^3.6.4",
|
|
19
|
+
"vue": "^3.2.41",
|
|
20
|
+
"vue-router": "^4.1.6"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "^17.0.42",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
|
25
|
+
"@typescript-eslint/parser": "^5.20.0",
|
|
26
|
+
"@vitejs/plugin-vue": "^4.0.0",
|
|
27
|
+
"@vitejs/plugin-vue-jsx": "^3.0.0",
|
|
28
|
+
"autoprefixer": "^10.4.13",
|
|
29
|
+
"eslint": "^8.13.0",
|
|
30
|
+
"eslint-config-prettier": "^8.5.0",
|
|
31
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
32
|
+
"eslint-plugin-vue": "^8.6.0",
|
|
33
|
+
"less": "^4.1.3",
|
|
34
|
+
"less-loader": "^11.1.0",
|
|
35
|
+
"postcss": "^8.4.18",
|
|
36
|
+
"postcss-html": "^1.5.0",
|
|
37
|
+
"postcss-less": "^6.0.0",
|
|
38
|
+
"postcss-pxtorem": "^6.0.0",
|
|
39
|
+
"prettier": "^2.7.1",
|
|
40
|
+
"rollup": "^2.79.1",
|
|
41
|
+
"stylelint": "^14.7.1",
|
|
42
|
+
"stylelint-config-prettier": "^9.0.3",
|
|
43
|
+
"stylelint-config-recommended": "^7.0.0",
|
|
44
|
+
"stylelint-config-recommended-vue": "^1.4.0",
|
|
45
|
+
"stylelint-config-standard": "^25.0.0",
|
|
46
|
+
"stylelint-order": "^5.0.0",
|
|
47
|
+
"typescript": "^4.6.4",
|
|
48
|
+
"unplugin-auto-import": "^0.11.4",
|
|
49
|
+
"unplugin-vue-components": "^0.22.9",
|
|
50
|
+
"vite": "^4.0.4",
|
|
51
|
+
"vite-plugin-mock": "^2.9.6",
|
|
52
|
+
"vite-plugin-html": "^3.2.0",
|
|
53
|
+
"vite-plugin-vue-setup-extend": "^0.4.0",
|
|
54
|
+
"vue-eslint-parser": "^9.1.0",
|
|
55
|
+
"vue-tsc": "^1.0.9"
|
|
56
|
+
}
|
|
57
|
+
}
|