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../common/src/index';\nimport config from '../common/config';\nimport props from './props';\n\nconst { prefix } = config;\nconst name = `${prefix}-icon`;\n\nconst sizeKeywordMap = {\n xs: '24rpx',\n small: '28rpx',\n middle: '32rpx',\n large: '36rpx',\n xl: '40rpx',\n};\n\n@wxComponent()\nexport default class Icon extends SuperComponent {\n behaviors: ['wx://form-field-icon'];\n\n externalClasses = ['t-class'];\n\n properties = props;\n\n data = {\n classPrefix: name,\n fontSize: '',\n };\n\n observers = {\n size(val) {\n let fontSize = val;\n if (Object.prototype.hasOwnProperty.call(sizeKeywordMap, val)) {\n fontSize = sizeKeywordMap[val];\n }\n this.setData({ fontSize });\n },\n };\n\n methods = {\n onTap(event: any) {\n this.triggerEvent('click', event.detail);\n },\n };\n}\n"]}