vuejs2

    0熱度

    1回答

    在單頁面應用程序中,我可以這樣做來在組件中包含組件。 $ npm install sagalbot/vue-select <template> <div id="myApp"> <v-select :value.sync="selected" :options="options"></v-select> </div> </template> <script>

    0熱度

    2回答

    我正在製作一個表單生成器,它使用輸入字段,按鈕等組件。我希望能夠根據我傳遞給它的選項生成表單。我不能讓它渲染組件。 我試圖返回純HTML但不會呈現組件。 我把從我Home.vue模板的形式產生,我想有一個選項對象的形式是這樣的: options: { name: { type: 'input', label: 'Name' }, submit:

    0熱度

    1回答

    在我的成分,我訂閱的數據存儲突變: mounted() { this.$dataStore.subscribe((mutation, state) => console.log(mutation)); }, 然而,當我打開該視圖/組件n時間,我越來越n訂閱,我看到一個突變多個日誌條目。 我該如何預防?爲什麼在新組件加載後不會刪除訂閱? 編輯:我知道試過以下,因爲subscribe函

    0熱度

    1回答

    我遇到問題。如何在nuxt.js的媒體查詢中禁用插件vue.fullpage? nuxt.config.js module.exports = { plugins: { '~plugins/fullpage-vue.js' } } 全頁,vue.js import Vue from 'vue' import 'animate.css' import 'ful

    0熱度

    1回答

    我想使用v-for循環的索引作爲點擊處理程序的參數,但是這會返回undefined? <div v-for="(item, key, index) in groups" v-on:click="selected(index)">{{item.name}}</div> 處理器 selected(i) { console.log("you clicked " + i) // this l

    0熱度

    2回答

    所以,我從2.0開始正確看待Vue.js。而且我很難從filter到computed。 這裏就是我在(使用vue-resource API調用): var moviesURL = 'http://localhost/api/movies'; var app = new Vue({ el: '#app', data: { liveFilter: '',

    1熱度

    1回答

    我學習Vue公司,並試圖完成一項任務自己循環。 我想找出如何使在初始狀態下,只出現「城市」模板,並在每次點擊運行V-對@單擊循環,旅遊模板處理與相關之旅。 let EventBus = new Vue(); Vue.component('cities', { \t name: 'Listings', \t props: ['city','tour'], \t \

    0熱度

    1回答

    我有一個數組,使用v-for呈現爲一組Vue組件。我需要使用:key=""否則Vue抱怨。 我的數組有沒有唯一標識符,所以我使用索引作爲關鍵 我的循環 <card v-for="(item, index) in questions" :question="item" :key="index">{{item}}</card> 陣列具有可以具有相同的內容 [{name:"jimmy"}, {nam

    0熱度

    1回答

    夥計們,我遇到了VueJS和bootstrap的問題。 這裏是我的組件UIV和vueJS 2.在瀏覽器中,我得到錯誤:[Vue warn]: Error in created hook: "Error: Tab parent must be Tabs." 我做錯了嗎? <template> <tabs> <tab>Test</tab> </tabs> </temp

    0熱度

    5回答

    這裏的限制是我的小提琴:DEMO new Vue({ el: '#app', data: { username: 'AVERYLONGGGNAMMEEE' } }); 我想在顯示一旦用戶登錄的消息 在其中的字符數超過8個的情況下,我怎麼能只顯示名稱後面加上「..」的前8個字符? (如:蒙娜麗莎..)