message: [Improvement] Swipe: window resize
diff: <script>
  import create from '../utils/create';
  import Touch from '../mixins/touch';
  +import { on, off } from '../utils/event';
  export default create({
  name: 'swipe',
  @@ -72,10 +73,18 @@ export default create({
  mounted() {
  this.initialize();
  +
  + if (!this.$isServer) {
  + on(window, 'resize', this.onResize, true);
  + }
  },
  destroyed() {
  this.clear();
  +
  + if (!this.$isServer) {
  + off(window, 'resize', this.onResize, true);
  + }
  },
  watch: {
  @@ -128,7 +137,7 @@ export default create({
  methods: {
  // initialize swipe position
  - initialize() {
  + initialize(active = this.initialSwipe) {
  clearTimeout(this.timer);
  if (this.$el) {
  const rect = this.$el.getBoundingClientRect();
  @@ -136,7 +145,7 @@ export default create({
  this.height = rect.height;
  }
  this.swiping = true;
  - this.active = this.initialSwipe;
  + this.active = active;
  this.offset = this.count > 1 ? -this.size * this.active : 0;
  this.swipes.forEach(swipe => {
  swipe.offset = 0;
  @@ -144,6 +153,10 @@ export default create({
  this.autoPlay();
  },
  + onResize() {
  + this.initialize(this.activeIndicator);
  + },
  +
  onTouchStart(event) {
  if (!this.touchable) return;
  