mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 19:29:04 +08:00
refactor: refactor layout
This commit is contained in:
@@ -219,11 +219,7 @@ export default defineComponent({
|
||||
emit('register', modalMethods, uuid);
|
||||
|
||||
return () => (
|
||||
<Modal
|
||||
onCancel={handleCancel}
|
||||
getContainer={() => document.querySelector('.default-layout__main')}
|
||||
{...{ ...attrs, ...props, ...unref(getProps) }}
|
||||
>
|
||||
<Modal onCancel={handleCancel} {...{ ...attrs, ...props, ...unref(getProps) }}>
|
||||
{{
|
||||
footer: () => renderFooter(),
|
||||
closeIcon: () => renderClose(),
|
||||
|
@@ -33,6 +33,7 @@ export function useModal(): UseModalReturnType {
|
||||
|
||||
modalRef.value = modalMethod;
|
||||
}
|
||||
|
||||
const getInstance = () => {
|
||||
const instance = unref(modalRef);
|
||||
if (!instance) {
|
||||
@@ -50,6 +51,7 @@ export function useModal(): UseModalReturnType {
|
||||
getInstance().setModalProps({
|
||||
visible: visible,
|
||||
});
|
||||
|
||||
if (data) {
|
||||
dataTransferRef[unref(uidRef)] = openOnSet
|
||||
? {
|
||||
|
Reference in New Issue
Block a user