🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

ollo

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ollo

公众号H5🈲触顶后允许局部元素滚动解决方案

npmnpm
Version
1.0.4
Version published
Weekly downloads
2
-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

ollo

Vue3环境插件

注册局部滚动指令

  • 支持响应式变量
// main.ts (入口文件)
import { createApp } from 'vue';
import { scroller } from 'ollo';
import App from './App.vue';

const app = createApp(App);

app.use(scroller);
app.use(longtouch);
<!-- case 1 -->
<template>
    <textarea v-scroll />
</template>

<!-- case 2 -->
<template>
    <textarea v-scroll="true" />
</template>

<!-- case 3 -->
<template>
    <textarea v-scroll="false" />
</template>

<!-- case 4 -->
<template>
    <textarea v-scroll="shouldScroll" />
</template>
<!-- case 1 -->
<template>
    <!-- 单指按下400ms, 触发 -->
    <textarea v-longtouch="callback" />
</template>

<!-- case 2 -->
<template>
    <!-- 单指按下500ms, 触发 -->
    <textarea v-longtouch:500="callback" />
</template>

<script setup>
function callback() {
    // doSomething
}
</script>

Keywords

scrollable

FAQs

Package last updated on 22 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts