|
@@ -1,4 +1,4 @@
|
|
|
-import VanNotify from './index.vue';
|
|
|
|
|
|
|
+import NutNotify from './index.vue';
|
|
|
import {
|
|
import {
|
|
|
createApp,
|
|
createApp,
|
|
|
reactive,
|
|
reactive,
|
|
@@ -74,12 +74,13 @@ function initInstance() {
|
|
|
({ instance } = mountComponent({
|
|
({ instance } = mountComponent({
|
|
|
setup() {
|
|
setup() {
|
|
|
const { state, toggle } = usePopupState();
|
|
const { state, toggle } = usePopupState();
|
|
|
- return h('img', {});
|
|
|
|
|
|
|
+ return h(NutNotify, { ...state, 'onUpdate:show': toggle });
|
|
|
}
|
|
}
|
|
|
}));
|
|
}));
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+// 入口
|
|
|
function Notify(options) {
|
|
function Notify(options) {
|
|
|
|
|
+ debugger;
|
|
|
if (!inBrowser) {
|
|
if (!inBrowser) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -134,10 +135,10 @@ Notify.resetDefaultOptions = () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
Notify.install = app => {
|
|
Notify.install = app => {
|
|
|
- app.use(VanNotify);
|
|
|
|
|
|
|
+ app.use(NutNotify);
|
|
|
app.config.globalProperties.$notify = Notify;
|
|
app.config.globalProperties.$notify = Notify;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-Notify.Component = VanNotify;
|
|
|
|
|
|
|
+Notify.Component = NutNotify;
|
|
|
|
|
|
|
|
export default Notify;
|
|
export default Notify;
|