mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
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:
parent
5fddda4912
commit
361f0cbb3a
@ -211,13 +211,14 @@ export default {
|
|||||||
return this.circle || !this.$slots.default
|
return this.circle || !this.$slots.default
|
||||||
},
|
},
|
||||||
avoidHollowOut () {
|
avoidHollowOut () {
|
||||||
return (
|
return true
|
||||||
this.text ||
|
// return (
|
||||||
this.ghost ||
|
// this.text ||
|
||||||
!['primary', 'link', 'info', 'success', 'warning', 'error'].includes(
|
// this.ghost ||
|
||||||
this.type
|
// !['primary', 'link', 'info', 'success', 'warning', 'error'].includes(
|
||||||
)
|
// this.type
|
||||||
)
|
// )
|
||||||
|
// )
|
||||||
},
|
},
|
||||||
simulateHollowOut () {
|
simulateHollowOut () {
|
||||||
if (this.ghost) return false
|
if (this.ghost) return false
|
||||||
|
@ -32,6 +32,9 @@ function getNextBackgroundColorOf (el) {
|
|||||||
for (const key of Object.keys(diffedStyle)) {
|
for (const key of Object.keys(diffedStyle)) {
|
||||||
if (~key.indexOf('ransition')) continue
|
if (~key.indexOf('ransition')) continue
|
||||||
memorizedInlineStyle[key] = el.style[key]
|
memorizedInlineStyle[key] = el.style[key]
|
||||||
|
}
|
||||||
|
for (const key of Object.keys(diffedStyle)) {
|
||||||
|
if (~key.indexOf('ransition')) continue
|
||||||
el.style[key] = diffedStyle[key]
|
el.style[key] = diffedStyle[key]
|
||||||
}
|
}
|
||||||
void (el.offsetHeight)
|
void (el.offsetHeight)
|
||||||
|
Loading…
Reference in New Issue
Block a user