| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <template v-slot:footer> |
| | | <el-button @click="close">返回</el-button> |
| | | </template> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | |
| | | // 添加标签 |
| | | async add() { |
| | | if (!this.value) return this.$message.warning('请先输入内容') |
| | | let res = await createLabels({ name: this.value }) |
| | | await this.getData() |
| | | createLabels({ name: this.value }) |
| | | .then(() => { |
| | | this.$message.success('添加成功') |
| | | this.$emit('success') |
| | | this.getData() |
| | | this.$emit('refresh') |
| | | this.value = '' |
| | | this.$message.success('添加成功') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | }, |
| | | // 删除 |
| | | async dele(id) { |
| | | let res = await labelsDeleteById(id) |
| | | await this.getData() |
| | | this.$emit('refresh') |
| | | labelsDeleteById(id) |
| | | .then(() => { |
| | | this.$message.success('删除成功') |
| | | this.$emit('success') |
| | | this.getData() |
| | | this.$emit('refresh') |
| | | this.value = '' |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | } |
| | | } |
| | | } |