uni-app popup 弹出层

uni-app About 367 words

代码

template

<uni-popup ref="popup">
    <view class="popup-content">
        <view style="font: bold;font-size: 40rpx;">Hello World</view>
        <image src="/static/hello.jpg" style="width: 200rpx;height: 200rpx;" mode="aspectFit"></image>
    </view>
</uni-popup>

js代码控制打开

this.$refs.popup.open();

官方文档

https://uniapp.dcloud.net.cn/component/uniui/uni-popup.html

Views: 28 · Posted: 2025-07-30

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh