Skip to content

Commit

Permalink
fix: loading
Browse files Browse the repository at this point in the history
  • Loading branch information
cole committed Aug 3, 2024
1 parent 3aca010 commit f6df379
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/plugins/loading/component/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export default defineComponent({
visible: {
type: Boolean,
default: false
},
onAfterClose: {
type: Function,
default: undefined
}
},
emits: ['afterClose'],
Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/loading/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export default createReactivePlugin({
},
hide (config) {
this.isActive = false
const afterClose = () => {
config && config.afterClose && config.afterClose()
const onAfterClose = () => {
config && config.onAfterClose && config.onAfterClose()
}
this.update({ visible: false, afterClose })
this.update({ visible: false, onAfterClose })
},
update (props) {
const nextVNode = cloneVNode(instance, {
Expand Down

0 comments on commit f6df379

Please sign in to comment.