chore: 调整修改参数请求方式,调整通用字典类型

This commit is contained in:
2024-06-05 21:05:26 +08:00
parent b1485c238f
commit 568653d5cb
3 changed files with 9 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ export function listOption(query: System.OptionQuery) {
/** @desc 修改参数 */
export function updateOption(data: any) {
return http.patch(`${BASE_URL}`, data)
return http.put(`${BASE_URL}`, data)
}
/** @desc 重置参数 */

View File

@@ -1,12 +1,12 @@
<template>
<span v-if="!dictItem"></span>
<span v-else-if="!dictItem.color">{{ dictItem.label }}</span>
<a-tag v-else-if="dictItem.color === 'primary'" color="arcoblue">{{ dictItem.label }}</a-tag>
<a-tag v-else-if="dictItem.color === 'success'" color="green">{{ dictItem.label }}</a-tag>
<a-tag v-else-if="dictItem.color === 'warning'" color="orangered">{{ dictItem.label }}</a-tag>
<a-tag v-else-if="dictItem.color === 'error'" color="red">{{ dictItem.label }}</a-tag>
<a-tag v-else-if="dictItem.color === 'default'" color="gray">{{ dictItem.label }}</a-tag>
<a-tag v-else :color="dictItem.color">{{ dictItem.label }}</a-tag>
<span v-else-if="!dictItem.extend">{{ dictItem.label }}</span>
<a-tag v-else-if="dictItem.extend === 'primary'" color="arcoblue">{{ dictItem.label }}</a-tag>
<a-tag v-else-if="dictItem.extend === 'success'" color="green">{{ dictItem.label }}</a-tag>
<a-tag v-else-if="dictItem.extend === 'warning'" color="orangered">{{ dictItem.label }}</a-tag>
<a-tag v-else-if="dictItem.extend === 'error'" color="red">{{ dictItem.label }}</a-tag>
<a-tag v-else-if="dictItem.extend === 'default'" color="gray">{{ dictItem.label }}</a-tag>
<a-tag v-else :color="dictItem.extend">{{ dictItem.label }}</a-tag>
</template>
<script lang="ts" setup>

View File

@@ -11,7 +11,7 @@ interface Options {
export interface LabelValueState {
label: string
value: any
color?: string
extend?: string
}
/** 字典类型 */