New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

shi-touch

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shi-touch

A Vue's plugin of v-touch

latest
npmnpm
Version
2.5.0
Version published
Maintainers
1
Created
Source

Vue plugin project

v-touch

下载自定义指令依赖

npm install vTouch --save -dev

引入指令

npm run dist ==== 生成打包的JS文件, 直接引入即可

使用指令参数说明

  • v-tap // 点击触发

  • v-longTap // 长按1秒触发

  • v-swipe // 移动触发

  • v-swipeup // 上移动10px触发

  • v-swipedown // 下移动10px触发

  • v-swipeleft // 左移动10px触发

  • v-swiperight // 右移动10px触发

dom 组件使用

<div v-tap="fn" v-swipeleft="(e) => fn(...)"></div>

extra

npm run build ---- vue-cli 打包项目

npm run dev ---- 启动项目

npm run dist ---- webpack-cli 打包插件生成JS文件 - 根据 vue.dist.config.js 配置来生成

package.json -- main.js  // 决定 import xxx from “vue-plugin” 它默认就会去找 dist下的 JS 文件

npm login --- 登录 npm 插件库 输入 用户 密码

npm publish --- 先dist打包 否则拿不到dist路径下的JS文件 发布插件

FAQs

Package last updated on 01 Apr 2021

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