fix(mixin/hollowoutable): memorized style not correct. by the way disabled hollow out effect on button, because it will delay the transition of backgrounded parent

This commit is contained in:
07akioni 2020-02-27 18:10:56 +08:00
parent 5fddda4912
commit 361f0cbb3a
2 changed files with 11 additions and 7 deletions

View File

@ -211,13 +211,14 @@ export default {
return this.circle || !this.$slots.default
},
avoidHollowOut () {
return (
this.text ||
this.ghost ||
!['primary', 'link', 'info', 'success', 'warning', 'error'].includes(
this.type
)
)
return true
// return (
// this.text ||
// this.ghost ||
// !['primary', 'link', 'info', 'success', 'warning', 'error'].includes(
// this.type
// )
// )
},
simulateHollowOut () {
if (this.ghost) return false

View File

@ -32,6 +32,9 @@ function getNextBackgroundColorOf (el) {
for (const key of Object.keys(diffedStyle)) {
if (~key.indexOf('ransition')) continue
memorizedInlineStyle[key] = el.style[key]
}
for (const key of Object.keys(diffedStyle)) {
if (~key.indexOf('ransition')) continue
el.style[key] = diffedStyle[key]
}
void (el.offsetHeight)