3e3c2dab by xukangle

Merge branch 'dev_20241202_xukangle' into develop

2 parents b30375b8 210b5eb5
......@@ -3,7 +3,7 @@ VITE_APP_TITLE = 数据资产管理系统
# 接口域名
# VITE_API_BASEURL = https://www.zgsjzc.com/api
# VITE_API_BASEURL = https://swzl-test.csbr.cn/api
# VITE_API_BASEURL = http://10.4.82.30:8052/
# VITE_API_BASEURL = http://localhost:9000
VITE_API_BASEURL = http://10.4.82.1:28052/
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = gateway-server/user
......@@ -24,10 +24,10 @@ VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service
#数据质量接口地址
VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
#数据盘点接口地址
#数据盘点接口地址ms-daop-zcgl-data-inventory
# VITE_APP_CHECK_BASEURL = /mock
VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory
#门户接口
VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal
......
......@@ -54,7 +54,6 @@ declare module '@vue/runtime-core' {
Table_tools: typeof import('./src/components/Tools/table_tools.vue')['default']
Table_v2: typeof import('./src/components/Table/table_v2.vue')['default']
Tabs: typeof import('./src/components/Tabs/index.vue')['default']
TemplateItem: typeof import('./src/components/TemplateItem/index.vue')['default']
Toolbar: typeof import('./src/components/LineageGraph/toolbar.vue')['default']
Topbar: typeof import('./src/components/LineageGraph/topbar.vue')['default']
Transfer: typeof import('./src/components/Transfer/index.vue')['default']
......
......@@ -35,7 +35,6 @@
"lodash-es": "^4.17.21",
"md5": "^2.3.0",
"mitt": "^3.0.0",
"mockjs": "^1.1.0",
"moment": "^2.29.4",
"nprogress": "^0.2.0",
"path-browserify": "^1.0.1",
......@@ -67,6 +66,7 @@
"fs-extra": "^11.1.1",
"http-server": "^14.1.1",
"lint-staged": "^13.2.2",
"mockjs": "^1.1.0",
"npm-run-all": "^4.1.5",
"plop": "^3.1.2",
"postcss-html": "^1.5.0",
......
......@@ -129,3 +129,100 @@ export const getGradeTreeList = () => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/grade/tree-list`,
method: 'post',
})
/**
* 分类树形列表
* @param {Object}
* @path /classify/tree-list
* */
export const getClassifyTreeList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify/tree-list`,
method: 'post',
data
})
/**
* 分类新增
* @param {Object}
* @path /classify/save
* */
export const saveClassify = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify/save`,
method: 'post',
data
})
/**
* 分类更新
* @param {Object}
* @path /classify/update
*/
export const updateClassify = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify/update`,
method: 'post',
data
})
/**删除分类
* @param {Object}
* @path /classify/delete
*/
export const deleteClassify = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify/delete?guid=${data.guid}`,
method: 'delete',
})
/** ---------------分类分级模板------------------------ */
/**
* 分类分级模板新增
* @param {Object}
* @path /cg-template/save
*/
export const saveCgTemplate = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-template/save`,
method: 'post',
data
})
/**
* 分类分级模板左侧树形列表
* @param {Object}
* @path /cg-template-classify/tree-list
*/
export const getCgTemplateClassifyTreeList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-template-classify/tree-list`,
method: 'post',
data
})
/**-------------------------分类分级目录--------------------------------- */
/**
* 分类分级目录树形列表
* @param {Object}
* @path /cg-dir/tree-list
*/
export const getCgDirTreeList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/tree-list`,
method: 'post',
data
})
/**
* 分类分级目录-分页
* @param {Object}
* @path /cg-dir/field/page-list
*/
export const getCgDirFieldPageList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/field/page-list`,
method: 'post',
data
})
......
import request from "@/utils/request";
/**
* 远程获取标签
* @param {Object}
* @path /cg-label/label-serach
* @method get
* @des query查询 label
*/
export const getLabelList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/label-serach?label=${data.label}`,
method: 'get',
})
/**
* 分类分级树形目录
* @param {no params}
* @path /classify-grade/tree-list
* @method post
*/
export const getClassifyGradeTreeList = () => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify-grade/tree-list`,
method: 'post',
})
/**
* @des 新增标签规则
* @param {Object}
* @path /cg-label/save
*/
export const saveLabel = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/save`,
method: 'post',
data
})
/**
* @des 获取标签页规则列表
* @param {Object}
* @path /cg-label/page-list
*/
export const getLabelPageList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/page-list`,
method: 'post',
data
})
/**
* @des 删除标签规则
* @param {Array}
* @path /cg-label/delete
*/
export const deleteLabel = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/delete`,
method: 'delete',
data
})
/**
* @des 标签规则修改
* @param {Object}
* @path /cg-label/update
*/
export const updateLabel = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/update`,
method: 'post',
data
})
......@@ -14,6 +14,8 @@ const props = defineProps({
},
});
const dialogRef = ref();
const dialogInfo = computed(() => {
return {
visible: props.dialogConfigInfo.visible,
......@@ -49,10 +51,16 @@ const formDialogRadioGroupChange = (val, row, item) => {
const formDialogSelectChange = (val, item, row) => {
emits('formDialogSelectChange', val, row, item);
}
defineExpose({
dialogRef,
});
</script>
<template>
<Dialog :dialogInfo="dialogInfo" @btnClick="formDialogBtnClick" @radioGroupChange="formDialogRadioGroupChange"
@select-change="formDialogSelectChange" />
<Dialog ref="dialogRef" :dialogInfo="dialogInfo" @btnClick="formDialogBtnClick"
@radioGroupChange="formDialogRadioGroupChange" @select-change="formDialogSelectChange">
<!-- 默认插槽内容 -->
<slot></slot>
</Dialog>
</template>
......
......@@ -99,7 +99,7 @@ const onClickOutside = (e: any) => {
};
const getDrawerConRef = (refName) => {
if(refName == 'drawerTableRef'){
if (refName == 'drawerTableRef') {
const dtf = drawerTableRef.value[0] || drawerTableRef.value
return dtf?.tableRef
}
......@@ -228,90 +228,45 @@ const drawerClose = () => {
</script>
<template>
<el-drawer
v-model="drawerVisible"
:direction="drawerDirection"
:size="drawerSize"
:modal="drawerModal"
:close-on-click-modal="modalClose"
:close-on-press-escape="modalClose"
:modal-class="drawerModalClass"
destroy-on-close
:z-index="props.drawerInfo.zIndex ?? null"
@close="drawerClose"
>
<el-drawer v-model="drawerVisible" :direction="drawerDirection" :size="drawerSize" :modal="drawerModal"
:close-on-click-modal="modalClose" :close-on-press-escape="modalClose" :modal-class="drawerModalClass"
destroy-on-close :z-index="props.drawerInfo.zIndex ?? null" @close="drawerClose">
<template #header>
<span class="title">{{ drawerTitle }}</span>
</template>
<template #default>
<div class="drawer-body-loading" v-if="drawerInfo.loading ?? false" v-loading="drawerInfo.loading ?? false"></div>
<div
v-else
class="drawer_panel"
:class="[con.col]"
:style="con.style"
v-for="con in contents"
>
<div v-else class="drawer_panel" :class="[con.col]" :style="con.style" v-for="con in contents">
<div class="panel_title" v-if="con.title">{{ con.title }}</div>
<template v-if="con.type && con.type.indexOf('table') > -1">
<div
class="table_tool"
:class="[con.tableTool.col]"
v-if="con.tableTool && (con.tableTool.visible ?? true)"
>
<div class="table_tool" :class="[con.tableTool.col]" v-if="con.tableTool && (con.tableTool.visible ?? true)">
<template v-for="bar in con.tableTool.btns">
<el-popover
v-if="bar.popover"
:visible="bar.popover.visible"
:title="bar.popover.title"
:popper-class="bar.popover.class ?? ''"
placement="bottom-start"
:width="bar.popover.width ?? 200"
trigger="click"
>
<el-popover v-if="bar.popover" :visible="bar.popover.visible" :title="bar.popover.title"
:popper-class="bar.popover.class ?? ''" placement="bottom-start" :width="bar.popover.width ?? 200"
trigger="click">
<template #reference>
<el-button
:type="bar.type"
@click="toolBtnClick(bar, con.type)"
v-click-outside="onClickOutside"
v-preReClick
>{{ bar.label }}</el-button
>
<el-button :type="bar.type" @click="toolBtnClick(bar, con.type)" v-click-outside="onClickOutside"
v-preReClick>{{ bar.label }}</el-button>
</template>
<template #default>
<span v-html="bar.popover.content"></span>
</template>
</el-popover>
<el-button
:type="bar.type"
:plain="bar.plain"
v-else
@click="toolBtnClick(bar, 'table')"
v-preReClick
>{{ bar.label }}</el-button
>
<el-button :type="bar.type" :plain="bar.plain" v-else @click="toolBtnClick(bar, 'table')" v-preReClick>{{
bar.label
}}</el-button>
</template>
</div>
<div class="table_panel_wrap" :style="con.tableInfo.style">
<Table
ref="drawerTableRef"
:class="[con.tableInfo.col]"
:tableInfo="con.tableInfo"
@tableSelectChange="tableSelectChange"
@tableBtnClick="tableBtnClick"
@tableSelectionChange="tableSelectionChange"
@tableInputChange="tableInputChange"
@tablePageChange="tablePageChange"
/>
<Table ref="drawerTableRef" :class="[con.tableInfo.col]" :tableInfo="con.tableInfo"
@tableSelectChange="tableSelectChange" @tableBtnClick="tableBtnClick"
@tableSelectionChange="tableSelectionChange" @tableInputChange="tableInputChange"
@tablePageChange="tablePageChange" />
</div>
</template>
<template v-else-if="con.type && con.type.indexOf('tree') > -1">
<div class="list_tree" v-if="con.type.indexOf('list') > -1">
<ListPanel
ref="formListRef"
:listInfo="con.listInfo"
@itemClick="listItemClick"
/>
<ListPanel ref="formListRef" :listInfo="con.listInfo" @itemClick="listItemClick" />
<Tree ref="formTreeRef" :treeInfo="con.treeInfo" />
</div>
<Tree ref="formTreeRef" :treeInfo="con.treeInfo" v-else />
......@@ -329,23 +284,12 @@ const drawerClose = () => {
</template>
<template v-else-if="con.type && con.type.indexOf('upload') > -1">
<div class="upload_tool">
<UploadFiles
ref="uploadRef"
:upload-info="con.uploadInfo"
@onUpload="onUpload"
@beforeUPload="beforeUPload"
@uploadFile="uploadFile"
@uploadBtnClick="uploadBtnClick"
/>
<UploadFiles ref="uploadRef" :upload-info="con.uploadInfo" @onUpload="onUpload" @beforeUPload="beforeUPload"
@uploadFile="uploadFile" @uploadBtnClick="uploadBtnClick" />
<div class="tool_btns" v-if="con.tools && con.tools.visible">
<template v-for="btn in con.tools.btns">
<el-button
v-if="btn.visible ?? true"
:type="btn.type"
:plain="btn.plain"
@click="toolBtnClick(btn, 'table')"
v-preReClick
>
<el-button v-if="btn.visible ?? true" :type="btn.type" :plain="btn.plain"
@click="toolBtnClick(btn, 'table')" v-preReClick>
<el-icon v-if="btn.icon && btn.icon == 'Upload'">
<Upload />
</el-icon>
......@@ -357,49 +301,28 @@ const drawerClose = () => {
</template>
</div>
</div>
<div
class="upload_table_panel_wrap"
v-if="con.tableInfo && Object.keys(con.tableInfo).length"
>
<Table
ref="drawerTableRef"
:class="[con.tableInfo.col]"
:tableInfo="con.tableInfo"
@tableSelectChange="tableSelectChange"
@tableBtnClick="tableBtnClick"
@tableSelectionChange="tableSelectionChange"
@tableInputChange="tableInputChange"
@tablePageChange="tablePageChange"
/>
<div class="upload_table_panel_wrap" v-if="con.tableInfo && Object.keys(con.tableInfo).length">
<Table ref="drawerTableRef" :class="[con.tableInfo.col]" :tableInfo="con.tableInfo"
@tableSelectChange="tableSelectChange" @tableBtnClick="tableBtnClick"
@tableSelectionChange="tableSelectionChange" @tableInputChange="tableInputChange"
@tablePageChange="tablePageChange" />
</div>
</template>
<template v-else>
<Form
ref="drawerFormRef"
:itemList="con.formInfo.items"
:formId="con.formInfo.id"
:rules="con.formInfo.rules"
:col="con.formInfo.col"
:readonly="con.formInfo.readonly"
@radioGroupChange="radioGroupChange"
@selectChange="formSelectChange"
@btnClick="formBtnClick"
/>
<Form ref="drawerFormRef" :itemList="con.formInfo.items" :formId="con.formInfo.id" :rules="con.formInfo.rules"
:col="con.formInfo.col" :readonly="con.formInfo.readonly" @radioGroupChange="radioGroupChange"
@selectChange="formSelectChange" @btnClick="formBtnClick">
</Form>
<!-- 插槽内容 -->
<slot></slot>
</template>
</div>
</template>
<template #footer v-if="footer.visible ?? true">
<div style="flex: auto">
<template v-for="btn in footer.btns">
<el-button
v-if="btn.visible ?? true"
:type="btn.type"
:disabled="btn.disabled ?? false"
@click="btnClick(btn, null)"
v-preReClick
:loading="btn.loading ?? false"
>{{ btn.label }}</el-button
>
<el-button v-if="btn.visible ?? true" :type="btn.type" :disabled="btn.disabled ?? false"
@click="btnClick(btn, null)" v-preReClick :loading="btn.loading ?? false">{{ btn.label }}</el-button>
</template>
</div>
</template>
......
This diff could not be displayed because it is too large.
import type { MockMethod } from 'vite-plugin-mock'
import Mock from 'mockjs'
export const confirmDelivery = {
url: '/mock/youthBoost/admin/shipment',
method: 'post',
response: ({body}:{body:any}) => {
return {
code: 200,
message: '成功',
data: []
}
}
}
export default [confirmDelivery] as MockMethod[]
// import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
// const mocks: any[] = []
// const mockContext = import.meta.glob('./mock/*.ts', { eager: true })
// Object.keys(mockContext).forEach((v) => {
// mocks.push(...(mockContext[v] as any).default)
// })
// export function setupProdMockServer() {
// createProdMockServer(mocks)
// }
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
import dataInventory from './mock/data_inventory'
const mocks: any[] = []
const mockContext = import.meta.glob('./mock/*.ts', { eager: true })
Object.keys(mockContext).forEach((v) => {
mocks.push(...(mockContext[v] as any).default)
})
export function setupProdMockServer() {
createProdMockServer(mocks)
createProdMockServer([...dataInventory,])
}
......
......@@ -89,7 +89,17 @@ const routes: RouteRecordRaw[] = [
name: 'templateConfig',
component: () => import('@/views/data_inventory/templateConfig.vue'),
meta: {
title: '分类分级模板',
title: '分类分级标准',
breadcrumb: false,
cache: true
},
},
{
path: 'data-label',
name: 'dataLabel',
component: () => import('@/views/data_inventory/dataLabel.vue'),
meta: {
title: '标签管理',
breadcrumb: false,
cache: true
},
......@@ -109,7 +119,7 @@ const routes: RouteRecordRaw[] = [
},
beforeEnter: (to, from) => {
if (to.query.classStandardName) {
to.meta.title = `编辑-${to.query.classStandardName}`;
to.meta.title = `编辑-${to.query.classStandardName}`;
}
}
},
......@@ -165,6 +175,47 @@ const routes: RouteRecordRaw[] = [
}
}
},
{
path: 'classificationTemplate-edit',
name: 'classificationTemplateEdit',
component: () => import('@/views/data_inventory/classificationTemplateEdit.vue'),
meta: {
title: '编辑-',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
editPage: true,
activeMenu: '/data-inventory/classify-grade-manage/template-config'
},
beforeEnter: (to, from) => {
if (to.query.classClassifyGradName) {
to.meta.title = `编辑-${to.query.classClassifyGradName}`;
}
}
},
],
},
{
path: '/data-inventory/classify-grade-catalogue',
component: Layout,
meta: {
title: '分类分级目录',
icon: 'sidebar-videos',
},
children: [
{
path: '',
name: 'classifyGradeCatalogue',
component: () => import('@/views/data_inventory/classifyGradeCatalogue.vue'),
meta: {
title: '分类分级目录',
sidebar: false,
breadcrumb: false,
cache: true
},
},
],
}
]
......
......@@ -484,7 +484,7 @@ export const tagType = (row, type) => {
}
} else if (type == 'state') {
switch (row[type]) {
case 'N':
case 'N':
state = 'warning';
break;
case "Y":
......@@ -552,6 +552,18 @@ export const tagType = (row, type) => {
state = 'danger'//发布中
break;
}
}else if (type == 'status'){
switch (row[type]) {
case 'Y':
state = 'success';
break;
case 'S':
state = 'info';
break;
default:
state = 'info';
break;
}
}
return state;
}
......
......@@ -237,7 +237,7 @@ const newCreateGradeFormItems = ref([{
{
label: '分级描述',
type: 'textarea',
maxlength: 50,
maxlength: 500,
placeholder: '分类分级的描述说明',
field: 'gradeDesc',
default: '',
......
......@@ -6,20 +6,54 @@
import router from "@/router";
import { getMetaDataBase } from '@/api/modules/dataMetaService';
import { ref } from "vue";
import { getClassifyGradList, saveCgTemplate } from "@/api/modules/dataInventory";
onMounted(async () => {
const params = {
pageIndex: 1,
pageSize: -1,
}
const res = await getMetaDataBase(params)
console.log(res);
const res = await getMetaDataBase(params);
tableInfo.value.data = res.data.records;
getGradListData();
getClassifyDataList();
});
const { proxy } = getCurrentInstance() as any;
const refGradePageParams = ref({
pageIndex: 1,
pageSize: -1,
type: "G"
});
const refClassifyPageParams = ref({
pageIndex: 1,
pageSize: -1,
type: "C"
});
const gradListData = ref([]);
const classifyDataList = ref([]);
// 获取分级列表
const getGradListData = async () => {
const res: any = await getClassifyGradList(refGradePageParams.value);
gradListData.value = res.data.records;
newCreateTemplateFormItems.value[2].options = gradListData.value;
};
// 获取分类列表
const getClassifyDataList = async () => {
const res: any = await getClassifyGradList(refClassifyPageParams.value);
classifyDataList.value = res.data.records;
newCreateTemplateFormItems.value[1].options = classifyDataList.value;
};
// 表单引用
const formRef = ref();
const tableRef = ref();
// 元数据metaGuids
const metaGuids = ref<any>([]);
const fullscreenLoading = ref(false);
const isExpand = ref(true);
const newCreateTemplateFormItems = ref([{
......@@ -27,7 +61,7 @@ const newCreateTemplateFormItems = ref([{
type: 'input',
maxlength: 50,
placeholder: '请输入',
field: 'templeteName',
field: 'templateName',
default: '',
clearable: true,
required: true
......@@ -35,9 +69,13 @@ const newCreateTemplateFormItems = ref([{
label: '行业分类',
type: 'select',
placeholder: '请选择',
field: ' industryCategory',
field: 'classifyGuid',
default: '',
options: [], //TODO
props: {
label: 'name',
value: 'guid'
},
required: true,
filterable: true,
clearable: true,
......@@ -46,9 +84,13 @@ const newCreateTemplateFormItems = ref([{
label: '分级标准',
type: 'select',
placeholder: '请选择',
field: ' gradingStandard',
field: 'gradeGuid',
default: '',
options: [], //TODO
props: {
label: 'name',
value: 'guid'
},
required: true,
filterable: true,
clearable: true,
......@@ -82,63 +124,14 @@ const tableInfo = ref({
actionInfo: {
show: false,
},
data: [
{
index: 1,
databaseNameZh: "数据库名称",
databaseName: "数据库名",
tableCount: 0,
storageCapacities: 0,
columns: 0,
},
{
index: 2,
databaseNameZh: "数据库名称",
databaseName: "数据库名",
tableCount: 0,
storageCapacities: 0,
columns: 0,
},
{
index: 3,
databaseNameZh: "数据库名称",
databaseName: "数据库名",
tableCount: 0,
storageCapacities: 0,
columns: 0,
},
{
index: 4,
databaseNameZh: "数据库名称",
databaseName: "数据库名",
tableCount: 0,
storageCapacities: 0,
columns: 0,
},
{
index: 5,
databaseNameZh: "数据库名称",
databaseName: "数据库名",
tableCount: 0,
storageCapacities: 0,
columns: 0,
},
{
index: 6,
databaseNameZh: "数据库名称",
databaseName: "数据库名",
tableCount: 0,
storageCapacities: 0,
columns: 0,
},
],
data: [],
showPage: false,
loading: false,
});
const onTableSelectChange = (selection: any[]) => {
console.log(selection);
// 遍历选中的元数据guid,然后存入metaGuids数组中
metaGuids.value = selection.map((item: any) => item.guid);
};
const cancel = () => {
......@@ -149,11 +142,24 @@ const cancel = () => {
const save = async () => {
console.log('save');
// 校验表单
const res = formRef.value;
res.ruleFormRef.validate((valid: any) => {
const formRes = formRef.value;
formRes.ruleFormRef.validate(async (valid: any) => {
if (valid) {
// 表单校验通过
console.log('表单校验通过');
const formData = formRes.formInline;
const params = {
...formData,
metaGuids: metaGuids.value,
version: 0
};
const res: any = await saveCgTemplate(params);
if (res.code == proxy.$passCode) {
// 保存成功
proxy.$ElMessage.success(res.msg);
} else {
// 保存失败
proxy.$ElMessage.error(res.msg);
}
} else {
console.log('表单校验不通过');
return false;
......
......@@ -21,9 +21,10 @@
<span>模板确认时间: {{ item.content.modelConfirmTime }}</span>
</div>
<div class="botton-btn">
<el-button type="primary" class="off-line-btn">下线</el-button>
<el-button type="primary" class="templete-btn">模板训练</el-button>
<el-button type="primary" class="delete-btn">删除</el-button>
<el-button type="primary" plain class="off-line-btn">下线</el-button>
<el-button>模板训练</el-button>
<el-button>模板确认</el-button>
<el-button>删除</el-button>
</div>
</div>
</div>
......@@ -146,6 +147,7 @@ const getItemStyle = (status: string) => {
borderTop: `4px solid ${borderColor}`,
};
};
</script>
<style scoped lang="scss">
......@@ -259,22 +261,6 @@ const getItemStyle = (status: string) => {
.botton-btn {
margin-top: 13px;
.off-line-btn {
background-color: #fff;
font-size: 14px;
color: #4FA1A4;
}
.templete-btn,
.delete-btn {
background: #FFFFFF;
border: 1px solid rgba(217, 217, 217, 1);
font-size: 14px;
color: #212121;
}
}
}
}
......
......@@ -15,6 +15,7 @@ import createBanner from './banner'
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from '@vant/auto-import-resolver';
import createMock from './mock'
export default function createVitePlugins(viteEnv, isBuild = false) {
const vitePlugins: (PluginOption | PluginOption[])[] = [
......@@ -37,5 +38,6 @@ export default function createVitePlugins(viteEnv, isBuild = false) {
isBuild && vitePlugins.push(...createCompression(viteEnv))
vitePlugins.push(...createSpritesmith(isBuild))
vitePlugins.push(createBanner())
vitePlugins.push(createMock(viteEnv.VITE_APP_CHECK_BASEURL, isBuild))
return vitePlugins
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!