@gx-design-vue/create-gx-cli 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/README.md +4 -11
  2. package/package.json +3 -2
  3. package/src/main.js +9 -3
  4. package/template-mobile-vant-cli/.env +0 -0
  5. package/template-mobile-vant-cli/.env.pro +1 -1
  6. package/template-mobile-vant-cli/.env.production +2 -2
  7. package/template-mobile-vant-cli/.eslintignore +0 -1
  8. package/template-mobile-vant-cli/build/plugin/autoImport.ts +8 -10
  9. package/template-mobile-vant-cli/build/plugin/index.ts +2 -10
  10. package/template-mobile-vant-cli/build/plugin/mock.ts +5 -11
  11. package/template-mobile-vant-cli/build/plugin/viteMock/client.ts +88 -0
  12. package/template-mobile-vant-cli/build/plugin/viteMock/createMockServer.ts +271 -0
  13. package/template-mobile-vant-cli/build/plugin/viteMock/index.ts +69 -0
  14. package/template-mobile-vant-cli/build/plugin/viteMock/types.ts +48 -0
  15. package/template-mobile-vant-cli/build/plugin/viteMock/utils.ts +48 -0
  16. package/template-mobile-vant-cli/eslint.config.js +49 -0
  17. package/template-mobile-vant-cli/mock/_createProductionServer.ts +4 -4
  18. package/template-mobile-vant-cli/mock/datasSource/api/index.ts +0 -0
  19. package/template-mobile-vant-cli/package.json +26 -33
  20. package/template-mobile-vant-cli/src/components/PageContainer/ProSkeleton.tsx +1 -2
  21. package/template-mobile-vant-cli/src/components/PageContainer/index.tsx +7 -6
  22. package/template-mobile-vant-cli/src/components/PageContainer/style.module.less +1 -1
  23. package/template-mobile-vant-cli/src/core/vant-design/index.ts +1 -1
  24. package/template-mobile-vant-cli/src/hooks/web/usePageLoading.ts +8 -5
  25. package/template-mobile-vant-cli/src/layout/BasicLayout.vue +3 -3
  26. package/template-mobile-vant-cli/src/pages/home.vue +27 -27
  27. package/template-mobile-vant-cli/src/router/index.ts +3 -2
  28. package/template-mobile-vant-cli/src/router/typings.ts +1 -1
  29. package/template-mobile-vant-cli/src/settings/index.ts +2 -2
  30. package/template-mobile-vant-cli/src/store/modules/global.ts +1 -1
  31. package/template-mobile-vant-cli/src/utils/crypto/base64.ts +101 -0
  32. package/template-mobile-vant-cli/src/utils/{cryptoJS.ts → crypto/index.ts} +23 -5
  33. package/template-mobile-vant-cli/src/utils/env.ts +15 -17
  34. package/template-mobile-vant-cli/src/utils/pageTitle.ts +5 -3
  35. package/template-mobile-vant-cli/src/utils/request/XHR.ts +38 -30
  36. package/template-mobile-vant-cli/src/utils/request/axiosCancel.ts +32 -23
  37. package/template-mobile-vant-cli/src/utils/request/checkStatus.ts +1 -3
  38. package/template-mobile-vant-cli/src/utils/request/index.ts +3 -4
  39. package/template-mobile-vant-cli/src/utils/request/typings.ts +74 -17
  40. package/template-mobile-vant-cli/src/utils/storage.ts +25 -18
  41. package/template-mobile-vant-cli/src/utils/util.ts +0 -5
  42. package/template-mobile-vant-cli/src/utils/validate.ts +191 -3
  43. package/template-mobile-vant-cli/tsconfig.json +8 -9
  44. package/template-mobile-vant-cli/types/{gx-components.d.ts → ant-design-import.d.ts} +3 -3
  45. package/template-mobile-vant-cli/types/auto-imports.d.ts +3 -0
  46. package/template-mobile-vant-cli/types/components.d.ts +2 -5
  47. package/template-mobile-vant-cli/types/global.d.ts +7 -4
  48. package/template-mobile-vant-cli/types/module.d.ts +15 -2
  49. package/template-mobile-vant-cli/types/plugins-auto-import.d.ts +14 -0
  50. package/template-mobile-vant-cli/types/response.d.ts +8 -5
  51. package/template-mobile-vant-cli/types/vant-import.d.ts +13 -0
  52. package/template-mobile-vant-cli/unocss.config.ts +101 -0
  53. package/template-mobile-vant-cli/vite.config.ts +43 -11
  54. package/template-mobile-vant-cli/.eslintrc.js +0 -64
  55. package/template-mobile-vant-cli/.stylelintignore +0 -3
  56. package/template-mobile-vant-cli/mock/api/index.ts +0 -66
  57. package/template-mobile-vant-cli/stylelint.config.js +0 -106
  58. /package/template-mobile-vant-cli/{postcss.config.js → postcss.config.cjs} +0 -0
  59. /package/template-mobile-vant-cli/{prettier.config.js → prettier.config.cjs} +0 -0
