chore: remove object spead (#8514)
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import { App } from 'vue';
|
||||
import { isObject, inBrowser, ComponentInstance, withInstall } from '../utils';
|
||||
import {
|
||||
extend,
|
||||
isObject,
|
||||
inBrowser,
|
||||
withInstall,
|
||||
ComponentInstance,
|
||||
} from '../utils';
|
||||
import { mountComponent, usePopupState } from '../utils/mount-component';
|
||||
import VanNotify, { NotifyType } from './Notify';
|
||||
|
||||
@@ -29,14 +35,7 @@ function initInstance() {
|
||||
({ instance } = mountComponent({
|
||||
setup() {
|
||||
const { state, toggle } = usePopupState();
|
||||
return () => (
|
||||
<VanNotify
|
||||
{...{
|
||||
...state,
|
||||
'onUpdate:show': toggle,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
return () => <VanNotify {...state} {...{ 'onUpdate:show': toggle }} />;
|
||||
},
|
||||
}));
|
||||
}
|
||||
@@ -50,10 +49,7 @@ function Notify(options: NotifyMessage | NotifyOptions) {
|
||||
initInstance();
|
||||
}
|
||||
|
||||
options = {
|
||||
...Notify.currentOptions,
|
||||
...parseOptions(options),
|
||||
};
|
||||
options = extend(Notify.currentOptions, parseOptions(options));
|
||||
|
||||
instance.open(options);
|
||||
clearTimeout(timer);
|
||||
|
||||
Reference in New Issue
Block a user