-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ljtool/dev
feat: add scroll-x directives
- Loading branch information
Showing
6 changed files
with
1,756 additions
and
1,474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# scrollX PC 鼠标横向滑动 scroll | ||
|
||
### 介绍 | ||
|
||
scrollX PC 鼠标横向滑动 scroll | ||
|
||
### 引入 | ||
|
||
```js | ||
import scrollX from 'lj-utils/directives/scrollX'; | ||
directives: { | ||
scrollX: scrollX, | ||
}, | ||
// vue3 setup | ||
import vScrollX from 'lj-utils/directive/scrollX'; | ||
// 或 | ||
import {scrollX as vScrollX} from 'lj-utils/directive/scrollX'; | ||
``` | ||
|
||
## 代码演示 | ||
|
||
### 基础用法 | ||
|
||
```html | ||
<div | ||
v-scroll-x | ||
style="height: 100px; width: 100vw; background: grey; overflow: auto" | ||
> | ||
<div style="width: 200vw; background: grey">test text</div> | ||
</div> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<demo-block title="鼠标点击内容移动"> | ||
<div | ||
id="a" | ||
v-scroll-x | ||
style="height: 100px; width: 100vw; background: grey; overflow: auto" | ||
> | ||
<div style="width: 200vw; background: grey">test text</div> | ||
<div style="width: 200vw; background: grey"> | ||
test texttest texttest texttest texttest texttest text | ||
</div> | ||
</div> | ||
</demo-block> | ||
</template> | ||
|
||
<script setup> | ||
import { scrollX as vScrollX } from 'lj-utils/directive/scrollX'; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters