-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
16 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,14 @@ | ||
# v-hover | ||
|
||
## 功能介绍 | ||
## Function Introduction | ||
|
||
经过元素触发回调 | ||
🚧 正在施工中 🚧 | ||
|
||
## 示例 | ||
## Example | ||
|
||
<script setup lang="ts"> | ||
const handler = () => { | ||
window.alert('hover') | ||
} | ||
</script> | ||
<div | ||
v-hover="handler" | ||
:style="{ | ||
width: '200px', | ||
height: '200px', | ||
border: '1px solid #ccc' | ||
}" | ||
> | ||
Hover | ||
</div> | ||
🚧 正在施工中 🚧 | ||
|
||
## 使用 | ||
## Usage | ||
|
||
🚧 正在施工中 🚧 | ||
|
||
```typescript {2-4} | ||
<script setup lang="ts"> | ||
const handler = () => { | ||
window.alert('hover') | ||
} | ||
</script> | ||
<template> | ||
<div | ||
v-hover="handler" | ||
:style="{ | ||
width: '200px', | ||
height: '200px', | ||
border: '1px solid #ccc' | ||
}" | ||
> | ||
Hover | ||
</div> | ||
</template> | ||
``` |
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 |
---|---|---|
@@ -1,29 +1,13 @@ | ||
# v-onOnce | ||
|
||
## 功能介绍 | ||
## Function Introduction | ||
|
||
只触发一次回调 | ||
🚧 正在施工中 🚧 | ||
|
||
## 示例 | ||
## Example | ||
|
||
<script setup lang="ts"> | ||
const handler = () => { | ||
window.alert('Hello!') | ||
} | ||
</script> | ||
🚧 正在施工中 🚧 | ||
|
||
<button v-ononce:click="handler">只触发一次</button> | ||
## Usage | ||
|
||
|
||
## 使用 | ||
|
||
```typescript {8} | ||
<script setup lang="ts"> | ||
const handler = () => { | ||
window.alert('Hello!') | ||
} | ||
</script> | ||
<template> | ||
<button v-ononce:click="handler">只触发一次</button> | ||
</template> | ||
``` | ||
🚧 正在施工中 🚧 |
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
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{ | ||
"name": "@ileostar/v3-directives", | ||
"version": "0.0.5", | ||
"type": "module", | ||
"packageManager": "[email protected]", | ||
"description": "Custom Vue3 directives", | ||
"author": "ileostar <[email protected]> (https://github.com/ileostar)", | ||
|
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