Refactor: Move exposed properties to array

This commit is contained in:
Lea Verou
2025-03-16 23:06:23 -04:00
parent d649d2ee3b
commit c9a1e21cdb

View File

@@ -46,7 +46,22 @@ await customElements.whenDefined('wa-select');
let maxUid = 0;
const expose = [
'valueRaw',
'value',
'inputValueRaw',
'inputValue',
'colorRaw',
'color',
'inputColorRaw',
'inputColor',
'hue',
'level',
'tweaked',
];
export default {
expose,
props: {
modelValue: {
type: Object,
@@ -109,19 +124,7 @@ export default {
computedValue() {
let ret = {};
for (let property of [
'valueRaw',
'value',
'inputValueRaw',
'inputValue',
'colorRaw',
'color',
'inputColorRaw',
'inputColor',
'hue',
'level',
'tweaked',
]) {
for (let property of expose) {
ret[property] = this[property];
}