refactor: drop event delegation and use simple async edge case fix
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import { isString } from '@vue/shared'
|
||||
|
||||
// style properties that should NOT have "px" added when numeric
|
||||
const nonNumericRE = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i
|
||||
|
||||
export function patchStyle(el: any, prev: any, next: any, data: any) {
|
||||
const { style } = el
|
||||
if (!next) {
|
||||
@@ -11,11 +8,7 @@ export function patchStyle(el: any, prev: any, next: any, data: any) {
|
||||
style.cssText = next
|
||||
} else {
|
||||
for (const key in next) {
|
||||
let value = next[key]
|
||||
if (typeof value === 'number' && !nonNumericRE.test(key)) {
|
||||
value = value + 'px'
|
||||
}
|
||||
style[key] = value
|
||||
style[key] = next[key]
|
||||
}
|
||||
if (prev && !isString(prev)) {
|
||||
for (const key in prev) {
|
||||
|
||||
Reference in New Issue
Block a user