1 |
- {"version":3,"sources":["../src/drawer/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAe,MAAM,qBAAqB,CAAC;AAQlE,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,cAAc;IAChD,eAAe,QAAM;IAErB,UAAU,iCAAS;IAEnB,IAAI;;MAEF;IAEF,OAAO;;;;;MAqBL;CACH","file":"drawer.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}-drawer`;\n\n@wxComponent()\nexport default class Drawer extends SuperComponent {\n externalClasses = [];\n\n properties = props;\n\n data = {\n classPrefix: name,\n };\n\n methods = {\n // closeOnOverlayClick为true时才能触发popup的visible-change事件\n visibleChange({ detail }) {\n const { visible } = detail;\n const { showOverlay } = this.data;\n\n this.setData({\n visible: visible,\n });\n\n if (showOverlay) {\n this.triggerEvent('overlay-click', { visible: visible });\n }\n },\n\n itemClick(detail) {\n const { index, item } = detail.currentTarget.dataset;\n this.triggerEvent('item-click', {\n sibarItem: { index: index, item: item },\n });\n },\n };\n}\n"]}
|