Skip to content

Commit

Permalink
feat: add update and requestUpdate for quark-core
Browse files Browse the repository at this point in the history
  • Loading branch information
xsf0105 committed Oct 24, 2023
1 parent 6c7618d commit 5ed085f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ module.exports = defineConfig({
destructuring: 'all',
},
],

'n/no-process-exit': 'off',
'n/no-missing-import': 'off',
'n/no-missing-require': [
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"*.vue": "html"
},
"eslint.options": {
"configFile": "./.eslintrc.json"
"configFile": "./.eslintrc.cjs"
},
"eslint.validate": ["javascript", "vue", "html", "typescript"],
"workbench.startupEditor": "none",
Expand Down
14 changes: 12 additions & 2 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function customElement(
}
});
}

return isBoolean;
}

Expand Down Expand Up @@ -144,7 +144,7 @@ export function customElement(
);
});
}

}
}

Expand Down Expand Up @@ -264,6 +264,16 @@ export class QuarkElement extends HTMLElement {
}
}

// Reserve, may expand in the future
requestUpdate() {
this._render()
}

// Reserve, may expand in the future
update() {
this._render()
}

private _updateProperty() {
(this.constructor as any).observedAttributes.forEach(
(propertyName: string) => {
Expand Down

0 comments on commit 5ed085f

Please sign in to comment.