You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
4.7 KiB
1 line
4.7 KiB
{"ast":null,"code":"import { computed } from 'vue';\nimport '../../../utils/index.mjs';\nimport { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { NOOP } from '@vue/shared';\nconst CommonProps = buildProps({\n modelValue: {\n type: definePropType([Number, String, Array])\n },\n options: {\n type: definePropType(Array),\n default: () => []\n },\n props: {\n type: definePropType(Object),\n default: () => ({})\n }\n});\nconst DefaultProps = {\n expandTrigger: \"click\",\n multiple: false,\n checkStrictly: false,\n emitPath: true,\n lazy: false,\n lazyLoad: NOOP,\n value: \"value\",\n label: \"label\",\n children: \"children\",\n leaf: \"leaf\",\n disabled: \"disabled\",\n hoverThreshold: 500\n};\nconst useCascaderConfig = props => {\n return computed(() => ({\n ...DefaultProps,\n ...props.props\n }));\n};\nexport { CommonProps, DefaultProps, useCascaderConfig };","map":{"version":3,"names":["CommonProps","buildProps","modelValue","type","definePropType","Number","String","Array","options","default","props","Object","DefaultProps","expandTrigger","multiple","checkStrictly","emitPath","lazy","lazyLoad","NOOP","value","label","children","leaf","disabled","hoverThreshold","useCascaderConfig","computed"],"sources":["../../../../../../packages/components/cascader-panel/src/config.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { NOOP, buildProps, definePropType } from '@element-plus/utils'\nimport type {\n CascaderConfig,\n CascaderOption,\n CascaderProps,\n CascaderValue,\n} from './node'\n\nexport const CommonProps = buildProps({\n /**\n * @description specify which key of node object is used as the node's value\n */\n modelValue: {\n type: definePropType<CascaderValue>([Number, String, Array]),\n },\n /**\n * @description data of the options, the key of `value` and `label` can be customize by `CascaderProps`.\n */\n options: {\n type: definePropType<CascaderOption[]>(Array),\n default: () => [] as CascaderOption[],\n },\n /**\n * @description configuration options, see the following `CascaderProps` table.\n */\n props: {\n type: definePropType<CascaderProps>(Object),\n default: () => ({} as CascaderProps),\n },\n} as const)\n\nexport const DefaultProps: CascaderConfig = {\n /**\n * @description trigger mode of expanding options\n */\n expandTrigger: 'click',\n /**\n * @description whether multiple selection is enabled\n */\n multiple: false,\n /**\n * @description whether checked state of a node not affects its parent and child nodes\n */\n checkStrictly: false, // whether all nodes can be selected\n /**\n * @description when checked nodes change, whether to emit an array of node's path, if false, only emit the value of node.\n */\n emitPath: true, // wether to emit an array of all levels value in which node is located\n /**\n * @description whether to dynamic load child nodes, use with `lazyload` attribute\n */\n lazy: false,\n /**\n * @description method for loading child nodes data, only works when `lazy` is true\n */\n lazyLoad: NOOP,\n /**\n * @description specify which key of node object is used as the node's value\n */\n value: 'value',\n /**\n * @description specify which key of node object is used as the node's label\n */\n label: 'label',\n /**\n * @description specify which key of node object is used as the node's children\n */\n children: 'children',\n /**\n * @description specify which key of node object is used as the node's leaf\n */\n leaf: 'leaf',\n /**\n * @description specify which key of node object is used as the node's disabled\n */\n disabled: 'disabled',\n /**\n * @description hover threshold of expanding options\n */\n hoverThreshold: 500,\n}\n\nexport const useCascaderConfig = (props: { props: CascaderProps }) => {\n return computed(() => ({\n ...DefaultProps,\n ...props.props,\n }))\n}\n"],"mappings":";;;;AAEY,MAACA,WAAW,GAAGC,UAAU,CAAC;EACpCC,UAAU,EAAE;IACVC,IAAI,EAAEC,cAAc,CAAC,CAACC,MAAM,EAAEC,MAAM,EAAEC,KAAK,CAAC;EAChD,CAAG;EACDC,OAAO,EAAE;IACPL,IAAI,EAAEC,cAAc,CAACG,KAAK,CAAC;IAC3BE,OAAO,EAAEA,CAAA,KAAM;EACnB,CAAG;EACDC,KAAK,EAAE;IACLP,IAAI,EAAEC,cAAc,CAACO,MAAM,CAAC;IAC5BF,OAAO,EAAEA,CAAA,MAAO,EAAE;EACtB;AACA,CAAC;AACW,MAACG,YAAY,GAAG;EAC1BC,aAAa,EAAE,OAAO;EACtBC,QAAQ,EAAE,KAAK;EACfC,aAAa,EAAE,KAAK;EACpBC,QAAQ,EAAE,IAAI;EACdC,IAAI,EAAE,KAAK;EACXC,QAAQ,EAAEC,IAAI;EACdC,KAAK,EAAE,OAAO;EACdC,KAAK,EAAE,OAAO;EACdC,QAAQ,EAAE,UAAU;EACpBC,IAAI,EAAE,MAAM;EACZC,QAAQ,EAAE,UAAU;EACpBC,cAAc,EAAE;AAClB;AACY,MAACC,iBAAiB,GAAIhB,KAAK,IAAK;EAC1C,OAAOiB,QAAQ,CAAC,OAAO;IACrB,GAAGf,YAAY;IACf,GAAGF,KAAK,CAACA;EACb,CAAG,CAAC,CAAC;AACL","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |