create-jnrs-template-vue 1.2.1 → 1.2.2
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/bin/create.mjs +3 -3
- package/jnrs-template-vue/auto-imports.d.ts +4 -0
- package/jnrs-template-vue/components.d.ts +0 -1
- package/jnrs-template-vue/package.json +2 -2
- package/jnrs-template-vue/public/system/menu.json +1 -1
- package/jnrs-template-vue/src/api/demos/index.ts +13 -12
- package/jnrs-template-vue/src/assets/styles/animation.scss +0 -0
- package/jnrs-template-vue/src/assets/styles/common.scss +4 -0
- package/jnrs-template-vue/src/assets/styles/fonts.scss +4 -1
- package/jnrs-template-vue/src/assets/styles/{main.scss → index.scss} +1 -0
- package/jnrs-template-vue/src/assets/styles/init.scss +4 -13
- package/jnrs-template-vue/src/assets/styles/root.scss +0 -3
- package/jnrs-template-vue/src/components/common/{JnDictTag.vue → DictTag.vue} +1 -1
- package/jnrs-template-vue/src/components/{base → common}/PdfView.vue +2 -2
- package/jnrs-template-vue/src/components/select/SelectManager.vue +20 -0
- package/jnrs-template-vue/src/composables/common/usePagination.ts +4 -4
- package/jnrs-template-vue/src/composables/common/useTable.ts +4 -4
- package/jnrs-template-vue/src/composables/tools/useMouseSelection.ts +150 -0
- package/jnrs-template-vue/src/layout/SideMenu.vue +1 -0
- package/jnrs-template-vue/src/layout/TopHeader.vue +1 -1
- package/jnrs-template-vue/src/locales/en.ts +1 -1
- package/jnrs-template-vue/src/main.ts +1 -1
- package/jnrs-template-vue/src/types/index.ts +45 -3
- package/jnrs-template-vue/src/views/demos/crud/index.vue +98 -35
- package/jnrs-template-vue/src/views/demos/unitTest/RequestPage.vue +1 -1
- package/jnrs-template-vue/src/views/login/index.vue +7 -2
- package/jnrs-template-vue/src/views/system/dict/index.vue +2 -2
- package/jnrs-template-vue/src/views/system/menu/index.vue +2 -2
- package/jnrs-template-vue/tsconfig.json +1 -9
- package/jnrs-template-vue/vite.config.ts +1 -2
- package/jnrs-template-vue/viteMockServe/file.ts +2 -3
- package/jnrs-template-vue/viteMockServe/json/tableRes.json +384 -342
- package/package.json +1 -1
- package/jnrs-template-vue/src/assets/images/fileIcon/iconArchive.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconAudio.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconCode.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconExcel.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconFile.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconFlash.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconGif.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconImage.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconMac.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconOfd.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconPdf.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconPpt.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconText.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconUnknown.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconVideo.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconWindows.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconWord.png +0 -0
- package/jnrs-template-vue/src/assets/images/fileIcon/iconWps.png +0 -0
- package/jnrs-template-vue/src/components/base/JnFileUpload.vue +0 -433
- package/jnrs-template-vue/src/components/common/JnDatetime.vue +0 -37
- package/jnrs-template-vue/src/components/common/JnEdit.vue +0 -68
- package/jnrs-template-vue/src/components/common/JnPagination.vue +0 -83
- package/jnrs-template-vue/src/components/common/JnTable.vue +0 -133
- package/jnrs-template-vue/src/composables/tools/useReactivityTableHeight.ts +0 -63
- /package/jnrs-template-vue/src/components/{base → common}/ImageView.vue +0 -0
- /package/jnrs-template-vue/viteMockServe/{fileSrc → file}/mock-pdf.pdf +0 -0
- /package/jnrs-template-vue/viteMockServe/{fileSrc → file}/mock-png-0.png +0 -0
- /package/jnrs-template-vue/viteMockServe/{fileSrc → file}/mock-png-1.png +0 -0
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { FormInstance, FormRules } from 'element-plus'
|
|
3
|
-
import type { Attachment } from '@/types'
|
|
3
|
+
import type { Attachment, Pagination } from '@/types'
|
|
4
4
|
import type { ProjectItem, AddProjectItem } from '@/api/demos/index'
|
|
5
5
|
import { ref, onActivated } from 'vue'
|
|
6
6
|
import { ElMessage } from 'element-plus'
|
|
7
7
|
import { Plus } from '@element-plus/icons-vue'
|
|
8
8
|
import { objectMatchAssign } from '@jnrs/shared'
|
|
9
|
+
import { debounce } from '@jnrs/shared/lodash'
|
|
9
10
|
import { isNumberGtZero } from '@jnrs/shared/validator'
|
|
10
|
-
import { getDictList, objectToFormData } from '@/utils/packages'
|
|
11
|
+
import { getDictList, objectToFormData, downloadFile } from '@/utils/packages'
|
|
11
12
|
import { DemosTableApi, DemosFormApi } from '@/api/demos/index'
|
|
12
|
-
|
|
13
|
-
import JnPagination from '
|
|
14
|
-
import ImageView from '@/components/
|
|
15
|
-
import PdfView from '@/components/
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import JnDatetime from '@/components/common/JnDatetime.vue'
|
|
19
|
-
import JnFileUpload from '@/components/base/JnFileUpload.vue'
|
|
13
|
+
|
|
14
|
+
import { JnDialog, JnDatetime, JnPagination, JnFileUpload, JnTable } from '@jnrs/vue-core/components'
|
|
15
|
+
import ImageView from '@/components/common/ImageView.vue'
|
|
16
|
+
import PdfView from '@/components/common/PdfView.vue'
|
|
17
|
+
import DictTag from '@/components/common/DictTag.vue'
|
|
18
|
+
import SelectManager from '@/components/select/SelectManager.vue'
|
|
20
19
|
|
|
21
20
|
interface ProcessedProjectItem extends ProjectItem {
|
|
22
21
|
newImageFiles?: Attachment[]
|
|
@@ -26,28 +25,30 @@ interface ProcessedProjectItem extends ProjectItem {
|
|
|
26
25
|
const loading = ref(false)
|
|
27
26
|
const tableData = ref<ProcessedProjectItem[]>([])
|
|
28
27
|
const total = ref(0)
|
|
29
|
-
const pagination = ref({
|
|
28
|
+
const pagination = ref<Pagination>({ pageNo: 1, pageSize: 10 })
|
|
29
|
+
|
|
30
|
+
// 编辑
|
|
30
31
|
const jnEditRef = ref()
|
|
31
32
|
const ruleFormRef = ref<FormInstance>()
|
|
32
|
-
|
|
33
33
|
const ruleForm = ref<AddProjectItem>({
|
|
34
34
|
id: '',
|
|
35
35
|
name: '',
|
|
36
36
|
program: '',
|
|
37
37
|
projectType: undefined,
|
|
38
|
+
managerId: undefined,
|
|
38
39
|
budget: 0,
|
|
39
40
|
plannedStartDate: '',
|
|
40
41
|
description: '',
|
|
41
42
|
newImageFiles: [],
|
|
42
43
|
newAttachmentFile: []
|
|
43
44
|
})
|
|
44
|
-
|
|
45
45
|
const rules = ref<FormRules>({
|
|
46
46
|
name: [{ required: true, message: '请输入', trigger: 'change' }],
|
|
47
47
|
program: [{ required: true, message: '请选择', trigger: 'change' }],
|
|
48
48
|
projectType: [{ required: true, message: '请选择', trigger: 'change' }],
|
|
49
49
|
plannedStartDate: [{ required: true, message: '请选择', trigger: 'change' }],
|
|
50
50
|
newImageFiles: [{ required: true, message: '请上传', trigger: 'change' }],
|
|
51
|
+
managerId: [{ required: true, message: '请选择', trigger: 'change' }],
|
|
51
52
|
budget: [
|
|
52
53
|
{ required: true, message: '请输入', trigger: 'change' },
|
|
53
54
|
{
|
|
@@ -57,27 +58,33 @@ const rules = ref<FormRules>({
|
|
|
57
58
|
]
|
|
58
59
|
})
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
// 查询
|
|
62
|
+
const queryForm = ref({
|
|
63
|
+
code: '',
|
|
64
|
+
projectType: undefined,
|
|
65
|
+
manager: ''
|
|
66
|
+
})
|
|
63
67
|
|
|
64
68
|
const handleSelectionChange = (row: ProjectItem[]) => {
|
|
65
69
|
console.log(row)
|
|
66
70
|
}
|
|
67
71
|
|
|
68
|
-
const getDemosTable = async () => {
|
|
72
|
+
const getDemosTable = debounce(async () => {
|
|
69
73
|
try {
|
|
70
|
-
const res = await DemosTableApi(
|
|
71
|
-
|
|
74
|
+
const res = await DemosTableApi({
|
|
75
|
+
...pagination.value,
|
|
76
|
+
...queryForm.value
|
|
77
|
+
})
|
|
78
|
+
tableData.value = res.list.map((item) => ({
|
|
72
79
|
...item,
|
|
73
80
|
newImageFiles: item.imageDocument?.attachments ?? undefined,
|
|
74
81
|
newAttachmentFile: item.attachmentDocument?.attachments ?? undefined
|
|
75
82
|
}))
|
|
76
|
-
total.value = res.
|
|
83
|
+
total.value = res.count
|
|
77
84
|
} catch (error) {
|
|
78
85
|
console.error(error)
|
|
79
86
|
}
|
|
80
|
-
}
|
|
87
|
+
}, 300)
|
|
81
88
|
|
|
82
89
|
// 新增和修改
|
|
83
90
|
const handleEdit = (row?: ProjectItem) => {
|
|
@@ -86,6 +93,13 @@ const handleEdit = (row?: ProjectItem) => {
|
|
|
86
93
|
ruleFormRef.value?.resetFields()
|
|
87
94
|
const matched = objectMatchAssign(ruleForm.value, row)
|
|
88
95
|
ruleForm.value = matched
|
|
96
|
+
// Select 组件数据回填
|
|
97
|
+
if (row && 'managerId' in row && 'manager' in row) {
|
|
98
|
+
ruleForm.value.managerId = {
|
|
99
|
+
managerId: row.managerId,
|
|
100
|
+
manager: row.manager
|
|
101
|
+
}
|
|
102
|
+
}
|
|
89
103
|
})
|
|
90
104
|
}
|
|
91
105
|
|
|
@@ -94,7 +108,10 @@ const submitForm = () => {
|
|
|
94
108
|
ruleFormRef.value?.validate(async (valid) => {
|
|
95
109
|
if (valid) {
|
|
96
110
|
loading.value = true
|
|
97
|
-
const formData = objectToFormData(
|
|
111
|
+
const formData = objectToFormData({
|
|
112
|
+
...ruleForm.value,
|
|
113
|
+
managerId: ruleForm.value.managerId?.managerId
|
|
114
|
+
})
|
|
98
115
|
try {
|
|
99
116
|
await DemosFormApi(formData)
|
|
100
117
|
ElMessage({
|
|
@@ -117,7 +134,8 @@ onActivated(() => {
|
|
|
117
134
|
</script>
|
|
118
135
|
|
|
119
136
|
<template>
|
|
120
|
-
|
|
137
|
+
<!-- 编辑弹窗 -->
|
|
138
|
+
<JnDialog ref="jnEditRef" title="项目管理" width="600px">
|
|
121
139
|
<el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="auto" v-loading="loading">
|
|
122
140
|
<el-form-item prop="id"></el-form-item>
|
|
123
141
|
<el-form-item label="项目名称" prop="name">
|
|
@@ -133,6 +151,14 @@ onActivated(() => {
|
|
|
133
151
|
/>
|
|
134
152
|
</el-select>
|
|
135
153
|
</el-form-item>
|
|
154
|
+
<el-form-item label="项目经理" prop="managerId">
|
|
155
|
+
<SelectManager
|
|
156
|
+
v-model="ruleForm.managerId"
|
|
157
|
+
:formRef="ruleFormRef"
|
|
158
|
+
validateFieldName="managerId"
|
|
159
|
+
:simpleValue="false"
|
|
160
|
+
></SelectManager>
|
|
161
|
+
</el-form-item>
|
|
136
162
|
<el-form-item label="预算" prop="budget">
|
|
137
163
|
<el-input-number v-model="ruleForm.budget" :min="0" :precision="2" :step="10000" controls-position="right">
|
|
138
164
|
<template #prefix>
|
|
@@ -171,6 +197,7 @@ onActivated(() => {
|
|
|
171
197
|
:fileSizeMb="50"
|
|
172
198
|
:limit="3"
|
|
173
199
|
drag
|
|
200
|
+
:downloadFileFn="(file) => downloadFile(file.uniqueFileName, file.fileName)"
|
|
174
201
|
/>
|
|
175
202
|
</el-form-item>
|
|
176
203
|
<el-form-item label="上传文件" prop="newAttachmentFile">
|
|
@@ -180,20 +207,62 @@ onActivated(() => {
|
|
|
180
207
|
<template #footer>
|
|
181
208
|
<el-button type="success" icon="Select" :loading="loading" @click="submitForm()">提交</el-button>
|
|
182
209
|
</template>
|
|
183
|
-
</
|
|
210
|
+
</JnDialog>
|
|
184
211
|
|
|
185
212
|
<el-card>
|
|
186
213
|
<template #header>
|
|
187
|
-
<div
|
|
214
|
+
<div style="display: flex; justify-content: space-between">
|
|
188
215
|
<span>项目管理</span>
|
|
189
216
|
<el-button type="primary" size="small" :icon="Plus" @click="handleEdit()">新增</el-button>
|
|
190
217
|
</div>
|
|
191
218
|
</template>
|
|
219
|
+
|
|
220
|
+
<!-- 查询条件 -->
|
|
221
|
+
<el-form :model="queryForm" size="small" inline v-loading="loading">
|
|
222
|
+
<el-form-item label="项目编号" prop="code">
|
|
223
|
+
<el-input v-model="queryForm.code" clearable style="width: 150px">
|
|
224
|
+
<template #append>
|
|
225
|
+
<el-button icon="Search" @click="getDemosTable()" />
|
|
226
|
+
</template>
|
|
227
|
+
</el-input>
|
|
228
|
+
</el-form-item>
|
|
229
|
+
<el-form-item label="项目名称" prop="projectType">
|
|
230
|
+
<el-select
|
|
231
|
+
v-model="queryForm.projectType"
|
|
232
|
+
filterable
|
|
233
|
+
placeholder=""
|
|
234
|
+
clearable
|
|
235
|
+
style="width: 150px"
|
|
236
|
+
@change="getDemosTable()"
|
|
237
|
+
>
|
|
238
|
+
<el-option
|
|
239
|
+
:label="item.label"
|
|
240
|
+
:value="item.value"
|
|
241
|
+
v-for="item in getDictList('projectType')"
|
|
242
|
+
:key="item.value"
|
|
243
|
+
/>
|
|
244
|
+
</el-select>
|
|
245
|
+
</el-form-item>
|
|
246
|
+
<el-form-item label="项目经理" prop="manager">
|
|
247
|
+
<SelectManager
|
|
248
|
+
v-model="queryForm.manager"
|
|
249
|
+
:initialParams="{ role: 1 }"
|
|
250
|
+
size="small"
|
|
251
|
+
width="200px"
|
|
252
|
+
@change="getDemosTable()"
|
|
253
|
+
></SelectManager>
|
|
254
|
+
</el-form-item>
|
|
255
|
+
</el-form>
|
|
256
|
+
|
|
257
|
+
<!-- 数据列表 -->
|
|
192
258
|
<JnTable
|
|
193
259
|
:data="tableData"
|
|
194
260
|
:pagination="pagination"
|
|
261
|
+
:autoHeight="true"
|
|
262
|
+
:showScrollbar="true"
|
|
195
263
|
:showIndexColumn="true"
|
|
196
264
|
:showSelectionColumn="true"
|
|
265
|
+
:showMouseSelection="true"
|
|
197
266
|
@selection-change="handleSelectionChange"
|
|
198
267
|
>
|
|
199
268
|
<el-table-column prop="code" label="项目编号" min-width="200" sortable show-overflow-tooltip />
|
|
@@ -205,7 +274,7 @@ onActivated(() => {
|
|
|
205
274
|
<el-table-column prop="program" label="项目集名称" min-width="200" sortable show-overflow-tooltip />
|
|
206
275
|
<el-table-column prop="projectType" label="项目类型" width="100" align="center" sortable>
|
|
207
276
|
<template #default="{ row }">
|
|
208
|
-
<
|
|
277
|
+
<DictTag dictName="projectType" :value="row.projectType" />
|
|
209
278
|
</template>
|
|
210
279
|
</el-table-column>
|
|
211
280
|
<el-table-column prop="manager" label="项目经理" width="100" align="center" sortable />
|
|
@@ -231,7 +300,7 @@ onActivated(() => {
|
|
|
231
300
|
</el-table-column>
|
|
232
301
|
<el-table-column prop="status" label="状态" width="100" align="center" sortable>
|
|
233
302
|
<template #default="{ row }">
|
|
234
|
-
<
|
|
303
|
+
<DictTag dictName="status" :value="row.status" :showColor="false" />
|
|
235
304
|
</template>
|
|
236
305
|
</el-table-column>
|
|
237
306
|
<el-table-column prop="description" label="描述" min-width="200" show-overflow-tooltip />
|
|
@@ -252,13 +321,7 @@ onActivated(() => {
|
|
|
252
321
|
</el-table-column>
|
|
253
322
|
</JnTable>
|
|
254
323
|
|
|
255
|
-
|
|
324
|
+
<!-- 表格分页 -->
|
|
325
|
+
<JnPagination :total="total" v-model="pagination" @change="getDemosTable" />
|
|
256
326
|
</el-card>
|
|
257
327
|
</template>
|
|
258
|
-
|
|
259
|
-
<style lang="scss" scoped>
|
|
260
|
-
.card_header {
|
|
261
|
-
display: flex;
|
|
262
|
-
justify-content: space-between;
|
|
263
|
-
}
|
|
264
|
-
</style>
|
|
@@ -7,7 +7,7 @@ import { NotFoundApi, NoAuth, DetailsApi } from '@/api/demos'
|
|
|
7
7
|
import { getFileUrl } from '@/utils/file'
|
|
8
8
|
import { downloadFile } from '@/utils/packages'
|
|
9
9
|
|
|
10
|
-
import ImageView from '@/components/
|
|
10
|
+
import ImageView from '@/components/common/ImageView.vue'
|
|
11
11
|
|
|
12
12
|
const squareUrl = ref()
|
|
13
13
|
|
|
@@ -191,8 +191,6 @@ const submitForm = async () => {
|
|
|
191
191
|
box-shadow: 5px 0 10px rgba(0, 0, 0, 0.5);
|
|
192
192
|
// background: url('@/assets/img/common/card_bg.png') no-repeat;
|
|
193
193
|
// background-size: 100% 100%;
|
|
194
|
-
text-align: center;
|
|
195
|
-
font-size: 22px;
|
|
196
194
|
|
|
197
195
|
.card_left_mid {
|
|
198
196
|
width: 50%;
|
|
@@ -204,7 +202,10 @@ const submitForm = async () => {
|
|
|
204
202
|
}
|
|
205
203
|
|
|
206
204
|
.title {
|
|
205
|
+
text-align: center;
|
|
207
206
|
font-size: 24px;
|
|
207
|
+
letter-spacing: 4px;
|
|
208
|
+
white-space: nowrap;
|
|
208
209
|
font-weight: normal;
|
|
209
210
|
font-family: AlimamaShuHeiTi-Bold;
|
|
210
211
|
color: rgba(255, 255, 255, 0.5);
|
|
@@ -238,6 +239,7 @@ const submitForm = async () => {
|
|
|
238
239
|
|
|
239
240
|
.title {
|
|
240
241
|
text-align: center;
|
|
242
|
+
text-transform: uppercase;
|
|
241
243
|
color: var(--jnrs-color-primary);
|
|
242
244
|
}
|
|
243
245
|
|
|
@@ -261,6 +263,7 @@ const submitForm = async () => {
|
|
|
261
263
|
color: var(--jnrs-color-primary-06);
|
|
262
264
|
font-size: 14px;
|
|
263
265
|
text-align: center;
|
|
266
|
+
text-transform: uppercase;
|
|
264
267
|
|
|
265
268
|
&::before,
|
|
266
269
|
&::after {
|
|
@@ -286,6 +289,8 @@ const submitForm = async () => {
|
|
|
286
289
|
position: absolute;
|
|
287
290
|
bottom: 5px;
|
|
288
291
|
font-size: 12px;
|
|
292
|
+
letter-spacing: 2px;
|
|
293
|
+
text-transform: uppercase;
|
|
289
294
|
color: rgba(0, 0, 0, 0.1);
|
|
290
295
|
}
|
|
291
296
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { ElMessage } from 'element-plus'
|
|
3
3
|
import { ref, onActivated } from 'vue'
|
|
4
4
|
import { DictApi, DictDetailApi, DictChangeApi } from '@/api/system'
|
|
5
|
-
import {
|
|
5
|
+
import { useReactivityTableHeight } from '@jnrs/vue-core/composables'
|
|
6
6
|
import type { DictItem } from '@jnrs/shared'
|
|
7
7
|
import { hasPermission } from '@/utils/permissions'
|
|
8
8
|
|
|
9
|
-
const { maxHeight } =
|
|
9
|
+
const { maxHeight } = useReactivityTableHeight({ className: 'el_table_dict', bottomGap: 0 })
|
|
10
10
|
const PERMISSION_EDIT = ['dict:edit']
|
|
11
11
|
const loading = ref(false)
|
|
12
12
|
const tableData = ref<DictItem[]>()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { ref } from 'vue'
|
|
3
3
|
import { useMenuStore } from '@jnrs/vue-core/pinia'
|
|
4
|
-
import {
|
|
4
|
+
import { useReactivityTableHeight } from '@jnrs/vue-core/composables'
|
|
5
5
|
|
|
6
|
-
const { maxHeight } =
|
|
6
|
+
const { maxHeight } = useReactivityTableHeight({ className: 'el_table_menu', bottomGap: 0 })
|
|
7
7
|
const loading = ref(false)
|
|
8
8
|
|
|
9
9
|
const { menus } = useMenuStore()
|
|
@@ -20,14 +20,6 @@
|
|
|
20
20
|
"@/*": ["src/*"]
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
-
"include": [
|
|
24
|
-
"src/**/*",
|
|
25
|
-
"vite.config.ts",
|
|
26
|
-
"../../../packages/shared/src/validate.ts",
|
|
27
|
-
"../../../packages/shared/src/validator.ts",
|
|
28
|
-
"../../../packages/vue-core/src/components/JnImageView.vue",
|
|
29
|
-
"../../../packages/vue-core/src/components/JnPdfView.vue",
|
|
30
|
-
"src/components/common/JnEdit.vue"
|
|
31
|
-
],
|
|
23
|
+
"include": ["src/**/*", "vite.config.ts", "../../../packages/vue-core/src/composables/useMouseSelection.ts"],
|
|
32
24
|
"exclude": ["node_modules", "dist"]
|
|
33
25
|
}
|
|
@@ -33,10 +33,9 @@ export default [
|
|
|
33
33
|
try {
|
|
34
34
|
const fs = await import('fs').then((m) => m.default || m)
|
|
35
35
|
const path = await import('path').then((m) => m.default || m)
|
|
36
|
+
const filePath = path.resolve(process.cwd(), `viteMockServe/file/${fileName}`)
|
|
37
|
+
const fileDir = path.resolve(process.cwd(), 'viteMockServe/file')
|
|
36
38
|
|
|
37
|
-
const filePath = path.resolve(process.cwd(), `viteMockServe/fileSrc/${fileName}`)
|
|
38
|
-
|
|
39
|
-
const fileDir = path.resolve(process.cwd(), 'viteMockServe/fileSrc')
|
|
40
39
|
if (!filePath.startsWith(fileDir + path.sep) && filePath !== fileDir) {
|
|
41
40
|
res.statusCode = 403
|
|
42
41
|
res.end('Forbidden')
|