更新记录
1.0.9(2022-10-18) 下载此版本
编辑readme
1.0.8(2022-10-18) 下载此版本
编辑 readme 文件
1.0.7(2022-10-17) 下载此版本
手贱 给style 加了 scoped 结果造成不透明了
查看更多平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | × | - | - | √ | × | - | - | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
× | × | × | × | × | × | - | × | × | × | × |
sc-modal
为什么要写这个?
1.因为领导要求 安卓端跟ios端 确认跟取消的按钮 统一, 当前 左边取消 右边 确定.
2.领导嫌`uni.showmodal` 在安卓端 使用系统自带的样式不好看.
说明
ios 时调用 plus.nativeUI,
为什么使用 plus.nativeUI 而不使用 u-modal?
因为ios 原生的比u-modal 好 --!
android 时 调用u-modal
需要在 app.vue
中 的 globalData
配置一个 canIpop
参数 限制同时弹窗, 默认 true
globalData: {
canIpop: true
},
onLaunch(){
...
}
依赖uview @1.8
用法
在`main.js`中引入并挂载
import showModal from '@/uni_modules/sc-modal/index.js'
Vue.use(showModal)
挂载在`this` 和 `$u`上, 用法与`uni.showModal`一致,
this.$showModal({
title: '',
content: '',
confirmText: '',
cancelText: '',
showCancel: true
})