UNPKG

sard-uniapp

Version:

sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库

17 lines (16 loc) 585 B
import { getAvailableImperative } from '../../use/useImperative'; import { defaultConfig } from '../config'; import { defaultCropImageProps } from '../crop-image/common'; export const defaultCropImageAgentProps = () => ({ ...defaultCropImageProps, ...defaultConfig.cropImageAgent, }); export const imperativeName = 'cropImage'; const cropImage = (options) => { const { id = defaultConfig.cropImageAgent.id } = options; const imperative = getAvailableImperative(imperativeName, id); if (imperative) { imperative.show(options); } }; export { cropImage };