@yqg/permission 1.3.0-alpha.9 → 1.3.1-alpha.0
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/dist/{apply-modal-L-62MLld.js → apply-modal-D3Frqfx8.js} +995 -957
- package/dist/{category-selector-BY2CDs7z.js → category-selector-BsBqfqWu.js} +5 -5
- package/dist/{index-BTczN9dE.js → index-CHKs7hG7.js} +1 -1
- package/dist/{index-C6YJSbYD.js → index-CvLY5Rbl.js} +3 -3
- package/dist/index.js +2 -2
- package/dist/{permission-item-Q0DEMUdN.js → permission-item-DTdDRu0E.js} +60 -57
- package/dist/{yqg-permission-CQegf22C.js → yqg-permission-CEJEsvl5.js} +1956 -1939
- package/dist/yqg-permission.umd.js +39 -39
- package/package.json +1 -1
- package/src/App.vue +10 -21
- package/src/axios/index.ts +5 -1
- package/src/components/apply-modal.vue +74 -39
- package/src/components/approval-steps.vue +39 -40
- package/src/components/category-selector.vue +7 -5
- package/src/components/permission-item.vue +45 -36
- package/src/components/success-modal.vue +45 -45
- package/src/components/yqg-permission.vue +148 -138
- package/src/hooks/useFormat.ts +15 -3
- package/src/i18n/zh-CH.ts +1 -0
- package/src/typings/index.d.ts +1 -0
- package/tsconfig.app.json +8 -8
|
@@ -2,59 +2,59 @@
|
|
|
2
2
|
<contextHolder></contextHolder>
|
|
3
3
|
</template>
|
|
4
4
|
<script lang="ts" setup>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { createVNode } from 'vue';
|
|
6
|
+
import { CheckCircleFilled } from '@ant-design/icons-vue';
|
|
7
|
+
import { Modal } from 'ant-design-vue';
|
|
8
|
+
import t from '../utils';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const [modal, contextHolder] = Modal.useModal();
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
12
|
+
const countDown = (url: string, callback?: () => void) => {
|
|
13
|
+
let secondsToGo = 10;
|
|
14
|
+
const modal1 = modal.confirm({
|
|
15
|
+
title: t('resoultTitle'),
|
|
16
|
+
content: t('successTips'),
|
|
17
|
+
cancelText: `${t('close')}(${secondsToGo}s)`,
|
|
18
|
+
okText: `${t('viewApprovalDetail')}>>`,
|
|
19
|
+
wrapClassName: 'yqg-permission-modal-wrap',
|
|
20
|
+
icon: createVNode(CheckCircleFilled, { style: 'color: #52c41a;' }),
|
|
21
|
+
onOk: () => {
|
|
22
|
+
window.open(url);
|
|
23
|
+
modal1.destroy();
|
|
24
|
+
callback && callback();
|
|
25
|
+
window.YQG_PERMISSION_CALLBACK && window.YQG_PERMISSION_CALLBACK();
|
|
26
|
+
if (!window.YQG_PERMISSION_CALLBACK && !callback) {
|
|
27
|
+
location.reload();
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
onCancel: () => {
|
|
31
|
+
modal1.destroy();
|
|
32
|
+
callback && callback();
|
|
33
|
+
window.YQG_PERMISSION_CALLBACK && window.YQG_PERMISSION_CALLBACK();
|
|
34
|
+
if (!window.YQG_PERMISSION_CALLBACK && !callback) {
|
|
35
|
+
location.reload();
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
const interval = setInterval(() => {
|
|
41
|
+
secondsToGo -= 1;
|
|
42
|
+
modal1.update({
|
|
43
|
+
cancelText: `${t('close')}(${secondsToGo}s)`,
|
|
44
|
+
});
|
|
45
|
+
}, 1000);
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
clearInterval(interval);
|
|
49
|
+
modal1.destroy();
|
|
50
|
+
}, secondsToGo * 1000);
|
|
51
|
+
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
defineExpose({ countDown });
|
|
54
54
|
|
|
55
55
|
</script>
|
|
56
56
|
<style>
|
|
57
57
|
.yqg-permission-modal-wrap .yqg-permission-modal-confirm-btns {
|
|
58
|
-
text-align: center!important;
|
|
58
|
+
text-align: center !important;
|
|
59
59
|
}
|
|
60
60
|
</style>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ConfigProvider prefixCls="yqg-permission" :theme="{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
token: {
|
|
4
|
+
colorPrimary: props.color,
|
|
5
|
+
}
|
|
6
|
+
}">
|
|
7
7
|
<div class="crane-wraper">
|
|
8
8
|
<template v-if="[COM_TYPE.FLOATBUTTON, COM_TYPE.TEXT].includes(type)">
|
|
9
9
|
<FloatButton ref="dragElement" type="primary" :tooltip="t('clickToApply')" :style="{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
right: RIGHT_DEFAULT,
|
|
11
|
+
top: currentTop,
|
|
12
|
+
}">
|
|
13
13
|
<template #icon>
|
|
14
14
|
<img :src="applyIconUrl" height="20" width="20" />
|
|
15
15
|
</template>
|
|
16
16
|
</FloatButton>
|
|
17
17
|
</template>
|
|
18
|
-
<template v-else-if="type===COM_TYPE.CUSTOM">
|
|
18
|
+
<template v-else-if="type === COM_TYPE.CUSTOM">
|
|
19
19
|
<div @click="showModal">
|
|
20
20
|
<slot name="custom" />
|
|
21
21
|
</div>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
{{ t('unavailableTips') }}
|
|
29
29
|
</div>
|
|
30
30
|
<div>
|
|
31
|
-
<Button type="primary" @click="showModal">+ {{t('applyPermission')}}</Button>
|
|
31
|
+
<Button type="primary" @click="showModal">+ {{ t('applyPermission') }}</Button>
|
|
32
32
|
</div>
|
|
33
33
|
</template>
|
|
34
34
|
<!-- 审批中 -->
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
<img :src="curStatus.imageUrl" height="200" width="200" style="margin-top: calc(50vh - 273px)" />
|
|
37
37
|
<div class="crane-margin10">
|
|
38
38
|
<span class="crane-unapply" v-html="t('appliedTips', {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
status: `<style>.crane-unapply span {color: orange;}</style><span>${curStatus.tips}</span>`
|
|
40
|
+
})">
|
|
41
41
|
</span>
|
|
42
42
|
</div>
|
|
43
43
|
<div>
|
|
44
|
-
<Button class="crane-margin-right10"
|
|
45
|
-
|
|
46
|
-
<Button type="primary" @click="showModal">+ {{t('applyMore')}}</Button>
|
|
44
|
+
<Button class="crane-margin-right10" @click="goViewApproval">{{ t('viewApprovalDetail')
|
|
45
|
+
}}</Button>
|
|
46
|
+
<Button type="primary" @click="showModal">+ {{ t('applyMore') }}</Button>
|
|
47
47
|
</div>
|
|
48
48
|
</template>
|
|
49
49
|
<!-- 不可申请 -->
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
{{ t('unapplyTips') }}
|
|
54
54
|
<Popover>
|
|
55
55
|
<template #content>
|
|
56
|
-
<div style="max-width: 400px;">{{t('manager')}}: {{ curStatus.tips }}</div>
|
|
56
|
+
<div style="max-width: 400px;">{{ t('manager') }}: {{ curStatus.tips }}</div>
|
|
57
57
|
</template>
|
|
58
|
-
<span style="color: #1677ff;">{{t('callManager') }}</span>
|
|
58
|
+
<span style="color: #1677ff;">{{ t('callManager') }}</span>
|
|
59
59
|
</Popover>
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
@@ -63,139 +63,149 @@
|
|
|
63
63
|
</div>
|
|
64
64
|
|
|
65
65
|
<ApplyModal v-model="open" :permissionList="permissionList" :spining="loading" :workNumber="workNumber"
|
|
66
|
-
@onSuccess="() => emit('onSuccess')"
|
|
66
|
+
:defaultCheckedIds="defaultCheckedIds" :isAllOwn="isAllOwn" @onSuccess="() => emit('onSuccess')"
|
|
67
|
+
@onSubmit="getPermissions">
|
|
67
68
|
</ApplyModal>
|
|
68
69
|
|
|
69
70
|
</ConfigProvider>
|
|
70
71
|
</template>
|
|
71
72
|
<script lang="ts" setup>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
import { ref, defineAsyncComponent, computed, watchEffect, watch } from 'vue';
|
|
74
|
+
import { Button, ConfigProvider, Popover, message, FloatButton } from 'ant-design-vue';
|
|
75
|
+
import applyIconUrl from '@/assets/applyicon.png';
|
|
76
|
+
import noauthority from '@/assets/noauthority.png';
|
|
77
|
+
import Http from '../axios/index';
|
|
78
|
+
import t from '../utils';
|
|
79
|
+
import useDraggable from '../hooks/useDragable';
|
|
80
|
+
import useStatus from '../hooks/useStatus';
|
|
80
81
|
import useFormat from '../hooks/useFormat';
|
|
81
82
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return props.permissions
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
const url = curApproving.value?.oaFlowUrl;
|
|
149
|
-
if (!url) return;
|
|
150
|
-
|
|
151
|
-
window.open(url, '_blank');
|
|
152
|
-
};
|
|
83
|
+
const STATUS_MAP = {
|
|
84
|
+
DEFAULT: 'DEFAULT',
|
|
85
|
+
PENDING: 'PENDING',
|
|
86
|
+
NO: 'NO',
|
|
87
|
+
} as const;
|
|
88
|
+
|
|
89
|
+
const COM_TYPE = {
|
|
90
|
+
FLOATBUTTON: 'floatButton',
|
|
91
|
+
DEFAULT: 'default',
|
|
92
|
+
TEXT: 'text',
|
|
93
|
+
CUSTOM: 'custom',
|
|
94
|
+
};
|
|
95
|
+
const RIGHT_DEFAULT = '10px';
|
|
96
|
+
|
|
97
|
+
// 重置 message 类名,避免被全局样式覆盖
|
|
98
|
+
message.config({ prefixCls: 'yqg-permission-message' });
|
|
99
|
+
|
|
100
|
+
const ApplyModal = defineAsyncComponent(() => import('./apply-modal.vue'));
|
|
101
|
+
|
|
102
|
+
const emit = defineEmits(['onSuccess']);
|
|
103
|
+
|
|
104
|
+
const props = defineProps({
|
|
105
|
+
workNumber: {
|
|
106
|
+
type: String,
|
|
107
|
+
default: ''
|
|
108
|
+
},
|
|
109
|
+
permissions: {
|
|
110
|
+
type: [String, Array<String>],
|
|
111
|
+
default: []
|
|
112
|
+
},
|
|
113
|
+
locale: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: 'zh-CN'
|
|
116
|
+
},
|
|
117
|
+
color: {
|
|
118
|
+
type: String,
|
|
119
|
+
default: '#1677ff'
|
|
120
|
+
},
|
|
121
|
+
type: {
|
|
122
|
+
type: String,
|
|
123
|
+
default: 'default'
|
|
124
|
+
},
|
|
125
|
+
top: {
|
|
126
|
+
type: String,
|
|
127
|
+
default: '100px'
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
const open = ref(false);
|
|
132
|
+
const curApproving = ref<PermissionType>();
|
|
133
|
+
const loading = ref(false);
|
|
134
|
+
const defaultCheckedIds = ref<string[]>([]);
|
|
135
|
+
const isAllOwn = ref(false);
|
|
136
|
+
let permissionList = ref<PermissionListType>([]);
|
|
137
|
+
let curStatus = ref<Record<string, any>>({
|
|
138
|
+
imageUrl: noauthority,
|
|
139
|
+
status: '',
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
const allPermissions = computed(() => {
|
|
143
|
+
permissionList.value = [];
|
|
144
|
+
if (Array.isArray(props.permissions)) {
|
|
145
|
+
return props.permissions.filter((item) => item.trim());
|
|
146
|
+
}
|
|
147
|
+
return props.permissions?.split(',')?.filter((item) => item.trim()) || [];
|
|
148
|
+
});
|
|
153
149
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
workNumber,
|
|
161
|
-
features: permissions.toString(),
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
loading.value = true;
|
|
165
|
-
const res = await Http.getPermissions(params);
|
|
166
|
-
permissionList.value = useFormat(res.body || []);
|
|
167
|
-
curStatus.value = useStatus(permissionList.value, curApproving);
|
|
168
|
-
loading.value = false;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
const showModal = () => {
|
|
172
|
-
open.value = !open.value;
|
|
173
|
-
getPermissions();
|
|
174
|
-
};
|
|
150
|
+
const goViewApproval = () => {
|
|
151
|
+
const url = curApproving.value?.oaFlowUrl;
|
|
152
|
+
if (!url) return;
|
|
153
|
+
|
|
154
|
+
window.open(url, '_blank');
|
|
155
|
+
};
|
|
175
156
|
|
|
176
|
-
|
|
157
|
+
const getPermissions = async () => {
|
|
158
|
+
const { workNumber } = props;
|
|
159
|
+
const permissions = allPermissions.value;
|
|
160
|
+
if (!permissions?.length || !workNumber) return;
|
|
177
161
|
|
|
178
|
-
|
|
162
|
+
const params = {
|
|
163
|
+
workNumber,
|
|
164
|
+
features: permissions.toString(),
|
|
165
|
+
};
|
|
179
166
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
167
|
+
loading.value = true;
|
|
168
|
+
const res = await Http.getPermissions(params);
|
|
169
|
+
const datalist = useFormat(res.body || []);
|
|
170
|
+
permissionList.value = datalist.data;
|
|
171
|
+
defaultCheckedIds.value = datalist.ownList;
|
|
172
|
+
isAllOwn.value = datalist.isAllOwn;
|
|
173
|
+
curStatus.value = useStatus(permissionList.value, curApproving);
|
|
174
|
+
loading.value = false;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
const showModal = () => {
|
|
178
|
+
open.value = !open.value;
|
|
179
|
+
getPermissions();
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
const { currentTop, dragElement } = useDraggable(props, showModal);
|
|
183
|
+
|
|
184
|
+
watchEffect(() => {
|
|
185
|
+
if (props.type === COM_TYPE.DEFAULT) {
|
|
186
|
+
getPermissions();
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
watch(() => props.locale, (cur, pre) => {
|
|
190
|
+
if (cur === pre) return;
|
|
191
|
+
localStorage.setItem('permission_locale', props.locale);
|
|
192
|
+
}, { immediate: true });
|
|
184
193
|
</script>
|
|
185
194
|
|
|
186
195
|
<style scoped>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
196
|
+
.crane-wraper {
|
|
197
|
+
display: flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
flex-direction: column;
|
|
200
|
+
font-size: 14px;
|
|
201
|
+
white-space: nowrap;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.crane-margin10 {
|
|
205
|
+
margin: 10px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.crane-margin-right10 {
|
|
209
|
+
margin-right: 10px;
|
|
210
|
+
}
|
|
211
|
+
</style>
|
package/src/hooks/useFormat.ts
CHANGED
|
@@ -9,6 +9,8 @@ const StatusType = {
|
|
|
9
9
|
TEMP_OWNER: 'TEMP_OWNER'
|
|
10
10
|
}
|
|
11
11
|
export default function useFormat(tree: PermissionListType) {
|
|
12
|
+
const ownList: string[] = [];
|
|
13
|
+
let allCount: number = 0;
|
|
12
14
|
function sortTree(
|
|
13
15
|
tree: PermissionListType,
|
|
14
16
|
sortMap: Map<string | null, number>,
|
|
@@ -16,7 +18,7 @@ export default function useFormat(tree: PermissionListType) {
|
|
|
16
18
|
) {
|
|
17
19
|
return tree.map((node) => {
|
|
18
20
|
node.key = node.feature;
|
|
19
|
-
|
|
21
|
+
allCount++;
|
|
20
22
|
if (!node.children || node.children.length === 0) {
|
|
21
23
|
node.categoryVOS = (node.categoryVOS || []).filter((item: any) => item.configWay !== Category.AUTO);
|
|
22
24
|
|
|
@@ -26,8 +28,13 @@ export default function useFormat(tree: PermissionListType) {
|
|
|
26
28
|
|
|
27
29
|
if ([StatusType.OWNER].includes(node.businessApplyType) && !node.categoryVOS.length) {
|
|
28
30
|
node.disabled = true;
|
|
31
|
+
ownList.push(node.feature);
|
|
29
32
|
}
|
|
30
33
|
} else {
|
|
34
|
+
// 如果当前节点的所有自节点都符合[StatusType.OWNER].includes(node.businessApplyType) && !node.categoryVOS.length;那么也把当前featrue放到ownList中
|
|
35
|
+
if (node.children.every((child) => [StatusType.OWNER].includes(child.businessApplyType) && !child?.categoryVOS?.length)) {
|
|
36
|
+
ownList.push(node.feature);
|
|
37
|
+
}
|
|
31
38
|
// 递归对子节点进行排序
|
|
32
39
|
node.children = sortTree(node.children, sortMap, levelSortMap);
|
|
33
40
|
|
|
@@ -35,7 +42,8 @@ export default function useFormat(tree: PermissionListType) {
|
|
|
35
42
|
if (node.children.every((child) => child.disabled)) {
|
|
36
43
|
node.disabled = true;
|
|
37
44
|
}
|
|
38
|
-
}
|
|
45
|
+
};
|
|
46
|
+
|
|
39
47
|
|
|
40
48
|
return node;
|
|
41
49
|
}).sort((a, b) => {
|
|
@@ -51,6 +59,10 @@ export default function useFormat(tree: PermissionListType) {
|
|
|
51
59
|
const sortMap = new Map(sort.map((value, index) => [value, index]));
|
|
52
60
|
const levelSortMap = new Map(levelSort.map((value, index) => [value, index]));
|
|
53
61
|
|
|
54
|
-
return
|
|
62
|
+
return {
|
|
63
|
+
data: sortTree(tree, sortMap, levelSortMap),
|
|
64
|
+
ownList,
|
|
65
|
+
isAllOwn: allCount === ownList.length
|
|
66
|
+
};
|
|
55
67
|
}
|
|
56
68
|
|
package/src/i18n/zh-CH.ts
CHANGED
|
@@ -3,6 +3,7 @@ export default {
|
|
|
3
3
|
applyPermission: '申请权限',
|
|
4
4
|
applyReason: '申请理由',
|
|
5
5
|
approvalProcess: '审批流程',
|
|
6
|
+
isAllOwnTips: '您当前已拥有该页面所有权限,无需申请',
|
|
6
7
|
applyReasonPlaceholder: '请尽可能详细说明申请原因和使用场景,不要只填写“工作需要”之类的理由,以免影响你获取权限的审批时间。',
|
|
7
8
|
applyReasonTips: '示例:由于XX项目需要,需要查看/操作XXXX场景/问题,涉及到XXX权限的使用,因此提交申请!',
|
|
8
9
|
cancel: '取消',
|
package/src/typings/index.d.ts
CHANGED
package/tsconfig.app.json
CHANGED
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
},
|
|
23
23
|
"composite": true,
|
|
24
24
|
"include": [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
"src/**/*.ts",
|
|
26
|
+
"src/**/*.d.ts",
|
|
27
|
+
"src/**/*.tsx",
|
|
28
|
+
"src/**/*.vue",
|
|
29
29
|
"src/i18n/zh-CH.js"
|
|
30
30
|
],
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
"exclude": [
|
|
32
|
+
"node_modules",
|
|
33
|
+
"vite.config.ts" // 如果不需要解析 vite.config.ts
|
|
34
|
+
],
|
|
35
35
|
}
|