yanzhen-design-vue
Version:
26 lines (25 loc) • 703 B
JavaScript
import { useAttrs, useSlots, computed, createVNode, mergeProps } from "vue";
import { Row } from "ant-design-vue";
import { pick } from "lodash-es";
import { useProxyProps, unref } from "@yanzhen-libs/utils-vue";
import { AntRowProps } from "./row.mjs";
function useRow(props, emit) {
const attrs = useAttrs();
const slots = useSlots();
const config = computed(() => pick(props, ...Object.keys(AntRowProps.props)));
const proxyProps = useProxyProps(config, AntRowProps.emits, {
emit,
filter: true
});
return [
{
proxyProps
},
(props2) => {
return createVNode(Row, mergeProps(unref(attrs), unref(proxyProps), props2), slots);
}
];
}
export {
useRow
};