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.
27 lines
819 B
27 lines
819 B
import { VxeUI } from '@vxe-ui/core';
|
|
import VxeLoadingComponent from './src/loading';
|
|
import { dynamicApp, dynamicStore, checkDynamic } from '../dynamics';
|
|
export const VxeLoading = Object.assign({}, VxeLoadingComponent, {
|
|
install(app) {
|
|
app.component(VxeLoadingComponent.name, VxeLoadingComponent);
|
|
}
|
|
});
|
|
export const LoadingController = {
|
|
open(options) {
|
|
const opts = Object.assign({}, options);
|
|
dynamicStore.globalLoading = {
|
|
value: true,
|
|
text: opts.text,
|
|
icon: opts.icon
|
|
};
|
|
checkDynamic();
|
|
},
|
|
close() {
|
|
dynamicStore.globalLoading = null;
|
|
}
|
|
};
|
|
dynamicApp.use(VxeLoading);
|
|
VxeUI.component(VxeLoadingComponent);
|
|
VxeUI.loading = LoadingController;
|
|
export const Loading = VxeLoading;
|
|
export default VxeLoading;
|
|
|