vue-bootstrap-modal icon indicating copy to clipboard operation
vue-bootstrap-modal copied to clipboard

Vue 2.3 compatible

Open thierryxing opened this issue 7 years ago • 2 comments

In 2.3 we re-introduced the .sync modifier for props, but this time it is just syntax sugar that automatically expands into an additional v-on listener:

https://vuejs.org/v2/guide/components.html#sync-Modifier

In case to compatible Vue 2.3, ok and cancel methods must be changed to:

methods: {
      ok () {
        this.$emit('ok')
        this.$emit('update:show', false)
      },

      cancel () {
        this.$emit('cancel')
        this.$emit('update:show', false)
      },

      // 点击遮罩层
      clickMask () {
        if (!this.force) {
          this.cancel()
        }
      }
    }

thierryxing avatar May 30 '17 13:05 thierryxing

Thank you @thierryxing

dracon avatar Aug 18 '17 06:08 dracon

@dracon sure thing

thierryxing avatar Nov 12 '17 15:11 thierryxing