Skip to content

Commit

Permalink
perf(ui/collapse): add call (#369)
Browse files Browse the repository at this point in the history
* perf(ui/collapse): add call

* perf(ui/spaces): add class
  • Loading branch information
ahqrt authored Apr 3, 2022
1 parent eadf910 commit cfd23a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/varlet-ui/src/collapse/Collapse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type { ComputedRef } from 'vue'
import type { CollapseItemProvider } from '../collapse-item/provide'
import type { CollapseProvider } from './provide'
import type { CollapseModelValue } from './props'
import { call } from '../utils/components'
export default defineComponent({
name: 'VarCollapse',
Expand Down Expand Up @@ -49,9 +50,8 @@ export default defineComponent({
const updateItem = (value: number | string, isExpand: boolean) => {
const modelValue = getValue(value, isExpand)
props['onUpdate:modelValue']?.(modelValue)
props.onChange?.(modelValue)
call(props['onUpdate:modelValue'], modelValue)
call(props.onChange, modelValue)
}
const matchName = (): Array<CollapseItemProvider> | CollapseItemProvider | undefined => {
Expand Down

0 comments on commit cfd23a3

Please sign in to comment.