Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
8b8f530b
提交
8b8f530b
编写于
12月 28, 2020
作者:
vino
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/dev-circle-nine-20201231' into dev-circle-nine-20201231
上级
e23abaeb
154f024e
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
25 行增加
和
14 行删除
+25
-14
baseinfo.vue
src/components/activitymanagement/baseinfo.vue
+25
-14
未找到文件。
src/components/activitymanagement/baseinfo.vue
浏览文件 @
8b8f530b
...
...
@@ -147,7 +147,7 @@
</div>
<div
class=
"limit-text"
>
<p>
限制大小: 500kb
</p>
<p>
最小尺寸:160*160
</p>
<p>
尺寸:112*112
</p>
<p>
支持jpeg, png格式
</p>
</div>
</el-upload>
...
...
@@ -180,7 +180,7 @@
</div>
<div
class=
"limit-text"
>
<p>
限制大小: 500kb
</p>
<p>
最小尺寸:160*160
</p>
<p>
宽度:750px
</p>
<p>
支持jpeg, png格式
</p>
</div>
</el-upload>
...
...
@@ -548,11 +548,11 @@
beforeUploadPic1(file) {
this.currentOption.aspectRatio = 1/1;
this.currentOption.cropBoxResizable = true;
this.currentOption.minCropBoxWidth = 1
60
;
this.currentOption.minCropBoxHeight = 1
60
;
this.currentOption.minCropBoxWidth = 1
12
;
this.currentOption.minCropBoxHeight = 1
12
;
let fileLimit = {
width: 1
60
,
height: 1
60
,
width: 1
12
,
height: 1
12
,
size: 0.5,
sizeText: "
500
K
",
key: "
listImage
",
...
...
@@ -565,11 +565,11 @@
beforeUploadPic2(file) {
this.currentOption.aspectRatio = 1/1;
this.currentOption.cropBoxResizable = true;
this.currentOption.minCropBoxWidth =
16
0;
this.currentOption.minCropBoxHeight = 160;
this.currentOption.minCropBoxWidth =
75
0;
//
this.currentOption.minCropBoxHeight = 160;
let fileLimit = {
width:
16
0,
height:
160,
width:
75
0,
height:
0, //不限制
size: 0.5,
sizeText: "
500
K
",
key: "
introImage
",
...
...
@@ -600,18 +600,29 @@
vm.slide2.oriUrl = theFile.target.result;
image.onload = function () {
let _this = this;
// if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
if (_this.width < fileLimit.width || _this.height < fileLimit.height) {
if (fileLimit.key == "
introImage
"){
//表示不限制高度
if (_this.width != fileLimit.width){
vm.$message.error("
图片必须是
jpeg
或
png
格式,同时长宽尺寸和图片大小需符合要求
");
return;
}
}
if (fileLimit.key == "
listImage
"){
if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
vm.$message.error("
图片必须是
jpeg
或
png
格式,同时长宽尺寸和图片大小需符合要求
");
return;
}
}
// else if(_this.width > fileLimit.width || _this.height > fileLimit.height){
// vm.showCropper = true;
// vm.currentOption.cvWidth = _this.width;
// vm.currentOption.cvHeight = _this.height;
// return;
// }
else {
//
else {
openLoading(vm);
doUpload(vm, file, getFilePath(file, null), "
preview4
", "
progress1
", 1).then(function (path) {
closeLoading(vm);
...
...
@@ -629,7 +640,7 @@
};
vm.$message.success("
上传成功
");
});
}
//
}
};
};
return isJPG && isLt2M;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录