UNPKG

press-ui

Version:

简单、易用的跨端组件库,兼容 Vue2 和 Vue3,同时支持 uni-app和普通 Vue 项目

27 lines (22 loc) 649 B
import { showFunctionalComponent } from '../common/functional-component/index'; // #ifdef H5 import { initH5Instance } from '../common/component-handler/h5-handler'; import PressImageView from './press-image-preview.vue'; // #endif const DIALOG_ID = 'pressImagePreview'; export function imagePreview(options) { let dialog; // #ifdef H5 if (!options.selector) { dialog = initH5Instance(PressImageView, DIALOG_ID); dialog.mode = 'functional'; } // #endif return showFunctionalComponent({ ...options, dialog, show: true, showFunction: 'showImagePreview', }); } export const imagePreviewHandler = imagePreview;