vue-component

How would I be able to multiple select and pass data in the given format in vue js html?

人盡茶涼 提交于 2019-12-14 03:44:50
问题 I need to pass the data in the given format. rules : [{ name:null, section:null, data : [{head:null,value:null}] }], This is the problem I am facing. Hope somebody could help me sort out a solution. The snippet is given. I need to pass data in the format given above. If another array is needed inside rules[], it is also fine Is another array needed for head and value inside data[]. This will be also fine, if needed. Hoping for a help. Please help me to have a solution. Please change the

Reuse Modal with VueJS 2

我与影子孤独终老i 提交于 2019-12-14 02:08:12
问题 I see a reuse modal in JSFiddle use Vue version 1: https://jsfiddle.net/_kemar/d3jecL8n/ But when I change to Vue version 2, it can't work. How can I fix this? https://jsfiddle.net/chelsea39/awwk6v5h/1/ Error when updating to Vue2 : [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "show" 回答1: The issue is that you are trying to change

Post to list from Vue component

家住魔仙堡 提交于 2019-12-13 22:24:01
问题 How can i post through subInput(in component, 2nd input) to the list outside the component? I can see that the input posts to subTaskList, but wont post it to the list? For clarifications: I'm trying to make a food planner, where the main inputs with placeholder="Tilføj ret til madplanen" to be the food for the day, and the second input with placeholder="Tilføj til indkøbsseddel" to add to a shoppinglist (#list) (sorry for the danish placeholders) Vue.component('list-component', { data:

How to trigger event when Vue component is rendered?

我怕爱的太早我们不能终老 提交于 2019-12-13 18:12:48
问题 I've googled a lot, but didn't found anything about this. I want to fade in my content when it's rendered by Vue. My application is large and it takes some time to be ready for user. But CSS animation doesn't want to work when Vue inserts content into block. See listed code below at JSFiddle. HTML <div id="my-app"> <p>Weeverfish round whitefish bass tarpon lighthousefish mullet tigerperch bangus knifefish coley Black sea bass tompot blenny madtom tapetail yellow-eye mullet..</p> <hr> <example

“Unexpected token <” for VueJS running with Webpack

狂风中的少年 提交于 2019-12-13 17:57:22
问题 Note: Before you mark this as a duplicate , I have looked at a few solutions and they don't work: [1] https://github.com/webpack/webpack-dev-server/issues/135 [2] https://github.com/gaearon/react-hot-loader/blob/master/docs/Troubleshooting.md#syntax-error-unexpected-token- Few other Unexpected token < threads here but they are (probably) unrelated. I am trying to integrate VueJS into an OSS chat application https://github.com/zulip/zulip . I tried to use the standard configuration template

Cannot make vue.js element-ui's dialog work while it's inside a child component

左心房为你撑大大i 提交于 2019-12-13 16:04:05
问题 Here is the parent component: <template lang="pug"> .wrapper el-button(type="primary", @click="dialogAddUser = true") New User hr // Dialog: Add User add-edit-user(:dialog-visible.sync="dialogAddUser") </template> <script> import * as data from '@/components/partials/data' import AddUser from './partials/AddUser' export default { name: 'users', components: { AddUser }, data () { return { users: data.users, dialogAddUser: false } } } </script> Here is the child component: <template lang="pug">

How can I showing truncated text only on hover without change height of box list?

自作多情 提交于 2019-12-13 08:59:49
问题 My script of vue component like this : <template> ... <b-card-group deck v-for="row in formattedClubs"> <b-card v-for="club in row" img-src="http://placehold.it/130?text=No-image" img-alt="Img" img-top> <h4 class="card-title" @mouseenter="club.truncate = false" @mouseleave="club.truncate = true"> <template v-if="club.truncate">{{trucateText(club.description)}}</template> <template v-else>{{club.description}}</template> </h4> <p class="card-text"> {{club.price}} </p> <p class="card-text"> {

Vue.js only show objects with a unique property

雨燕双飞 提交于 2019-12-13 03:59:58
问题 I am building a Leaderboard. I have a collection of leaders. There are multiple entries from the same teams. I would like to only show one entry per team (most recent preferably). I am using Firestore for the database. My html looks like this. (I shortened the code for simplicity) <div v-for="tracker in trackers" :key="tracker.id"> <div>{{tracker.team.team_name}}</div> </div> If I add this {{ tracker }} to the HTML this is what one tracker splits out { "team": { "bio": "<div><!--block-->This

How can I pass input file with vue.js 2?

只谈情不闲聊 提交于 2019-12-13 03:46:34
问题 My vue component like this : <template> <div class="modal" tabindex="-1" role="dialog"> ... <div class="form-group"> <label for="change-image">Change image</label> <input type="file" name="replace" v-on:change="changeImage"> </div> <div class="form-group"> <label for="alt-image">Alt attr</label> <input type="text" class="form-control" v-model="altImage"> </div> <div class="checkbox"> <label> <input type="checkbox" v-model="mainCover"> Set Cover </label> </div> <button type="button" class="btn

Styling not being applied to SINGLE ELEMENT after exacting JQuery function on single element within a ,vue page

情到浓时终转凉″ 提交于 2019-12-13 03:38:37
问题 I'm using JQuery-AsRange (https://github.com/thecreation/jquery-asRange) within my vue.js project. The function execute within the .vue page within the script section of my vue page and the JQuery-AsRange library works perfect but, lack any css styling. The css style that is loaded should handle those id and tags that are generated (I can copy can paste the generated non-style JavaScript code and add hardcore it into the template and it will be styled correctly- it just won't move), but when