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ent, 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"]}