Skip to content

Commit

Permalink
fix(dropdown-item): [dropdown] fix issues for v-auto-tip and add effe…
Browse files Browse the repository at this point in the history
…ct 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
  • Loading branch information
MomoPoppy authored Oct 17, 2024
1 parent 7561208 commit cf5f8ea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/vue/src/dropdown-item/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opentiny/vue-dropdown-item",
"type": "module",
"version": "3.18.0",
"version": "3.18.1",
"description": "",
"license": "MIT",
"sideEffects": false,
Expand All @@ -25,4 +25,4 @@
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
}
}
}
4 changes: 4 additions & 0 deletions packages/vue/src/dropdown-item/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ export const dropdownItemProps = {
tipPosition: {
type: String,
default: 'right'
},
effect: {
type: String,
default: 'light'
}
}

Expand Down
5 changes: 3 additions & 2 deletions packages/vue/src/dropdown-item/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<template>
<!-- TINY-TODO: tiny-dropdown-menu__item命名不规范,后续统一有个迭代去掉 -->
<li
v-auto-tip="{ always: true, content: getTip, effect: 'dark', placement: tipPosition }"
v-auto-tip="getTip ? { always: true, content: getTip, effect, placement: tipPosition } : false"
class="tiny-dropdown-item tiny-dropdown-menu__item"
:class="{
'is-disabled': disabled,
Expand Down Expand Up @@ -96,7 +96,8 @@ export default defineComponent({
'appendToBody',
'textField',
'tip',
'tipPosition'
'tipPosition',
'effect'
],
components: {
IconDeltaLeft: iconDeltaLeft()
Expand Down

0 comments on commit cf5f8ea

Please sign in to comment.