Commit 32f31e67 authored by Mac's avatar Mac

1

parent e91e140e
......@@ -137,7 +137,7 @@
<text style="font-size:12px;color: #666666;">标签</text>
<div>
<view class="flex-row" style="justify-content: flex-end;margin-bottom: 5px;">
<u-tag :text="x" mode="dark" :bg-color="mainColor" size='mini' style='margin-left: 5px;' v-for="(x, i) in addMsg.Label" :key="i" closeable @close="tagClick(i)"/>
<u-tag :text="x" mode="dark" :bg-color="mainColor" size='mini' style='margin-left: 5px;' v-for="(x, i) in addMsg.LabelList" :key="i" closeable @close="tagClick(i)"/>
</view>
<view class="flex-row" style="justify-content: flex-end;">
<input type="text" v-model="labeldemo" :min='0' :maxlength="5" placeholder="活动标签" style="font-size: 12px;text-align: right;margin-right: 5px;">
......@@ -291,7 +291,7 @@ export default {
Content:'',
ImageList:[],
Deadline:'',
Label:[],
LabelList:[],
IsOpenEnroll:1,//1 是开启 2 是不开启
StartTime:'',
EndTime:'',
......@@ -355,21 +355,29 @@ export default {
},
methods: {
addlable(){
console.log(this.addMsg.Label.length)
if(this.addMsg.Label.length>2){
if(this.addMsg.LabelList.length>2){
uni.showToast({
title: '标签最多3个',
icon: 'none',
duration: 2500
})
}else{
this.addMsg.Label.push(this.labeldemo)
this.labeldemo = '';
if(this.labeldemo == ''){
uni.showToast({
title: '请输入标签内容',
icon: 'none',
duration: 2500
})
}else{
this.addMsg.LabelList.push(this.labeldemo)
this.labeldemo = '';
}
}
},
tagClick(i){
this.addMsg.Label.splice(i,1)
this.addMsg.LabelList.splice(i,1)
},
GetForumList(){
this.request2(
......
......@@ -22,9 +22,9 @@
{{x.ActivityTitle}}
</view>
<view class="max-b">
<view class="tagBox">
<u-tag :text="x.Label" mode="dark" :bg-color="mainColor" size='mini'
v-if="x.Label!=null && x.Label!=''" />
<view class="tagBox" v-if="x.LabelList.length>0">
<u-tag :text="item" mode="dark" :bg-color="mainColor" size='mini' style='margin-right: 5px;'
v-for="(item, index) in x.LabelList" :key="index" />
</view>
<view class="infoBox">
......@@ -56,7 +56,7 @@
</view>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20"
bg-color="#FFF" />
bg-color="#F5F5F5" />
<view style="width: 100%;height: 50px;"></view>
</scroll-view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment