mirror of https://gitee.com/xiaonuobase/snowy
【更新】更新前端部分代码的换行格式
parent
17da615cea
commit
d8bf602f74
|
@ -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('只能上传视频类型文件')
|
||||||
|
@ -362,8 +359,7 @@
|
||||||
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)
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 = () => {
|
||||||
|
|
Loading…
Reference in New Issue