search.d.ts.map 1.9 KB

1
  1. {"version":3,"sources":["../src/search/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAe,MAAM,qBAAqB,CAAC;AAQlE,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,cAAc;IAChD,eAAe,WAOb;IAEF,OAAO;;MAEL;IAEF,UAAU,iCAAS;IAEnB,SAAS;oBACK,MAAM,aAAa,OAAO;MAGtC;IAEF,IAAI;;;;;;MAMF;IAEF,OAAO,CAAC,CAAC,KAAA;IAOT,OAAO,CAAC,CAAC,KAAA;IAOT,MAAM,CAAC,CAAC,KAAA;IAOR,WAAW;IAKX,SAAS,CAAC,CAAC,KAAA;IAKX,aAAa;CAId","file":"search.d.ts","sourcesContent":["import { SuperComponent, wxComponent } from '../common/src/index';\nimport config from '../common/config';\nimport props from './props';\n\nconst { prefix } = config;\nconst name = `${prefix}-search`;\n\n@wxComponent()\nexport default class Search extends SuperComponent {\n externalClasses = [\n `${prefix}-class`,\n `${prefix}-class-input-container`,\n `${prefix}-class-input`,\n `${prefix}-class-cancel`,\n `${prefix}-class-left`,\n `${prefix}-class-right`,\n ];\n\n options = {\n multipleSlots: true,\n };\n\n properties = props;\n\n observers = {\n focus(this: Search, nextValue: boolean) {\n this.setData({ 'localValue.focus': nextValue });\n },\n };\n\n data = {\n classPrefix: name,\n prefix,\n localValue: {\n focus: false,\n },\n };\n\n onInput(e) {\n const { value } = e.detail;\n\n this.setData({ value });\n this.triggerEvent('change', { value });\n }\n\n onFocus(e) {\n const { value } = e.detail;\n\n this.setData({ 'localValue.focus': true });\n this.triggerEvent('focus', { value });\n }\n\n onBlur(e) {\n const { value } = e.detail;\n\n this.setData({ 'localValue.focus': false });\n this.triggerEvent('blur', { value });\n }\n\n handleClear() {\n this.setData({ value: '' });\n this.triggerEvent('clear', { value: '' });\n }\n\n onConfirm(e) {\n const { value } = e.detail;\n this.triggerEvent('submit', { value });\n }\n\n onActionClick() {\n this.triggerEvent('cancel');\n this.triggerEvent('action-click');\n }\n}\n"]}