打印/下载
参数
Vue案例
小程序案例

参数

  • v-model: (Boolean) 显示&隐藏, 默认: false
  • position: (String) 位置, 默认: '', 可选: left\right\top\bottom
  • opacity: (Number) 背景透明度, 默认: 0.7
  • bgClose: (Boolean) 点击背景关闭, 默认: true
  • bgColor: (Boolean) 内容背景, 默认: ""

方法

  • close() 关闭

引入

import WmPopup from '@/components/popup'

Html

<wm-popup v-model="demo.show" position="">
  <div>内容</div>
</wm-popup>

JavaScript

export default {
  components: {Popup},
  data(){
    return {
      demo:{show:false},
    }
  },
  methods:{

    /* 显示 */
    show(){
      this.demo.show = true;
    },

  },
}

引入

{
  "usingComponents": {
    "wm-popup": "/components/popup/index"
  },
  "navigationStyle": "custom"
}

Html

<wm-popup show="demo.show" position="left">
  <view>内容</view>
</wm-popup>

JavaScript

import store from '../../store'
import create from '../../libray/store/create'

create(store,{
  data:{
    demo:{show:false},
  },

});
{{copy}}