Vue + Element Model Mode Form Injective Form Implementation

The effect to be implemented is as follows, when it is initialized, can not be editable, click Edit button, edit button hide, cancel the editing button display; some input box is editing

vue+element 模态框表格形式的可编辑表单实现

vue+element 模态框表格形式的可编辑表单实现

                                            Cancel   Save 

Data in DATA Editform: {}, // Additive form Isedit: false, // Have you edited Dialogeditvisible: false, // New Model box images: [], // Image Information YwlxList: [ ], // Service Type List Kdzslist: ['50', '100', '200', '300'], // NPP Broad Mash List SJTClist: ['38', '58', '88', '98', '128', '138', '188'], // Mobile Basic Package list
ViewDetail (Row ) {Console.log (row) this.editform = this.deepclone (row) this.dialogeditvisible = true this. $ pos ("/ anapi / yxdcontroller / getByid", {ID: row.id}, (data) => {this.EDitform = data.yxd this.editform.qywg = row.name1 + row.name2 + row.name3 + row.gridname this.editform.address = row.name1 + row.name2 + row.namE3 + row.gridname + row.xxdz this.editform.yxry = row.yxcname + '-' + row.yxid this.currentItem = this.deepclone (this.editform) let imgs = data.yxd.imgs || [] This.images = [] imgs.map (item => {this.images)}}}}}}}}}}}}}}} saved editives () {this. $ REFS.EDITFORM.VALIDATE ((VALID) => {if (valid) {this.startloading () this. $ pos ("/ api / yxdcontroller / edityxd", this.editform, (data) => {this. $ message.success ("Modify Success! ") This.dialogeditvisible = false this.gettableData (1)})}})}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} / View Inited (Viewer) {this. $ Viewer = VIEWER}, show () {if (! this.Images.length) {this. $ message.error ("No photo") Return} this. $ viewer.show ()}, The above is all the content of this article, I hope to help everyone, I hope everyone will support Tumi Cloud.
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment