progress.d.ts.map 1.2 KB

1
  1. {"version":3,"sources":["../src/progress/progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAe,MAAM,qBAAqB,CAAC;AASlE,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,cAAc;IAClD,eAAe,WAA6B;IAE5C,OAAO;;MAEL;IAEF,UAAU,mCAAS;IAEnB,IAAI;;;;;;MAMF;IAEF,SAAS;;;MAeP;CACH","file":"progress.d.ts","sourcesContent":["import { SuperComponent, wxComponent } from '../common/src/index';\nimport config from '../common/config';\nimport props from './props';\nimport { getBackgroundColor } from './utils';\n\nconst { prefix } = config;\nconst classPrefix = `${prefix}-progress`;\n\n@wxComponent()\nexport default class Progress extends SuperComponent {\n externalClasses = [`${prefix}-class-label`];\n\n options = {\n multipleSlots: true,\n };\n\n properties = props;\n\n data = {\n prefix,\n classPrefix,\n colorBar: '',\n computedStatus: '',\n computedProgress: 0,\n };\n\n observers = {\n percentage(percentage) {\n percentage = Math.max(0, Math.min(percentage, 100));\n\n this.setData({\n computedStatus: percentage === 100 ? 'success' : '',\n computedProgress: percentage,\n });\n },\n\n color(color) {\n this.setData({\n colorBar: getBackgroundColor(color),\n });\n },\n };\n}\n"]}