@@ -1,66 +0,0 @@
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[]
@@ -1,106 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- plugins: [ 'stylelint-order' ],
4
- extends: [ 'stylelint-config-standard', 'stylelint-config-prettier' ],
5
- customSyntax: 'postcss-html',
6
- rules: {
7
- 'number-leading-zero': false,
8
- 'alpha-value-notation': false,
9
- 'color-function-notation': false,
10
- 'no-eol-whitespace': false,
11
- 'function-no-unknown': null,
12
- 'selector-class-pattern': null,
13
- 'selector-pseudo-class-no-unknown': [
14
- true,
15
- {
16
- ignorePseudoClasses: [ 'global' ]
17
- }
18
- ],
19
- 'selector-pseudo-element-no-unknown': [
20
- true,
21
- {
22
- ignorePseudoElements: [ 'v-deep' ]
23
- }
24
- ],
25
- 'at-rule-no-unknown': [
26
- true,
27
- {
28
- ignoreAtRules: [
29
- 'tailwind',
30
- 'apply',
31
- 'variants',
32
- 'responsive',
33
- 'screen',
34
- 'function',
35
- 'if',
36
- 'each',
37
- 'include',
38
- 'mixin'
39
- ]
40
- }
41
- ],
42
- 'no-empty-source': null,
43
- 'font-family-name-quotes': null,
44
- 'declaration-colon-newline-after': null,
45
- 'selector-pseudo-element-colon-notation': null,
46
- 'string-quotes': null,
47
- 'named-grid-areas-no-invalid': null,
48
- 'unicode-bom': 'never',
49
- 'no-descending-specificity': null,
50
- 'font-family-no-missing-generic-family-keyword': null,
51
- 'declaration-colon-space-after': 'always-single-line',
52
- 'declaration-colon-space-before': 'never',
53
- 'rule-empty-line-before': [
54
- 'always',
55
- {
56
- ignore: [ 'after-comment', 'first-nested' ]
57
- }
58
- ],
59
- 'unit-no-unknown': [ true, { ignoreUnits: [ 'rpx' ] } ],
60
- 'order/order': [
61
- [
62
- 'dollar-variables',
63
- 'custom-properties',
64
- 'at-rules',
65
- 'declarations',
66
- {
67
- type: 'at-rule',
68
- name: 'supports'
69
- },
70
- {
71
- type: 'at-rule',
72
- name: 'media'
73
- },
74
- 'rules'
75
- ],
76
- { severity: 'warning' }
77
- ]
78
- },
79
- ignoreFiles: [ '**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts' ],
80
- overrides: [
81
- {
82
- files: [ '*.vue', '**/*.vue', '**/*.ts', '**/*.tsx', '*.html', '**/*.html' ],
83
- extends: [ 'stylelint-config-recommended', 'stylelint-config-html' ],
84
- rules: {
85
- 'keyframes-name-pattern': null,
86
- 'selector-pseudo-class-no-unknown': [
87
- true,
88
- {
89
- ignorePseudoClasses: [ 'deep', 'global' ]
90
- }
91
- ],
92
- 'selector-pseudo-element-no-unknown': [
93
- true,
94
- {
95
- ignorePseudoElements: [ 'v-deep', 'v-global', 'v-slotted' ]
96
- }
97
- ]
98
- }
99
- },
100
- {
101
- files: [ '*.less', '**/*.less' ],
102
- customSyntax: 'postcss-less',
103
- extends: [ 'stylelint-config-standard', 'stylelint-config-recommended-vue' ]
104
- }
105
- ]
106
- }