chore: remove object spead (#8514)
This commit is contained in:
@@ -231,15 +231,13 @@ export default defineComponent({
|
||||
class={[bem(), props.className]}
|
||||
overlayClass={bem('overlay')}
|
||||
onClosed={onClosed}
|
||||
{...{
|
||||
...pick(props, [
|
||||
'show',
|
||||
'transition',
|
||||
'overlayStyle',
|
||||
'closeOnPopstate',
|
||||
]),
|
||||
'onUpdate:show': updateShow,
|
||||
}}
|
||||
{...pick(props, [
|
||||
'show',
|
||||
'transition',
|
||||
'overlayStyle',
|
||||
'closeOnPopstate',
|
||||
])}
|
||||
{...{ 'onUpdate:show': updateShow }}
|
||||
>
|
||||
{renderClose()}
|
||||
{renderImages()}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user