2.0.0 • Published 5 years ago

vue-rescroll v2.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

vue-rescroll 是一款滚动状态管理指令化的插件。Is a rolling state management instruction plug-in.

https://www.npmjs.com/package/vue-rescroll 总下载量

How to use it

install

npm install vue-rescroll --save

use

全局注册/Global registration (main.js)

import VueRescroll from 'vue-rescroll';
Vue.use(VueRescroll);

局部注册/Partial registration (*.vue)

import { directive } from 'vue-rescroll';
directives: {
    'rescroll': directive
}

*.vue

使用默认配置/use default config
<div v-rescroll="{name: 'A unique marker'}"></div>

参数配置/Parameter configuration

keyrequirevaluetypediscribe
namestring用来保存滚动状态的key值
type'default'/'window'string滚动类型(局部,全局)
storageMode'default'/'localstorage'string滚动状态保存方式
domType'default'/'tab'string是否为tab切换组件
<div
    v-rescroll="{
        name: `${id}-scroll`,
        type: 'window',
        storageMode: 'localstorage'
    }"
     ></div>

tips

页面不要使用keep-alive缓存,那样的话,钩子函数不会触发。 Don't use keep-alive caching for your pages. In that case, the hook function won't trigger

使用vuex缓存数据/use vuex

async created () {
    if (hasData) return hasData;
    return await this.getData();
}

必须要每次刷新的页面/must refreshed

async created () {
    openLoading();
    await this.getData();
    closeLoading();
}

详细描述各种现象博客地址

2.0.0

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago