This commit is contained in:
Gdpao
2020-08-14 12:17:28 +08:00
parent 150c3337e4
commit c9c714d4e3
5 changed files with 164 additions and 13 deletions

View File

@@ -38,7 +38,7 @@
<view class="form-view active" @click="show_add()">+ 新建标签</view>
<view :class="['form-view', item.state == true ? 'active' : '']" v-for="(item, index) in fileListes" :key="index" @click="changeselect(index)">
{{ item.name }}
<u-icon v-show="is_edit" class="close" name="close" color="#666" size="18"></u-icon>
<u-icon v-show="is_edit && item.user_id != 0" class="close" name="close" color="#666" size="18" @click="isTable(item.id,index)"></u-icon>
</view>
</view>
<!-- 简介 -->
@@ -246,6 +246,31 @@ export default {
}
});
},
// 删除标签
isTable(id,index) {
uni.showModal({
title: "提示",
content: "是否删除此标签?",
success: (res) => {
console.log();
if (res.confirm) {
this.delTable(id,index);
}
}
})
},
delTable(id,index) {
let me = this;
this.$u.post("Streaming/deltLabel", {label_id: id}).then(res => {
if (res.errCode == 0) {
this.$refs.uToast.show({
title: res.message,
type: 'success'
});
this.fileListes.splice(index,1);
}
})
},
// 上传封面
uploadcover(data) {
console.log(data);