naive-ui/demo/documentation/components/popselect/enUS/cancelable.md
2019-10-18 11:23:45 +08:00

671 B

Cancelable

<n-popselect
  v-model="value"
  cancelable
  :options="options"
>
  <n-tag>{{ value || 'popselect' }}</n-tag>
</n-popselect>
export default {
  data () {
    return {
      value: null,
      options: [{
        label: 'Go Let It Out',
        value: 'Go Let It Out'
      }, {
        label: 'Who Feels Love?',
        value: 'Who Feels Love?'
      }, {
        label: 'Sunday Morning Call',
        value: 'Sunday Morning Call',
        disabled: true
      }, {
        label: 'Roll It Over',
        value: 'Roll It Over'
      }]
    }
  },
  methods: {
    handleChange (v) {
      this.$NMessage.info('value: ' + v)
    }
  }
}