1
1
<script setup lang="ts">
2
2
import { VueSelect , VueSwitch } from ' @vue/devtools-ui'
3
3
import { rpc } from ' @vue/devtools-core'
4
- import { useCustomInspectorState } from ' ~/composables/custom-inspector-state '
4
+ import { computed } from ' vue '
5
5
6
6
const props = defineProps <{
7
7
pluginId: string
8
- options: Record <string , unknown >
9
- values: Record <string , unknown >
8
+ options: Record <string , any >
9
+ values: Record <string , any >
10
10
}>()
11
11
const emit = defineEmits ([' update' ])
12
- const state = useCustomInspectorState ()
13
12
const options = computed (() => props .options )
14
13
const values = computed (() => props .values )
15
14
16
- function toggleOption(key : string , v : unknown ) {
15
+ function toggleOption(key : any , v : any ) {
17
16
rpc .value .updatePluginSettings (props .pluginId , key , v )
18
17
rpc .value .getPluginSettings (props .pluginId ).then ((_settings ) => {
19
18
emit (' update' , _settings )
@@ -34,18 +33,14 @@ function toggleOption(key: string, v: unknown) {
34
33
:model-value =" values[index]"
35
34
class =" row-reverse flex hover:bg-active py1 pl2 pr1"
36
35
@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
+ />
42
37
</div >
43
38
<template v-else-if =" item .type === ' choice' " >
44
39
<div >
45
40
<VueSelect
46
41
:model-value =" values[index]"
47
42
:options =" item.options"
48
- @update:model-value =" (v: string ) => toggleOption(index, v)"
43
+ @update:model-value =" (v) => toggleOption(index, v)"
49
44
/>
50
45
</div >
51
46
</template >
0 commit comments