mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 10:20:19 +08:00
feat(Tag): close event param (#8337)
This commit is contained in:
parent
1e3791a8a3
commit
6877dabe6a
@ -108,7 +108,7 @@ export default {
|
|||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
| ----- | ---------------------------------- | ------------------- |
|
| ----- | ---------------------------------- | ------------------- |
|
||||||
| click | Emitted when component is clicked | _event: MouseEvent_ |
|
| click | Emitted when component is clicked | _event: MouseEvent_ |
|
||||||
| close | Emitted when close icon is clicked | - |
|
| close | Emitted when close icon is clicked | _event: MouseEvent_ |
|
||||||
|
|
||||||
### Less Variables
|
### Less Variables
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ export default {
|
|||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
| ------ | -------------- | ------------------- |
|
| ------ | -------------- | ------------------- |
|
||||||
| click | 点击时触发 | _event: MouseEvent_ |
|
| click | 点击时触发 | _event: MouseEvent_ |
|
||||||
| close | 关闭标签时触发 | - |
|
| close | 关闭标签时触发 | _event: MouseEvent_ |
|
||||||
|
|
||||||
### 样式变量
|
### 样式变量
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ export default defineComponent({
|
|||||||
setup(props, { slots, emit }) {
|
setup(props, { slots, emit }) {
|
||||||
const onClose = (event: MouseEvent) => {
|
const onClose = (event: MouseEvent) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
emit('close');
|
emit('close', event);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getStyle = (): CSSProperties => {
|
const getStyle = (): CSSProperties => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user