• <abbr id="chdyf"></abbr>
    <ruby id="chdyf"><acronym id="chdyf"><meter id="chdyf"></meter></acronym></ruby>
    <bdo id="chdyf"></bdo>
    <dfn id="chdyf"><menu id="chdyf"></menu></dfn>
    1. <menuitem id="chdyf"></menuitem><strong id="chdyf"><menu id="chdyf"></menu></strong>

      <rt id="chdyf"><menu id="chdyf"></menu></rt>
      成人小说一区二区三区,伊人精品成人久久综合全集观看,久久HEZYO色综合,中文字幕精品人妻熟女,影音先锋成人网站,我要看免费一级毛片,中国女人做爰A片,中文字幕av久久爽Av

      Vue 組件封裝之 Result 結果頁

      2020-10-21    前端達人

      一、Result 結果頁

      組件說明:

      實現 Result 結果頁。

      效果展示:
      在這里插入圖片描述

      實現的功能:

      1. 提交或者操作完成之后,進入一個成功或者失敗的結果頁。
      2. 包含成功或者失敗的狀態插圖。
      3. 包含成功或者失敗的文案表述(標題及詳情)。
      4. 包含取消(推出應用)和確定(繼續填寫)兩個按鈕。

      二、使用案例

      <template> <div> <el-result :item="item" @on-cancel="cancel" @on-submit="submit" /> </div> </template> <script> export default { name: "Result", data(){ return{ item: { title: '提交成功', submitText:"繼續填寫", cancelText:"退出應用", status:"success" }, } }, created(){ let item = this.$route && this.$route.query; if(item.status==='fail'){ this.item = { title: '提交失敗,請聯系開發人員', submitText:"重新填寫", cancelText:"退出應用", status:"fail" } } }, methods:{ cancel(){ dd.biz.navigation.close({ onSuccess : function(result) { /*result結構
                   {}
                   */ }, onFail : function(err) {} }) }, submit(){ this.$router.go(-1) } } } </script>  
      
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 43
      • 44
      • 45
      • 46
      • 47
      • 48
      • 49
      • 50

      三、API 使用指南

      屬性 說明 類型 默認值
      item 頁面展示的靜態內容集合 Array []
      title 描述標題 String
      submitText 提交按鈕文本 String
      cancelText 取消按鈕文本 String
      status 輸入值字段 String
      on-cancel 取消按鈕事件 Function
      on-submit 提交按鈕事件 Function

      四、源代碼

      Result.vue
      文件路徑:share/result/Result.vue

      <template> <div class="cm-tx-c cm-mt-08 cm-p-02"> <el-image :src="item.status==='success'?successBg:failBg" style="width: 250px" > <div slot="placeholder" class="image-slot"> 圖片加載中<span class="dot">...</span> </div> </el-image> <div :class="item.status==='success'?'success-title':'fail-title'">{{item.title}}</div> <div>{{item.describe}}</div> <div class="cm-flex cm-jc-sa"> <div  @click="cancel()" class="cm-btn-cancel">{{item.cancelText}}</div> <div  @click="submit()" class="cm-btn-submit">{{item.submitText}}</div> </div> </div> </template> <script> import successBg from '../images/result-success.png'; import failBg from '../images/result-fail.png'; export default { name: "ElResult", data(){ return{ successBg, failBg } }, props:{ item:{ type:Object, default:{} } }, created(){ }, methods:{ cancel(){ this.$emit('on-cancel',''); }, submit(){ this.$emit('on-submit',''); } } } </script> <style scoped> .success-title{ padding: 0.4rem; font-size: 0.35rem; color:#15bc83; } .fail-title{ padding: 0.4rem; font-size: 0.35rem; color:#f25643; } </style> 6
      
      
      
      
      
      
      
      
      轉載 作者: 2020-10-19 09:24:19 分類專欄: # Vue通用組件封裝
      
      

      日歷

      鏈接

      個人資料

      藍藍設計的小編 http://www.wtxcl.cn

      存檔

      主站蜘蛛池模板: 这里只有精品在线观看| 黄片91爱豆传媒| 久久五月丁香激情综合| 婷婷丁香五月天综合东京热| 99热色| 亚洲欧洲日韩免费无码h| 998av资源影音先锋| 风流老熟女一区二区三区| 亚洲制服丝袜无码| 国产美女自慰在线观看| 韩国精品一区视频在线播放| 日本少妇视频| 免费av资源在线观看| 国模久久| 国产精品免费中文字幕| 国产剧情AV麻豆香蕉精品| 国产波多野结衣中文在线播放| 垣曲县| 来凤县| 欧美日韩一区二区三区视频在线观看| av美女网站| 亚洲精品aⅴ| 亚av在线| 国产成人精品二三区波多野| 亚洲精品之国产av| 五月。。激情綜合老漢色| 久久大香伊蕉在人线免费AV| 国产精品国三级国产av| 久久久精品国产亚洲AV蜜| 国产成人无码AA精品一区| 欧美人与性动交ccoo| 嫩草院一区二区三区无码| 精品网站999www| 亚洲人妻中文字幕| 97成人精品一区二区三区狼人| 亚洲色人| 久草福利| 亚洲日韩在线中文字幕| 日韩久久中文| 自拍亚洲视频在线观看| 亚洲综合色在线观看一区二区|