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panel.js","sourcesContent":["import { SuperComponent, wxComponent } from '../common/src/index';\nimport props from './tab-panel-props';\nimport config from '../common/config';\n\nconst { prefix } = config;\nconst name = `${prefix}-tab-panel`;\n\n@wxComponent()\nexport default class TabPanel extends SuperComponent {\n relations = {\n './tabs': {\n type: 'ancestor' as 'ancestor',\n },\n };\n\n properties = props;\n\n data = {\n prefix,\n classPrefix: name,\n active: false,\n hide: true,\n };\n\n observers = {\n label() {\n this.update();\n },\n };\n\n getComputedName() {\n if (this.properties.value) {\n return `${this.properties.value}`;\n }\n return `${this.index}`;\n }\n\n update() {\n if (this.parent) {\n this.parent.updateTabs();\n }\n }\n\n render(active: Boolean, parent: any) {\n this.setData({\n active,\n hide: !parent.animated && !active,\n });\n }\n}\n"]}
|