Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbb9ab2e

Browse files
committed
Accordion watches for activeItemKey changes
1 parent02bf4b3 commitbb9ab2e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎packages/coreui-vue/src/components/accordion/CAccordion.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import{defineComponent,h,provide,ref}from'vue'
1+
import{defineComponent,h,provide,ref,watch}from'vue'
22

33
constCAccordion=defineComponent({
44
name:'CAccordion',
@@ -21,6 +21,9 @@ const CAccordion = defineComponent({
2121
constsetActiveItemKey=(key:string|number)=>{
2222
activeItemKey.value=key
2323
}
24+
25+
watch(()=>props.activeItemKey,value=>activeItemKey.value=value)
26+
2427
provide('activeItemKey',activeItemKey)
2528
provide('alwaysOpen',props.alwaysOpen)
2629
provide('setActiveItemKey',setActiveItemKey)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp