Commit e0032881 authored by chenqikuai's avatar chenqikuai

fix

parent 066c1524
......@@ -32,7 +32,6 @@ export default defineComponent({
return {
name: "",
isErrorShowing: false, // 错误提示
isInActive: false,
MyCategories: [] as any[],
value: "" as any,
};
......@@ -50,25 +49,16 @@ export default defineComponent({
},
methods: {
async checkForm() {
if (this.isInActive) return;
this.isInActive = true;
this.isErrorShowing = true;
// 追加非空验证
if (this.name === "") {
ElMessage("模板名称不可为空");
this.isInActive = false;
return null;
}
if (this.value === "" || this.value === undefined) {
ElMessage("请选择分类");
return null;
}
if (this.value === "") {
// ElMessage("请选择分类");
// this.isInActive = false;
this.value = this.MyCategories[0].id;
// return null;
}
const data = await $ajax({
type: "post",
url: GO_URLS.customize,
......@@ -82,7 +72,6 @@ export default defineComponent({
if (data) {
this.$emit("successCallback", this.value);
}
this.isInActive = false;
return true;
},
closeDialog() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment