Comments (9)
Is this able to solve your problem?
<slider :max="price.max" v-model="price.value"></slider>
from vue-slider-component.
Can't understand how to change default style.
I am trying to do next:
<div class="MySlider"><vue-slider ref="slider" :speed="price.speed" :interval="price.interval" :formatter = "price.formatter" :max="price.max" :min="price.min" v-model="price.value"></vue-slider></div>
tooltipStyle: {
backgroundColor: '#red',
borderColor: '#666'
},
price: {
value: [1.5,10],
min: 1,
max: 10,
interval: 0.5,
formatter: "{value} тыс. ₽",
bgstyle: {
backgroundColor: '#red',
}
}
Can I put style tooltipStyle
outside if I need it's global? How I should bind slider and style?
from vue-slider-component.
I can't understand how binding with default parameters works.
For example my code:
export default {
name : "LeftMenu",
data() {
return {
default: {
tooltipStyle: {
backgroundColor: '#red',
borderColor: '#666'
}
},
price: {
value: [1.5,10],
min: 1,
max: 10,
interval: 0.5,
formatter: "{value} тыс. ₽"
}
What should I add to slider to bind it with default?
from vue-slider-component.
Did not see that you have passed tooltip-style
down to the component. just like:
<vue-slider :tooltip-style="tooltipStyle"></vue-slider>
// ....
data() {
return {
tooltipStyle: {
backgroundColor: '#red',
borderColor: '#666'
}
}
}
from vue-slider-component.
from vue-slider-component.
It's seems that default keyword is bad.
I changed
:tooltip-style="my.processStyle"
And:
export default {
name : "LeftMenu",
data() {
return {
my: {
processStyle:
{
backgroundColor: 'green',
borderColor: '#666'
},
tooltipStyle:
{
backgroundColor: 'red',
And got it work. But with default it's not working
from vue-slider-component.
I'm sorry I wrote #red
in the reply, should be red
.
After my test, the cause of the bug is not a default keyword.
from vue-slider-component.
After my test, the cause of the bug is not a default keyword.
It's blame on this keyword...
from vue-slider-component.
default
is the keyword to the vue. so there is no relationship with the components.
from vue-slider-component.
Related Issues (20)
- [vue3.x] Type imports used as value importsNotUsedAsValues HOT 1
- VUE2 版本 多段间隔 HOT 2
- 可不可以在同一轴上设置多段范围模式的滑块 HOT 5
- [vue3.x] Brand new vue project fails on type-check with vue-slider-component HOT 3
- [vue3.x] <valid prop: custom validator check failed for prop "tooltipPlacement". >
- [vue3.x] <vue3中使用setValue改变进度条的值时,报传入类型错> HOT 1
- Nothing changes when clicking on the rail over right dot
- dotAttrs for multiple dots
- [vue3.x] onUnmounted is called when there is no active component instance to be associated with HOT 1
- [vue3.x] Deep watching an array (modelValue) HOT 1
- Add the ability to evenly distribute intervals
- [vue3.x] <与vant的van-config-provider组件冲突 Uncaught TypeError: RefImpl is not a constructor>
- TypeError: Super expression must either be null or a function HOT 8
- TypeError: S.extend is not a function (incompatible with Vue 2.7.0) HOT 1
- Add possibility to position slider dot to max or min value if min, max and modelValue are equal HOT 1
- [vue3.x] Errors during type checking because of default export in `index.d.ts` HOT 1
- Events:drag-end HOT 1
- [vue3.x] Vue 3.4.* Uncaught TypeError: Cannot read properties of null (reading 'isCE') HOT 11
- [vue3.x] warning [email protected] has incorrect peer dependency "vue@^2.0.0 HOT 1
- 怎么可以获取鼠标点击了的事件,因为点击或者拖拽以后要取消自动轮播 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-slider-component.