yunfeihuang / vx-ui

vue components 移动端UI组件库
http://vx.bittyos.com/
201 stars 51 forks source link

亲,我想把你的组件放在我的项目中使用,请问怎么引入以及使用呢,能不能有一个文档呢 #5

Closed MyDAIDAI closed 6 years ago

ks55259980 commented 6 years ago

木有文档

yunfeihuang commented 6 years ago

亲,文档已经在准备写了,请先看一下源码吧

MyDAIDAI commented 6 years ago

好的,我想问下listview组件怎么监听不到on-pullup以及on-pulldown事件呢

yunfeihuang commented 6 years ago

贴代码出来看看

MyDAIDAI commented 6 years ago
      <list-view @on-pullup="pullupHandler" @on-pulldown="pulldownHandler" :loading="loading" :end="end">
        <template v-for="item in list">
          <flexbox align="center" class="list-view-item">
            <flexbox-item>
              <div style="padding: 10px; padding-left: 15px">
                <h4 style="margin: 0px; color: #464c5b">{{item.username}}</h4>
                <div style="color: #657180; font-size: 12px">
                  <span>用户类型:{{item.usertype}}</span> &nbsp; &nbsp; <span>通行状态:{{item.pass}}</span>
                </div>
              </div>
            </flexbox-item>
          </flexbox>
          <divider></divider>
        </template>
      </list-view>

      pullupHandler (e) {
        this.page += 1
        if (this.page > this.lastPage) {
          this.loading = false
          this.end = true
          return
        }
        console.log(this.page)
        this._getUserList()
      },
      pulldownHandler (e) {
        this.page = 1
        this._getUserList()
      }
yunfeihuang commented 6 years ago

可能是你没有设置ListView的高度,没有滚动条不要会出现效果的 @MyDAIDAI

yunfeihuang commented 6 years ago

@MyDAIDAI @ks55259980 亲,组件API文档已经完成大部分,大伙可以访问 http://vx.bittyos.com 查看了