增加前端格式检查配置

This commit is contained in:
yml2213
2026-06-08 06:40:33 +08:00
parent 79ea3a476c
commit 500f511185
150 changed files with 7254 additions and 4013 deletions
@@ -35,7 +35,7 @@ const form = ref<CreatePaymentAccountRequest>({
watch(
() => props.modelValue,
(val) => {
val => {
if (val) {
if (props.account) {
// 编辑模式:只能修改部分字段
@@ -157,16 +157,9 @@ function removeImage(index: number) {
width="500px"
@update:model-value="emit('update:modelValue', $event)"
>
<el-form
:model="form"
label-width="100px"
label-position="left"
>
<el-form :model="form" label-width="100px" label-position="left">
<el-form-item label="账号类型" required>
<el-radio-group
v-model="form.account_type"
:disabled="!!account"
>
<el-radio-group v-model="form.account_type" :disabled="!!account">
<el-radio-button value="alipay">支付宝</el-radio-button>
<el-radio-button value="wechat">微信</el-radio-button>
<el-radio-button value="bank">银行卡</el-radio-button>
@@ -195,26 +188,19 @@ function removeImage(index: number) {
form.account_type === 'alipay'
? '支付宝账号(手机号或邮箱)'
: form.account_type === 'wechat'
? '微信号'
: '银行卡号'
? '微信号'
: '银行卡号'
"
/>
</el-form-item>
<template v-if="form.account_type === 'bank'">
<el-form-item label="银行名称" required>
<el-input
v-model="form.bank_name"
placeholder="如:中国工商银行"
:disabled="!!account"
/>
<el-input v-model="form.bank_name" placeholder="如:中国工商银行" :disabled="!!account" />
</el-form-item>
<el-form-item label="开户支行">
<el-input
v-model="form.bank_branch"
placeholder="如:北京朝阳支行(可选)"
/>
<el-input v-model="form.bank_branch" placeholder="如:北京朝阳支行(可选)" />
</el-form-item>
</template>
@@ -224,7 +210,7 @@ function removeImage(index: number) {
</div>
<div class="certificate-upload">
<div v-for="(url, index) in form.certificate_urls" :key="url" class="certificate-item">
<img :src="url" alt="凭证">
<img :src="url" alt="凭证" />
<el-button
:icon="Delete"
circle
@@ -234,14 +220,18 @@ function removeImage(index: number) {
@click="removeImage(index)"
/>
</div>
<label v-if="!form.certificate_urls || form.certificate_urls.length < 3" class="upload-btn" :class="{ 'is-uploading': uploading }">
<label
v-if="!form.certificate_urls || form.certificate_urls.length < 3"
class="upload-btn"
:class="{ 'is-uploading': uploading }"
>
<input
type="file"
accept="image/*"
style="display: none"
:disabled="uploading"
@change="handleUpload"
>
/>
<el-icon v-if="uploading" class="is-loading"><Loading /></el-icon>
<el-icon v-else><Upload /></el-icon>
<span>{{ uploading ? '上传中...' : '上传凭证' }}</span>
@@ -271,14 +261,8 @@ function removeImage(index: number) {
</el-alert>
<template #footer>
<el-button @click="emit('update:modelValue', false)">
取消
</el-button>
<el-button
type="primary"
:loading="submitting"
@click="handleSubmit"
>
<el-button @click="emit('update:modelValue', false)"> 取消 </el-button>
<el-button type="primary" :loading="submitting" @click="handleSubmit">
{{ account ? '更新' : '添加' }}
</el-button>
</template>