cost 223 ms
如何管理動態組件中的 v-on/@<component :is="currentPage" etc.></component> vue3 選項中的結構 api

[英]how to manage v-on/@ in dynamic components <component :is="currentPage" etc. ></component> structure in vue3 options api

我正在學習 Vue 3 Options API 中的動態組件渲染,到目前為止,我已經了解:is="currentPage" 以及 v-bind="currentProps" 的工作原理。 但是在以下情況下,我無法弄清楚如何處理我的事件偵聽器: 假設我有 3 個組件:A、B、C。 每個組件都有一個或 ...

在 beforeRouteEnter NProgress 中調用方法

[英]Calling methods inside beforeRouteEnter NProgress

在導航到路線之前,我正在嘗試調用 API。 問題是,如果我嘗試在 beforeRouteEnter 內部調用 axios 調用,例如它工作正常; 但是,當我嘗試從方法調用 API 時,它會在解析 API 之前導航到路線,並且 NProgress 欄也在解析調用之前完成。 誰能指導我可能出了什么問題? ...

VueJS 3 查看所有全局注冊的組件。 this.$options.components 是空的

[英]VueJS 3 See all globally registered components. this.$options.components is empty

您好,我有一個使用 Vite 的新 Vue 3 應用程序。 我正在全局注冊我的UserTextInput組件,但在我的所有組件中this.$options.components是空的 在任何其他組件內 我正在尋找一種方法來查看哪些組件已在全球范圍內注冊。 有任何想法嗎? ...

從具有屬性裝飾器和 class 樣式語法的 vue2 遷移到 vue3

[英]Migrating from vue2 with property-decorator and class style syntax to vue3

我維護着一個相當大的 vue2 項目,它在其他庫中使用了 Vuetify、vue-class-component、vue-property-decorator 和 typescript。示例組件: (為了顯示語法,該組件已簡化且不可編譯) 我們對這個設置非常滿意,因為語法簡單,新老開發人員都很 ...

Vue.js中如何從父組件的子組件訪問方法

[英]How to access method from the child component in parent in Vue.js

我想訪問父組件中的方法,而該方法存在於子組件中。 我嘗試使用混合。 但是 function 返回的是 null 而不是值。 如果我嘗試發出 object 並且在父組件中工作正常。 如何在 vue3 選項 API 中訪問父其他方法中的子方法父視圖 兒童.vue ...

(Vue.js 3 Options API) 如何訪問子方法?

[英](Vue.js 3 Options API) How do I access a child method?

我需要使用 Vue.js 3 和選項 API 來訪問子組件的方法。在How to access to a child method from the parent in vue.js 中有一個答案,但它適用於 Vue.js 2 和 Vue.js 3 但具有 Composition 88103085 ...

無法讀取未定義的屬性(讀取“toLowerCase”)

[英]Cannot read properties of undefined (reading 'toLowerCase')

我正在使用 Vue 創建一個搜索輸入,並且我做了一個方法來檢查每個項目是否應該可見,並將當前用戶輸入與項目的數據進行比較,並返回 true 或 false。 我在控制台上遇到的問題,它向我顯示了與“toLowerCase”相關的錯誤。 請一些幫助和建議。 提前致謝。 ...

使用 axios 和 v-for 時,我在 Vue 中不斷收到“超出最大遞歸更新”

[英]I keep getting "maximum recursive updates exceeded" in Vue when using axios and v-for

我正在建立一個電子商務網站,並為產品卡創建了一個組件。 我將該組件導入主頁,以便顯示產品列表。 我在 data(){} 中聲明了一個產品變量,還創建了一個 beforeMount 並將我的邏輯放入其中以使用 axios 獲取數據。 每次我加載頁面時,我都會收到錯誤消息: 未捕獲(承諾)錯誤:超出最 ...

什么是 Vue 選項 API?

[英]What is the Vue Options API?

我知道 Vue 3 的主要特性之一是 Composition API,它是舊 Vue Options API 的替代品。 但我似乎找不到 Options API 的簡單文本定義 - 它是什么? ...

我是否必須在 Vue 3 中使用組合 API,或者我仍然可以按照“Vue 2”的方式做事嗎?

[英]Do I have to use the Composition API in Vue 3, or can I still do things the "Vue 2" way?

是否可以安裝 Vue 3,但仍以“Vue 2”方式進行操作? 換句話說,我看到 Vue 3 有新的組合 API,但在 Vue 3 中這是可選的還是必需的做事方式? 出於某種原因,我認為 Vue 3 仍然允許您以 Vue-2 的方式做事,而是使用選項 API。 不是這樣嗎? 謝謝。 ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM