fix: 解决PHP上传限制清空之后可以上传的问题 (#1227)

pull/1229/head
zhengkunwang223 2 years ago committed by GitHub
parent ce9c2e6d3c
commit 4f650cad9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,8 +3,8 @@
<el-row> <el-row>
<el-col :xs="20" :sm="12" :md="10" :lg="10" :xl="8" :offset="1"> <el-col :xs="20" :sm="12" :md="10" :lg="10" :xl="8" :offset="1">
<el-form :model="form" :rules="rules" ref="phpFormRef"> <el-form :model="form" :rules="rules" ref="phpFormRef">
<el-form-item> <el-form-item prop="uploadSize">
<el-input clearable v-model.number="form.uploadSize" maxlength="15"> <el-input clearable type="number" v-model.number="form.uploadSize" maxlength="15">
<template #append>M</template> <template #append>M</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -19,7 +19,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { GetPHPConfig, UpdatePHPConfig } from '@/api/modules/website'; import { GetPHPConfig, UpdatePHPConfig } from '@/api/modules/website';
import { checkNumberRange } from '@/global/form-rules'; import { Rules, checkNumberRange } from '@/global/form-rules';
import { computed, onMounted, reactive } from 'vue'; import { computed, onMounted, reactive } from 'vue';
import ConfirmDialog from '@/components/confirm-dialog/index.vue'; import ConfirmDialog from '@/components/confirm-dialog/index.vue';
import { ref } from 'vue'; import { ref } from 'vue';
@ -37,7 +37,7 @@ const websiteID = computed(() => {
return props.id; return props.id;
}); });
const rules = reactive({ const rules = reactive({
uploadSize: [checkNumberRange(0, 999999999)], uploadSize: [Rules.requiredInput, checkNumberRange(0, 999999999)],
}); });
const phpFormRef = ref(); const phpFormRef = ref();
const confirmDialogRef = ref(); const confirmDialogRef = ref();

Loading…
Cancel
Save