Pārlūkot izejas kodu

简化前端dialog组件拖拽写法

zuohuaijun 3 gadi atpakaļ
vecāks
revīzija
c864863967

+ 1 - 4
Web/src/views/system/config/component/editConfig.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-config-container">
-		<el-dialog v-model="isShowDialog" width="600px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">{{ title }}</div>
-			</template>
+		<el-dialog v-model="isShowDialog" :title="title" draggable width="600px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="80px">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">

+ 1 - 4
Web/src/views/system/database/component/editColumn.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-dbColumn-container">
-		<el-dialog v-model="isShowDialog" width="600px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">列编辑</div>
-			</template>
+		<el-dialog v-model="isShowDialog" title="列编辑" draggable width="600px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="80px">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">

+ 1 - 4
Web/src/views/system/database/component/editTable.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-dbTable-container">
-		<el-dialog v-model="isShowDialog" width="600px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">表编辑</div>
-			</template>
+		<el-dialog v-model="isShowDialog" title="表编辑" draggable width="600px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="80px">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">

+ 1 - 1
Web/src/views/system/dict/component/dictDataDialog.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="sys-dictData-container">
-		<el-dialog title="字典值列表" v-model="isShowDialog" width="860px">
+		<el-dialog title="字典值列表" v-model="isShowDialog" draggable width="860px">
 			<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
 				<el-form :model="queryParams" ref="queryForm" :inline="true">
 					<el-form-item label="值" prop="value">

+ 1 - 4
Web/src/views/system/dict/component/editDictData.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-dictData-container">
-		<el-dialog v-model="isShowDialog" width="600px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">{{ title }}</div>
-			</template>
+		<el-dialog v-model="isShowDialog" :title="title" draggable width="600px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="80px">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">

+ 1 - 4
Web/src/views/system/dict/component/editDictType.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-dictType-container">
-		<el-dialog v-model="isShowDialog" width="600px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">{{ title }}</div>
-			</template>
+		<el-dialog v-model="isShowDialog" :title="title" draggable width="600px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="80px">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">

+ 1 - 1
Web/src/views/system/file/index.vue

@@ -75,7 +75,7 @@
 			/>
 		</el-card>
 
-		<el-dialog title="上传文件" v-model="dialogVisible" :lock-scroll="false" width="400px">
+		<el-dialog title="上传文件" v-model="dialogVisible" :lock-scroll="false" draggable width="400px">
 			<div>
 				<el-upload ref="uploadRef" drag :auto-upload="false" :limit="1" :file-list="fileList" action="" :on-change="handleChange" accept=".jpg,.png,.bmp,.gif,.txt,.pdf,.xlsx,.docx">
 					<el-icon class="el-icon--upload">

+ 1 - 1
Web/src/views/system/log/oplog/index.vue

@@ -46,7 +46,7 @@
 				layout="total, sizes, prev, pager, next, jumper"
 			/>
 		</el-card>
-		<el-dialog v-model="dialogVisible" title="日志详情" width="769px">
+		<el-dialog v-model="dialogVisible" title="日志详情" draggable width="769px">
 			<pre>{{ content }}</pre>
 			<template #footer>
 				<span class="dialog-footer">

+ 1 - 4
Web/src/views/system/menu/component/editMenu.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-menu-container">
-		<el-dialog v-model="isShowDialog" width="769px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">{{ title }}</div>
-			</template>
+		<el-dialog v-model="isShowDialog" :title="title" draggable width="769px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="80px">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">

+ 1 - 4
Web/src/views/system/org/component/editOrg.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-org-container">
-		<el-dialog v-model="isShowDialog" width="600px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">{{ title }}</div>
-			</template>
+		<el-dialog v-model="isShowDialog" :title="title" draggable width="600px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="80px">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">

+ 1 - 4
Web/src/views/system/pos/component/editPos.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-pos-container">
-		<el-dialog v-model="isShowDialog" width="600px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">{{ title }}</div>
-			</template>
+		<el-dialog v-model="isShowDialog" :title="title" draggable width="600px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="80px">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">

+ 1 - 4
Web/src/views/system/region/component/editRegion.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-region-container">
-		<el-dialog v-model="isShowDialog" width="600px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">{{ title }}</div>
-			</template>
+		<el-dialog v-model="isShowDialog" :title="title" draggable width="600px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="80px">
 				<el-row :gutter="35">
 					<!-- <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">

+ 1 - 4
Web/src/views/system/role/component/editRole.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-role-container">
-		<el-dialog v-model="isShowDialog" width="769px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">{{ title }}</div>
-			</template>
+		<el-dialog v-model="isShowDialog" :title="title" draggable width="769px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="80px">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">

+ 1 - 4
Web/src/views/system/role/component/grantData.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-grantData-container">
-		<el-dialog v-model="isShowDialog" width="450px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">授权数据范围</div>
-			</template>
+		<el-dialog v-model="isShowDialog" title="授权数据范围" draggable width="450px">
 			<el-form :model="ruleForm" size="default" label-position="top">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl1="24" class="mb20">

+ 1 - 4
Web/src/views/system/tenant/component/editTenant.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-tenant-container">
-		<el-dialog v-model="isShowDialog" width="769px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">{{ title }}</div>
-			</template>
+		<el-dialog v-model="isShowDialog" :title="title" draggable width="769px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="100px">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">

+ 1 - 4
Web/src/views/system/tenant/component/grantMenu.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-grantMenu-container">
-		<el-dialog v-model="isShowDialog" width="769px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">授权租户菜单</div>
-			</template>
+		<el-dialog v-model="isShowDialog" title="授权租户菜单" draggable width="769px">
 			<el-form :model="ruleForm" size="default">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl1="24">

+ 1 - 4
Web/src/views/system/timer/component/editTimer.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-timer-container">
-		<el-dialog v-model="isShowDialog" width="769px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">{{ title }}</div>
-			</template>
+		<el-dialog v-model="isShowDialog" :title="title" draggable width="769px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="100px">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">

+ 1 - 4
Web/src/views/system/user/component/editUser.vue

@@ -1,9 +1,6 @@
 <template>
 	<div class="sys-user-container">
-		<el-dialog v-model="isShowDialog" width="769px">
-			<template #header>
-				<div style="font-size: large" v-drag="['.el-dialog', '.el-dialog__header']">{{ title }}</div>
-			</template>
+		<el-dialog v-model="isShowDialog" :title="title" draggable width="769px">
 			<el-tabs v-loading="loading">
 				<el-tab-pane label="基础信息">
 					<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="100px">