daimuuc / dialog-wxapp

微信小程序弹窗组件 wxapp dialog component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dialog-wxapp

微信小程序弹窗组件 wxapp dialog component

dialog-wxapp

下载

git clone https://github.com/simsir-lin/dialog-wxapp.git

预览

打开微信web开发者工具,'本地小程序项目 - 添加项目',项目目录选择为 dialog-wxapp 的目录就可以了,添加项目后就可以进行组件源码的查看和预览demo了。

使用

  1. 将 dialog-wxapp 目录下的components文件夹下的dialog-wxapp拷贝到你的小程序目录下

  2. 在你要使用的页面的json文件中引入组件,如:index页面的index.json

{
  "navigationBarTitleText": "首页",
  "usingComponents": {
    "dialog": "/components/dialog-wxapp/dialog"
  }
}
  1. 在wxml中即可使用组件
<dialog visible="{{dialogvisible}}" title="{{title}}" opacity="{{opacity}}" show-close="{{options.showclose}}" show-footer="{{options.showfooter}}" close-on-click-modal="{{options.closeonclickmodal}}" bindclose="handleClose" bindopen="handleOpen" bindconfirm="handleConfirm">
  <view style='height:20vh;'>
    这是插入的内容
  </view>
</dialog>
  1. 如看不明白请直接参考项目实例(/pages/index/index)

注意

  • 微信小程序基础库版本至少为1.6.4

贡献

如果你有好的意见或建议,欢迎给我提issue!

About

微信小程序弹窗组件 wxapp dialog component


Languages

Language:JavaScript 100.0%