Dafrok / vue-iscroll-view

IScroll-view component for Vue 2.x
https://dafrok.github.io/vue-iscroll-view
MIT License
148 stars 26 forks source link

正准备反馈问题,结果更新为 vue-iscroll-view 了,哈哈哈。时间点掐的真好! #3

Closed polaris1119 closed 7 years ago

polaris1119 commented 7 years ago

错误依旧有:

qq20170213-142519 2x
Dafrok commented 7 years ago

新库变更了加载方式,需要 iscroll 作为 peer dependency,然后用 Vue.use 安装一下。README.md 里有写~

polaris1119 commented 7 years ago

import IScrollView from 'vue-iscroll-view' import IScroll from 'iscroll'

Vue.use(IScrollView, IScroll)

是这样吧?我就是这么写的

Dafrok commented 7 years ago

你现在用的是哪个版本?我刚更新到0.1.3了,你 update 下试试呢?

polaris1119 commented 7 years ago

刚升级到0.1.3,错误还是一样! qq20170213-142519 2x

Dafrok commented 7 years ago

奇怪了,我自己做了个 DEMO 复现不了,这个是上一个版本的遗留问题,是由于没有找到 iscroll 依赖所致,能够提供一个可复现的环境吗?

polaris1119 commented 7 years ago

我刚通过 vue init webpack vue-toturial 新建一个项目,啥也没干,直接在 App.vue 中使用你这个组件。 插入的代码如下,报的错和我上面截图的一样

<template>
  <div id="app">
    <iscroll-view class="scroll-view">
      Your contents
    </iscroll-view>
    <img src="./assets/logo.png">
    <h1></h1>
    <h2>Essential Links</h2>
    <ul>
      <li><a href="https://vuejs.org" target="_blank">Core Docs</a></li>
      <li><a href="https://forum.vuejs.org" target="_blank">Forum</a></li>
      <li><a href="https://gitter.im/vuejs/vue" target="_blank">Gitter Chat</a></li>
      <li><a href="https://twitter.com/vuejs" target="_blank">Twitter</a></li>
    </ul>
    <h2>Ecosystem</h2>
    <ul>
      <li><a href="http://router.vuejs.org/" target="_blank">vue-router</a></li>
      <li><a href="http://vuex.vuejs.org/" target="_blank">vuex</a></li>
      <li><a href="http://vue-loader.vuejs.org/" target="_blank">vue-loader</a></li>
      <li><a href="https://github.com/vuejs/awesome-vue" target="_blank">awesome-vue</a></li>
    </ul>
  </div>
</template>

<script>
import Vue from 'vue'

import IScrollView from 'vue-iscroll-view'
import IScroll from 'iscroll'

Vue.use(IScrollView, IScroll)
Dafrok commented 7 years ago

不好意思。。刚才忘记 build 就 publish 了。。你先更新到 0.1.4 ,回头我弄个 CI 吧。。

polaris1119 commented 7 years ago

这次好了,感谢!

evanoxu commented 7 years ago

这个可以在混合开发上用吗?

Dafrok commented 7 years ago

混合?