New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More →
Socket
Sign inDemoInstall
Socket

vue-slider-component

Package Overview
Dependencies
Maintainers
1
Versions
210
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-slider-component - npm Package Compare versions

Comparing version 3.0.1-5 to 3.0.2

lib/styles/_triangle.scss

17

CHANGELOG.md

@@ -0,3 +1,16 @@

# CHANGELOG
- remove dot-width and dot-height, dot-size support array type
- remove event-type, use disabled
## v3.0.2
> `2019-02-28`
### 🎉feature
- More customizable (`style`/`slot`)
- Multiple style themes
- Support for more sliders (Countless)
- Add marks
- Support SSR
- Support Typescript
### 🐞Bug Fixes
- Fix v2.x exception. (No longer need to call refresh)

6

lib/index.ts

@@ -1,6 +0,4 @@

import VueSlider from './vue-slider'
import VueSliderDot from './vue-slider-dot'
import VueSliderMark from './vue-slider-mark'
import VueSlider, { ERROR_TYPE } from './vue-slider'
export { VueSliderDot, VueSliderMark }
export { ERROR_TYPE }
export default VueSlider

@@ -53,2 +53,3 @@ import VueSlider from '../vue-slider'

pos: number
index: number
value: Value

@@ -55,0 +56,0 @@ focus: boolean

@@ -196,2 +196,7 @@ import Decimal from './decimal'

getValueByIndex(index: number): Value {
if (index < 0) {
index = 0
} else if (index > this.total) {
index = this.total
}
return this.data

@@ -303,4 +308,4 @@ ? this.data[index]

return this.dotsPos.map((_, i) => {
const changeDot = changeDots.find(dot => dot.index === i)
return changeDot ? changeDot.changePos : 0
const changeDot = changeDots.filter(dot => dot.index === i)
return changeDot.length ? changeDot[0].changePos : 0
})

@@ -355,2 +360,6 @@ }

}
if (typeof val !== 'number' || val !== val) {
this.emitError(ERROR_TYPE.VALUE)
return 0
}
val = new Decimal(val)

@@ -362,7 +371,2 @@ .minus(this.min)

if (typeof val !== 'number') {
this.emitError(ERROR_TYPE.VALUE)
return 0
}
const pos = new Decimal(val).multiply(this.gap).toNumber()

@@ -369,0 +373,0 @@ return pos < 0 ? 0 : pos > 100 ? 100 : pos

@@ -18,5 +18,6 @@ import { Direction } from '../typings'

const event = e instanceof MouseEvent ? e : e.targetTouches[0]
const rect = elem.getBoundingClientRect()
const posObj = {
x: event.pageX - elem.offsetLeft,
y: event.pageY - elem.offsetTop,
x: event.pageX - rect.left,
y: event.pageY - rect.top,
}

@@ -23,0 +24,0 @@ return {

{
"name": "vue-slider-component",
"version": "3.0.1-5",
"description": "Can use the Slider component in vue1.x and vue2.x",
"version": "3.0.2",
"description": "A highly customized slider component",
"keywords": [

@@ -14,2 +14,9 @@ "vue",

"typings": "./typings/index.d.ts",
"files": [
"dist",
"lib",
"src",
"typings",
"theme"
],
"repository": {

@@ -24,3 +31,3 @@ "type": "git",

},
"homepage": "https://github.com/NightCatSama/vue-slider-component#readme",
"homepage": "https://github.com/NightCatSama/vue-slider-component",
"scripts": {

@@ -30,7 +37,8 @@ "serve": "vue-cli-service serve",

"build:library": "npm run package && npm run sass",
"package": "vue-cli-service build --target lib --name vue-slider-component lib/index.ts",
"package": "vue-cli-service build --mode package --target lib --name vue-slider-component lib/index.ts",
"sass": "sass lib/theme:theme",
"prettier": "prettier --write lib/**/*.{ts,tsx,scss}",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit"
"test:unit": "vue-cli-service test:unit",
"deploy:docs": "sh scripts/deploy.sh"
},

@@ -47,3 +55,2 @@ "gitHooks": {

},
"dependencies": {},
"devDependencies": {

@@ -61,2 +68,3 @@ "@commitlint/config-conventional": "^7.3.1",

"lint-staged": "^8.1.0",
"markdown-it-container": "^2.0.0",
"node-sass": "^4.9.0",

@@ -69,5 +77,9 @@ "prettier": "^1.15.2",

"vue-class-component": "^6.0.0",
"vue-markdown-loader": "^2.4.1",
"vue-property-decorator": "^7.0.0",
"vue-template-compiler": "^2.6.6"
"vue-router": "^3.0.2",
"vue-template-compiler": "^2.6.6",
"codemirror": "^5.44.0",
"vuep": "^0.8.1"
}
}

@@ -8,16 +8,10 @@

> 🎚 a highly customized slider component
> 🎚 A highly customized slider component
English | [įŽ€äŊ“中文](https://github.com/NightCatSama/vue-slider-component/blob/master/README-CN.md)
English | [įŽ€äŊ“中文](https://github.com/NightCatSama/vue-slider-component/blob/refactor/README-CN.md)
## 🚴 Todo
- [x] Basis
- [ ] Update guide
- [ ] Document
- [ ] Test
## ✨ New Features (v3.x)
- đŸ¤Ŗ Fix [exceptions](https://github.com/NightCatSama/vue-slider-component#exceptions)
- 🔧 More customizable
- 🔧 Fix [exceptions](https://github.com/NightCatSama/vue-slider-component#exceptions)
- 🍖 More customizable
- 👗 Multiple style themes

@@ -27,8 +21,11 @@ - đŸŗ Support for more sliders

- 🎉 Support SSR
- 🍒 Support Typescript
## đŸ’Ŋ install
## đŸŽ¯ install
```bash
$ yarn add vue-slider-component@beta
$ yarn add vue-slider-component
```
## 🚀 Usage

@@ -55,2 +52,10 @@ ```vue

</script>
```
```
## Changelog
Detailed changes for each release are documented in the [release notes](https://github.com/NightCatSama/vue-slider-component/blob/master/CHANGELOG.md).
## License
[MIT](https://github.com/NightCatSama/vue-slider-component/blob/master/LICENSE)
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import Vuep from 'vuep'
import 'vuep/dist/vuep.css'
import Example from './components/Example.vue'
import VueSlider from '../lib'
import { getTheme } from './utils'
const theme = getTheme()
switch (theme) {
case 'antd':
require('../lib/theme/antd.scss')
break
case 'material':
require('../lib/theme/material.scss')
break
default:
require('../lib/theme/default.scss')
}
Vue.use(Vuep)
Vue.component('Example', Example)
Vue.component('VueSlider', VueSlider)
Vue.config.productionTip = false

@@ -8,2 +35,3 @@

render: h => h(App),
router,
}).$mount('#app')

@@ -1,8 +0,6 @@

import VueSlider from '../lib/vue-slider'
import VueSliderDot from '../lib/vue-slider-dot'
import VueSliderMark from '../lib/vue-slider-mark'
import VueSlider, { ERROR_TYPE } from '../lib/vue-slider'
declare module 'vue-slider-component' {
export { VueSliderDot, VueSliderMark }
export { ERROR_TYPE }
export default 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 too big to display

Sorry, the diff of this file is not supported yet

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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡ī¸ by Socket Inc