mix format

This commit is contained in:
shibao 2022-01-23 00:00:53 -05:00 committed by oliviasculley
parent f1f3082368
commit 9387756109
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
// update. https://github.com/phoenixframework/phoenix_live_view/issues/1011
export default {
attrs(){ return this.el.getAttribute("data-attrs").split(", ") },
beforeUpdate(){ this.prevAttrs = this.attrs().map(name => [name, this.el.getAttribute(name)]) },
updated(){ this.prevAttrs.forEach(([name, val]) => this.el.setAttribute(name, val)) }
attrs () { return this.el.getAttribute('data-attrs').split(', ') },
beforeUpdate () { this.prevAttrs = this.attrs().map(name => [name, this.el.getAttribute(name)]) },
updated () { this.prevAttrs.forEach(([name, val]) => this.el.setAttribute(name, val)) }
}