@silver-formily/element-plus 4.0.3 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/__builtins__/shared/loading.mjs.map +1 -1
- package/esm/__builtins__/shared/transform-component.mjs +1 -1
- package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
- package/esm/__builtins__/shared/utils.mjs +7 -5
- package/esm/__builtins__/shared/utils.mjs.map +1 -1
- package/esm/array-base/array-base-inner.mjs.map +1 -1
- package/esm/array-base/array-base-move-down.mjs +1 -1
- package/esm/array-base/array-base-move-down.mjs.map +1 -1
- package/esm/array-base/array-base-move-up.mjs +1 -1
- package/esm/array-base/array-base-move-up.mjs.map +1 -1
- package/esm/array-base/array-base-remove.mjs +1 -1
- package/esm/array-base/array-base-remove.mjs.map +1 -1
- package/esm/array-base/types.d.ts +2 -2
- package/esm/array-base/utils.d.ts +1 -1
- package/esm/array-base/utils.mjs +1 -1
- package/esm/array-base/utils.mjs.map +1 -1
- package/esm/array-cards/array-cards.mjs +1 -1
- package/esm/array-cards/array-cards.mjs.map +1 -1
- package/esm/array-collapse/array-collapse-item.mjs +1 -1
- package/esm/array-collapse/array-collapse-item.mjs.map +1 -1
- package/esm/array-collapse/array-collapse.mjs +3 -4
- package/esm/array-collapse/array-collapse.mjs.map +1 -1
- package/esm/array-items/array-items.mjs +3 -8
- package/esm/array-items/array-items.mjs.map +1 -1
- package/esm/array-list-tabs/array-list-tabs.mjs +57 -51
- package/esm/array-list-tabs/array-list-tabs.mjs.map +1 -1
- package/esm/array-list-tabs/utils.mjs.map +1 -1
- package/esm/array-table/array-table.mjs +4 -18
- package/esm/array-table/array-table.mjs.map +1 -1
- package/esm/array-table/utils.mjs.map +1 -1
- package/esm/array-tabs/array-tabs.mjs +1 -1
- package/esm/array-tabs/array-tabs.mjs.map +1 -1
- package/esm/autocomplete/autocomplete.mjs.map +1 -1
- package/esm/autocomplete/index.d.ts +1 -41
- package/esm/cascader/index.d.ts +1 -31
- package/esm/checkbox/checkbox-group.mjs +1 -1
- package/esm/checkbox/checkbox-group.mjs.map +1 -1
- package/esm/checkbox/index.d.ts +1 -819
- package/esm/color-picker/index.d.ts +1 -210
- package/esm/color-picker-panel/index.d.ts +1 -130
- package/esm/date-picker/index.d.ts +1 -447
- package/esm/date-picker-panel/index.d.ts +1 -147
- package/esm/editable/editable-popover.mjs +1 -1
- package/esm/editable/editable-popover.mjs.map +1 -1
- package/esm/editable/editable.mjs +1 -1
- package/esm/editable/editable.mjs.map +1 -1
- package/esm/editable/index.d.ts +1 -60
- package/esm/form/form.mjs.map +1 -1
- package/esm/form/form.vue.d.ts +1 -1
- package/esm/form-collapse/form-collapse.mjs +1 -1
- package/esm/form-collapse/form-collapse.mjs.map +1 -1
- package/esm/form-collapse/index.d.ts +3 -3
- package/esm/form-collapse/utils.d.ts +2 -2
- package/esm/form-collapse/utils.mjs +2 -2
- package/esm/form-collapse/utils.mjs.map +1 -1
- package/esm/form-dialog/dialog-content.mjs +1 -1
- package/esm/form-dialog/dialog-content.mjs.map +1 -1
- package/esm/form-dialog/index.mjs +3 -3
- package/esm/form-dialog/index.mjs.map +1 -1
- package/esm/form-dialog/types.d.ts +2 -2
- package/esm/form-drawer/drawer-content.mjs +1 -1
- package/esm/form-drawer/drawer-content.mjs.map +1 -1
- package/esm/form-drawer/index.mjs +3 -3
- package/esm/form-drawer/index.mjs.map +1 -1
- package/esm/form-drawer/types.d.ts +2 -2
- package/esm/form-item/form-item.mjs +1 -1
- package/esm/form-item/form-item.mjs.map +1 -1
- package/esm/form-item/index.d.ts +1 -83
- package/esm/form-item/index.mjs +1 -1
- package/esm/form-item/index.mjs.map +1 -1
- package/esm/form-item/utils.mjs +1 -1
- package/esm/form-item/utils.mjs.map +1 -1
- package/esm/form-layout/form-layout.mjs +1 -1
- package/esm/form-layout/form-layout.mjs.map +1 -1
- package/esm/form-layout/form-layout.vue.d.ts +1 -1
- package/esm/form-layout/utils.mjs +1 -1
- package/esm/form-layout/utils.mjs.map +1 -1
- package/esm/form-step/form-step.mjs +1 -1
- package/esm/form-step/form-step.mjs.map +1 -1
- package/esm/form-step/types.d.ts +1 -1
- package/esm/form-step/utils.d.ts +1 -1
- package/esm/form-step/utils.mjs +1 -1
- package/esm/form-step/utils.mjs.map +1 -1
- package/esm/form-tab/hooks.mjs.map +1 -1
- package/esm/form-tab/utils.mjs +1 -1
- package/esm/form-tab/utils.mjs.map +1 -1
- package/esm/input/index.d.ts +1 -43
- package/esm/input-number/index.d.ts +1 -328
- package/esm/input-tag/index.d.ts +1 -26
- package/esm/input-tag/input-tag.mjs.map +1 -1
- package/esm/mention/index.d.ts +1 -36
- package/esm/mention/mention.mjs.map +1 -1
- package/esm/pagination/components/pager2.mjs.map +1 -1
- package/esm/pagination/components/sizes2.mjs +1 -1
- package/esm/pagination/components/sizes2.mjs.map +1 -1
- package/esm/password/index.d.ts +1 -42
- package/esm/picker-select/index.d.ts +1 -41
- package/esm/picker-select/picker-select.mjs +1 -1
- package/esm/picker-select/picker-select.mjs.map +1 -1
- package/esm/picker-select/types.d.ts +1 -1
- package/esm/preview-text/cascader.mjs.map +1 -1
- package/esm/preview-text/color-picker.mjs +1 -1
- package/esm/preview-text/color-picker.mjs.map +1 -1
- package/esm/preview-text/input.mjs +1 -1
- package/esm/preview-text/input.mjs.map +1 -1
- package/esm/preview-text/rate.mjs +1 -1
- package/esm/preview-text/rate.mjs.map +1 -1
- package/esm/preview-text/select.mjs +1 -1
- package/esm/preview-text/select.mjs.map +1 -1
- package/esm/preview-text/time-picker.mjs +1 -1
- package/esm/preview-text/time-picker.mjs.map +1 -1
- package/esm/preview-text/tree.mjs.map +1 -1
- package/esm/query-form/hooks.mjs +1 -1
- package/esm/query-form/hooks.mjs.map +1 -1
- package/esm/query-form/index.d.ts +5 -5
- package/esm/query-form/query-form-light.mjs +1 -1
- package/esm/query-form/query-form-light.mjs.map +1 -1
- package/esm/query-form/query-form.mjs +1 -1
- package/esm/query-form/query-form.mjs.map +1 -1
- package/esm/query-form/types.d.ts +2 -2
- package/esm/query-form-item/index.d.ts +1 -152
- package/esm/query-form-item/query-form-item.mjs +2 -2
- package/esm/query-form-item/query-form-item.mjs.map +1 -1
- package/esm/query-form-item/types.d.ts +2 -2
- package/esm/radio/index.d.ts +67 -121
- package/esm/radio/radio-group.mjs +1 -1
- package/esm/radio/radio-group.mjs.map +1 -1
- package/esm/rate/index.d.ts +1 -186
- package/esm/segmented/index.d.ts +1 -28
- package/esm/select/index.d.ts +1 -112
- package/esm/select-table/index.d.ts +1 -61
- package/esm/select-table/select-table.mjs +1 -1
- package/esm/select-table/select-table.mjs.map +1 -1
- package/esm/slider/index.d.ts +1 -178
- package/esm/submit/submit.mjs.map +1 -1
- package/esm/switch/index.d.ts +1 -298
- package/esm/time-picker/index.d.ts +1 -446
- package/esm/time-select/index.d.ts +1 -188
- package/esm/transfer/index.d.ts +1 -268
- package/esm/tree/index.d.ts +1 -45
- package/esm/tree/tree.mjs +1 -1
- package/esm/tree/tree.mjs.map +1 -1
- package/esm/tree-select/index.d.ts +1 -19
- package/esm/tree-select/tree-select.mjs.map +1 -1
- package/esm/upload/index.d.ts +1 -129
- package/esm/upload/upload.mjs +1 -1
- package/esm/upload/upload.mjs.map +1 -1
- package/package.json +18 -14
- package/esm/select-table/types.d.ts +0 -22
- package/esm/tree/types.d.ts +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-form-item.mjs","names":[],"sources":["../../src/query-form-item/query-form-item.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Field } from '@formily/core'\nimport type { ISchema } from '@formily/json-schema'\nimport type { PropType } from 'vue'\nimport type {\n QueryFormItemMode,\n QueryFormItemPaginationMap,\n QueryFormItemPaginationProps,\n QueryFormItemQueryProps,\n QueryFormItemRequest,\n QueryFormItemRequestSuccessPayload,\n} from './types'\nimport { createForm } from '@formily/core'\nimport { isNum } from '@formily/shared'\nimport { useField } from '@silver-formily/vue'\nimport { ElPagination } from 'element-plus'\nimport { computed, onMounted, ref, watch } from 'vue'\nimport { stylePrefix, useCleanAttrs } from '../__builtins__'\nimport { FormBaseItem } from '../form-item'\nimport { QueryForm } from '../query-form'\nimport { useQueryFormForm } from '../query-form/hooks'\n\ndefineOptions({\n name: 'FQueryFormItem',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n mode: {\n type: String as PropType<QueryFormItemMode>,\n default: 'default',\n },\n request: Function as PropType<QueryFormItemRequest>,\n clearOnDataChange: {\n type: Boolean,\n default: false,\n },\n querySchema: Object as PropType<ISchema>,\n queryFormProps: {\n type: Object as PropType<QueryFormItemQueryProps>,\n default: () => ({}),\n },\n pagination: {\n type: Boolean,\n default: true,\n },\n paginationProps: {\n type: Object as PropType<QueryFormItemPaginationProps>,\n default: () => ({}),\n },\n paginationMap: {\n type: Object as PropType<QueryFormItemPaginationMap>,\n default: () => ({}),\n },\n immediate: {\n type: Boolean,\n default: true,\n },\n})\n\nconst emit = defineEmits<{\n (e: 'requestSuccess', payload: QueryFormItemRequestSuccessPayload): void\n (e: 'requestFailed', error: any): void\n}>()\n\nconst defaultPaginationProps: QueryFormItemPaginationProps = {\n currentPage: 1,\n pageSize: 10,\n pageSizes: [10, 20, 50, 100],\n layout: 'total, prev, pager, next',\n size: 'small',\n}\nconst defaultPaginationRequestMapping: Required<QueryFormItemPaginationMap> = {\n current: 'current',\n pageSize: 'pageSize',\n}\n\nconst fieldRef = useField<Field>()\nconst internalQueryForm = createForm()\nconst prefixCls = `${stylePrefix}-query-form-item`\nconst formItemInternalClass = `${stylePrefix}-form-item--isolated`\nconst { props: formItemProps } = useCleanAttrs()\n\nconst paginationBindings = computed(() => {\n const {\n currentPage,\n pageSize,\n ...bindings\n } = {\n ...defaultPaginationProps,\n ...props.paginationProps,\n }\n return bindings\n})\n\nconst currentPageRef = ref(props.paginationProps?.currentPage ?? defaultPaginationProps.currentPage)\nconst pageSizeRef = ref(props.paginationProps?.pageSize ?? defaultPaginationProps.pageSize)\nconst totalRef = ref(0)\nconst currentRequestId = ref(0)\n\nconst { activeForm: activeQueryForm } = useQueryFormForm({\n formProps: computed(() => props.queryFormProps),\n fallbackForm: internalQueryForm,\n})\n\nconst queryFormBindings = computed(() => {\n return ({\n ...props.queryFormProps,\n schema: props.querySchema ?? props.queryFormProps.schema,\n form: activeQueryForm.value,\n onAutoSubmit: handleQuerySubmit,\n resetProps: {\n onClick: handleQueryReset,\n },\n })\n})\n\nasync function executeRequest() {\n if (!props.request)\n return\n\n const field = fieldRef.value\n if (!Array.isArray(field.dataSource))\n field.dataSource = []\n\n const requestId = ++currentRequestId.value\n /* istanbul ignore next -- @preserve defensive: active query form can be temporarily undefined before form injection settles */\n const queryValues = activeQueryForm.value?.values ?? {}\n const paginationData = props.pagination\n ? {\n current: currentPageRef.value,\n pageSize: pageSizeRef.value,\n }\n : undefined\n const requestParams = paginationData\n ? {\n ...queryValues,\n [(props.paginationMap.current ?? defaultPaginationRequestMapping.current)]: paginationData.current,\n [(props.paginationMap.pageSize ?? defaultPaginationRequestMapping.pageSize)]: paginationData.pageSize,\n }\n : queryValues\n\n field.loading = true\n try {\n const result = await props.request(requestParams)\n\n if (requestId !== currentRequestId.value)\n return\n\n if (result.success !== true) {\n emit('requestFailed', result)\n return\n }\n\n field.dataSource = result.data\n if (props.clearOnDataChange) {\n field.setValue?.(undefined)\n }\n totalRef.value = isNum(result.total) ? result.total : result.data.length\n\n emit('requestSuccess', {\n values: queryValues,\n pagination: paginationData,\n dataSource: result.data,\n total: totalRef.value,\n result,\n })\n }\n catch (error) {\n if (requestId !== currentRequestId.value)\n return\n emit('requestFailed', error)\n }\n finally {\n if (requestId === currentRequestId.value)\n field.loading = false\n }\n}\n\nasync function handleQuerySubmit() {\n if (props.pagination && currentPageRef.value !== 1) {\n currentPageRef.value = 1\n return\n }\n\n await executeRequest()\n}\n\nfunction handleQueryReset(event: MouseEvent) {\n const userOnClick = props.queryFormProps.resetProps?.onClick as ((event: MouseEvent) => void | boolean) | undefined\n const result = userOnClick?.(event)\n if (result === false)\n return false\n\n void handleQuerySubmit()\n\n return result\n}\n\nonMounted(() => {\n if (props.immediate)\n void executeRequest()\n})\n\nwatch([currentPageRef, pageSizeRef], ([currentPage, pageSize], [previousPage, previousPageSize]) => {\n /* istanbul ignore if -- @preserve defensive: watcher is retained when pagination is dynamically toggled off */\n if (!props.pagination)\n return\n\n const currentChanged = currentPage !== previousPage\n const pageSizeChanged = pageSize !== previousPageSize\n\n /* istanbul ignore if -- @preserve defensive: keep guard for unexpected duplicated watcher payload */\n if (!currentChanged && !pageSizeChanged)\n return\n\n if (pageSizeChanged && currentPage !== 1) {\n currentPageRef.value = 1\n return\n }\n\n void executeRequest()\n})\n</script>\n\n<template>\n <FormBaseItem\n v-bind=\"formItemProps\"\n :internal-form-item-class=\"formItemInternalClass\"\n >\n <div :class=\"prefixCls\">\n <component\n :is=\"props.mode === 'light' ? QueryForm.Light : QueryForm\"\n v-bind=\"queryFormBindings\"\n />\n <div :class=\"`${prefixCls}__content`\">\n <slot />\n </div>\n <ElPagination\n v-if=\"props.pagination\"\n v-model:current-page=\"currentPageRef\"\n v-model:page-size=\"pageSizeRef\"\n :class=\"`${prefixCls}__pagination`\"\n v-bind=\"paginationBindings\"\n :total=\"totalRef\"\n />\n </div>\n </FormBaseItem>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BA,MAAM,QAAQ;EAiCd,MAAM,OAAO;EAKb,MAAM,yBAAuD;GAC3D,aAAa;GACb,UAAU;GACV,WAAW;IAAC;IAAI;IAAI;IAAI;IAAI;GAC5B,QAAQ;GACR,MAAM;GACR;EACA,MAAM,kCAAwE;GAC5E,SAAS;GACT,UAAU;GACZ;EAEA,MAAM,WAAW,UAAgB;EACjC,MAAM,oBAAoB,YAAW;EACrC,MAAM,YAAY,GAAG,YAAY;EACjC,MAAM,wBAAwB,GAAG,YAAY;EAC7C,MAAM,EAAE,OAAO,k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,OAAA,EAFA,OAAK,eAAA,GAAK,UAAS,WAAA,EAAA,EAAA,CACvB,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA;KAGF,MAAM,cAAA,WAAA,EADd,YAOE,MAAA,aAAA,EAPF,WAOE;;MALQ,gBAAc,eAAA;oEAAA,eAAc,QAAA;MAC5B,aAAW,YAAA;iEAAA,YAAW,QAAA;MAC7B,OAAK,GAAK,UAAS;QACZ,mBAAA,OAAkB,EACzB,OAAO,SAAA,OAAQ,CAAA,EAAA,MAAA,IAAA;MAAA;MAAA;MAAA;MAAA;MAAA,CAAA,IAAA,mBAAA,QAAA,KAAA"}
|
|
1
|
+
{"version":3,"file":"query-form-item.mjs","names":[],"sources":["../../src/query-form-item/query-form-item.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Field } from '@silver-formily/core'\nimport type { ISchema } from '@silver-formily/json-schema'\nimport type { PropType } from 'vue'\nimport type {\n QueryFormItemMode,\n QueryFormItemPaginationMap,\n QueryFormItemPaginationProps,\n QueryFormItemQueryProps,\n QueryFormItemRequest,\n QueryFormItemRequestSuccessPayload,\n} from './types'\nimport { createForm } from '@silver-formily/core'\nimport { isNum } from '@silver-formily/shared'\nimport { useField } from '@silver-formily/vue'\nimport { ElPagination } from 'element-plus'\nimport { computed, onMounted, ref, watch } from 'vue'\nimport { stylePrefix, useCleanAttrs } from '../__builtins__'\nimport { FormBaseItem } from '../form-item'\nimport { QueryForm } from '../query-form'\nimport { useQueryFormForm } from '../query-form/hooks'\n\ndefineOptions({\n name: 'FQueryFormItem',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n mode: {\n type: String as PropType<QueryFormItemMode>,\n default: 'default',\n },\n request: Function as PropType<QueryFormItemRequest>,\n clearOnDataChange: {\n type: Boolean,\n default: false,\n },\n querySchema: Object as PropType<ISchema>,\n queryFormProps: {\n type: Object as PropType<QueryFormItemQueryProps>,\n default: () => ({}),\n },\n pagination: {\n type: Boolean,\n default: true,\n },\n paginationProps: {\n type: Object as PropType<QueryFormItemPaginationProps>,\n default: () => ({}),\n },\n paginationMap: {\n type: Object as PropType<QueryFormItemPaginationMap>,\n default: () => ({}),\n },\n immediate: {\n type: Boolean,\n default: true,\n },\n})\n\nconst emit = defineEmits<{\n (e: 'requestSuccess', payload: QueryFormItemRequestSuccessPayload): void\n (e: 'requestFailed', error: any): void\n}>()\n\nconst defaultPaginationProps: QueryFormItemPaginationProps = {\n currentPage: 1,\n pageSize: 10,\n pageSizes: [10, 20, 50, 100],\n layout: 'total, prev, pager, next',\n size: 'small',\n}\nconst defaultPaginationRequestMapping: Required<QueryFormItemPaginationMap> = {\n current: 'current',\n pageSize: 'pageSize',\n}\n\nconst fieldRef = useField<Field>()\nconst internalQueryForm = createForm()\nconst prefixCls = `${stylePrefix}-query-form-item`\nconst formItemInternalClass = `${stylePrefix}-form-item--isolated`\nconst { props: formItemProps } = useCleanAttrs()\n\nconst paginationBindings = computed(() => {\n const {\n currentPage,\n pageSize,\n ...bindings\n } = {\n ...defaultPaginationProps,\n ...props.paginationProps,\n }\n return bindings\n})\n\nconst currentPageRef = ref(props.paginationProps?.currentPage ?? defaultPaginationProps.currentPage)\nconst pageSizeRef = ref(props.paginationProps?.pageSize ?? defaultPaginationProps.pageSize)\nconst totalRef = ref(0)\nconst currentRequestId = ref(0)\n\nconst { activeForm: activeQueryForm } = useQueryFormForm({\n formProps: computed(() => props.queryFormProps),\n fallbackForm: internalQueryForm,\n})\n\nconst queryFormBindings = computed(() => {\n return ({\n ...props.queryFormProps,\n schema: props.querySchema ?? props.queryFormProps.schema,\n form: activeQueryForm.value,\n onAutoSubmit: handleQuerySubmit,\n resetProps: {\n onClick: handleQueryReset,\n },\n })\n})\n\nasync function executeRequest() {\n if (!props.request)\n return\n\n const field = fieldRef.value\n if (!Array.isArray(field.dataSource))\n field.dataSource = []\n\n const requestId = ++currentRequestId.value\n /* istanbul ignore next -- @preserve defensive: active query form can be temporarily undefined before form injection settles */\n const queryValues = activeQueryForm.value?.values ?? {}\n const paginationData = props.pagination\n ? {\n current: currentPageRef.value,\n pageSize: pageSizeRef.value,\n }\n : undefined\n const requestParams = paginationData\n ? {\n ...queryValues,\n [(props.paginationMap.current ?? defaultPaginationRequestMapping.current)]: paginationData.current,\n [(props.paginationMap.pageSize ?? defaultPaginationRequestMapping.pageSize)]: paginationData.pageSize,\n }\n : queryValues\n\n field.loading = true\n try {\n const result = await props.request(requestParams)\n\n if (requestId !== currentRequestId.value)\n return\n\n if (result.success !== true) {\n emit('requestFailed', result)\n return\n }\n\n field.dataSource = result.data\n if (props.clearOnDataChange) {\n field.setValue?.(undefined)\n }\n totalRef.value = isNum(result.total) ? result.total : result.data.length\n\n emit('requestSuccess', {\n values: queryValues,\n pagination: paginationData,\n dataSource: result.data,\n total: totalRef.value,\n result,\n })\n }\n catch (error) {\n if (requestId !== currentRequestId.value)\n return\n emit('requestFailed', error)\n }\n finally {\n if (requestId === currentRequestId.value)\n field.loading = false\n }\n}\n\nasync function handleQuerySubmit() {\n if (props.pagination && currentPageRef.value !== 1) {\n currentPageRef.value = 1\n return\n }\n\n await executeRequest()\n}\n\nfunction handleQueryReset(event: MouseEvent) {\n const userOnClick = props.queryFormProps.resetProps?.onClick as ((event: MouseEvent) => void | boolean) | undefined\n const result = userOnClick?.(event)\n if (result === false)\n return false\n\n void handleQuerySubmit()\n\n return result\n}\n\nonMounted(() => {\n if (props.immediate)\n void executeRequest()\n})\n\nwatch([currentPageRef, pageSizeRef], ([currentPage, pageSize], [previousPage, previousPageSize]) => {\n /* istanbul ignore if -- @preserve defensive: watcher is retained when pagination is dynamically toggled off */\n if (!props.pagination)\n return\n\n const currentChanged = currentPage !== previousPage\n const pageSizeChanged = pageSize !== previousPageSize\n\n /* istanbul ignore if -- @preserve defensive: keep guard for unexpected duplicated watcher payload */\n if (!currentChanged && !pageSizeChanged)\n return\n\n if (pageSizeChanged && currentPage !== 1) {\n currentPageRef.value = 1\n return\n }\n\n void executeRequest()\n})\n</script>\n\n<template>\n <FormBaseItem\n v-bind=\"formItemProps\"\n :internal-form-item-class=\"formItemInternalClass\"\n >\n <div :class=\"prefixCls\">\n <component\n :is=\"props.mode === 'light' ? QueryForm.Light : QueryForm\"\n v-bind=\"queryFormBindings\"\n />\n <div :class=\"`${prefixCls}__content`\">\n <slot />\n </div>\n <ElPagination\n v-if=\"props.pagination\"\n v-model:current-page=\"currentPageRef\"\n v-model:page-size=\"pageSizeRef\"\n :class=\"`${prefixCls}__pagination`\"\n v-bind=\"paginationBindings\"\n :total=\"totalRef\"\n />\n </div>\n </FormBaseItem>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BA,MAAM,QAAQ;EAiCd,MAAM,OAAO;EAKb,MAAM,yBAAuD;GAC3D,aAAa;GACb,UAAU;GACV,WAAW;IAAC;IAAI;IAAI;IAAI;IAAI;GAC5B,QAAQ;GACR,MAAM;GACR;EACA,MAAM,kCAAwE;GAC5E,SAAS;GACT,UAAU;GACZ;EAEA,MAAM,WAAW,UAAgB;EACjC,MAAM,oBAAoB,YAAW;EACrC,MAAM,YAAY,GAAG,YAAY;EACjC,MAAM,wBAAwB,GAAG,YAAY;EAC7C,MAAM,EAAE,OAAO,kBAAkB,eAAc;EAE/C,MAAM,qBAAqB,eAAe;GACxC,MAAM,EACJ,aACA,UACA,GAAG,aACD;IACF,GAAG;IACH,GAAG,MAAM;IACX;AACA,UAAO;IACR;EAED,MAAM,iBAAiB,IAAI,MAAM,iBAAiB,eAAe,uBAAuB,YAAW;EACnG,MAAM,cAAc,IAAI,MAAM,iBAAiB,YAAY,uBAAuB,SAAQ;EAC1F,MAAM,WAAW,IAAI,EAAC;EACtB,MAAM,mBAAmB,IAAI,EAAC;EAE9B,MAAM,EAAE,YAAY,oBAAoB,iBAAiB;GACvD,WAAW,eAAe,MAAM,eAAe;GAC/C,cAAc;GACf,CAAA;EAED,MAAM,oBAAoB,eAAe;AACvC,UAAQ;IACN,GAAG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-item/types.js";
|
|
2
2
|
import { IQueryFormLightProps, IQueryFormProps } from "../query-form/types.js";
|
|
3
3
|
import { PaginationProps } from "element-plus";
|
|
4
|
-
import { Form } from "@formily/core";
|
|
5
|
-
import { ISchema } from "@formily/json-schema";
|
|
4
|
+
import { Form } from "@silver-formily/core";
|
|
5
|
+
import { ISchema } from "@silver-formily/json-schema";
|
|
6
6
|
|
|
7
7
|
//#region src/query-form-item/types.d.ts
|
|
8
8
|
type QueryFormItemMode = 'default' | 'light';
|
package/esm/radio/index.d.ts
CHANGED
|
@@ -4,10 +4,6 @@ import * as _$vue from "vue";
|
|
|
4
4
|
//#region src/radio/index.d.ts
|
|
5
5
|
declare const Radio: {
|
|
6
6
|
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<_$vue.ExtractPropTypes<{
|
|
7
|
-
modelValue: {
|
|
8
|
-
type: _$vue.PropType<string | number | boolean>;
|
|
9
|
-
default: undefined;
|
|
10
|
-
};
|
|
11
7
|
value: {
|
|
12
8
|
type: _$vue.PropType<string | number | boolean>;
|
|
13
9
|
default: undefined;
|
|
@@ -16,6 +12,10 @@ declare const Radio: {
|
|
|
16
12
|
type: _$vue.PropType<string>;
|
|
17
13
|
default: undefined;
|
|
18
14
|
};
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: _$vue.PropType<string | number | boolean>;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
19
|
disabled: {
|
|
20
20
|
type: _$vue.PropType<boolean>;
|
|
21
21
|
default: undefined;
|
|
@@ -23,14 +23,14 @@ declare const Radio: {
|
|
|
23
23
|
size: {
|
|
24
24
|
type: _$vue.PropType<"" | "default" | "small" | "large">;
|
|
25
25
|
};
|
|
26
|
-
border: {
|
|
27
|
-
type: _$vue.PropType<boolean>;
|
|
28
|
-
default: false;
|
|
29
|
-
};
|
|
30
26
|
label: {
|
|
31
27
|
type: _$vue.PropType<string | number | boolean>;
|
|
32
28
|
default: undefined;
|
|
33
29
|
};
|
|
30
|
+
border: {
|
|
31
|
+
type: _$vue.PropType<boolean>;
|
|
32
|
+
default: false;
|
|
33
|
+
};
|
|
34
34
|
}>> & {
|
|
35
35
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
36
36
|
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
@@ -52,10 +52,6 @@ declare const Radio: {
|
|
|
52
52
|
M: {};
|
|
53
53
|
Defaults: {};
|
|
54
54
|
}, Readonly<_$vue.ExtractPropTypes<{
|
|
55
|
-
modelValue: {
|
|
56
|
-
type: _$vue.PropType<string | number | boolean>;
|
|
57
|
-
default: undefined;
|
|
58
|
-
};
|
|
59
55
|
value: {
|
|
60
56
|
type: _$vue.PropType<string | number | boolean>;
|
|
61
57
|
default: undefined;
|
|
@@ -64,6 +60,10 @@ declare const Radio: {
|
|
|
64
60
|
type: _$vue.PropType<string>;
|
|
65
61
|
default: undefined;
|
|
66
62
|
};
|
|
63
|
+
modelValue: {
|
|
64
|
+
type: _$vue.PropType<string | number | boolean>;
|
|
65
|
+
default: undefined;
|
|
66
|
+
};
|
|
67
67
|
disabled: {
|
|
68
68
|
type: _$vue.PropType<boolean>;
|
|
69
69
|
default: undefined;
|
|
@@ -71,14 +71,14 @@ declare const Radio: {
|
|
|
71
71
|
size: {
|
|
72
72
|
type: _$vue.PropType<"" | "default" | "small" | "large">;
|
|
73
73
|
};
|
|
74
|
-
border: {
|
|
75
|
-
type: _$vue.PropType<boolean>;
|
|
76
|
-
default: false;
|
|
77
|
-
};
|
|
78
74
|
label: {
|
|
79
75
|
type: _$vue.PropType<string | number | boolean>;
|
|
80
76
|
default: undefined;
|
|
81
77
|
};
|
|
78
|
+
border: {
|
|
79
|
+
type: _$vue.PropType<boolean>;
|
|
80
|
+
default: false;
|
|
81
|
+
};
|
|
82
82
|
}>> & {
|
|
83
83
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
84
84
|
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
@@ -94,10 +94,6 @@ declare const Radio: {
|
|
|
94
94
|
__isTeleport?: never;
|
|
95
95
|
__isSuspense?: never;
|
|
96
96
|
} & _$vue.ComponentOptionsBase<Readonly<_$vue.ExtractPropTypes<{
|
|
97
|
-
modelValue: {
|
|
98
|
-
type: _$vue.PropType<string | number | boolean>;
|
|
99
|
-
default: undefined;
|
|
100
|
-
};
|
|
101
97
|
value: {
|
|
102
98
|
type: _$vue.PropType<string | number | boolean>;
|
|
103
99
|
default: undefined;
|
|
@@ -106,6 +102,10 @@ declare const Radio: {
|
|
|
106
102
|
type: _$vue.PropType<string>;
|
|
107
103
|
default: undefined;
|
|
108
104
|
};
|
|
105
|
+
modelValue: {
|
|
106
|
+
type: _$vue.PropType<string | number | boolean>;
|
|
107
|
+
default: undefined;
|
|
108
|
+
};
|
|
109
109
|
disabled: {
|
|
110
110
|
type: _$vue.PropType<boolean>;
|
|
111
111
|
default: undefined;
|
|
@@ -113,14 +113,14 @@ declare const Radio: {
|
|
|
113
113
|
size: {
|
|
114
114
|
type: _$vue.PropType<"" | "default" | "small" | "large">;
|
|
115
115
|
};
|
|
116
|
-
border: {
|
|
117
|
-
type: _$vue.PropType<boolean>;
|
|
118
|
-
default: false;
|
|
119
|
-
};
|
|
120
116
|
label: {
|
|
121
117
|
type: _$vue.PropType<string | number | boolean>;
|
|
122
118
|
default: undefined;
|
|
123
119
|
};
|
|
120
|
+
border: {
|
|
121
|
+
type: _$vue.PropType<boolean>;
|
|
122
|
+
default: false;
|
|
123
|
+
};
|
|
124
124
|
}>> & {
|
|
125
125
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
126
126
|
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
@@ -141,10 +141,6 @@ declare const Radio: {
|
|
|
141
141
|
}) & _$vue.ObjectPlugin & {
|
|
142
142
|
RadioButton: {
|
|
143
143
|
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<_$vue.ExtractPropTypes<{
|
|
144
|
-
modelValue: {
|
|
145
|
-
type: _$vue.PropType<string | number | boolean>;
|
|
146
|
-
default: undefined;
|
|
147
|
-
};
|
|
148
144
|
value: {
|
|
149
145
|
type: _$vue.PropType<string | number | boolean>;
|
|
150
146
|
default: undefined;
|
|
@@ -153,6 +149,10 @@ declare const Radio: {
|
|
|
153
149
|
type: _$vue.PropType<string>;
|
|
154
150
|
default: undefined;
|
|
155
151
|
};
|
|
152
|
+
modelValue: {
|
|
153
|
+
type: _$vue.PropType<string | number | boolean>;
|
|
154
|
+
default: undefined;
|
|
155
|
+
};
|
|
156
156
|
disabled: {
|
|
157
157
|
type: _$vue.PropType<boolean>;
|
|
158
158
|
default: undefined;
|
|
@@ -178,10 +178,6 @@ declare const Radio: {
|
|
|
178
178
|
M: {};
|
|
179
179
|
Defaults: {};
|
|
180
180
|
}, Readonly<_$vue.ExtractPropTypes<{
|
|
181
|
-
modelValue: {
|
|
182
|
-
type: _$vue.PropType<string | number | boolean>;
|
|
183
|
-
default: undefined;
|
|
184
|
-
};
|
|
185
181
|
value: {
|
|
186
182
|
type: _$vue.PropType<string | number | boolean>;
|
|
187
183
|
default: undefined;
|
|
@@ -190,6 +186,10 @@ declare const Radio: {
|
|
|
190
186
|
type: _$vue.PropType<string>;
|
|
191
187
|
default: undefined;
|
|
192
188
|
};
|
|
189
|
+
modelValue: {
|
|
190
|
+
type: _$vue.PropType<string | number | boolean>;
|
|
191
|
+
default: undefined;
|
|
192
|
+
};
|
|
193
193
|
disabled: {
|
|
194
194
|
type: _$vue.PropType<boolean>;
|
|
195
195
|
default: undefined;
|
|
@@ -212,10 +212,6 @@ declare const Radio: {
|
|
|
212
212
|
__isTeleport?: never;
|
|
213
213
|
__isSuspense?: never;
|
|
214
214
|
} & _$vue.ComponentOptionsBase<Readonly<_$vue.ExtractPropTypes<{
|
|
215
|
-
modelValue: {
|
|
216
|
-
type: _$vue.PropType<string | number | boolean>;
|
|
217
|
-
default: undefined;
|
|
218
|
-
};
|
|
219
215
|
value: {
|
|
220
216
|
type: _$vue.PropType<string | number | boolean>;
|
|
221
217
|
default: undefined;
|
|
@@ -224,6 +220,10 @@ declare const Radio: {
|
|
|
224
220
|
type: _$vue.PropType<string>;
|
|
225
221
|
default: undefined;
|
|
226
222
|
};
|
|
223
|
+
modelValue: {
|
|
224
|
+
type: _$vue.PropType<string | number | boolean>;
|
|
225
|
+
default: undefined;
|
|
226
|
+
};
|
|
227
227
|
disabled: {
|
|
228
228
|
type: _$vue.PropType<boolean>;
|
|
229
229
|
default: undefined;
|
|
@@ -248,9 +248,9 @@ declare const Radio: {
|
|
|
248
248
|
});
|
|
249
249
|
RadioGroup: {
|
|
250
250
|
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<_$vue.ExtractPropTypes<{
|
|
251
|
-
|
|
252
|
-
type: _$vue.PropType<string
|
|
253
|
-
default:
|
|
251
|
+
fill: {
|
|
252
|
+
type: _$vue.PropType<string>;
|
|
253
|
+
default: "";
|
|
254
254
|
};
|
|
255
255
|
props: {
|
|
256
256
|
type: _$vue.PropType<_$element_plus0.radioOptionProp>;
|
|
@@ -264,9 +264,9 @@ declare const Radio: {
|
|
|
264
264
|
type: _$vue.PropType<string>;
|
|
265
265
|
default: undefined;
|
|
266
266
|
};
|
|
267
|
-
|
|
268
|
-
type: _$vue.PropType<string>;
|
|
269
|
-
default:
|
|
267
|
+
modelValue: {
|
|
268
|
+
type: _$vue.PropType<string | number | boolean>;
|
|
269
|
+
default: undefined;
|
|
270
270
|
};
|
|
271
271
|
disabled: {
|
|
272
272
|
type: _$vue.PropType<boolean>;
|
|
@@ -278,10 +278,6 @@ declare const Radio: {
|
|
|
278
278
|
options: {
|
|
279
279
|
type: _$vue.PropType<_$element_plus0.radioOption[]>;
|
|
280
280
|
};
|
|
281
|
-
validateEvent: {
|
|
282
|
-
type: _$vue.PropType<boolean>;
|
|
283
|
-
default: true;
|
|
284
|
-
};
|
|
285
281
|
ariaLabel: {
|
|
286
282
|
type: _$vue.PropType<string>;
|
|
287
283
|
};
|
|
@@ -289,6 +285,10 @@ declare const Radio: {
|
|
|
289
285
|
type: _$vue.PropType<string>;
|
|
290
286
|
default: undefined;
|
|
291
287
|
};
|
|
288
|
+
validateEvent: {
|
|
289
|
+
type: _$vue.PropType<boolean>;
|
|
290
|
+
default: true;
|
|
291
|
+
};
|
|
292
292
|
textColor: {
|
|
293
293
|
type: _$vue.PropType<string>;
|
|
294
294
|
default: "";
|
|
@@ -317,9 +317,9 @@ declare const Radio: {
|
|
|
317
317
|
M: {};
|
|
318
318
|
Defaults: {};
|
|
319
319
|
}, Readonly<_$vue.ExtractPropTypes<{
|
|
320
|
-
|
|
321
|
-
type: _$vue.PropType<string
|
|
322
|
-
default:
|
|
320
|
+
fill: {
|
|
321
|
+
type: _$vue.PropType<string>;
|
|
322
|
+
default: "";
|
|
323
323
|
};
|
|
324
324
|
props: {
|
|
325
325
|
type: _$vue.PropType<_$element_plus0.radioOptionProp>;
|
|
@@ -333,9 +333,9 @@ declare const Radio: {
|
|
|
333
333
|
type: _$vue.PropType<string>;
|
|
334
334
|
default: undefined;
|
|
335
335
|
};
|
|
336
|
-
|
|
337
|
-
type: _$vue.PropType<string>;
|
|
338
|
-
default:
|
|
336
|
+
modelValue: {
|
|
337
|
+
type: _$vue.PropType<string | number | boolean>;
|
|
338
|
+
default: undefined;
|
|
339
339
|
};
|
|
340
340
|
disabled: {
|
|
341
341
|
type: _$vue.PropType<boolean>;
|
|
@@ -347,10 +347,6 @@ declare const Radio: {
|
|
|
347
347
|
options: {
|
|
348
348
|
type: _$vue.PropType<_$element_plus0.radioOption[]>;
|
|
349
349
|
};
|
|
350
|
-
validateEvent: {
|
|
351
|
-
type: _$vue.PropType<boolean>;
|
|
352
|
-
default: true;
|
|
353
|
-
};
|
|
354
350
|
ariaLabel: {
|
|
355
351
|
type: _$vue.PropType<string>;
|
|
356
352
|
};
|
|
@@ -358,6 +354,10 @@ declare const Radio: {
|
|
|
358
354
|
type: _$vue.PropType<string>;
|
|
359
355
|
default: undefined;
|
|
360
356
|
};
|
|
357
|
+
validateEvent: {
|
|
358
|
+
type: _$vue.PropType<boolean>;
|
|
359
|
+
default: true;
|
|
360
|
+
};
|
|
361
361
|
textColor: {
|
|
362
362
|
type: _$vue.PropType<string>;
|
|
363
363
|
default: "";
|
|
@@ -380,9 +380,9 @@ declare const Radio: {
|
|
|
380
380
|
__isTeleport?: never;
|
|
381
381
|
__isSuspense?: never;
|
|
382
382
|
} & _$vue.ComponentOptionsBase<Readonly<_$vue.ExtractPropTypes<{
|
|
383
|
-
|
|
384
|
-
type: _$vue.PropType<string
|
|
385
|
-
default:
|
|
383
|
+
fill: {
|
|
384
|
+
type: _$vue.PropType<string>;
|
|
385
|
+
default: "";
|
|
386
386
|
};
|
|
387
387
|
props: {
|
|
388
388
|
type: _$vue.PropType<_$element_plus0.radioOptionProp>;
|
|
@@ -396,9 +396,9 @@ declare const Radio: {
|
|
|
396
396
|
type: _$vue.PropType<string>;
|
|
397
397
|
default: undefined;
|
|
398
398
|
};
|
|
399
|
-
|
|
400
|
-
type: _$vue.PropType<string>;
|
|
401
|
-
default:
|
|
399
|
+
modelValue: {
|
|
400
|
+
type: _$vue.PropType<string | number | boolean>;
|
|
401
|
+
default: undefined;
|
|
402
402
|
};
|
|
403
403
|
disabled: {
|
|
404
404
|
type: _$vue.PropType<boolean>;
|
|
@@ -410,10 +410,6 @@ declare const Radio: {
|
|
|
410
410
|
options: {
|
|
411
411
|
type: _$vue.PropType<_$element_plus0.radioOption[]>;
|
|
412
412
|
};
|
|
413
|
-
validateEvent: {
|
|
414
|
-
type: _$vue.PropType<boolean>;
|
|
415
|
-
default: true;
|
|
416
|
-
};
|
|
417
413
|
ariaLabel: {
|
|
418
414
|
type: _$vue.PropType<string>;
|
|
419
415
|
};
|
|
@@ -421,6 +417,10 @@ declare const Radio: {
|
|
|
421
417
|
type: _$vue.PropType<string>;
|
|
422
418
|
default: undefined;
|
|
423
419
|
};
|
|
420
|
+
validateEvent: {
|
|
421
|
+
type: _$vue.PropType<boolean>;
|
|
422
|
+
default: true;
|
|
423
|
+
};
|
|
424
424
|
textColor: {
|
|
425
425
|
type: _$vue.PropType<string>;
|
|
426
426
|
default: "";
|
|
@@ -447,61 +447,7 @@ declare const Radio: {
|
|
|
447
447
|
};
|
|
448
448
|
});
|
|
449
449
|
} & {
|
|
450
|
-
Group:
|
|
451
|
-
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<_$vue.ExtractPropTypes<{
|
|
452
|
-
options: {
|
|
453
|
-
type: _$vue.PropType<Array<_$element_plus0.RadioProps | string | number>>;
|
|
454
|
-
default: () => any[];
|
|
455
|
-
};
|
|
456
|
-
optionType: {
|
|
457
|
-
type: _$vue.PropType<"default" | "button">;
|
|
458
|
-
default: string;
|
|
459
|
-
};
|
|
460
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, _$vue.PublicProps, {
|
|
461
|
-
options: (string | number | _$element_plus0.RadioProps)[];
|
|
462
|
-
optionType: "default" | "button";
|
|
463
|
-
}, true, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
|
464
|
-
P: {};
|
|
465
|
-
B: {};
|
|
466
|
-
D: {};
|
|
467
|
-
C: {};
|
|
468
|
-
M: {};
|
|
469
|
-
Defaults: {};
|
|
470
|
-
}, Readonly<_$vue.ExtractPropTypes<{
|
|
471
|
-
options: {
|
|
472
|
-
type: _$vue.PropType<Array<_$element_plus0.RadioProps | string | number>>;
|
|
473
|
-
default: () => any[];
|
|
474
|
-
};
|
|
475
|
-
optionType: {
|
|
476
|
-
type: _$vue.PropType<"default" | "button">;
|
|
477
|
-
default: string;
|
|
478
|
-
};
|
|
479
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
480
|
-
options: (string | number | _$element_plus0.RadioProps)[];
|
|
481
|
-
optionType: "default" | "button";
|
|
482
|
-
}>;
|
|
483
|
-
__isFragment?: never;
|
|
484
|
-
__isTeleport?: never;
|
|
485
|
-
__isSuspense?: never;
|
|
486
|
-
} & _$vue.ComponentOptionsBase<Readonly<_$vue.ExtractPropTypes<{
|
|
487
|
-
options: {
|
|
488
|
-
type: _$vue.PropType<Array<_$element_plus0.RadioProps | string | number>>;
|
|
489
|
-
default: () => any[];
|
|
490
|
-
};
|
|
491
|
-
optionType: {
|
|
492
|
-
type: _$vue.PropType<"default" | "button">;
|
|
493
|
-
default: string;
|
|
494
|
-
};
|
|
495
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, {
|
|
496
|
-
options: (string | number | _$element_plus0.RadioProps)[];
|
|
497
|
-
optionType: "default" | "button";
|
|
498
|
-
}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
|
|
499
|
-
$slots: {
|
|
500
|
-
option?: (props: {
|
|
501
|
-
option: _$element_plus0.RadioProps;
|
|
502
|
-
}) => any;
|
|
503
|
-
};
|
|
504
|
-
});
|
|
450
|
+
Group: any;
|
|
505
451
|
};
|
|
506
452
|
//#endregion
|
|
507
453
|
export { Radio };
|
|
@@ -2,7 +2,7 @@ import { lt } from "../__builtins__/shared/simple-version-compare.mjs";
|
|
|
2
2
|
import { useCleanAttrs } from "../__builtins__/shared/utils.mjs";
|
|
3
3
|
import { ElRadio, ElRadioButton, ElRadioGroup, version } from "element-plus";
|
|
4
4
|
import { Fragment, computed, createBlock, createElementBlock, createTextVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useSlots, withCtx } from "vue";
|
|
5
|
-
import { isPlainObj } from "@formily/shared";
|
|
5
|
+
import { isPlainObj } from "@silver-formily/shared";
|
|
6
6
|
//#region src/radio/radio-group.vue
|
|
7
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
name: "FRadioGroup",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.mjs","names":[],"sources":["../../src/radio/radio-group.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { RadioProps } from 'element-plus'\nimport type { PropType } from 'vue'\nimport { isPlainObj } from '@formily/shared'\nimport { ElRadio, ElRadioButton, ElRadioGroup, version } from 'element-plus'\nimport { computed, useSlots } from 'vue'\nimport { lt, useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FRadioGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n options: {\n type: Array as PropType<Array<RadioProps | string | number>>,\n default: () => [],\n },\n optionType: {\n type: String as PropType<'default' | 'button'>,\n default: 'default',\n },\n})\n\nconst { props: radioProps } = useCleanAttrs()\nconst normalizedOptions = computed(() => Array.isArray(props.options) ? props.options : [])\n\nconst OptionType = computed(() => {\n return props.optionType === 'button' ? ElRadioButton : ElRadio\n})\nconst IS_LESS_THAN_2_6_0 = lt(version, '2.6.0')\n\nfunction isRadioPropsObject(option: any): option is RadioProps {\n return isPlainObj(option)\n}\n\nfunction getOptionLabel(option: any, index: number) {\n if (isRadioPropsObject(normalizedOptions.value[index])) {\n return normalizedOptions.value[index].label\n }\n return option.label\n}\n\nconst compatiableProps = computed(() => {\n return normalizedOptions.value.map((option) => {\n if (!isRadioPropsObject(option)) {\n return {\n label: option,\n value: option,\n }\n }\n /* istanbul ignore if -- @preserve */\n if (IS_LESS_THAN_2_6_0) {\n return {\n ...option,\n label: option.value,\n }\n }\n return option\n })\n})\n\nconst slots = useSlots()\n</script>\n\n<template>\n <ElRadioGroup v-bind=\"radioProps\">\n <template v-if=\"!slots.option\">\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\n {{ getOptionLabel(option, index) }}\n </component>\n </template>\n <template v-else>\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\n <slot name=\"option\" :option=\"option\" />\n </component>\n </template>\n </ElRadioGroup>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAaA,MAAM,QAAQ;EAWd,MAAM,EAAE,OAAO,eAAe,eAAc;EAC5C,MAAM,oBAAoB,eAAe,MAAM,QAAQ,MAAM,QAAQ,GAAG,MAAM,UAAU,EAAE,CAAA;EAE1F,MAAM,aAAa,eAAe;AAChC,UAAO,MAAM,eAAe,WAAW,gBAAgB;IACxD;EACD,MAAM,qBAAqB,GAAG,SAAS,QAAO;EAE9C,SAAS,mBAAmB,QAAmC;AAC7D,UAAO,WAAW,OAAM;;EAG1B,SAAS,eAAe,QAAa,OAAe;AAClD,OAAI,mBAAmB,kBAAkB,MAAM,OAAO,CACpD,QAAO,kBAAkB,MAAM,OAAO;AAExC,UAAO,OAAO;;EAGhB,MAAM,mBAAmB,eAAe;AACtC,UAAO,kBAAkB,MAAM,KAAK,WAAW;AAC7C,QAAI,CAAC,mBAAmB,OAAO,CAC7B,QAAO;KACL,OAAO;KACP,OAAO;KACT;;AAGF,QAAI,mBACF,QAAO;KACL,GAAG;KACH,OAAO,OAAO;KAChB;AAEF,WAAO;KACR;IACF;EAED,MAAM,QAAQ,UAAS;;uBAIrB,YAWe,MAAA,aAAA,EAAA,eAAA,mBAXO,MAAA,WAAU,CAAA,CAAA,EAAA;2BAKnB,CAAA,CAJM,MAAA,MAAK,CAAC,UAAA,UAAA,KAAA,EACrB,mBAEY,UAAA,EAAA,KAAA,GAAA,EAAA,WAF0C,iBAAA,QAAlB,QAAQ,UAAK;yBAAjD,YAEY,wBAFI,WAAA,MAAU,EAA1B,WAEY,EAF6D,KAAK,OAAK,EAAA,EAAA,SAAA,MAAA,EAAU,OAAM,EAAA;6BAC9D,CAAA,gBAAA,gBAAhC,eAAe,QAAQ,MAAK,CAAA,EAAA,EAAA,CAAA,CAAA;;;kCAIjC,mBAEY,UAAA,EAAA,KAAA,GAAA,EAAA,WAF0C,iBAAA,QAAlB,QAAQ,UAAK;yBAAjD,YAEY,wBAFI,WAAA,MAAU,EAA1B,WAEY,EAF6D,KAAK,OAAK,EAAA,EAAA,SAAA,MAAA,EAAU,OAAM,EAAA;6BAC1D,CAAvC,WAAuC,KAAA,QAAA,UAAA,EAAV,QAAM,CAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"radio-group.mjs","names":[],"sources":["../../src/radio/radio-group.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { RadioProps } from 'element-plus'\nimport type { PropType } from 'vue'\nimport { isPlainObj } from '@silver-formily/shared'\nimport { ElRadio, ElRadioButton, ElRadioGroup, version } from 'element-plus'\nimport { computed, useSlots } from 'vue'\nimport { lt, useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FRadioGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n options: {\n type: Array as PropType<Array<RadioProps | string | number>>,\n default: () => [],\n },\n optionType: {\n type: String as PropType<'default' | 'button'>,\n default: 'default',\n },\n})\n\nconst { props: radioProps } = useCleanAttrs()\nconst normalizedOptions = computed(() => Array.isArray(props.options) ? props.options : [])\n\nconst OptionType = computed(() => {\n return props.optionType === 'button' ? ElRadioButton : ElRadio\n})\nconst IS_LESS_THAN_2_6_0 = lt(version, '2.6.0')\n\nfunction isRadioPropsObject(option: any): option is RadioProps {\n return isPlainObj(option)\n}\n\nfunction getOptionLabel(option: any, index: number) {\n if (isRadioPropsObject(normalizedOptions.value[index])) {\n return normalizedOptions.value[index].label\n }\n return option.label\n}\n\nconst compatiableProps = computed(() => {\n return normalizedOptions.value.map((option) => {\n if (!isRadioPropsObject(option)) {\n return {\n label: option,\n value: option,\n }\n }\n /* istanbul ignore if -- @preserve */\n if (IS_LESS_THAN_2_6_0) {\n return {\n ...option,\n label: option.value,\n }\n }\n return option\n })\n})\n\nconst slots = useSlots()\n</script>\n\n<template>\n <ElRadioGroup v-bind=\"radioProps\">\n <template v-if=\"!slots.option\">\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\n {{ getOptionLabel(option, index) }}\n </component>\n </template>\n <template v-else>\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\n <slot name=\"option\" :option=\"option\" />\n </component>\n </template>\n </ElRadioGroup>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAaA,MAAM,QAAQ;EAWd,MAAM,EAAE,OAAO,eAAe,eAAc;EAC5C,MAAM,oBAAoB,eAAe,MAAM,QAAQ,MAAM,QAAQ,GAAG,MAAM,UAAU,EAAE,CAAA;EAE1F,MAAM,aAAa,eAAe;AAChC,UAAO,MAAM,eAAe,WAAW,gBAAgB;IACxD;EACD,MAAM,qBAAqB,GAAG,SAAS,QAAO;EAE9C,SAAS,mBAAmB,QAAmC;AAC7D,UAAO,WAAW,OAAM;;EAG1B,SAAS,eAAe,QAAa,OAAe;AAClD,OAAI,mBAAmB,kBAAkB,MAAM,OAAO,CACpD,QAAO,kBAAkB,MAAM,OAAO;AAExC,UAAO,OAAO;;EAGhB,MAAM,mBAAmB,eAAe;AACtC,UAAO,kBAAkB,MAAM,KAAK,WAAW;AAC7C,QAAI,CAAC,mBAAmB,OAAO,CAC7B,QAAO;KACL,OAAO;KACP,OAAO;KACT;;AAGF,QAAI,mBACF,QAAO;KACL,GAAG;KACH,OAAO,OAAO;KAChB;AAEF,WAAO;KACR;IACF;EAED,MAAM,QAAQ,UAAS;;uBAIrB,YAWe,MAAA,aAAA,EAAA,eAAA,mBAXO,MAAA,WAAU,CAAA,CAAA,EAAA;2BAKnB,CAAA,CAJM,MAAA,MAAK,CAAC,UAAA,UAAA,KAAA,EACrB,mBAEY,UAAA,EAAA,KAAA,GAAA,EAAA,WAF0C,iBAAA,QAAlB,QAAQ,UAAK;yBAAjD,YAEY,wBAFI,WAAA,MAAU,EAA1B,WAEY,EAF6D,KAAK,OAAK,EAAA,EAAA,SAAA,MAAA,EAAU,OAAM,EAAA;6BAC9D,CAAA,gBAAA,gBAAhC,eAAe,QAAQ,MAAK,CAAA,EAAA,EAAA,CAAA,CAAA;;;kCAIjC,mBAEY,UAAA,EAAA,KAAA,GAAA,EAAA,WAF0C,iBAAA,QAAlB,QAAQ,UAAK;yBAAjD,YAEY,wBAFI,WAAA,MAAU,EAA1B,WAEY,EAF6D,KAAK,OAAK,EAAA,EAAA,SAAA,MAAA,EAAU,OAAM,EAAA;6BAC1D,CAAvC,WAAuC,KAAA,QAAA,UAAA,EAAV,QAAM,CAAA,CAAA,CAAA"}
|
package/esm/rate/index.d.ts
CHANGED
|
@@ -1,193 +1,8 @@
|
|
|
1
1
|
import { ElRate } from "element-plus";
|
|
2
|
-
import * as _$vue from "vue";
|
|
3
|
-
import * as _$element_plus_es_utils_index_mjs0 from "element-plus/es/utils/index.mjs";
|
|
4
2
|
|
|
5
3
|
//#region src/rate/index.d.ts
|
|
6
4
|
type RateProps = typeof ElRate;
|
|
7
|
-
declare const Rate:
|
|
8
|
-
modelValue: {
|
|
9
|
-
type: _$vue.PropType<number>;
|
|
10
|
-
default: number;
|
|
11
|
-
};
|
|
12
|
-
disabled: {
|
|
13
|
-
type: _$vue.PropType<boolean>;
|
|
14
|
-
default: undefined;
|
|
15
|
-
};
|
|
16
|
-
size: {
|
|
17
|
-
type: _$vue.PropType<"" | "default" | "small" | "large">;
|
|
18
|
-
};
|
|
19
|
-
clearable: {
|
|
20
|
-
type: _$vue.PropType<boolean>;
|
|
21
|
-
};
|
|
22
|
-
ariaLabel: {
|
|
23
|
-
type: _$vue.PropType<string>;
|
|
24
|
-
};
|
|
25
|
-
id: {
|
|
26
|
-
type: _$vue.PropType<string>;
|
|
27
|
-
default: undefined;
|
|
28
|
-
};
|
|
29
|
-
max: {
|
|
30
|
-
type: _$vue.PropType<number>;
|
|
31
|
-
default: number;
|
|
32
|
-
};
|
|
33
|
-
textColor: {
|
|
34
|
-
type: _$vue.PropType<string>;
|
|
35
|
-
default: string;
|
|
36
|
-
};
|
|
37
|
-
lowThreshold: {
|
|
38
|
-
type: _$vue.PropType<number>;
|
|
39
|
-
default: number;
|
|
40
|
-
};
|
|
41
|
-
highThreshold: {
|
|
42
|
-
type: _$vue.PropType<number>;
|
|
43
|
-
default: number;
|
|
44
|
-
};
|
|
45
|
-
colors: {
|
|
46
|
-
type: _$vue.PropType<string[] | Record<number, string>>;
|
|
47
|
-
default: () => string[];
|
|
48
|
-
};
|
|
49
|
-
voidColor: {
|
|
50
|
-
type: _$vue.PropType<string>;
|
|
51
|
-
default: string;
|
|
52
|
-
};
|
|
53
|
-
disabledVoidColor: {
|
|
54
|
-
type: _$vue.PropType<string>;
|
|
55
|
-
default: string;
|
|
56
|
-
};
|
|
57
|
-
icons: {
|
|
58
|
-
type: _$vue.PropType<(string | _$vue.Component)[] | Record<number, string | _$vue.Component>>;
|
|
59
|
-
default: () => any[];
|
|
60
|
-
};
|
|
61
|
-
voidIcon: {
|
|
62
|
-
type: _$vue.PropType<string | _$vue.Component>;
|
|
63
|
-
default: () => any;
|
|
64
|
-
};
|
|
65
|
-
disabledVoidIcon: {
|
|
66
|
-
type: _$vue.PropType<string | _$vue.Component>;
|
|
67
|
-
default: () => any;
|
|
68
|
-
};
|
|
69
|
-
allowHalf: {
|
|
70
|
-
type: _$vue.PropType<boolean>;
|
|
71
|
-
};
|
|
72
|
-
showText: {
|
|
73
|
-
type: _$vue.PropType<boolean>;
|
|
74
|
-
};
|
|
75
|
-
showScore: {
|
|
76
|
-
type: _$vue.PropType<boolean>;
|
|
77
|
-
};
|
|
78
|
-
texts: {
|
|
79
|
-
type: _$vue.PropType<string[]>;
|
|
80
|
-
default: () => string[];
|
|
81
|
-
};
|
|
82
|
-
scoreTemplate: {
|
|
83
|
-
type: _$vue.PropType<string>;
|
|
84
|
-
default: string;
|
|
85
|
-
};
|
|
86
|
-
}, {
|
|
87
|
-
setCurrentValue: (value: number, event?: MouseEvent) => void;
|
|
88
|
-
resetCurrentValue: () => void;
|
|
89
|
-
}, unknown, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
90
|
-
"update:modelValue": (value: number) => void;
|
|
91
|
-
change: (value: number) => void;
|
|
92
|
-
}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
|
|
93
|
-
modelValue: {
|
|
94
|
-
type: _$vue.PropType<number>;
|
|
95
|
-
default: number;
|
|
96
|
-
};
|
|
97
|
-
disabled: {
|
|
98
|
-
type: _$vue.PropType<boolean>;
|
|
99
|
-
default: undefined;
|
|
100
|
-
};
|
|
101
|
-
size: {
|
|
102
|
-
type: _$vue.PropType<"" | "default" | "small" | "large">;
|
|
103
|
-
};
|
|
104
|
-
clearable: {
|
|
105
|
-
type: _$vue.PropType<boolean>;
|
|
106
|
-
};
|
|
107
|
-
ariaLabel: {
|
|
108
|
-
type: _$vue.PropType<string>;
|
|
109
|
-
};
|
|
110
|
-
id: {
|
|
111
|
-
type: _$vue.PropType<string>;
|
|
112
|
-
default: undefined;
|
|
113
|
-
};
|
|
114
|
-
max: {
|
|
115
|
-
type: _$vue.PropType<number>;
|
|
116
|
-
default: number;
|
|
117
|
-
};
|
|
118
|
-
textColor: {
|
|
119
|
-
type: _$vue.PropType<string>;
|
|
120
|
-
default: string;
|
|
121
|
-
};
|
|
122
|
-
lowThreshold: {
|
|
123
|
-
type: _$vue.PropType<number>;
|
|
124
|
-
default: number;
|
|
125
|
-
};
|
|
126
|
-
highThreshold: {
|
|
127
|
-
type: _$vue.PropType<number>;
|
|
128
|
-
default: number;
|
|
129
|
-
};
|
|
130
|
-
colors: {
|
|
131
|
-
type: _$vue.PropType<string[] | Record<number, string>>;
|
|
132
|
-
default: () => string[];
|
|
133
|
-
};
|
|
134
|
-
voidColor: {
|
|
135
|
-
type: _$vue.PropType<string>;
|
|
136
|
-
default: string;
|
|
137
|
-
};
|
|
138
|
-
disabledVoidColor: {
|
|
139
|
-
type: _$vue.PropType<string>;
|
|
140
|
-
default: string;
|
|
141
|
-
};
|
|
142
|
-
icons: {
|
|
143
|
-
type: _$vue.PropType<(string | _$vue.Component)[] | Record<number, string | _$vue.Component>>;
|
|
144
|
-
default: () => any[];
|
|
145
|
-
};
|
|
146
|
-
voidIcon: {
|
|
147
|
-
type: _$vue.PropType<string | _$vue.Component>;
|
|
148
|
-
default: () => any;
|
|
149
|
-
};
|
|
150
|
-
disabledVoidIcon: {
|
|
151
|
-
type: _$vue.PropType<string | _$vue.Component>;
|
|
152
|
-
default: () => any;
|
|
153
|
-
};
|
|
154
|
-
allowHalf: {
|
|
155
|
-
type: _$vue.PropType<boolean>;
|
|
156
|
-
};
|
|
157
|
-
showText: {
|
|
158
|
-
type: _$vue.PropType<boolean>;
|
|
159
|
-
};
|
|
160
|
-
showScore: {
|
|
161
|
-
type: _$vue.PropType<boolean>;
|
|
162
|
-
};
|
|
163
|
-
texts: {
|
|
164
|
-
type: _$vue.PropType<string[]>;
|
|
165
|
-
default: () => string[];
|
|
166
|
-
};
|
|
167
|
-
scoreTemplate: {
|
|
168
|
-
type: _$vue.PropType<string>;
|
|
169
|
-
default: string;
|
|
170
|
-
};
|
|
171
|
-
}>> & {
|
|
172
|
-
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
173
|
-
onChange?: ((value: number) => any) | undefined;
|
|
174
|
-
}, {
|
|
175
|
-
disabled: boolean;
|
|
176
|
-
id: string;
|
|
177
|
-
modelValue: number;
|
|
178
|
-
max: number;
|
|
179
|
-
textColor: string;
|
|
180
|
-
colors: string[] | Record<number, string>;
|
|
181
|
-
lowThreshold: number;
|
|
182
|
-
highThreshold: number;
|
|
183
|
-
voidColor: string;
|
|
184
|
-
disabledVoidColor: string;
|
|
185
|
-
icons: Array<string | _$vue.Component> | Record<number, string | _$vue.Component>;
|
|
186
|
-
voidIcon: string | _$vue.Component;
|
|
187
|
-
disabledVoidIcon: string | _$vue.Component;
|
|
188
|
-
texts: string[];
|
|
189
|
-
scoreTemplate: string;
|
|
190
|
-
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>>;
|
|
5
|
+
declare const Rate: any;
|
|
191
6
|
//#endregion
|
|
192
7
|
export { Rate, RateProps };
|
|
193
8
|
//# sourceMappingURL=index.d.ts.map
|