-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When using the dataZoom component, changes to the data will cause the dataZoom to be reset. Setting `:not-set-unchange="['dataZoom']"` on the component will solve the problem.
- Loading branch information
1 parent
775fe4d
commit 48d4346
Showing
8 changed files
with
88 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<template> | ||
<div> | ||
<button @click="change">change data</button> | ||
<button @click="changeDataZoom">change dataZoom</button> | ||
<ve-line | ||
:data="chartData" | ||
:not-set-unchange="['dataZoom']" | ||
:data-zoom="dataZoom"> | ||
</ve-line> | ||
<ve-line | ||
:data="chartData" | ||
:data-zoom="dataZoom"> | ||
</ve-line> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { VeLine } from '../../src/index.es' | ||
import { LINE_DATA, LINE_DATA1 } from '../test/data' | ||
export default { | ||
data () { | ||
this.unchange = ['dataZoom'] | ||
return { | ||
chartData: LINE_DATA, | ||
dataZoom: { start: 20, end: 100 } | ||
} | ||
}, | ||
methods: { | ||
change () { | ||
this.chartData = this.chartData === LINE_DATA | ||
? LINE_DATA1 | ||
: LINE_DATA | ||
}, | ||
changeDataZoom () { | ||
this.dataZoom.start = this.dataZoom.start === 20 ? 50 : 20 | ||
} | ||
}, | ||
components: { VeLine } | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters