重构:将 config 表单的 visible 改成从字典数据里获取

This commit is contained in:
YunaiV 2023-03-10 21:30:54 +08:00
parent 30dea302a9
commit ba563f76c6

View File

@ -20,10 +20,14 @@
<el-input v-model="formData.value" placeholder="请输入参数键值" /> <el-input v-model="formData.value" placeholder="请输入参数键值" />
</el-form-item> </el-form-item>
<el-form-item label="是否可见" prop="visible"> <el-form-item label="是否可见" prop="visible">
<!-- TODO 芋艿改成组件 -->
<el-radio-group v-model="formData.visible"> <el-radio-group v-model="formData.visible">
<el-radio :key="true" :label="true"></el-radio> <el-radio
<el-radio :key="false" :label="false"></el-radio> v-for="dict in getBoolDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING)"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
@ -39,6 +43,7 @@
</Dialog> </Dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { DICT_TYPE, getBoolDictOptions } from '@/utils/dict'
import * as ConfigApi from '@/api/infra/config' import * as ConfigApi from '@/api/infra/config'
const { t } = useI18n() // const { t } = useI18n() //