Commit a502fbc7 authored by zL's avatar zL

现在名称为空

parent 3906eec1
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
ref="List" ref="List"
v-for="item in propertyList" v-for="item in propertyList"
class="l-input t-input" class="l-input t-input"
v-model="item.label" v-model.trim="item.label"
:errorShowing="isErrorShowing" :errorShowing="isErrorShowing"
maxlength="10" maxlength="10"
:key="item.id" :key="item.id"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<h2 class="c-dialog-title">添加一级标题</h2> <h2 class="c-dialog-title">添加一级标题</h2>
<dialog-input <dialog-input
class="l-input t-input" class="l-input t-input"
v-model="bindValue" v-model.trim="bindValue"
:errorShowing="isErrorShowing" :errorShowing="isErrorShowing"
placeholder="输入一级标题名称" placeholder="输入一级标题名称"
:maxlength="limit" :maxlength="limit"
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<h2 class="title">修改标题名</h2> <h2 class="title">修改标题名</h2>
<el-input <el-input
class="edit" class="edit"
v-model="editTitle" v-model.trim="editTitle"
:errorShowing="isErrorShowing"
placeholder="请输入标题名" placeholder="请输入标题名"
:maxlength="titleLength" :maxlength="titleLength"
@input="changeEdit" @input="changeEdit"
...@@ -139,6 +140,7 @@ export default class SetBar extends Vue { ...@@ -139,6 +140,7 @@ export default class SetBar extends Vue {
public PropertyType = PropertyType; public PropertyType = PropertyType;
public editTitle = ``; public editTitle = ``;
public titleLength = 100; public titleLength = 100;
public isErrorShowing: boolean = false;
public get type() { public get type() {
const target = this.selectTarget; const target = this.selectTarget;
...@@ -164,7 +166,14 @@ export default class SetBar extends Vue { ...@@ -164,7 +166,14 @@ export default class SetBar extends Vue {
} }
} }
public changeEdit() { public changeEdit(val: string) {
if (val.length === 0) {
this.$message({
message: "标题名称不可为空",
type: "warning",
});
return;
}
this.$nextTick(() => { this.$nextTick(() => {
if (this.selectTarget) { if (this.selectTarget) {
if (this.selectTarget.hasOwnProperty("title")) if (this.selectTarget.hasOwnProperty("title"))
......
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