flat: 兼容

This commit is contained in:
史典卓
2025-05-13 11:42:17 +08:00
parent fd74b7d4df
commit 5333254c58
8 changed files with 68 additions and 23 deletions

View File

@@ -7,6 +7,7 @@ import SelectPopup from './selectPopup.vue';
export default {
install(app) {
const popupApp = createApp(SelectPopup);
// #ifdef H5
const popupInstance = popupApp.mount(document.createElement('div'));
document.body.appendChild(popupInstance.$el);
@@ -14,7 +15,11 @@ export default {
const openPopup = (config) => {
popupInstance.open(config);
};
// #endif
// #ifndef H5
const openPopup = (config) => {};
// #endif
// 提供给所有组件使用
app.provide('openSelectPopup', openPopup);
}