Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
8a4f130d
提交
8a4f130d
编写于
7月 27, 2020
作者:
bo.dang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
裁剪优化和背景图优化
上级
5a9ea032
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
29 行增加
和
9 行删除
+29
-9
cropper.vue
src/components/common/cropper.vue
+24
-5
create-live.vue
src/views/yqrange/create-live.vue
+5
-4
未找到文件。
src/components/common/cropper.vue
浏览文件 @
8a4f130d
...
...
@@ -96,9 +96,12 @@
guides
:
true
,
highlight
:
true
,
cropBoxMovable
:
true
,
zoomable
:
true
,
cropBoxResizable
:
this
.
cropOption
.
cropBoxResizable
,
//是否显示等比例缩放
minCropBoxWidth
:
this
.
cropOption
.
minCropBoxWidth
,
// 剪切区域的最小宽度
minCropBoxHeight
:
this
.
cropOption
.
minCropBoxHeight
,
// 剪切区域的最小高度
// minContainerHeight: 3000,
// minCanvasHeight: 3000,
toggleDragModeOnDblclick
:
false
,
// aspectRatio: 75/42,
aspectRatio
:
this
.
cropOption
.
aspectRatio
,
// 显示等比例缩放的比例
...
...
@@ -109,12 +112,28 @@
width
:
this
.
cropOption
.
width
,
height
:
this
.
cropOption
.
height
})
this
.
cropper
.
setCropBoxData
({
width
:
100
,
height
:
100
})
// this.cropper.zoomTo(1);
// this.cropper.setCropBoxData({
// width: 750,
// height: 100
// })
// this.cropper.move(1, -1).rotate(0).scale(1, -1);
},
cropstart
:(
event
)
=>
{
console
.
log
(
event
.
detail
.
originalEvent
);
console
.
log
(
event
.
detail
.
action
);
if
(
this
.
cropOption
.
aspectRatio
==
0
){
if
(
event
.
detail
.
action
==
"w"
||
event
.
detail
.
action
==
"e"
||
event
.
detail
.
action
==
"se"
||
event
.
detail
.
action
==
"sw"
||
event
.
detail
.
action
==
"ne"
||
event
.
detail
.
action
==
"nw"
){
event
.
preventDefault
();
}
}
},
// zoom: function (event) {
// // Keep the image in its natural size
// if (event.detail.oldRatio === 1) {
...
...
src/views/yqrange/create-live.vue
浏览文件 @
8a4f130d
...
...
@@ -576,11 +576,11 @@
},
antiScreenCap: "
0
",
backgroundImageId: "
0
",
backgroundImageId: "",
// backgroundImageIdTemp: "
0
",
// backgroundImages: [],// 直播背景图
},
backgroundImageIdTemp: '
0
',
backgroundImageIdTemp: '',
backgroundImageUrlTemp: "",
backgroundImages: [],
backgroundImageUrl: "",
...
...
@@ -798,10 +798,11 @@
//上传直播简介
beforeUploadPic1(file) {
vm.cropperIndex = 10;
// this.currentOption.aspectRatio = /3
;
this.currentOption.aspectRatio = 0
;
this.currentOption.cropBoxResizable = true;
this.currentOption.minCropBoxWidth = 750;
// this.currentOption.minCropBoxHeight = 120;
this.currentOption.minCropBoxHeight = 120;
this.currentOption.width = 750;
let fileLimit = {
width: 750,
height: 3000,
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录