vue-component

    2熱度

    1回答

    我有一個Django上下文變量,它是一個字符串jsonified名單,但其中的一些字符串可能會通過他的道具,其中一個有一個單引號' import json list_of_strings = ["test", "hello", "I have a'single quote"] return render(request, 'template.html', { 'strings': j

    0熱度

    1回答

    我需要知道如何在VueJS此功能工作的方法... $(document).ready(function(){ $(".slide").hover(function(){ $(this).find("div.snipit").slideDown("slow"); },function(){ $(this).find("div.snipit").slide

    1熱度

    2回答

    我有一個數據數組的vue.js子組件調用messages。在數組中插入新元素時如何更新DOM。 這裏是我的代碼的簡化片斷:使用VUE devtools我可以看到的消息陣列更新 <template> <q-item v-for="(msg, i) in messages" :key="i" > <!-- q-item is a custom component of quasar

    0熱度

    1回答

    我試圖在元素中使用的表述: v-if="currentstep < maxStep" 的maxStep應該從我defauld出口列出的組件的數量來獲得 export default { name: 'step', data() { return { maxStep: 8, currentstep: 0 } },

    2熱度

    1回答

    我希望能夠在<script>標籤使用Vue的文件JavaScript和打字稿,所以在未設置或設置爲js然後用ES2015 lang當<script lang="ts">使用打字稿。我有一個現有的vue + ts項目,現在我們決定我們要在用ES6編寫的vue-paper-dashboard之上構建應用程序。我仍然想保留我的組件在TS和.vue文件與<script lang="ts">。所以從空的儀表

    1熱度

    1回答

    在打字稿中重寫我的VueJs項目時,我遇到了TypeScript錯誤。 這是具有自定義v模型的組件的一部分。 html中的輸入字段有一個名爲'plate'的ref,我想訪問它的值。該字段上的@input調用下面所寫的更新方法。 Typescript抱怨板上沒有價值。 @Prop() value: any; update() { this.$emit('input', pl

    3熱度

    3回答

    我是Vue Js的新人。所以,我面臨一個問題,即要從另一個組件中更改數據值。 我有一個組分A: <template> <div id="app"> <p v-on:click="test()">Something</p> </div> </template> import B from '../components/B.vue'; export defaul

    2熱度

    1回答

    組件我使用Vue的2,加強on Rails的引擎紅寶石,使用現有的Haml的意見,我的Vue組件模板inline-template屬性。 是否有可能測試這樣定義的組件的方法?我能找到的所有測試示例假定使用單個文件.vue組件。 (採用摩卡和柴)這些測試失敗,[Vue warn]: Failed to mount component: template or render function not

    0熱度

    1回答

    我在VueJS上測試Mixins,我有一個問題。有沒有辦法直接從Mixins調用事件,而無需將其分配在我的methods中? MyMixins.js import Vue from 'vue' Vue.mixin({ methods: { Alerta(){ alert('WORK!') } } }) app.vue <templ

    1熱度

    1回答

    我正在使用Element UI的上傳組件。不幸的是,一旦上傳文件就會觸發POST請求。我想要的是將文件推送到一個空的數組,然後用按鈕發佈。 HTML // Element UI documentation says http-request overrides xhr behavior // so I can use my own file request. In this case, I wa