naive-ui/demo/documentation/components/input/enUS/pair.demo.md
07akioni 487001d697 build: add changelog to site, refactor loader based on suffix
.demo.md for component demo
.demo-entry.md for demo entry
.md for common docs
2020-08-19 23:30:04 +08:00

762 B
Raw Blame History

Pairwise Value

<n-input
  pair
  separator="-"
  v-model="value"
  :placeholder="placeholder"
  clearable
  @blur="handleInputBlur"
  @focus="handleInputFocus"
  @change="handleInputChange"
  @input="handleInputInput"
/>
export default {
  data () {
    return {
      placeholder: ['From', 'To'],
      value: ['0', '100']
    }
  },
  methods: {
    handleInputBlur () {
      this.$NMessage.info('Pairwise ValueBlur')
    },
    handleInputFocus () {
      this.$NMessage.info('Pairwise ValueFocus')
    },
    handleInputInput () {
      this.$NMessage.info('Pairwise ValueInput')
    },
    handleInputChange () {
      this.$NMessage.info('Pairwise ValueChange')
    }
  }
}
.n-input {
  margin-bottom: 8px;
}