|
|
@@ -1,5 +1,5 @@
|
|
|
import BsModal from './Modal.vue';
|
|
|
-import {onBeforeMount, onMounted, reactive, toRaw} from 'vue';
|
|
|
+import { onBeforeMount, onMounted, reactive, toRaw } from 'vue';
|
|
|
import { set, get } from 'lodash';
|
|
|
|
|
|
export const useBsModal = (options, modalRef) => {
|
|
|
@@ -13,35 +13,12 @@ export const useBsModal = (options, modalRef) => {
|
|
|
return toRaw(get(modalOptions, path, undefined));
|
|
|
};
|
|
|
|
|
|
- const onModalBeforeMount = (callback) => {
|
|
|
- onBeforeMount(() => {
|
|
|
- if (typeof callback === 'function') {
|
|
|
- callback();
|
|
|
- }
|
|
|
- });
|
|
|
- };
|
|
|
-
|
|
|
- const onModalMounted = (callback) => {
|
|
|
- onMounted(() => {
|
|
|
- if (typeof callback === 'function') {
|
|
|
- callback();
|
|
|
- }
|
|
|
- });
|
|
|
- };
|
|
|
-
|
|
|
- onMounted(() => {
|
|
|
- onModalBeforeMount();
|
|
|
- options.beforeMount && options.beforeMount();
|
|
|
- options.mounted && options.mounted();
|
|
|
- onModalMounted();
|
|
|
- });
|
|
|
+ onMounted(() => {});
|
|
|
|
|
|
return {
|
|
|
- onModalBeforeMount,
|
|
|
- onModalMounted,
|
|
|
modalOptions,
|
|
|
setModalPropsValue,
|
|
|
- getModalPropsValue
|
|
|
+ getModalPropsValue,
|
|
|
};
|
|
|
};
|
|
|
|