How to use weui - 1 common examples

To help you get started, we’ve selected a few weui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jcc / weui-distpicker / src / Distpicker.vue View on Github external
showPicker() {
      this.calculateDepth()

      weui.picker(this.formatDistricts(), {
        depth: this.depth,
        defaultValue: this.defaultValue,
        onChange: (result) => {
          this.$emit('change', result)
        },
        onConfirm: (result) => {
          this.$emit('confirm', result)
        },
        className: this.className,
        id: this.id,
      })

      let picker = document.querySelector('.' + this.className)

      picker.querySelector('.weui-mask').addEventListener('click', () => {
        this.$emit('cancel')

weui

A UI library by WeChat official design team, includes the most useful widgets/modules in mobile web applications.

MIT
Latest version published 22 days ago

Package Health Score

87 / 100
Full package analysis

Popular weui functions