提交 65dd3d8d authored 作者: 龙菲's avatar 龙菲

修复视频和音频文件长度为0时回显问题

上级 64c6563f
<template> <template>
<div class="images-list"> <div class="images-list">
<el-upload :disabled="onlyRead" action="#" :on-remove="handleRemove" :on-exceed="handleExceed" :on-change="handleChange" <!-- <el-upload :disabled="onlyRead" action="#" :on-remove="handleRemove" :on-exceed="handleExceed" :on-change="handleChange"
:file-list="fileList" :multiple="fileLimit > 1" :limit="fileLimit" :list-type="listType" :accept="fileAccept" :file-list="fileList" :multiple="fileLimit > 1" :limit="fileLimit" :list-type="listType" :accept="fileAccept"
:auto-upload="false" ref="ManualUploader" :class="{ disabled: uploadDisabled || onlyRead }"> :auto-upload="false" ref="ManualUploader" :class="{ disabled: uploadDisabled || onlyRead }">
<i v-if="listType === 'picture-card'" class="el-icon-plus" slot="trigger" ></i> <i v-if="listType === 'picture-card'" class="el-icon-plus" slot="trigger" ></i>
...@@ -12,6 +12,18 @@ ...@@ -12,6 +12,18 @@
提示:只能上传{{ fileTypeName || "jpg/png" }}文件,且不超过 提示:只能上传{{ fileTypeName || "jpg/png" }}文件,且不超过
{{ fileSize }}MB,最多上传{{ fileLimit }}个文件 {{ fileSize }}MB,最多上传{{ fileLimit }}个文件
</div> </div>
</el-upload> -->
<el-upload action="#" :on-remove="handleRemove" :on-exceed="handleExceed" :on-change="handleChange"
:file-list="fileList" :multiple="fileLimit > 1" :limit="fileLimit" :list-type="listType" :accept="fileAccept"
:auto-upload="false" ref="ManualUploader" >
<i v-if="listType == 'picture-card'" class="el-icon-plus" slot="trigger"></i>
<el-button v-else size="small" type="primary">点击上传</el-button>
<div v-if="showTip" slot="tip" class="el-upload__tip">
<div v-if="advice" style="color: #f56c6c">建议:{{ advice }}</div>
提示:只能上传{{ fileTypeName || "jpg/png" }}文件,且不超过
{{ fileSize }}MB,最多上传{{ fileLimit }}个文件
</div>
</el-upload> </el-upload>
</div> </div>
</template> </template>
...@@ -109,9 +121,9 @@ export default { ...@@ -109,9 +121,9 @@ export default {
}); });
return fileAccept; return fileAccept;
}, },
uploadDisabled() { // uploadDisabled() {
return this.fileList.length == this.fileLimit; // return this.fileList.length == this.fileLimit;
}, // },
}, },
methods: { methods: {
getFiles() { getFiles() {
...@@ -210,9 +222,10 @@ export default { ...@@ -210,9 +222,10 @@ export default {
}; };
</script> </script>
<style lang="scss" > <style lang="scss" >
.disabled .el-upload--picture-card,.el-upload--card { // .disabled .el-upload--picture-card,
display: none !important; // .el-upload--card {
} // display: none !important;
// }
.el-upload-list__item { .el-upload-list__item {
transition: none !important; transition: none !important;
......
...@@ -41,8 +41,8 @@ module.exports = { ...@@ -41,8 +41,8 @@ module.exports = {
proxy: { proxy: {
'/api': { '/api': {
// target: 'http://172.24.100.109:8080/', // target: 'http://172.24.100.109:8080/',
// target:'http://222.85.214.245:9603/api', target:'http://222.85.214.245:9603/api',
target:'http://192.168.1.230:9603/api', // target:'http://192.168.1.230:9603/api',
// target: 'http://114.115.157.218:9602/api',//生产 // target: 'http://114.115.157.218:9602/api',//生产
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
...@@ -50,8 +50,8 @@ module.exports = { ...@@ -50,8 +50,8 @@ module.exports = {
} }
}, },
'/files': { '/files': {
target: 'http://192.168.1.230:9604/files', // target: 'http://192.168.1.230:9604/files',
// target: 'http://222.85.214.245:9604/files', target: 'http://222.85.214.245:9604/files',
// target: 'http://114.115.157.218:9602/files',//生产 // target: 'http://114.115.157.218:9602/files',//生产
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论