【更新】更新前端部分代码的换行格式

pull/256/MERGE
俞宝山 2025-05-13 00:30:46 +08:00
parent 17da615cea
commit d8bf602f74
3 changed files with 43 additions and 39 deletions

View File

@ -74,9 +74,7 @@
您的浏览器不支持video标签哦请联系管理员 您的浏览器不支持video标签哦请联系管理员
</video> </video>
</template> </template>
<template v-else> <template v-else> </template>
暂不支持该文件预览
</template>
</a-modal> </a-modal>
<a-upload-dragger <a-upload-dragger
@ -305,8 +303,7 @@
message.warning('只能上传图片类型文件') message.warning('只能上传图片类型文件')
} }
return isPNG || Upload.LIST_IGNORE return isPNG || Upload.LIST_IGNORE
} } else if (props.uploadMode == 'video') {
else if (props.uploadMode == 'video') {
const isVideo = file.type.startsWith('video/') const isVideo = file.type.startsWith('video/')
if (!isVideo) { if (!isVideo) {
message.warning('只能上传视频类型文件') message.warning('只能上传视频类型文件')
@ -348,7 +345,7 @@
data.response.data + (resultIntervalValue.value ? ',' + resultIntervalValue.value : '') data.response.data + (resultIntervalValue.value ? ',' + resultIntervalValue.value : '')
}) })
emit('update:value', resultIntervalValue) emit('update:value', resultIntervalValue)
emit('onSuccessful',resultIntervalValue) emit('onSuccessful', resultIntervalValue)
emit('onChange', resultIntervalValue) emit('onChange', resultIntervalValue)
} else if (props.uploadResultCategory === 'array') { } else if (props.uploadResultCategory === 'array') {
if (props.completeResult) { if (props.completeResult) {
@ -360,16 +357,15 @@
} }
}) })
emit('update:value', newResult) emit('update:value', newResult)
emit('onSuccessful',newResult) emit('onSuccessful', newResult)
emit('onChange', newResult) emit('onChange', newResult)
} } else {
else {
const resultArrayValue = ref([]) const resultArrayValue = ref([])
result.forEach((data) => { result.forEach((data) => {
resultArrayValue.value.push(data.response.data) resultArrayValue.value.push(data.response.data)
}) })
emit('update:value', resultArrayValue) emit('update:value', resultArrayValue)
emit('onSuccessful',resultArrayValue) emit('onSuccessful', resultArrayValue)
emit('onChange', resultArrayValue) emit('onChange', resultArrayValue)
} }
} }

View File

@ -187,10 +187,10 @@ tool.parseTime = (time, cFormat) => {
if (typeof time === 'object') { if (typeof time === 'object') {
date = time date = time
} else { } else {
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { if (typeof time === 'string' && /^[0-9]+$/.test(time)) {
time = parseInt(time) time = parseInt(time)
} }
if ((typeof time === 'number') && (time.toString().length === 10)) { if (typeof time === 'number' && time.toString().length === 10) {
time = time * 1000 time = time * 1000
} }
date = new Date(time) date = new Date(time)
@ -207,7 +207,9 @@ tool.parseTime = (time, cFormat) => {
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key] let value = formatObj[key]
// Note: getDay() returns 0 on Sunday // Note: getDay() returns 0 on Sunday
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] } if (key === 'a') {
return ['日', '一', '二', '三', '四', '五', '六'][value]
}
if (result.length > 0 && value < 10) { if (result.length > 0 && value < 10) {
value = '0' + value value = '0' + value
} }

View File

@ -14,7 +14,13 @@
<a-textarea v-model:value="formData.remark" placeholder="请输入备注" :auto-size="{ minRows: 3, maxRows: 5 }" /> <a-textarea v-model:value="formData.remark" placeholder="请输入备注" :auto-size="{ minRows: 3, maxRows: 5 }" />
</a-form-item> </a-form-item>
<a-form-item label="排序码:" name="sortCode"> <a-form-item label="排序码:" name="sortCode">
<a-input-number v-model:value="formData.sortCode" placeholder="请输入排序码" :min="1" :max="10000" style="width: 100%" /> <a-input-number
v-model:value="formData.sortCode"
placeholder="请输入排序码"
:min="1"
:max="10000"
style="width: 100%"
/>
</a-form-item> </a-form-item>
</a-form> </a-form>
<template #footer> <template #footer>
@ -53,7 +59,7 @@
// //
const formRules = { const formRules = {
name: [required('请输入名称')], name: [required('请输入名称')],
sortCode: [required('请输入排序码')], sortCode: [required('请输入排序码')]
} }
// //
const onSubmit = () => { const onSubmit = () => {