Skip to content

Commit

Permalink
fix: remove error classname
Browse files Browse the repository at this point in the history
  • Loading branch information
BeADre committed Jun 1, 2021
1 parent 4ab9f01 commit 675a8da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/snackbar/example/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default {
}
const create = (type) => {
const text = type === 'loading' ? pack.value.wait : pack.value.wait
const text = type === 'loading' ? pack.value.wait : pack.value.text
Snackbar[type](text)
if (type === 'loading') {
Expand Down
4 changes: 3 additions & 1 deletion packages/varlet-ui/src/snackbar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,11 @@ const TransitionGroupHost = {
})

const snackbarList = uniqSnackbarOptions.map((option: UniqSnackbarOptions) => {
const transitionGroupEl = document.querySelector('.var-transition-group')
if (option.reactiveSnackOptions.forbidClick || option.reactiveSnackOptions.type === 'loading') {
const transitionGroupEl = document.querySelector('.var-transition-group')
;(transitionGroupEl as HTMLElement).classList.add('var-pointer-auto')
} else {
;(transitionGroupEl as HTMLElement).classList.remove('var-pointer-auto')
}

if (Snackbar.isAllowMultiple) option.reactiveSnackOptions.position = 'top'
Expand Down

0 comments on commit 675a8da

Please sign in to comment.