You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
803 B
24 lines
803 B
import { VxeUI } from '@vxe-ui/core';
|
|
import VxeWatermarkComponent from './src/watermark';
|
|
import { checkDynamic, dynamicStore, dynamicApp } from '../dynamics';
|
|
export const VxeWatermark = Object.assign({}, VxeWatermarkComponent, {
|
|
install(app) {
|
|
app.component(VxeWatermarkComponent.name, VxeWatermarkComponent);
|
|
}
|
|
});
|
|
dynamicApp.use(VxeWatermark);
|
|
VxeUI.component(VxeWatermarkComponent);
|
|
export const WatermarkController = {
|
|
load(options) {
|
|
checkDynamic();
|
|
dynamicStore.globalWatermark = Object.assign({}, options);
|
|
return Promise.resolve();
|
|
},
|
|
clear() {
|
|
dynamicStore.globalWatermark = null;
|
|
return Promise.resolve();
|
|
}
|
|
};
|
|
VxeUI.watermark = WatermarkController;
|
|
export const Watermark = VxeWatermark;
|
|
export default VxeWatermark;
|
|
|