Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
610aa59c
提交
610aa59c
编写于
4月 13, 2020
作者:
haochangdi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改上传图片大小的提示
上级
8f4470bd
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
8 行增加
和
16 行删除
+8
-16
baseMessage.vue
src/components/education/template/baseMessage.vue
+4
-8
templateMessage.vue
src/components/education/template/templateMessage.vue
+4
-8
未找到文件。
src/components/education/template/baseMessage.vue
浏览文件 @
610aa59c
...
@@ -450,10 +450,6 @@ export default {
...
@@ -450,10 +450,6 @@ export default {
const isJPG = file.type === "
image
/
jpeg
";
const isJPG = file.type === "
image
/
jpeg
";
const isPNG = file.type === "
image
/
png
";
const isPNG = file.type === "
image
/
png
";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
if (file.width != fileLimit.width || file.height != fileLimit.height) {
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
return;
}
if (!isJPG && !isPNG) {
if (!isJPG && !isPNG) {
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
return;
return;
...
@@ -468,10 +464,10 @@ export default {
...
@@ -468,10 +464,10 @@ export default {
let image = new Image();
let image = new Image();
image.src = theFile.target.result;
image.src = theFile.target.result;
image.onload = function() {
image.onload = function() {
let _vm =
vm
;
let _vm =
this
;
if (
false
if (
//
_vm.width != fileLimit.width ||
_vm.width != fileLimit.width ||
//
_vm.height != fileLimit.height
_vm.height != fileLimit.height
) {
) {
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
} else {
} else {
...
...
src/components/education/template/templateMessage.vue
浏览文件 @
610aa59c
...
@@ -463,10 +463,6 @@ export default {
...
@@ -463,10 +463,6 @@ export default {
const isJPG = file.type === "
image
/
jpeg
";
const isJPG = file.type === "
image
/
jpeg
";
const isPNG = file.type === "
image
/
png
";
const isPNG = file.type === "
image
/
png
";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
if (file.width != fileLimit.width || file.height != fileLimit.height) {
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
return;
}
if (!isJPG && !isPNG) {
if (!isJPG && !isPNG) {
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
return;
return;
...
@@ -481,10 +477,10 @@ export default {
...
@@ -481,10 +477,10 @@ export default {
let image = new Image();
let image = new Image();
image.src = theFile.target.result;
image.src = theFile.target.result;
image.onload = function() {
image.onload = function() {
let _vm =
vm
;
let _vm =
this
;
if (
false
if (
//
_vm.width != fileLimit.width ||
_vm.width != fileLimit.width ||
//
_vm.height != fileLimit.height
_vm.height != fileLimit.height
) {
) {
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
vm.$message.error("
图片不符合规范,请根据规范上传图片
");
} else {
} else {
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录