1 |
- {"version":3,"sources":["../src/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAe,MAAM,qBAAqB,CAAC;AAgBlE,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,cAAc;IAC9C,SAAS,EAAE,CAAC,sBAAsB,CAAC,CAAC;IAEpC,eAAe,WAAe;IAE9B,UAAU,+BAAS;IAEnB,IAAI;;;MAGF;IAEF,SAAS;;MAQP;IAEF,OAAO;qBACQ,GAAG;MAGhB;CACH","file":"icon.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}-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"]}
|