chore: remove object spead (#8514)

This commit is contained in:
neverland
2021-04-12 20:57:24 +08:00
committed by GitHub
parent 0b764b6347
commit 9deca34d1d
41 changed files with 204 additions and 241 deletions
+3 -6
View File
@@ -1,5 +1,5 @@
import { App, CSSProperties, TeleportProps } from 'vue';
import { ComponentInstance, inBrowser, withInstall } from '../utils';
import { ComponentInstance, extend, inBrowser, withInstall } from '../utils';
import { mountComponent, usePopupState } from '../utils/mount-component';
import { Interceptor } from '../utils/interceptor';
import { PopupCloseIconPosition } from '../popup';
@@ -63,8 +63,8 @@ function initInstance() {
return () => (
<VanImagePreview
{...state}
{...{
...state,
onClosed,
'onUpdate:show': toggle,
}}
@@ -89,10 +89,7 @@ const ImagePreview = (
const options = Array.isArray(images) ? { images, startPosition } : images;
instance.open({
...defaultConfig,
...options,
});
instance.open(extend({}, defaultConfig, options));
return instance;
};