Files
supplier-dispatch-h5/node_modules/.cache/babel-loader/32045bb60e18a29c349ff00f7737360a3f0bdb3a257dd7311ebb304cae333bd3.json
2023-08-11 10:45:20 +08:00

1 line
8.1 KiB
JSON

{"ast":null,"code":"import { createNamespace, addUnit } from '../utils';\nimport { BindEventMixin } from '../mixins/bind-event';\nvar _createNamespace = createNamespace('progress'),\n createComponent = _createNamespace[0],\n bem = _createNamespace[1];\nexport default createComponent({\n mixins: [BindEventMixin(function (bind) {\n bind(window, 'resize', this.resize, true);\n bind(window, 'orientationchange', this.resize, true);\n })],\n props: {\n color: String,\n inactive: Boolean,\n pivotText: String,\n textColor: String,\n pivotColor: String,\n trackColor: String,\n strokeWidth: [Number, String],\n percentage: {\n type: [Number, String],\n required: true,\n validator: function validator(value) {\n return value >= 0 && value <= 100;\n }\n },\n showPivot: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n pivotWidth: 0,\n progressWidth: 0\n };\n },\n mounted: function mounted() {\n this.resize();\n },\n watch: {\n showPivot: 'resize',\n pivotText: 'resize'\n },\n methods: {\n // @exposed-api\n resize: function resize() {\n var _this = this;\n this.$nextTick(function () {\n _this.progressWidth = _this.$el.offsetWidth;\n _this.pivotWidth = _this.$refs.pivot ? _this.$refs.pivot.offsetWidth : 0;\n });\n }\n },\n render: function render() {\n var h = arguments[0];\n var pivotText = this.pivotText,\n percentage = this.percentage;\n var text = pivotText != null ? pivotText : percentage + '%';\n var showPivot = this.showPivot && text;\n var background = this.inactive ? '#cacaca' : this.color;\n var pivotStyle = {\n color: this.textColor,\n left: (this.progressWidth - this.pivotWidth) * percentage / 100 + \"px\",\n background: this.pivotColor || background\n };\n var portionStyle = {\n background: background,\n width: this.progressWidth * percentage / 100 + 'px'\n };\n var wrapperStyle = {\n background: this.trackColor,\n height: addUnit(this.strokeWidth)\n };\n return h(\"div\", {\n \"class\": bem(),\n \"style\": wrapperStyle\n }, [h(\"span\", {\n \"class\": bem('portion'),\n \"style\": portionStyle\n }, [showPivot && h(\"span\", {\n \"ref\": \"pivot\",\n \"style\": pivotStyle,\n \"class\": bem('pivot')\n }, [text])])]);\n }\n});","map":{"version":3,"names":["createNamespace","addUnit","BindEventMixin","_createNamespace","createComponent","bem","mixins","bind","window","resize","props","color","String","inactive","Boolean","pivotText","textColor","pivotColor","trackColor","strokeWidth","Number","percentage","type","required","validator","value","showPivot","default","data","pivotWidth","progressWidth","mounted","watch","methods","_this","$nextTick","$el","offsetWidth","$refs","pivot","render","h","arguments","text","background","pivotStyle","left","portionStyle","width","wrapperStyle","height"],"sources":["C:/Users/zhouxueli/Desktop/scheduling-app/node_modules/vant/es/progress/index.js"],"sourcesContent":["import { createNamespace, addUnit } from '../utils';\nimport { BindEventMixin } from '../mixins/bind-event';\n\nvar _createNamespace = createNamespace('progress'),\n createComponent = _createNamespace[0],\n bem = _createNamespace[1];\n\nexport default createComponent({\n mixins: [BindEventMixin(function (bind) {\n bind(window, 'resize', this.resize, true);\n bind(window, 'orientationchange', this.resize, true);\n })],\n props: {\n color: String,\n inactive: Boolean,\n pivotText: String,\n textColor: String,\n pivotColor: String,\n trackColor: String,\n strokeWidth: [Number, String],\n percentage: {\n type: [Number, String],\n required: true,\n validator: function validator(value) {\n return value >= 0 && value <= 100;\n }\n },\n showPivot: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n pivotWidth: 0,\n progressWidth: 0\n };\n },\n mounted: function mounted() {\n this.resize();\n },\n watch: {\n showPivot: 'resize',\n pivotText: 'resize'\n },\n methods: {\n // @exposed-api\n resize: function resize() {\n var _this = this;\n\n this.$nextTick(function () {\n _this.progressWidth = _this.$el.offsetWidth;\n _this.pivotWidth = _this.$refs.pivot ? _this.$refs.pivot.offsetWidth : 0;\n });\n }\n },\n render: function render() {\n var h = arguments[0];\n var pivotText = this.pivotText,\n percentage = this.percentage;\n var text = pivotText != null ? pivotText : percentage + '%';\n var showPivot = this.showPivot && text;\n var background = this.inactive ? '#cacaca' : this.color;\n var pivotStyle = {\n color: this.textColor,\n left: (this.progressWidth - this.pivotWidth) * percentage / 100 + \"px\",\n background: this.pivotColor || background\n };\n var portionStyle = {\n background: background,\n width: this.progressWidth * percentage / 100 + 'px'\n };\n var wrapperStyle = {\n background: this.trackColor,\n height: addUnit(this.strokeWidth)\n };\n return h(\"div\", {\n \"class\": bem(),\n \"style\": wrapperStyle\n }, [h(\"span\", {\n \"class\": bem('portion'),\n \"style\": portionStyle\n }, [showPivot && h(\"span\", {\n \"ref\": \"pivot\",\n \"style\": pivotStyle,\n \"class\": bem('pivot')\n }, [text])])]);\n }\n});"],"mappings":"AAAA,SAASA,eAAe,EAAEC,OAAO,QAAQ,UAAU;AACnD,SAASC,cAAc,QAAQ,sBAAsB;AAErD,IAAIC,gBAAgB,GAAGH,eAAe,CAAC,UAAU,CAAC;EAC9CI,eAAe,GAAGD,gBAAgB,CAAC,CAAC,CAAC;EACrCE,GAAG,GAAGF,gBAAgB,CAAC,CAAC,CAAC;AAE7B,eAAeC,eAAe,CAAC;EAC7BE,MAAM,EAAE,CAACJ,cAAc,CAAC,UAAUK,IAAI,EAAE;IACtCA,IAAI,CAACC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAACC,MAAM,EAAE,IAAI,CAAC;IACzCF,IAAI,CAACC,MAAM,EAAE,mBAAmB,EAAE,IAAI,CAACC,MAAM,EAAE,IAAI,CAAC;EACtD,CAAC,CAAC,CAAC;EACHC,KAAK,EAAE;IACLC,KAAK,EAAEC,MAAM;IACbC,QAAQ,EAAEC,OAAO;IACjBC,SAAS,EAAEH,MAAM;IACjBI,SAAS,EAAEJ,MAAM;IACjBK,UAAU,EAAEL,MAAM;IAClBM,UAAU,EAAEN,MAAM;IAClBO,WAAW,EAAE,CAACC,MAAM,EAAER,MAAM,CAAC;IAC7BS,UAAU,EAAE;MACVC,IAAI,EAAE,CAACF,MAAM,EAAER,MAAM,CAAC;MACtBW,QAAQ,EAAE,IAAI;MACdC,SAAS,EAAE,SAASA,SAASA,CAACC,KAAK,EAAE;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