Socket
Socket
Sign inDemoInstall

v-gantt-chart

Package Overview
Dependencies
104
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.0 to 1.5.1

12

package.json
{
"name": "v-gantt-chart",
"version": "1.5.0",
"version": "1.5.1",
"description": "display gantt-like vaule,like use this to order bus schedule.",

@@ -32,5 +32,15 @@ "main": "dist/v-gantt-chart.js",

},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,vue}": [
"vue-cli-service lint",
"git add"
]
},
"dependencies": {
"core-js": "^3.4.3",
"dayjs": "^1.8.17",
"lint-staged": "^10.2.11",
"resize-observer-polyfill": "^1.5.1",

@@ -37,0 +47,0 @@ "vue": "^2.6.10"

@@ -34,3 +34,4 @@ <p align="center"><img src="https://raw.githubusercontent.com/w1301625107/vue-gantt-chart/master/screenshot/icon.png" alt="logo" width="180"></p>

- [API](#api)
- [Param](#param)
- [Param](#param)
- [Method](#method)
- [Event](#event)

@@ -68,3 +69,3 @@ - [Run Demo](#run-demo)

Vue.use(vGanttChart});
Vue.use(vGanttChart);
```

@@ -373,2 +374,3 @@

| hideYScrollBar | ❌ | boolean | false | 隐藏纵向滚动轴 |
| enableGrab | ❌ | boolean | true | 启动按住拖拽 |
| customGenerateBlocks | ❌ | boolean | false | 开启自定义生成渲染块,具体使用见说明 |

@@ -396,2 +398,39 @@ | timeRangeCorrection | ❌ | boolean | false | 时间矫正,默认开启。关闭后时间轴不会自动填充剩余空间,错误的先后时间会引起错误 |

### Method
通过使用`vue`的`ref`来调用组件内部的方法,`params`中的`scrollToTime`和`scrollToPostion`可能会择机废弃,最好使用下方的方法替代。
<div class="event">
| method | args | describle|
| :--- |:-----:|:---------|
| scrollToPostionHandle|positon:{x:number,y:number} | 滚动到指定位置|
| scrollToTimehandle | time:string | 滚动到指定时间|
</div>
#### example
```html
<template>
<v-gantt-chart ref="gantt"></v-gantt-chart>
</template>
```
```js
export default {
methods:{
doScrollToPostion(){
this.$refs.gantt.scrollToPostionHandle({x:100,y:100})
},
doScrollToTime(){
this.$refs.gantt.scrollToTimehandle("Fri, 31 Jul 2020 12:41:39 GMT")
}
}
};
```
### Event

@@ -456,2 +495,8 @@

## Update
1.5.1
- 使用css来绘制网格获取更好的显示效果
- 优化一点点性能
- 添加鼠标按住拖动功能
- 添加新的refs说明
1.5.0

@@ -458,0 +503,0 @@ - 时间轴添加天的倍数的刻度支持

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc