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

1 line
13 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _mergeJSXProps from \"@vue/babel-helper-vue-jsx-merge-props\";\n// Utils\nimport { createNamespace } from '../utils';\nimport { emit, inherit } from '../utils/functional';\nimport { BORDER_SURROUND } from '../utils/constant';\nimport { routeProps, functionalRoute } from '../utils/router'; // Components\n\nimport Icon from '../icon';\nimport Loading from '../loading'; // Types\n\nvar _createNamespace = createNamespace('button'),\n createComponent = _createNamespace[0],\n bem = _createNamespace[1];\nfunction Button(h, props, slots, ctx) {\n var _ref;\n var tag = props.tag,\n icon = props.icon,\n type = props.type,\n color = props.color,\n plain = props.plain,\n disabled = props.disabled,\n loading = props.loading,\n hairline = props.hairline,\n loadingText = props.loadingText,\n iconPosition = props.iconPosition;\n var style = {};\n if (color) {\n style.color = plain ? color : 'white';\n if (!plain) {\n // Use background instead of backgroundColor to make linear-gradient work\n style.background = color;\n } // hide border when color is linear-gradient\n\n if (color.indexOf('gradient') !== -1) {\n style.border = 0;\n } else {\n style.borderColor = color;\n }\n }\n function onClick(event) {\n if (props.loading) {\n event.preventDefault();\n }\n if (!loading && !disabled) {\n emit(ctx, 'click', event);\n functionalRoute(ctx);\n }\n }\n function onTouchstart(event) {\n emit(ctx, 'touchstart', event);\n }\n var classes = [bem([type, props.size, {\n plain: plain,\n loading: loading,\n disabled: disabled,\n hairline: hairline,\n block: props.block,\n round: props.round,\n square: props.square\n }]), (_ref = {}, _ref[BORDER_SURROUND] = hairline, _ref)];\n function renderIcon() {\n if (loading) {\n return slots.loading ? slots.loading() : h(Loading, {\n \"class\": bem('loading'),\n \"attrs\": {\n \"size\": props.loadingSize,\n \"type\": props.loadingType,\n \"color\": \"currentColor\"\n }\n });\n }\n if (slots.icon) {\n return h(\"div\", {\n \"class\": bem('icon')\n }, [slots.icon()]);\n }\n if (icon) {\n return h(Icon, {\n \"attrs\": {\n \"name\": icon,\n \"classPrefix\": props.iconPrefix\n },\n \"class\": bem('icon')\n });\n }\n }\n function renderContent() {\n var content = [];\n if (iconPosition === 'left') {\n content.push(renderIcon());\n }\n var text;\n if (loading) {\n text = loadingText;\n } else {\n text = slots.default ? slots.default() : props.text;\n }\n if (text) {\n content.push(h(\"span\", {\n \"class\": bem('text')\n }, [text]));\n }\n if (iconPosition === 'right') {\n content.push(renderIcon());\n }\n return content;\n }\n return h(tag, _mergeJSXProps([{\n \"style\": style,\n \"class\": classes,\n \"attrs\": {\n \"type\": props.nativeType,\n \"disabled\": disabled\n },\n \"on\": {\n \"click\": onClick,\n \"touchstart\": onTouchstart\n }\n }, inherit(ctx)]), [h(\"div\", {\n \"class\": bem('content')\n }, [renderContent()])]);\n}\nButton.props = _extends({}, routeProps, {\n text: String,\n icon: String,\n color: String,\n block: Boolean,\n plain: Boolean,\n round: Boolean,\n square: Boolean,\n loading: Boolean,\n hairline: Boolean,\n disabled: Boolean,\n iconPrefix: String,\n nativeType: String,\n loadingText: String,\n loadingType: String,\n tag: {\n type: String,\n default: 'button'\n },\n type: {\n type: String,\n default: 'default'\n },\n size: {\n type: String,\n default: 'normal'\n },\n loadingSize: {\n type: String,\n default: '20px'\n },\n iconPosition: {\n type: String,\n default: 'left'\n }\n});\nexport default createComponent(Button);","map":{"version":3,"names":["_extends","_mergeJSXProps","createNamespace","emit","inherit","BORDER_SURROUND","routeProps","functionalRoute","Icon","Loading","_createNamespace","createComponent","bem","Button","h","props","slots","ctx","_ref","tag","icon","type","color","plain","disabled","loading","hairline","loadingText","iconPosition","style","background","indexOf","border","borderColor","onClick","event","preventDefault","onTouchstart","classes","size","block","round","square","renderIcon","loadingSize","loadingType","iconPrefix","renderContent","content","push","text","default","nativeType","String","Boolean"],"sources":["C:/Users/zhouxueli/Desktop/scheduling-app/node_modules/vant/es/button/index.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _mergeJSXProps from \"@vue/babel-helper-vue-jsx-merge-props\";\n// Utils\nimport { createNamespace } from '../utils';\nimport { emit, inherit } from '../utils/functional';\nimport { BORDER_SURROUND } from '../utils/constant';\nimport { routeProps, functionalRoute } from '../utils/router'; // Components\n\nimport Icon from '../icon';\nimport Loading from '../loading'; // Types\n\nvar _createNamespace = createNamespace('button'),\n createComponent = _createNamespace[0],\n bem = _createNamespace[1];\n\nfunction Button(h, props, slots, ctx) {\n var _ref;\n\n var tag = props.tag,\n icon = props.icon,\n type = props.type,\n color = props.color,\n plain = props.plain,\n disabled = props.disabled,\n loading = props.loading,\n hairline = props.hairline,\n loadingText = props.loadingText,\n iconPosition = props.iconPosition;\n var style = {};\n\n if (color) {\n style.color = plain ? color : 'white';\n\n if (!plain) {\n // Use background instead of backgroundColor to make linear-gradient work\n style.background = color;\n } // hide border when color is linear-gradient\n\n\n if (color.indexOf('gradient') !== -1) {\n style.border = 0;\n } else {\n style.borderColor = color;\n }\n }\n\n function onClick(event) {\n if (props.loading) {\n event.preventDefault();\n }\n\n if (!loading && !disabled) {\n emit(ctx, 'click', event);\n functionalRoute(ctx);\n }\n }\n\n function onTouchstart(event) {\n emit(ctx, 'touchstart', event);\n }\n\n var classes = [bem([type, props.size, {\n plain: plain,\n loading: loading,\n disabled: disabled,\n hairline: hairline,\n block: props.block,\n round: props.round,\n square: props.square\n }]), (_ref = {}, _ref[BORDER_SURROUND] = hairline, _ref)];\n\n function renderIcon() {\n if (loading) {\n return slots.loading ? slots.loading() : h(Loading, {\n \"class\": bem('loading'),\n \"attrs\": {\n \"size\": props.loadingSize,\n \"type\": props.loadingType,\n \"color\": \"currentColor\"\n }\n });\n }\n\n if (slots.icon) {\n return h(\"div\", {\n \"class\": bem('icon')\n }, [slots.icon()]);\n }\n\n if (icon) {\n return h(Icon, {\n \"attrs\": {\n \"name\": icon,\n \"classPrefix\": props.iconPrefix\n },\n \"class\": bem('icon')\n });\n }\n }\n\n function renderContent() {\n var content = [];\n\n if (iconPosition === 'left') {\n content.push(renderIcon());\n }\n\n var text;\n\n if (loading) {\n text = loadingText;\n } else {\n text = slots.default ? slots.default() : props.text;\n }\n\n if (text) {\n content.push(h(\"span\", {\n \"class\": bem('text')\n }, [text]));\n }\n\n if (iconPosition === 'right') {\n content.push(renderIcon());\n }\n\n return content;\n }\n\n return h(tag, _mergeJSXProps([{\n \"style\": style,\n \"class\": classes,\n \"attrs\": {\n \"type\": props.nativeType,\n \"disabled\": disabled\n },\n \"on\": {\n \"click\": onClick,\n \"touchstart\": onTouchstart\n }\n }, inherit(ctx)]), [h(\"div\", {\n \"class\": bem('content')\n }, [renderContent()])]);\n}\n\nButton.props = _extends({}, routeProps, {\n text: String,\n icon: String,\n color: String,\n block: Boolean,\n plain: Boolean,\n round: Boolean,\n square: Boolean,\n loading: Boolean,\n hairline: Boolean,\n disabled: Boolean,\n iconPrefix: String,\n nativeType: String,\n loadingText: String,\n loadingType: String,\n tag: {\n type: String,\n default: 'button'\n },\n type: {\n type: String,\n default: 'default'\n },\n size: {\n type: String,\n default: 'normal'\n },\n loadingSize: {\n type: String,\n default: '20px'\n },\n iconPosition: {\n type: String,\n default: 'left'\n }\n});\nexport default createComponent(Button);"],"mappings":";AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,cAAc,MAAM,uCAAuC;AAClE;AACA,SAASC,eAAe,QAAQ,UAAU;AAC1C,SAASC,IAAI,EAAEC,OAAO,QAAQ,qBAAqB;AACnD,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,UAAU,EAAEC,eAAe,QAAQ,iBAAiB,CAAC,CAAC;;AAE/D,OAAOC,IAAI,MAAM,SAAS;AAC1B,OAAOC,OAAO,MAAM,YAAY,CAAC,CAAC;;AAElC,IAAIC,gBAAgB,GAAGR,eAAe,CAAC,QAAQ,CAAC;EAC5CS,eAAe,GAAGD,gBAAgB,CAAC,C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