没有合适的资源?快使用搜索试试~ 我知道了~
首页微信UI(weui)使用手册最新版
微信UI(weui)使用手册最新版
需积分: 9 180 浏览量
更新于2023-03-16
评论
收藏 679KB PDF 举报
WeUI 是一套同微信原生视觉体验一致的基础样式库,由微信官方设计团队为微信内网页和微信小程序量身设计,令用户的使用感知更加统一。在微信网页或小程序中使用 WeUI 这个文档主要介绍WeUI的各个组件使用方法
资源详情
资源评论
资源推荐


actionSheet
actionSheet(menus,actions,[options])
actionsheet弹出式菜单
Kind:globalfunction
Param Type Description
menus
array
上层的选项
menus[].label
string
选项的文字
menus[].onClick
function
选项点击时的回调
actions
array
下层的选项
actions[].label
string
选项的文字
actions[].onClick
function
选项点击时的回调
[options]
object
配置项
[options.className]
string
自定义类名
Example
weui.actionSheet([
{
label:'拍照',
onClick:function(){
console.log('拍照');
}
},{
label:'从相册选择',
onClick:function(){
console.log('从相册选择');
}
},{
label:'其他',
onClick:function(){
console.log('其他');
}
}
],[
{
label:'取消',
onClick:function(){
console.log('取消');
}
}
actionSheet
-3-本文档使用看云构建

],{
className:'custom-classname'
});
actionSheet
-4-本文档使用看云构建

alert
alert(content,[yes],[options])
alert警告弹框,功能类似于浏览器自带的alert弹框,用于提醒、警告用户简单扼要的信
息,只有一个“确认”按钮,点击“确认”按钮后关闭弹框。
Kind:globalfunction
Param Type Description
content
string
弹窗内容
[yes]
function
点击确定按钮的回调
[options]
object
配置项
[options.title]
string
弹窗的标题
[options.className]
string
自定义类名
[options.buttons]
array
按钮配置项,详情参考dialog
Example
weui.alert('普通的alert');
weui.alert('带回调的alert',function(){console.log('ok')});
varalertDom=weui.alert('手动关闭的alert',function(){
returnfalse;//不关闭弹窗,可用alertDom.hide()来手动关闭
});
weui.alert('自定义标题的alert',{title:'自定义标题'});
weui.alert('带回调的自定义标题的alert',function(){
console.log('ok')
},{
title:'自定义标题'
});
weui.alert('自定义按钮的alert',{
title:'自定义按钮的alert',
buttons:[{
label:'OK',
type:'primary',
onClick:function(){console.log('ok')}
}]
});
//多次使用
varalert=weui.alert('hello');
alert.hide(function(){
weui.alert('world');
});
alert
-5-本文档使用看云构建
剩余31页未读,继续阅读

















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0