refactor(ui): 调整优化

This commit is contained in:
廖彦棋 2024-03-11 13:46:08 +08:00
parent d4d1fb26f6
commit c55275872e
4 changed files with 12 additions and 22 deletions

View File

@ -165,6 +165,7 @@ const createOption = (data, key) => {
.chartDom { .chartDom {
width: 450px; width: 450px;
height: 500px; height: 500px;
text-align: center;
} }
} }
</style> </style>

View File

@ -103,19 +103,14 @@ async function handleSubmit({ errors }: any) {
> >
<a-space direction="vertical" style="width: 100%"> <a-space direction="vertical" style="width: 100%">
<a-form-item field="username" label="账号"> <a-form-item field="username" label="账号">
<a-input <a-input v-model="formData.username" placeholder="请输入您的账号" class="input" />
v-model="formData.username"
placeholder="请输入您的账号"
class="input"
></a-input>
</a-form-item> </a-form-item>
<a-form-item field="password" label="密码"> <a-form-item field="password" label="密码">
<a-input-password <a-input-password
v-model="formData.password" v-model="formData.password"
placeholder="请输入您的密码" placeholder="请输入您的密码"
class="input" class="input"
> />
</a-input-password>
</a-form-item> </a-form-item>
<a-form-item field="captcha" label="验证码"> <a-form-item field="captcha" label="验证码">
<a-input v-model="formData.captcha" placeholder="请输入验证码" class="input"> <a-input v-model="formData.captcha" placeholder="请输入验证码" class="input">

View File

@ -41,6 +41,7 @@ const columns: SearchTableColumns[] = [
hideInTable: true, hideInTable: true,
search: { search: {
valueType: "select", valueType: "select",
defaultValue: -1,
fieldProps: { fieldProps: {
options: [ options: [
{ label: "全部", value: -1 }, { label: "全部", value: -1 },

View File

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, ref } from "vue"; import { computed } from "vue";
import { Message } from "@arco-design/web-vue"; import { Message } from "@arco-design/web-vue";
import type { UploadInstance, FileItem } from "@arco-design/web-vue"; import type { UploadInstance, FileItem } from "@arco-design/web-vue";
import { uploadUrl } from "@/http/config"; import { uploadUrl } from "@/http/config";
@ -11,8 +11,6 @@ defineProps({
const emits = defineEmits(["update:modelValue"]); const emits = defineEmits(["update:modelValue"]);
const uploadRef = ref();
const uploadProps = computed<UploadInstance["$props"]>(() => ({ const uploadProps = computed<UploadInstance["$props"]>(() => ({
action: uploadUrl, action: uploadUrl,
name: "file", name: "file",
@ -28,19 +26,14 @@ const handleChange = (_, file: FileItem) => {
}; };
</script> </script>
<template> <template>
<a-input-group style="width: 100%"> <a-upload v-bind="uploadProps" style="width: 100%" @change="handleChange">
<a-input <template #upload-button>
:model-value="modelValue" <a-input-group style="width: 100%">
:placeholder="placeholder" <a-input :model-value="modelValue" :placeholder="placeholder" readonly />
readonly
@dblclick="uploadRef?.$el?.click()"
/>
<a-upload ref="uploadRef" v-bind="uploadProps" @change="handleChange">
<template #upload-button>
<a-button type="primary" style="width: 100px"> <a-button type="primary" style="width: 100px">
<icon-cloud /> <icon-cloud />
</a-button> </a-button>
</template> </a-input-group>
</a-upload> </template>
</a-input-group> </a-upload>
</template> </template>