element-ui

Select element inside dropdown menu issue

十年热恋 提交于 2021-01-29 05:19:45
问题 I am currently experimenting in Element UI a beautiful VueJS frame for ui. I am having issue when putting an select element inside a dropdown menu because when I select an item inside the select element it will close the dropdown also. How should I make the dropdown stay whenever I select an item in select element? Here is the sample demo. fiddle https://jsfiddle.net/vy70ogbz/ 回答1: Why dont you use a menu to achieve this. I find it is more flexible, you can use the menu-trigger="click"

Simulate select with element-ui and vue-test-utils

放肆的年华 提交于 2021-01-27 04:00:19
问题 I'm doing unit tests with Jest and Element-ui in Vue on a component which contains a select with 2 options. I am selecting an option from a dropdown and then checking that an action has been called. 1) With normal select and option HTML tags this works perfectly. // Fruit.vue <template lang="pug"> select( v-model="fruit" ) option( v-for="item in fruits" :label="item.label" :value="item.value" ) </template> <script> export default { data () { return { fruits: [ { label: 'Banana', value: false

Best way to dynamically change theme of my Vue.js SPA?

℡╲_俬逩灬. 提交于 2020-08-24 06:22:05
问题 So I think the title is enough explaination: I would like to dynamically theme my whole application. Maybe this means to change color of all divs when I press a specific button, or change the whole webapp's colors when a specific user logs in. Just to give some insights on what I am currently working on I will say that I have built a Vue.js app that uses many libraries, including one called Element-ui which already has a theming option built onto it. The problem is that it's written in scss

Best way to dynamically change theme of my Vue.js SPA?

爷,独闯天下 提交于 2020-08-24 06:21:39
问题 So I think the title is enough explaination: I would like to dynamically theme my whole application. Maybe this means to change color of all divs when I press a specific button, or change the whole webapp's colors when a specific user logs in. Just to give some insights on what I am currently working on I will say that I have built a Vue.js app that uses many libraries, including one called Element-ui which already has a theming option built onto it. The problem is that it's written in scss

Vue.js + Element UI: Get “event.target” at change

此生再无相见时 提交于 2020-07-06 12:59:30
问题 I can't get the html field that fires the event in its event handler (in javascript is the event.target ). I've a form with: an input element attached to a function on change event a function that manages the change event My code is like the following: var Main = { methods: { change(par) { console.log("The value is: " + par); //HERE I can't get "event.target" } } }; var Ctor = Vue.extend(Main) new Ctor().$mount('#app') <script src="//unpkg.com/vue/dist/vue.js"></script> <script src="//unpkg

How to move columns from the-table-column, Elerment UI, and vuedraggable?

陌路散爱 提交于 2020-06-29 05:24:09
问题 i have the next table: <data-tables :data="dataTable" :pagination-props="{ pageSizes: [5, 10, 15] }"> <draggable v-model="headers" tag="tr"> <el-table-column v-for="title in titles" :prop="title.prop" :label="title.label" :key="title.label"> </el-table-column> </draggable> </data-tables> to which I am trying to apply draggable to move the columns, as well as this example: https://sortablejs.github.io/Vue.Draggable/#/table-column-example I have no idea how it should go in the model to display

how to send object to child component in Vue elementui

China☆狼群 提交于 2020-05-17 07:07:39
问题 I am new to vue. so here is my vue template <template> <div class="app-container"> <el-dialog :visible="dialogVisible" title="View order" :before-close="() => dialogVisible = false"> <order-form :oneorder="oneorderdata" @success="handleAdd" @cancel="dialogVisible = false" /> </el-dialog> <el-table v-loading="loading" :data="orders" border> <el-table-column prop="order.id" label="Id" /> <el-table-column prop="order.fullName" label="Full Name" /> <el-table-column prop="order.address.name" label

how to send object to child component in Vue elementui

浪尽此生 提交于 2020-05-17 07:07:25
问题 I am new to vue. so here is my vue template <template> <div class="app-container"> <el-dialog :visible="dialogVisible" title="View order" :before-close="() => dialogVisible = false"> <order-form :oneorder="oneorderdata" @success="handleAdd" @cancel="dialogVisible = false" /> </el-dialog> <el-table v-loading="loading" :data="orders" border> <el-table-column prop="order.id" label="Id" /> <el-table-column prop="order.fullName" label="Full Name" /> <el-table-column prop="order.address.name" label

Correctly redirect to another page with inertia?

久未见 提交于 2020-01-25 08:32:10
问题 I"m trying to redirect on click to another page, for some reason it's not working. This is the code on my vue where the redirect buttons are. I've tried two different ways and neither are working. <el-row class="import-btn"> <a :href="'/imports/teachers'"> <el-button type="warning"> Importar </el-button> </a> </el-row> <el-row class="import-btn"> <el-button type="warning" @click="redirectStudents()"> Importar </el-button> </el-row> redirectStudents() { this.$inertia.visit('/imports/students')