11<script setup lang="ts">
22import { VueSelect , VueSwitch } from ' @vue/devtools-ui'
33import { rpc } from ' @vue/devtools-core'
4- import { useCustomInspectorState } from ' ~/composables/custom-inspector-state '
4+ import { computed } from ' vue '
55
66const props = defineProps <{
77 pluginId: string
8- options: Record <string , unknown >
9- values: Record <string , unknown >
8+ options: Record <string , any >
9+ values: Record <string , any >
1010}>()
1111const emit = defineEmits ([' update' ])
12- const state = useCustomInspectorState ()
1312const options = computed (() => props .options )
1413const values = computed (() => props .values )
1514
16- function toggleOption(key : string , v : unknown ) {
15+ function toggleOption(key : any , v : any ) {
1716 rpc .value .updatePluginSettings (props .pluginId , key , v )
1817 rpc .value .getPluginSettings (props .pluginId ).then ((_settings ) => {
1918 emit (' update' , _settings )
@@ -34,18 +33,14 @@ function toggleOption(key: string, v: unknown) {
3433 :model-value =" values[index]"
3534 class =" row-reverse flex hover:bg-active py1 pl2 pr1"
3635 @update:model-value =" (v: boolean) => toggleOption(index, v)"
37- >
38- <div flex =" ~ gap-2" flex-auto items-center justify-start >
39- <span capitalize op75 >{{ name }}</span >
40- </div >
41- </VueSwitch >
36+ />
4237 </div >
4338 <template v-else-if =" item .type === ' choice' " >
4439 <div >
4540 <VueSelect
4641 :model-value =" values[index]"
4742 :options =" item.options"
48- @update:model-value =" (v: string ) => toggleOption(index, v)"
43+ @update:model-value =" (v) => toggleOption(index, v)"
4944 />
5045 </div >
5146 </template >
0 commit comments