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

1 line
5.7 KiB
JSON

{"ast":null,"code":"import { isDef, createNamespace } from '../utils';\nimport { isNumeric } from '../utils/validate/number';\nvar _createNamespace = createNamespace('badge'),\n createComponent = _createNamespace[0],\n bem = _createNamespace[1];\nexport default createComponent({\n props: {\n dot: Boolean,\n max: [Number, String],\n color: String,\n content: [Number, String],\n tag: {\n type: String,\n default: 'div'\n }\n },\n methods: {\n hasContent: function hasContent() {\n return !!(this.$scopedSlots.content || isDef(this.content) && this.content !== '');\n },\n renderContent: function renderContent() {\n var dot = this.dot,\n max = this.max,\n content = this.content;\n if (!dot && this.hasContent()) {\n if (this.$scopedSlots.content) {\n return this.$scopedSlots.content();\n }\n if (isDef(max) && isNumeric(content) && +content > max) {\n return max + \"+\";\n }\n return content;\n }\n },\n renderBadge: function renderBadge() {\n var h = this.$createElement;\n if (this.hasContent() || this.dot) {\n return h(\"div\", {\n \"class\": bem({\n dot: this.dot,\n fixed: !!this.$scopedSlots.default\n }),\n \"style\": {\n background: this.color\n }\n }, [this.renderContent()]);\n }\n }\n },\n render: function render() {\n var h = arguments[0];\n if (this.$scopedSlots.default) {\n var tag = this.tag;\n return h(tag, {\n \"class\": bem('wrapper')\n }, [this.$scopedSlots.default(), this.renderBadge()]);\n }\n return this.renderBadge();\n }\n});","map":{"version":3,"names":["isDef","createNamespace","isNumeric","_createNamespace","createComponent","bem","props","dot","Boolean","max","Number","String","color","content","tag","type","default","methods","hasContent","$scopedSlots","renderContent","renderBadge","h","$createElement","fixed","background","render","arguments"],"sources":["C:/Users/zhouxueli/Desktop/scheduling-app/node_modules/vant/es/badge/index.js"],"sourcesContent":["import { isDef, createNamespace } from '../utils';\nimport { isNumeric } from '../utils/validate/number';\n\nvar _createNamespace = createNamespace('badge'),\n createComponent = _createNamespace[0],\n bem = _createNamespace[1];\n\nexport default createComponent({\n props: {\n dot: Boolean,\n max: [Number, String],\n color: String,\n content: [Number, String],\n tag: {\n type: String,\n default: 'div'\n }\n },\n methods: {\n hasContent: function hasContent() {\n return !!(this.$scopedSlots.content || isDef(this.content) && this.content !== '');\n },\n renderContent: function renderContent() {\n var dot = this.dot,\n max = this.max,\n content = this.content;\n\n if (!dot && this.hasContent()) {\n if (this.$scopedSlots.content) {\n return this.$scopedSlots.content();\n }\n\n if (isDef(max) && isNumeric(content) && +content > max) {\n return max + \"+\";\n }\n\n return content;\n }\n },\n renderBadge: function renderBadge() {\n var h = this.$createElement;\n\n if (this.hasContent() || this.dot) {\n return h(\"div\", {\n \"class\": bem({\n dot: this.dot,\n fixed: !!this.$scopedSlots.default\n }),\n \"style\": {\n background: this.color\n }\n }, [this.renderContent()]);\n }\n }\n },\n render: function render() {\n var h = arguments[0];\n\n if (this.$scopedSlots.default) {\n var tag = this.tag;\n return h(tag, {\n \"class\": bem('wrapper')\n }, [this.$scopedSlots.default(), this.renderBadge()]);\n }\n\n return this.renderBadge();\n }\n});"],"mappings":"AAAA,SAASA,KAAK,EAAEC,eAAe,QAAQ,UAAU;AACjD,SAASC,SAAS,QAAQ,0BAA0B;AAEpD,IAAIC,gBAAgB,GAAGF,eAAe,CAAC,OAAO,CAAC;EAC3CG,eAAe,GAAGD,gBAAgB,CAAC,CAAC,CAAC;EACrCE,GAAG,GAAGF,gBAAgB,CAAC,CAAC,CAAC;AAE7B,eAAeC,eAAe,CAAC;EAC7BE,KAAK,EAAE;IACLC,GAAG,EAAEC,OAAO;IACZC,GAAG,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;IACrBC,KAAK,EAAED,MAAM;IACbE,OAAO,EAAE,CAACH,MAAM,EAAEC,MAAM,CAAC;IACzBG,GAAG,EAAE;MACHC,IAAI,EAAEJ,MAAM;MACZK,OAAO,EAAE;IACX;EACF,CAAC;EACDC,OAAO,EAAE;IACPC,UAAU,EAAE,SAASA,UAAUA,CAAA,EAAG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