瀏覽代碼

问答模块字数限制修改

jwyu 2 年之前
父節點
當前提交
b6bb784b20
共有 1 個文件被更改,包括 10 次插入3 次删除
  1. 10 3
      pages-question/detail/index.vue

+ 10 - 3
pages-question/detail/index.vue

@@ -52,6 +52,10 @@
                   class="editor"
                />
             </view>
+            <view style="height:40rpx;padding:10rpx 34rpx;font-size:24rpx;color:#999">
+               <text style="float:left">注:限制28个字</text>
+               <text style="float:right">超出字数:<text style="color:#ff0000">{{edit_item.QuestionContent.length>28?edit_item.QuestionContent.length-28:0}}</text>字</text>
+            </view>
             <view class="edit-bottom">
                <view class="cancel-color" @click="showEditPicker=false">取消</view>
                <view class="blue-color" @click="editQuestionHandle">确定</view>
@@ -106,9 +110,12 @@
          uni.$off('questionListUpdate')
       },
       onShow() {
-         this.$nextTick(()=>{
-         	this.selectComponent('#tabs').resize();// 解决初始渲染 vant tab 底部条
-         })
+         if(!this.id){
+            this.$nextTick(()=>{
+               this.selectComponent('#tabs').resize();// 解决初始渲染 vant tab 底部条
+            })
+         }
+         
       },
       onPullDownRefresh() {
       	this.page_no=1