fix: bugs

This commit is contained in:
xingyu
2022-11-28 16:50:53 +08:00
parent dec05a6c40
commit 005a3e6ab0
20 changed files with 113 additions and 95 deletions

View File

@@ -17,6 +17,7 @@ export const crudSchemas = reactive<VxeCrudSchema>({
primaryType: null,
action: true,
actionWidth: '140px',
searchSpan: 12,
columns: [
{
title: '字典类型',

View File

@@ -7,8 +7,7 @@ const { t } = useI18n() // 国际化
// 表单校验
export const dictTypeRules = reactive({
name: [required],
type: [required]
name: [required]
})
// 新增 + 修改
const crudSchemas = reactive<VxeCrudSchema>({
@@ -16,6 +15,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
primaryType: null,
action: true,
actionWidth: '140px',
searchSpan: 12,
columns: [
{
title: '字典名称',

View File

@@ -1,7 +1,6 @@
<template>
<div class="flex">
<!-- ====== 字典分类 ====== -->
<!-- TODO 星语筛选框很小 -->
<el-card class="w-1/2 dict" :gutter="12" shadow="always">
<template #header>
<div class="card-header">
@@ -94,7 +93,7 @@
ref="typeFormRef"
>
<template #type>
<template v-if="dictTypeValue">
<template v-if="actionType == 'typeUpdate'">
<el-tag>{{ dictTypeValue }}</el-tag>
</template>
<template v-else><el-input v-model="dictTypeValue" /> </template>
@@ -232,7 +231,7 @@ const submitTypeForm = async () => {
const elForm = unref(typeFormRef)?.getElFormRef()
if (!elForm) return
elForm.validate(async (valid) => {
if (valid) {
if (valid && dictTypeValue.value != '') {
actionLoading.value = true
// 提交请求
try {