亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

微信小程序自定義彈框效果

 更新時間:2022年07月07日 13:36:33   作者:asteriaV  
這篇文章主要為大家詳細介紹了微信小程序自定義彈框效果,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下

本文實例為大家分享了微信小程序自定義彈框效果的具體代碼,供大家參考,具體內容如下

wxml

<!-- 取消訂單按鈕 -->
<view class="cancelBtn" bindtap="cancelOrder" data-id="{{item.id}}" data-type="{{type}}">取消訂單</view>

<!-- 取消訂單彈框 -->
<view class="modalDlg-mask" wx:if="{{showModal}}"></view>
<view class="modalDlg" wx:if="{{showModal}}">
?? ?<view class="page-body">
?? ??? ?<form bindsubmit="submit">
?? ??? ??? ?<view class="modalDlg-title">
?? ??? ??? ??? ?<text>取消訂單原因</text>
?? ??? ??? ?</view>
?? ??? ??? ?<view class="modalDlg-content">
?? ??? ??? ??? ?<view class="modalDlg-content-item">
?? ??? ??? ??? ??? ?<radio-group bindchange="radioChange">
?? ??? ??? ??? ??? ??? ?<label class="weui-cell weui-check__label" wx:for="{{items}}" wx:key="index">
?? ??? ??? ??? ??? ??? ??? ?<view class="weui-cell__hd">
?? ??? ??? ??? ??? ??? ??? ??? ?<radio value="{{item.value}}" color="#ff5155" />
?? ??? ??? ??? ??? ??? ??? ?</view>
?? ??? ??? ??? ??? ??? ??? ?<view wx:if="{{item.value!=='3'}}" class="weui-cell__bd">{{item.name}}</view>
?? ??? ??? ??? ??? ??? ??? ?<text wx:if="{{item.value==='3'}}" style="width:150rpx;">{{item.name}}</text>
?? ??? ??? ??? ??? ??? ??? ?<textarea wx:if="{{item.value==='3'}}" bindinput="bindTextArea" auto-height="true" placeholder="請輸入其他原因"></textarea>
?? ??? ??? ??? ??? ??? ?</label>
?? ??? ??? ??? ??? ?</radio-group>
?? ??? ??? ??? ?</view>
?? ??? ??? ?</view>
?? ??? ??? ?<view class="modalDlg-footer">
?? ??? ??? ??? ?<view bindtap="closeModal" class="modalDlg-btn closeBtn">取消</view>
?? ??? ??? ??? ?<view bindtap="confirmModal" form-type="submit" class="modalDlg-btn confirmBtn">確定</view>
?? ??? ??? ?</view>
?? ??? ?</form>
?? ?</view>
</view>

js 

data:{
showModal: false, //取消訂單彈框
?
} ,
??
? //取消訂單彈框
? cancelOrder() {
? ? this.setData({
? ? ? showModal: true
? ? })
? },
?
? ? //取消訂單彈框-確定
? confirmModal() {
?
? ?this.setData({
? ? ? ? ? showModal: false
? ? ? ? });
?
?},
?//取消訂單彈框-取消
? closeModal() {
? ? ?
? ? this.setData({
? ? ? showModal: false
? ? })
?
? },

wxss

/* 取消訂單彈框 */
.page-body {
? width: 100%;
}
?
/* 遮罩層 */
.modalDlg-mask {
? width: 100%;
? height: 100%;
? position: fixed;
? top: 0;
? left: 0;
? background: #000;
? z-index: 9000;
? opacity: 0.5;
}
?
/* 彈出層 */
.modalDlg {
? width: 70%;
? position: fixed;
? top: 25%;
? left: 0;
? right: 0;
? z-index: 9999;
? margin: 0 auto;
? background-color: #fff;
? border-radius: 5px;
? display: flex;
? flex-direction: column;
? align-items: center;
}
.modalDlg-title{
? width: 100%;
? display: flex;
? align-items: center;
? justify-content: center;
? padding: 20rpx 0rpx;
}
?
?
.modalDlg-content {
? width: 100%;
? display: flex;
? flex-direction: column;
? justify-content: center;
? padding: 10rpx 0;
}
.modalDlg-content .modalDlg-content-item{
display: flex;
align-items: center;
justify-content: space-between;
?}
?
?.modalDlg-content .modalDlg-content-item radio-group{
? ?width: 100%;
? ?color: #666;
?}
?.modalDlg-content .modalDlg-content-item .weui-check__label{
display: flex;
align-items: center;
}
.modalDlg-content .modalDlg-content-item .weui-cell__bd{
? line-height: 48rpx;
? }
.modalDlg-content .modalDlg-content-item .weui-cell{
? padding: 20rpx;
? display: flex;
? flex-direction: row;
}
?
.modalDlg-footer {
? width: 100%;
? height: 100rpx;
? border-top: 1rpx solid #ededed;
? display: flex;
? align-items: center;
? flex-wrap: nowrap;
? justify-content: space-between;
}?
?
/* 彈出層里面的文字 */
.modalDlg .modalDlg-content text {
? text-align: justify;
? font-size: 28rpx;
? color: #666;
? /* margin-left: 10px; */
}
?
/* 彈出層里面的按鈕 */
.modalDlg-btn {
? width: 80px;
? height: 70rpx;
? line-height: 70rpx;
? text-align: center;
? font-size: 28rpx;
? border-radius: 40rpx;
? margin: 0 auto;
}
?
.modalDlg .modalDlg-footer .closeBtn {
? background: #fff;
? color: #fc4141;
? border: 1rpx solid #fc4141;
}
?
.modalDlg .modalDlg-footer .confirmBtn {
? background: #fc4141;
? color: #fff;
}

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

