From 6fc3c4d3d46ba299d3053b9e8dbfe95c39299e8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com>
Date: Mon, 27 Jun 2022 20:13:38 +0800
Subject: [PATCH] =?UTF-8?q?perf=EF=BC=9A=E4=BC=98=E5=8C=96=E5=AD=97?=
=?UTF-8?q?=E5=85=B8=E6=95=B0=E6=8D=AE=E5=9B=9E=E6=98=BE=E6=A0=B7=E5=BC=8F?=
=?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E6=98=BE=E7=A4=BA=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/styles/index.scss | 11 +++--
src/views/components/dictData.vue | 75 +++++++++++++++++--------------
2 files changed, 50 insertions(+), 36 deletions(-)
diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss
index aca8afa..f4e6df4 100644
--- a/src/assets/styles/index.scss
+++ b/src/assets/styles/index.scss
@@ -206,7 +206,9 @@ div:focus {
.text-navy {
color: #1ab394;
}
-
+.text-pink {
+ color: pink;
+}
.text-primary {
color: inherit;
}
@@ -224,7 +226,7 @@ div:focus {
}
.text-danger {
- color: #ed5565;
+ color: #ff0000;
}
.text-muted {
@@ -232,7 +234,7 @@ div:focus {
}
.text-orange {
- color: orangered;
+ color: #ff7d00;
}
.text-hotpink {
@@ -246,6 +248,9 @@ div:focus {
.text-greenyellow {
color: greenyellow;
}
+.text-purple {
+ color: #ff00ff;
+}
/* image */
.img-circle {
diff --git a/src/views/components/dictData.vue b/src/views/components/dictData.vue
index d94f1b4..f54d5b0 100644
--- a/src/views/components/dictData.vue
+++ b/src/views/components/dictData.vue
@@ -40,7 +40,7 @@
-
+
编辑
删除
@@ -64,7 +64,12 @@
-
+
@@ -72,7 +77,11 @@
-
+
@@ -86,8 +95,8 @@
@@ -99,8 +108,8 @@ const { proxy } = getCurrentInstance()
const props = defineProps({
dictId: {
type: Number,
- default: 0,
- },
+ default: 0
+ }
})
watch(
() => props.dictId,
@@ -115,8 +124,8 @@ watch(
},
{
immediate: true,
- deep: true,
- },
+ deep: true
+ }
)
const ids = ref()
@@ -135,71 +144,71 @@ const open = ref(false)
const listClassOptions = ref([
{
value: 'default',
- label: '默认',
+ label: '默认'
},
{
value: 'primary',
- label: '主要',
+ label: '主要'
},
{
value: 'success',
- label: '成功',
+ label: '成功'
},
{
value: 'info',
- label: '信息',
+ label: '信息'
},
{
value: 'warning',
- label: '警告',
+ label: '警告'
},
{
value: 'danger',
- label: '危险',
- },
+ label: '危险'
+ }
])
const cssClassOptions = ref([
{
value: 'text-primary',
- label: 'primary',
- },
- {
- value: 'text-navy',
- label: 'text-navy',
+ label: '主要'
},
{
value: 'text-success',
- label: '成功',
+ label: '成功'
},
{
value: 'text-info',
- label: '信息',
+ label: '信息'
},
{
value: 'text-warning',
- label: '警告',
+ label: '警告'
},
{
value: 'text-danger',
- label: '危险',
+ label: '危险'
},
{
value: 'text-orange',
- label: '橘红色',
+ label: '橘红色'
},
{
value: 'text-hotpink',
- label: '粉红色',
+ label: '粉红色'
},
{
value: 'text-green',
- label: '绿色',
+ label: '绿色'
},
{
value: 'text-greenyellow',
- label: '黄绿色',
+ label: '黄绿色'
},
+ {
+ value: 'text-purple',
+ label: '紫色'
+ }
])
// 状态数据字典
const statusOptions = ref([])
@@ -211,7 +220,7 @@ const queryParams = reactive({
pageSize: 10,
dictName: undefined,
dictType: undefined,
- status: undefined,
+ status: undefined
})
// 表单参数
@@ -221,8 +230,8 @@ const state = reactive({
rules: {
dictLabel: [{ required: true, message: '数据标签不能为空', trigger: 'blur' }],
dictValue: [{ required: true, message: '数据键值不能为空', trigger: 'blur' }],
- dictSort: [{ required: true, message: '数据顺序不能为空', trigger: 'blur' }],
- },
+ dictSort: [{ required: true, message: '数据顺序不能为空', trigger: 'blur' }]
+ }
})
const { form, rules } = toRefs(state)
@@ -264,7 +273,7 @@ function reset() {
dictValue: undefined,
dictSort: 0,
status: '0',
- remark: undefined,
+ remark: undefined
}
proxy.resetForm('formRef')
}
@@ -332,7 +341,7 @@ function handleDelete(row) {
.$confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
- type: 'warning',
+ type: 'warning'
})
.then(function () {
return delData(dictCodes)