美文网首页
小程序评论框弹出

小程序评论框弹出

作者: HelloWorld丶小工匠 | 来源:发表于2022-03-21 14:20 被阅读0次

    wxml:

    [ 复制代码

    ](javascript:void(0); "复制代码")

    <pre style="margin: 0px; padding: 0px; overflow: auto; overflow-wrap: break-word; font-family: "Lucida Console", Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace !important; font-size: 12px !important;"><scroll-view scroll-y="{{isScroll}}"> ...
    <view class='model' wx:if="{{inputBoxShow}}">

    <view class='invisible_model' catchtap='invisible'></view>
    <view class='input-box'>
    <textarea class="textarea" placeholder="请输入你的看法" cursor-spacing="{{65}}" show-confirm-bar="{{false}}" adjust-position="{{true}}" auto-focus="{{true}}" />
    <text class='send'>发送</text>
    </view>
    </view> ... </scroll-view></pre>

    [ 复制代码

    ](javascript:void(0); "复制代码")

    wxss:

    [ 复制代码

    ](javascript:void(0); "复制代码")

    <pre style="margin: 0px; padding: 0px; overflow: auto; overflow-wrap: break-word; font-family: "Lucida Console", Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace !important; font-size: 12px !important;">.model { position: fixed; width: 100vw; height: 100vh; top: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); z-index: 100;
    } .input-box { position: absolute; background-color: #f8f8f8; padding: 30rpx; padding-bottom: 130rpx; bottom: 0; left: 0; right: 0; z-index: 101;
    } .textarea { background-color: #fff; width: 100%; padding: 5rpx; height: 3.3em; font-size: 15px; position: static;
    } .send { font-size: 14px; margin-top: 5rpx; color: #09bb07; float: right; position: static;
    } .invisible_model{ position: fixed; width: 100vw; height: 100vh; top: 0; bottom: 0;
    }</pre>

    [ 复制代码

    ](javascript:void(0); "复制代码")

    js:

    [ 复制代码

    ](javascript:void(0); "复制代码")

    <pre style="margin: 0px; padding: 0px; overflow: auto; overflow-wrap: break-word; font-family: "Lucida Console", Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace !important; font-size: 12px !important;">Page({
    data: {
    inputBoxShow: false,
    isScroll: true,
    },
    showInputBox: function () { this.setData({ inputBoxShow: true }); this.setData({ isScroll: false });
    },
    invisible: function(){ this.setData({ inputBoxShow: false }); this.setData({ isScroll: true });
    }
    })</pre>

    [ 复制代码

    ](javascript:void(0); "复制代码")

    相关文章

      网友评论

          本文标题:小程序评论框弹出

          本文链接:https://www.haomeiwen.com/subject/fmktzktx.html