相關文章

  • JavaScript中的FileReader示例詳解

    JavaScript中的FileReader示例詳解

    FileReader主要用于將文件內容讀入內存,通過一系列異步接口,可以在主線程中訪問本地文件,這篇文章主要給大家介紹了關于JavaScript中FileReader的相關資料,需要的朋友可以參考下
    2022-03-03
  • js+jquery常用知識點匯總

    js+jquery常用知識點匯總

    本文主要介紹了jquery源碼中常見的知識點以及javascript中原型鏈常見的知識點,非常的全面,這里推薦給小伙伴們。
    2015-03-03
  • bootstrap fileinput 插件使用項目總結(經(jīng)驗)

    bootstrap fileinput 插件使用項目總結(經(jīng)驗)

    這篇文章主要介紹了bootstrap fileinput 插件使用項目總結,是小編日常碰到的問題及解決方法,需要的朋友可以參考下
    2017-02-02
  • JavaScript生成隨機字符串的方法

    JavaScript生成隨機字符串的方法

    這篇文章主要介紹了JavaScript生成隨機字符串的方法,涉及javascript中random的使用技巧,非常具有實用價值,需要的朋友可以參考下
    2015-03-03
  • JS 對象屬性相關(檢查屬性、枚舉屬性等)

    JS 對象屬性相關(檢查屬性、枚舉屬性等)

    這篇文章主要介紹了JS 對象屬性相關(檢查屬性、枚舉屬性等),需要的朋友可以參考下
    2015-04-04
  • JavaScript中常用的數(shù)組操作方法總結

    JavaScript中常用的數(shù)組操作方法總結

    這篇文章為大家總結了一些JavaScript中常用的數(shù)組操作方法,文中通過示例代碼介紹的非常詳細。對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2022-07-07
  • Nuxt.js開啟SSR渲染的教程詳解

    Nuxt.js開啟SSR渲染的教程詳解

    Nuxt.js 是一個基于 Vue.js 的通用應用框架。 通過對客戶端/服務端基礎架構的抽象組織,Nuxt.js 主要關注的是應用的 UI渲染。這篇文章主要介紹了Nuxt.js開啟SSR渲染 ,需要的朋友可以參考下
    2018-11-11
  • JS PromiseLike的判定與使用詳解

    JS PromiseLike的判定與使用詳解

    本文主要介紹了JS PromiseLike的判定與使用詳解, 文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2023-11-11
  • 使用uni-app打包H5的圖文教程

    使用uni-app打包H5的圖文教程

    uni-app是一個使用Vue.js開發(fā)所有前端應用的框架,開發(fā)者編寫一套代碼,可發(fā)布到iOS,Android,H5,以及各種小程序(微信/支付寶/百度/頭條/?QQ?/釘釘)等多個平臺,這篇文章主要給大家介紹了關于使用uni-app打包H5的相關資料,需要的朋友可以參考下
    2022-11-11
  • javascript數(shù)組去掉重復

    javascript數(shù)組去掉重復

    去tx面試過幾次,基本都會考到數(shù)組去重。其實平時工作中幾乎不會用到,再者也沒認真去了解過,所以基本上每次面到這里都會露出很大的馬腳,面試自然也over了
    2011-05-05

最新評論