| | |
| | | </ScrollContainer> |
| | | <DrawerFooter v-bind="getProps" @close="onClose" @ok="handleOk" :height="getFooterHeight"> |
| | | <template #[item]="data" v-for="item in Object.keys($slots)"> |
| | | <slot :name="item" v-bind="data"></slot> |
| | | <slot :name="item" v-bind="data || {}"></slot> |
| | | </template> |
| | | </DrawerFooter> |
| | | </Drawer> |
| | |
| | | defineComponent, |
| | | ref, |
| | | computed, |
| | | watchEffect, |
| | | watch, |
| | | unref, |
| | | nextTick, |
| | |
| | | opt.width = '100%'; |
| | | } |
| | | const detailCls = `${prefixCls}__detail`; |
| | | opt.wrapClassName = wrapClassName ? `${wrapClassName} ${detailCls}` : detailCls; |
| | | opt.class = wrapClassName ? `${wrapClassName} ${detailCls}` : detailCls; |
| | | |
| | | if (!getContainer) { |
| | | // TODO type error? |
| | |
| | | return !!unref(getProps)?.loading; |
| | | }); |
| | | |
| | | watchEffect(() => { |
| | | visibleRef.value = props.visible; |
| | | }); |
| | | watch( |
| | | () => props.visible, |
| | | (newVal, oldVal) => { |
| | | if (newVal !== oldVal) visibleRef.value = newVal; |
| | | }, |
| | | { deep: true }, |
| | | ); |
| | | |
| | | watch( |
| | | () => visibleRef.value, |
| | |
| | | emit('visible-change', visible); |
| | | instance && drawerInstance.emitVisible?.(visible, instance.uid); |
| | | }); |
| | | } |
| | | }, |
| | | ); |
| | | |
| | | // Cancel event |
| | |
| | | onClose, |
| | | t, |
| | | prefixCls, |
| | | getMergeProps, |
| | | getMergeProps: getMergeProps as any, |
| | | getScrollContentStyle, |
| | | getProps, |
| | | getProps: getProps as any, |
| | | getLoading, |
| | | getBindValues, |
| | | getFooterHeight, |