Closed johnson0903 closed 1 year ago
@johnson0903 If you really need this to work for you right now, defining the component globally worked for me. I did it in Nuxt 3, like:
components: [
{
path: '~/components/',
},
{
global: true,
path: '~/views/',
prefix: 'View',
},
],
So after this I could open the modal by string as:
$vfm.show({
component: 'ViewCustomModal',
});
I guess you could achieve the same in a Vue 3 app by:
import { createApp } from "vue";
import CustomModalfrom "./components/CustomModal";
import App from "./App.vue";
const app = createApp(App);
App.component('CustomModal', CustomModal); // global registration - can be used anywhere
app.mount("#app");
Version
vue-final-modal: 3.4.11 vue: 3.2.45
OS
Windows
Steps to reproduce
What is Expected?
modals-container 中應該產生對應的 vfm HMTL DOM
What is actually happening?
modals-container 中只出現
<vdynamicmodal modelvalue="true"></vdynamicmodal>
測試發現若 component 參數帶入Vue Component 物件而非字串格式可正常運作,如下
另外,中英文文件中 動態 modal 最上方的文件內容不同 中文:
英文: