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

1 line
10 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _mergeJSXProps from \"@vue/babel-helper-vue-jsx-merge-props\";\n// Utils\nimport { createNamespace, isDef } from '../utils';\nimport { emit, inherit } from '../utils/functional';\nimport { routeProps, functionalRoute } from '../utils/router';\nimport { cellProps } from './shared'; // Components\n\nimport Icon from '../icon'; // Types\n\nvar _createNamespace = createNamespace('cell'),\n createComponent = _createNamespace[0],\n bem = _createNamespace[1];\nfunction Cell(h, props, slots, ctx) {\n var _props$clickable;\n var icon = props.icon,\n size = props.size,\n title = props.title,\n label = props.label,\n value = props.value,\n isLink = props.isLink;\n var showTitle = slots.title || isDef(title);\n function Label() {\n var showLabel = slots.label || isDef(label);\n if (showLabel) {\n return h(\"div\", {\n \"class\": [bem('label'), props.labelClass]\n }, [slots.label ? slots.label() : label]);\n }\n }\n function Title() {\n if (showTitle) {\n return h(\"div\", {\n \"class\": [bem('title'), props.titleClass],\n \"style\": props.titleStyle\n }, [slots.title ? slots.title() : h(\"span\", [title]), Label()]);\n }\n }\n function Value() {\n var showValue = slots.default || isDef(value);\n if (showValue) {\n return h(\"div\", {\n \"class\": [bem('value', {\n alone: !showTitle\n }), props.valueClass]\n }, [slots.default ? slots.default() : h(\"span\", [value])]);\n }\n }\n function LeftIcon() {\n if (slots.icon) {\n return slots.icon();\n }\n if (icon) {\n return h(Icon, {\n \"class\": bem('left-icon'),\n \"attrs\": {\n \"name\": icon,\n \"classPrefix\": props.iconPrefix\n }\n });\n }\n }\n function RightIcon() {\n var rightIconSlot = slots['right-icon'];\n if (rightIconSlot) {\n return rightIconSlot();\n }\n if (isLink) {\n var arrowDirection = props.arrowDirection;\n return h(Icon, {\n \"class\": bem('right-icon'),\n \"attrs\": {\n \"name\": arrowDirection ? \"arrow-\" + arrowDirection : 'arrow'\n }\n });\n }\n }\n function onClick(event) {\n emit(ctx, 'click', event);\n functionalRoute(ctx);\n }\n var clickable = (_props$clickable = props.clickable) != null ? _props$clickable : isLink;\n var classes = {\n clickable: clickable,\n center: props.center,\n required: props.required,\n borderless: !props.border\n };\n if (size) {\n classes[size] = size;\n }\n return h(\"div\", _mergeJSXProps([{\n \"class\": bem(classes),\n \"attrs\": {\n \"role\": clickable ? 'button' : null,\n \"tabindex\": clickable ? 0 : null\n },\n \"on\": {\n \"click\": onClick\n }\n }, inherit(ctx)]), [LeftIcon(), Title(), Value(), RightIcon(), slots.extra == null ? void 0 : slots.extra()]);\n}\nCell.props = _extends({}, cellProps, routeProps);\nexport default createComponent(Cell);","map":{"version":3,"names":["_extends","_mergeJSXProps","createNamespace","isDef","emit","inherit","routeProps","functionalRoute","cellProps","Icon","_createNamespace","createComponent","bem","Cell","h","props","slots","ctx","_props$clickable","icon","size","title","label","value","isLink","showTitle","Label","showLabel","labelClass","Title","titleClass","titleStyle","Value","showValue","default","alone","valueClass","LeftIcon","iconPrefix","RightIcon","rightIconSlot","arrowDirection","onClick","event","clickable","classes","center","required","borderless","border","extra"],"sources":["E:/work/sino/sino-h5/node_modules/vant/es/cell/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, isDef } from '../utils';\nimport { emit, inherit } from '../utils/functional';\nimport { routeProps, functionalRoute } from '../utils/router';\nimport { cellProps } from './shared'; // Components\n\nimport Icon from '../icon'; // Types\n\nvar _createNamespace = createNamespace('cell'),\n createComponent = _createNamespace[0],\n bem = _createNamespace[1];\n\nfunction Cell(h, props, slots, ctx) {\n var _props$clickable;\n\n var icon = props.icon,\n size = props.size,\n title = props.title,\n label = props.label,\n value = props.value,\n isLink = props.isLink;\n var showTitle = slots.title || isDef(title);\n\n function Label() {\n var showLabel = slots.label || isDef(label);\n\n if (showLabel) {\n return h(\"div\", {\n \"class\": [bem('label'), props.labelClass]\n }, [slots.label ? slots.label() : label]);\n }\n }\n\n function Title() {\n if (showTitle) {\n return h(\"div\", {\n \"class\": [bem('title'), props.titleClass],\n \"style\": props.titleStyle\n }, [slots.title ? slots.title() : h(\"span\", [title]), Label()]);\n }\n }\n\n function Value() {\n var showValue = slots.default || isDef(value);\n\n if (showValue) {\n return h(\"div\", {\n \"class\": [bem('value', {\n alone: !showTitle\n }), props.valueClass]\n }, [slots.default ? slots.default() : h(\"span\", [value])]);\n }\n }\n\n function LeftIcon() {\n if (slots.icon) {\n return slots.icon();\n }\n\n if (icon) {\n return h(Icon, {\n \"class\": bem('left-icon'),\n \"attrs\": {\n \"name\": icon,\n \"classPrefix\": props.iconPrefix\n }\n });\n }\n }\n\n function RightIcon() {\n var rightIconSlot = slots['right-icon'];\n\n if (rightIconSlot) {\n return rightIconSlot();\n }\n\n if (isLink) {\n var arrowDirection = props.arrowDirection;\n return h(Icon, {\n \"class\": bem('right-icon'),\n \"attrs\": {\n \"name\": arrowDirection ? \"arrow-\" + arrowDirection : 'arrow'\n }\n });\n }\n }\n\n function onClick(event) {\n emit(ctx, 'click', event);\n functionalRoute(ctx);\n }\n\n var clickable = (_props$clickable = props.clickable) != null ? _props$clickable : isLink;\n var classes = {\n clickable: clickable,\n center: props.center,\n required: props.required,\n borderless: !props.border\n };\n\n if (size) {\n classes[size] = size;\n }\n\n return h(\"div\", _mergeJSXProps([{\n \"class\": bem(classes),\n \"attrs\": {\n \"role\": clickable ? 'button' : null,\n \"tabindex\": clickable ? 0 : null\n },\n \"on\": {\n \"click\": onClick\n }\n }, inherit(ctx)]), [LeftIcon(), Title(), Value(), RightIcon(), slots.extra == null ? void 0 : slots.extra()]);\n}\n\nCell.props = _extends({}, cellProps, routeProps);\nexport default createComponent(Cell);"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,cAAc,MAAM,uCAAuC;AAClE;AACA,SAASC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