forked from AkkomaGang/admin-fe
Add input for configuring atom values
This commit is contained in:
parent
7aba783351
commit
dc7b327076
1 changed files with 11 additions and 3 deletions
|
@ -20,16 +20,17 @@
|
||||||
@change="updateSetting($event, settingsGroup.key, setting.key)"/>
|
@change="updateSetting($event, settingsGroup.key, setting.key)"/>
|
||||||
<el-select
|
<el-select
|
||||||
v-if="setting.type === 'module'"
|
v-if="setting.type === 'module'"
|
||||||
:value="data.value"
|
:value="data[setting.key]"
|
||||||
clearable
|
clearable
|
||||||
@change="updateSetting($event, settingsGroup.key, 'value')">
|
@change="updateSetting($event, settingsGroup.key, setting.key)">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in setting.suggestions"
|
v-for="option in setting.suggestions"
|
||||||
:value="option"
|
:value="option"
|
||||||
:key="option"/>
|
:key="option"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select
|
<el-select
|
||||||
v-if="Array.isArray(setting.type) && setting.type.includes('list') && setting.type.includes('module')"
|
v-if="Array.isArray(setting.type) && (
|
||||||
|
(setting.type.includes('list') && setting.type.includes('module')) || (setting.type.includes('module') && setting.type.includes('atom')))"
|
||||||
:value="data[setting.key]"
|
:value="data[setting.key]"
|
||||||
multiple
|
multiple
|
||||||
filterable
|
filterable
|
||||||
|
@ -61,6 +62,13 @@
|
||||||
:placeholder="setting.key === 'ip' ? 'xxx.xxx.xxx.xx' : setting.suggestions[0]"
|
:placeholder="setting.key === 'ip' ? 'xxx.xxx.xxx.xx' : setting.suggestions[0]"
|
||||||
:value="data[setting.key]"
|
:value="data[setting.key]"
|
||||||
@input="updateSetting($event, settingsGroup.key, setting.key)"/>
|
@input="updateSetting($event, settingsGroup.key, setting.key)"/>
|
||||||
|
<el-input
|
||||||
|
v-if="setting.type === 'atom'"
|
||||||
|
:value="data[setting.key]"
|
||||||
|
:placeholder="setting.suggestions[0]"
|
||||||
|
@input="updateSetting($event, settingsGroup.key, setting.key)">
|
||||||
|
<template slot="prepend">:</template>
|
||||||
|
</el-input>
|
||||||
<p class="expl">{{ setting.description }}</p>
|
<p class="expl">{{ setting.description }}</p>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in a new issue