gdpaoup
This commit is contained in:
@@ -2,10 +2,16 @@
|
||||
<view id="release">
|
||||
<!-- 标签 -->
|
||||
<view>
|
||||
<view class="titles">标签</view>
|
||||
<view class="titles flex-title">
|
||||
<text>标签</text>
|
||||
<text @click="editing">{{ is_edit ? "取消编辑" : "编辑" }}</text>
|
||||
</view>
|
||||
<view class="form-view" @click="show_add()">+ 新建标签</view>
|
||||
<view class="form-view" :class=" {'cur': rSelect.indexOf(item.id)!=-1} " @tap="tapInfo(item.id)" v-for="(item,index) in fileListes"
|
||||
:key="index">{{item.name}}</view>
|
||||
:key="index">
|
||||
{{item.name}}
|
||||
<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>
|
||||
<!-- 添加标签的按钮 -->
|
||||
<u-popup v-model="show" mode="center" border-radius="14" :closeable="true">
|
||||
@@ -35,7 +41,8 @@
|
||||
action: 'http://www.example.com/upload',
|
||||
fileList: [],
|
||||
show: false,
|
||||
rSelect: []
|
||||
rSelect: [],
|
||||
is_edit: false,
|
||||
}
|
||||
},
|
||||
props:['fileListes'],
|
||||
@@ -44,6 +51,10 @@
|
||||
console.log(this.show)
|
||||
this.show = !this.show
|
||||
},
|
||||
// 编辑标签
|
||||
editing() {
|
||||
this.is_edit = !this.is_edit;
|
||||
},
|
||||
// 颜色切换
|
||||
tapInfo(e) {
|
||||
if (this.rSelect.indexOf(e) == -1) {
|
||||
@@ -54,6 +65,31 @@
|
||||
}
|
||||
this.$emit("qiehuan",this.rSelect)
|
||||
},
|
||||
// 删除标签
|
||||
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);
|
||||
}
|
||||
})
|
||||
},
|
||||
chuangjian(){
|
||||
this.$u.api.createLivesp({spec_name:this.form.name}).then((res)=>{
|
||||
if(res.errCode != 0){
|
||||
@@ -81,7 +117,12 @@
|
||||
#release {
|
||||
width: 690rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
|
||||
.flex-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.form-view {
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border-radius: 6rpx;
|
||||
@@ -91,6 +132,10 @@
|
||||
display: inline-block;
|
||||
margin-bottom: 28rpx;
|
||||
color: #333;
|
||||
.close {
|
||||
margin-left: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.titles {
|
||||
|
||||
Reference in New Issue
Block a user