|
|
@@ -87,12 +87,13 @@ export default {
|
|
|
},
|
|
|
// 确认编辑
|
|
|
submitEdit: function (i) {
|
|
|
- if (!this.newName) {
|
|
|
- alert("姓名不能为空");
|
|
|
- } else if (this.newName === this.tableData[i]["platformName"]) {
|
|
|
+ let newName = this.newName.replace(/\s/g,"");
|
|
|
+ if (!newName) {
|
|
|
+ alert("名称不能为空");
|
|
|
+ } else if (newName === this.tableData[i]["platformName"]) {
|
|
|
this.newName = ""; // 没有改
|
|
|
} else {
|
|
|
- this.$emit("edit", i, this.newName);
|
|
|
+ this.$emit("edit", i, newName);
|
|
|
}
|
|
|
this.newName = "";
|
|
|
this.editFlag.splice(i, 1, false);
|