forked from opentiny/tiny-vue
fix(tabs-mf): beforeLeave trigger twice (#4191)
This commit is contained in:
parent
a606236274
commit
f314981f46
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx --no-install commitlint --edit
|
||||
# 兼容node25
|
||||
pnpm exec commitlint --edit
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
||||
# 兼容node25
|
||||
pnpm exec lint-staged
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { fastdom } from '@opentiny/utils'
|
|||
export const setActive =
|
||||
({ state, api }) =>
|
||||
(name) => {
|
||||
const current = state.currentItem ? state.currentItem.name : ''
|
||||
const current = state.cacheCurrentItem ? state.cacheCurrentItem.name : ''
|
||||
|
||||
if (current && current !== name) {
|
||||
api.canLeave(name, current).then((result) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue