Bootstrap

vue 父刷新子_在Vue中父子组件之间的数据传输和子组件中删除操作之后更新父组件刷新当前列表数据...

//定义删除方法 handleDelete()

// 编写删除方法

handleDelete(row) {

let _id = row.id

this.$confirm('是否要删除 ' + row.name + ' ?', '提示', {

dangerouslyUseHTMLString: true,

showCancelButton: false,

confirmButtonText: '确定',

type: 'warning',

center: true

}).then(() => {

this.$axios.post('/api/LampPole/DelLampTypeTypeInfo', { data: { id: _id } }

).then((res) => {

this.$message.success(res.data.msg)

// 通过this.$emit属性传自定义的属性和值给父组件

this.$emit("refresh-item", res.data.code)

}).catch((err) => {

this.$message.error(err)

})

}).catch(e => e);

}

悦读

道可道,非常道;名可名,非常名。 无名,天地之始,有名,万物之母。 故常无欲,以观其妙,常有欲,以观其徼。 此两者,同出而异名,同谓之玄,玄之又玄,众妙之门。

;