search-bar.js 338 B

1234567891011121314151617
  1. import { VantComponent } from '../vant-ui/common/component'
  2. VantComponent({
  3. props: {
  4. placeholder: String,
  5. disabled: Boolean
  6. },
  7. methods: {
  8. bindconfirm (e) {
  9. const { value } = e.detail
  10. this.triggerEvent('search', value)
  11. },
  12. bindinput (e) {
  13. this.triggerEvent('input', e.detail.value)
  14. }
  15. }
  16. })