diff --git a/src/views/products/components/EditorImage.vue b/src/views/products/components/EditorImage.vue
index 3b1d618c..9d46ff82 100644
--- a/src/views/products/components/EditorImage.vue
+++ b/src/views/products/components/EditorImage.vue
@@ -27,6 +27,7 @@
SUCCESS you can now close this popup
+ {{ item._id }}
ERROR please try again, if the error persist contact Chadmin!
@@ -57,9 +58,18 @@ export default {
data() {
return {
dialogVisible: false,
- input: '',
- isNameCorrect: false,
- viewState: 'initialState'
+ viewState: 'initialState',
+ isNameCorrect: true,
+ input: ''
+ }
+ },
+ watch: {
+ input: function() {
+ if (this.input === this.item.name) {
+ this.isNameCorrect = false
+ } else {
+ this.isNameCorrect = true
+ }
}
},
methods: {
@@ -71,8 +81,6 @@ export default {
return Object.keys(this.listObj).every(item => this.listObj[item].hasSuccess)
},
handleSubmit() {
- console.log(this.input)
- console.log(this.item._id)
if (this.input) {
this.viewState = 'Success'
} else if (!this.input) {