Skip to content

Commit

Permalink
change readme
Browse files Browse the repository at this point in the history
  • Loading branch information
openfe-openfe committed Oct 27, 2017
1 parent 6cec5d2 commit a582bcf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/vue-better-slider/components/slider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export default {
},
mounted() {
this.initialize();
// 监听 resize事件,改变窗口重新初始化
window.addEventListener('resize', () => {
this.initialize();
})
},
destroyed() {
clearTimeout(this.timer);
Expand Down Expand Up @@ -80,7 +84,6 @@ export default {
},
methods: {
initialize() {
// reset offset when children changes
clearTimeout(this.timer);
this.width = this.$el.getBoundingClientRect().width;
this.active = 0;
Expand Down Expand Up @@ -167,6 +170,10 @@ export default {
</script>

<style>
body{
margin:0px;
padding:0px;
}
.ic-slider {
overflow: hidden;
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion static/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-better-slider",
"version": "1.0.9",
"version": "1.0.10",
"main": "index.js",
"scripts": {},
"author": "songhao",
Expand Down
2 changes: 1 addition & 1 deletion vue-better-slider/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vue-better-slider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-better-slider",
"version": "1.0.8",
"version": "1.0.9",
"main": "index.js",
"scripts": {},
"author": "songhao",
Expand Down

0 comments on commit a582bcf

Please sign in to comment.