Refactor frontend input components to use the v-model Vue pattern (#224)

* Use v-model for inputs

* Add opacity to LayerTree

* Fix FloatingMenu typing
This commit is contained in:
Chrs Msln
2021-06-27 08:18:47 +02:00
committed by Keavon Chambers
parent bb3293af43
commit 3f35c8d348
7 changed files with 65 additions and 33 deletions
@@ -5,15 +5,7 @@
<span>{{ activeEntry.label }}</span>
<Icon :class="'dropdown-arrow'" :icon="'DropdownArrow'" />
</div>
<MenuList
:menuEntries="menuEntries"
:activeEntry="activeEntry"
:defaultAction="setActiveEntry"
:direction="MenuDirection.Bottom"
:widthChanged="widthChanged"
:drawIcon="drawIcon"
ref="menuList"
/>
<MenuList :menuEntries="menuEntries" v-model:active-entry="activeEntry" :direction="MenuDirection.Bottom" @width-changed="onWidthChanged" :drawIcon="drawIcon" ref="menuList" />
</div>
</template>
@@ -101,7 +93,7 @@ export default defineComponent({
setActiveEntry(newActiveEntry: MenuListEntry) {
this.activeEntry = newActiveEntry;
},
widthChanged(newWidth: number) {
onWidthChanged(newWidth: number) {
this.minWidth = newWidth;
},
},