refactor: use XModel

This commit is contained in:
xingyu4j
2022-11-15 12:25:19 +08:00
parent 29f2f99401
commit c5075dad3b
37 changed files with 88 additions and 86 deletions

View File

@ -75,7 +75,7 @@ getList()
</Table>
</ContentWrap>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<XModal v-model="dialogVisible" :title="dialogTitle">
<!-- 对话框(详情) -->
<Descriptions :schema="allSchemas.detailSchema" :data="detailRef">
<template #userType="{ row }">
@ -95,5 +95,5 @@ getList()
<template #footer>
<el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
</template>
</Dialog>
</XModal>
</template>

View File

@ -114,7 +114,7 @@ getList()
</Table>
</ContentWrap>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<XModal v-model="dialogVisible" :title="dialogTitle">
<!-- 对话框(详情) -->
<Descriptions :schema="allSchemas.detailSchema" :data="detailRef">
<template #userType="{ row }">
@ -131,5 +131,5 @@ getList()
<template #footer>
<el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
</template>
</Dialog>
</XModal>
</template>

View File

@ -79,7 +79,7 @@ defineExpose({
</script>
<template>
<!-- 导入表 -->
<Dialog title="导入表" v-model="visible" maxHeight="500px" width="50%">
<XModal title="导入表" v-model="visible" maxHeight="500px" width="50%">
<el-form :model="queryParams" ref="queryRef" :inline="true">
<el-form-item label="数据源" prop="dataSourceConfigId">
<el-select v-model="queryParams.dataSourceConfigId" placeholder="请选择数据源" clearable>
@ -125,5 +125,5 @@ defineExpose({
<el-button @click="visible = false">{{ t('dialog.close') }}</el-button>
</div>
</template>
</Dialog>
</XModal>
</template>

View File

@ -114,7 +114,7 @@ defineExpose({
})
</script>
<template>
<Dialog title="预览" v-model="preview.open" top="5vh" maxHeight="800px" width="90%">
<XModal title="预览" v-model="preview.open" top="5vh" maxHeight="800px" width="90%">
<div class="flex">
<el-card class="w-1/4" :gutter="12" shadow="hover">
<el-tree
@ -144,5 +144,5 @@ defineExpose({
</el-tabs>
</el-card>
</div>
</Dialog>
</XModal>
</template>

View File

@ -158,7 +158,7 @@ getList()
</Table>
</ContentWrap>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<XModal v-model="dialogVisible" :title="dialogTitle">
<!-- 对话框(添加 / 修改) -->
<Form
v-if="['create', 'update'].includes(actionType)"
@ -194,5 +194,5 @@ getList()
</el-button>
<el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
</template>
</Dialog>
</XModal>
</template>

View File

@ -131,7 +131,7 @@ onMounted(async () => {
</template>
</Table>
</ContentWrap>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<XModal v-model="dialogVisible" :title="dialogTitle">
<!-- 对话框(添加 / 修改) -->
<Form
v-if="['create', 'update'].includes(actionType)"
@ -161,5 +161,5 @@ onMounted(async () => {
</el-button>
<el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
</template>
</Dialog>
</XModal>
</template>

View File

@ -176,7 +176,7 @@ getList()
</Table>
</ContentWrap>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<XModal v-model="dialogVisible" :title="dialogTitle">
<!-- 对话框(添加 / 修改) -->
<Form
v-if="['create', 'update'].includes(actionType)"
@ -212,5 +212,5 @@ getList()
</el-button>
<el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
</template>
</Dialog>
</XModal>
</template>

View File

@ -148,7 +148,7 @@ getList()
</Table>
</ContentWrap>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<XModal v-model="dialogVisible" :title="dialogTitle">
<!-- 对话框(详情) -->
<Descriptions :schema="allSchemas.detailSchema" :data="detailRef">
<template #url="{ row }">
@ -169,8 +169,8 @@ getList()
<template #footer>
<el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
</template>
</Dialog>
<Dialog v-model="uploadDialogVisible" :title="uploadDialogTitle" :destroy-on-close="true">
</XModal>
<XModal v-model="uploadDialogVisible" :title="uploadDialogTitle" :destroy-on-close="true">
<el-upload
ref="uploadRef"
:action="updateUrl + '?updateSupport=' + updateSupport"
@ -200,5 +200,5 @@ getList()
</el-button>
<el-button @click="uploadDialogVisible = false">{{ t('dialog.close') }}</el-button>
</template>
</Dialog>
</XModal>
</template>

View File

@ -95,7 +95,7 @@ onMounted(() => {
</template>
</Table>
</ContentWrap>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<XModal v-model="dialogVisible" :title="dialogTitle">
<!-- 对话框(详情) -->
<Descriptions :schema="allSchemas.detailSchema" :data="detailRef">
<template #status="{ row }">
@ -112,5 +112,5 @@ onMounted(() => {
<template #footer>
<el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
</template>
</Dialog>
</XModal>
</template>

View File

@ -208,7 +208,7 @@ getList()
</template>
</Table>
</ContentWrap>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<XModal v-model="dialogVisible" :title="dialogTitle">
<!-- 对话框(添加 / 修改) -->
<Form
v-if="['create', 'update'].includes(actionType)"
@ -248,5 +248,5 @@ getList()
</el-button>
<el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
</template>
</Dialog>
</XModal>
</template>

View File

@ -233,7 +233,7 @@ onBeforeMount(() => {
</el-col>
</el-row>
</el-scrollbar>
<Dialog v-model="dialogVisible" :title="keyTemplate + ' 模板'" width="60%" maxHeight="800px">
<XModal v-model="dialogVisible" :title="keyTemplate + ' 模板'" width="60%" maxHeight="800px">
<el-row>
<el-col :span="14" style="margin-top: 10px">
<el-card shadow="always">
@ -280,7 +280,7 @@ onBeforeMount(() => {
</el-card>
</el-col>
</el-row>
</Dialog>
</XModal>
</template>
<style scoped>
.redis {