search-bar.js 357 B

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