@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.
- package/README.md +4 -11
- package/package.json +3 -2
- package/src/main.js +9 -3
- package/template-mobile-vant-cli/.env +0 -0
- package/template-mobile-vant-cli/.env.pro +1 -1
- package/template-mobile-vant-cli/.env.production +2 -2
- package/template-mobile-vant-cli/.eslintignore +0 -1
- package/template-mobile-vant-cli/build/plugin/autoImport.ts +8 -10
- package/template-mobile-vant-cli/build/plugin/index.ts +2 -10
- package/template-mobile-vant-cli/build/plugin/mock.ts +5 -11
- package/template-mobile-vant-cli/build/plugin/viteMock/client.ts +88 -0
- package/template-mobile-vant-cli/build/plugin/viteMock/createMockServer.ts +271 -0
- package/template-mobile-vant-cli/build/plugin/viteMock/index.ts +69 -0
- package/template-mobile-vant-cli/build/plugin/viteMock/types.ts +48 -0
- package/template-mobile-vant-cli/build/plugin/viteMock/utils.ts +48 -0
- package/template-mobile-vant-cli/eslint.config.js +49 -0
- package/template-mobile-vant-cli/mock/_createProductionServer.ts +4 -4
- package/template-mobile-vant-cli/mock/datasSource/api/index.ts +0 -0
- package/template-mobile-vant-cli/package.json +26 -33
- package/template-mobile-vant-cli/src/components/PageContainer/ProSkeleton.tsx +1 -2
- package/template-mobile-vant-cli/src/components/PageContainer/index.tsx +7 -6
- package/template-mobile-vant-cli/src/components/PageContainer/style.module.less +1 -1
- package/template-mobile-vant-cli/src/core/vant-design/index.ts +1 -1
- package/template-mobile-vant-cli/src/hooks/web/usePageLoading.ts +8 -5
- package/template-mobile-vant-cli/src/layout/BasicLayout.vue +3 -3
- package/template-mobile-vant-cli/src/pages/home.vue +27 -27
- package/template-mobile-vant-cli/src/router/index.ts +3 -2
- package/template-mobile-vant-cli/src/router/typings.ts +1 -1
- package/template-mobile-vant-cli/src/settings/index.ts +2 -2
- package/template-mobile-vant-cli/src/store/modules/global.ts +1 -1
- package/template-mobile-vant-cli/src/utils/crypto/base64.ts +101 -0
- package/template-mobile-vant-cli/src/utils/{cryptoJS.ts → crypto/index.ts} +23 -5
- package/template-mobile-vant-cli/src/utils/env.ts +15 -17
- package/template-mobile-vant-cli/src/utils/pageTitle.ts +5 -3
- package/template-mobile-vant-cli/src/utils/request/XHR.ts +38 -30
- package/template-mobile-vant-cli/src/utils/request/axiosCancel.ts +32 -23
- package/template-mobile-vant-cli/src/utils/request/checkStatus.ts +1 -3
- package/template-mobile-vant-cli/src/utils/request/index.ts +3 -4
- package/template-mobile-vant-cli/src/utils/request/typings.ts +74 -17
- package/template-mobile-vant-cli/src/utils/storage.ts +25 -18
- package/template-mobile-vant-cli/src/utils/util.ts +0 -5
- package/template-mobile-vant-cli/src/utils/validate.ts +191 -3
- package/template-mobile-vant-cli/tsconfig.json +8 -9
- package/template-mobile-vant-cli/types/{gx-components.d.ts → ant-design-import.d.ts} +3 -3
- package/template-mobile-vant-cli/types/auto-imports.d.ts +3 -0
- package/template-mobile-vant-cli/types/components.d.ts +2 -5
- package/template-mobile-vant-cli/types/global.d.ts +7 -4
- package/template-mobile-vant-cli/types/module.d.ts +15 -2
- package/template-mobile-vant-cli/types/plugins-auto-import.d.ts +14 -0
- package/template-mobile-vant-cli/types/response.d.ts +8 -5
- package/template-mobile-vant-cli/types/vant-import.d.ts +13 -0
- package/template-mobile-vant-cli/unocss.config.ts +101 -0
- package/template-mobile-vant-cli/vite.config.ts +43 -11
- package/template-mobile-vant-cli/.eslintrc.js +0 -64
- package/template-mobile-vant-cli/.stylelintignore +0 -3
- package/template-mobile-vant-cli/mock/api/index.ts +0 -66
- package/template-mobile-vant-cli/stylelint.config.js +0 -106
- /package/template-mobile-vant-cli/{postcss.config.js → postcss.config.cjs} +0 -0
- /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
|
-
}
|
File without changes
|
File without changes
|