Skip to content

Commit cf5f8ea

Browse files
authored
fix(dropdown-item): [dropdown] fix issues for v-auto-tip and add effect attr (#2283)
* fix(dropdown-item): [dropdown] fix issues for v-auto-tip and add effect attr * fix(dropdown-item): [dropdown] Modify version for dropdown-item
1 parent 7561208 commit cf5f8ea

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

packages/vue/src/dropdown-item/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@opentiny/vue-dropdown-item",
33
"type": "module",
4-
"version": "3.18.0",
4+
"version": "3.18.1",
55
"description": "",
66
"license": "MIT",
77
"sideEffects": false,
@@ -25,4 +25,4 @@
2525
"@opentiny-internal/vue-test-utils": "workspace:*",
2626
"vitest": "^0.31.0"
2727
}
28-
}
28+
}

packages/vue/src/dropdown-item/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ export const dropdownItemProps = {
8484
tipPosition: {
8585
type: String,
8686
default: 'right'
87+
},
88+
effect: {
89+
type: String,
90+
default: 'light'
8791
}
8892
}
8993

packages/vue/src/dropdown-item/src/pc.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<template>
1414
<!-- TINY-TODO: tiny-dropdown-menu__item命名不规范,后续统一有个迭代去掉 -->
1515
<li
16-
v-auto-tip="{ always: true, content: getTip, effect: 'dark', placement: tipPosition }"
16+
v-auto-tip="getTip ? { always: true, content: getTip, effect, placement: tipPosition } : false"
1717
class="tiny-dropdown-item tiny-dropdown-menu__item"
1818
:class="{
1919
'is-disabled': disabled,
@@ -96,7 +96,8 @@ export default defineComponent({
9696
'appendToBody',
9797
'textField',
9898
'tip',
99-
'tipPosition'
99+
'tipPosition',
100+
'effect'
100101
],
101102
components: {
102103
IconDeltaLeft: iconDeltaLeft()

0 commit comments

Comments
 (0)