vue-slider-component
Advanced tools
Comparing version 2.4.1 to 2.4.2
{ | ||
"name": "vue-slider-component", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "Can use the Slider component in vue1.x and vue2.x", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -11,3 +11,3 @@ # vue-slider-component | ||
[Live Demo](https://jsfiddle.net/NightCatSama/2xy72dod/) | ||
[Live Demo](https://jsfiddle.net/NightCatSama/2xy72dod/83/) | ||
@@ -124,6 +124,8 @@ ## Install | ||
| direction | String | horizontal | set the direction of the component, optional value: ['horizontal', 'vertical'] | | ||
| event-type | String | auto | the event type, optional value: ['auto', 'touch', 'mouse', 'none'] | | ||
| event-type | String | auto | the event type, optional value: ['auto', 'none'] | | ||
| width | Number[,String(in horizontal)] | auto | width of the component | | ||
| height | Number[,String(in vertical)] | 6 | height of the component | | ||
| dot-size | Number | 16 | size of the sliders | | ||
| dot-size | Number | 16 | determines width and height of the sliders. to set different values of `width` & `height` use `dot-width` & `dot-height` props | | ||
| dot-width | Number | value of `dot-size` prop | width of sliders. if specified, overrides value of `dot-size` | | ||
| dot-height | Number | value of `dot-size` prop | height of sliders. if specified, overrides value of `dot-size` | | ||
| min | Number | 0 | the minimum value | | ||
@@ -200,6 +202,6 @@ | max | Number | 100 | the maximum value | | ||
The solution: | ||
1. set prop `:real-time="true"`, if the initial value not equal to the minimum, need to call the `refresh` method | ||
1. set prop `:real-time="true"`, if the initial value not equal to the minimum, still need to call the `refresh` method | ||
2. using `v-if` instead of `v-show` or `display: none`. | ||
3. use prop `show` to control display. | ||
4. After the component appears, to call the `refresh` method. | ||
4. After the component appears, to call the `refresh` method. [example](https://jsfiddle.net/2xy72dod/80/) | ||
@@ -233,3 +235,4 @@ ## Using it with NUXT.js | ||
```js | ||
if (process.BROWSER_BUILD) { | ||
if (process.browser) { | ||
// in older versions of nuxt, it's process.BROWSER_BUILD | ||
let VueSlider = require('vue-slider-component') | ||
@@ -236,0 +239,0 @@ components['vue-slider'] = VueSlider |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
281191
249