提交
This commit is contained in:
16
src/plugins/touch.js
Normal file
16
src/plugins/touch.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { touchDirectives } from './touch';
|
||||
|
||||
/**
|
||||
* 移动端触摸交互Vue插件
|
||||
*/
|
||||
export default {
|
||||
install(app) {
|
||||
// 注册所有触摸指令
|
||||
Object.keys(touchDirectives).forEach(key => {
|
||||
app.directive(key, touchDirectives[key]);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 单独导出指令,以便按需使用
|
||||
export { touchDirectives };
|
||||
Reference in New Issue
Block a user