all complete
This commit is contained in:
@@ -9,12 +9,20 @@
|
||||
</view>
|
||||
<view class="who">
|
||||
<view>
|
||||
<image src="/static/组 341.png" mode=""></image><text>发帖人:XXX</text>
|
||||
<image src="/static/组 341.png"></image><text>发帖人:XXX</text>
|
||||
</view>
|
||||
<view>
|
||||
评论数:{{this.value[2]}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="comment">
|
||||
<input type="text" placeholder="可评论" v-model="value_add" />
|
||||
<text v-show="write_if">{{this.value_add_else}}</text>
|
||||
</view>
|
||||
<view class="add_comment">
|
||||
<button @click="add()">添加评论</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -24,10 +32,23 @@
|
||||
|
||||
data() {
|
||||
return {
|
||||
value: null
|
||||
value: null,
|
||||
value_add: null,
|
||||
write_if:false,
|
||||
value_add_else:null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add() {
|
||||
this.write_if=true
|
||||
this.value_add_else=this.value_add
|
||||
this.value_add=""
|
||||
uni.showToast({
|
||||
title: '发布成功',
|
||||
icon:"success"
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
onLoad(option) {
|
||||
const id = option.id
|
||||
this.value = JSON.parse(decodeURIComponent(option.data))
|
||||
@@ -67,4 +88,11 @@
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.comment {
|
||||
margin: 10px;
|
||||
}
|
||||
.comment text{
|
||||
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user