|
@@ -36,6 +36,7 @@ import FormatPreNine from "@/views/ppt_manage/newVersion/components/formatPrevie
|
|
|
import FormatPreTen from "@/views/ppt_manage/newVersion/components/formatPreview/FormatPreTen";
|
|
|
import FormatPreEle from "@/views/ppt_manage/newVersion/components/formatPreview/FormatPreEle";
|
|
|
import FormatPreTwelve from "@/views/ppt_manage/newVersion/components/formatPreview/FormatPreTwelve";
|
|
|
+import FormatPreThirteen from "@/views/ppt_manage/newVersion/components/formatPreview/FormatPreThirteen";
|
|
|
import {countComponentName} from '@/views/ppt_manage/newVersion/utils/untils';
|
|
|
export default {
|
|
|
name: "AddFormat",
|
|
@@ -57,7 +58,8 @@ export default {
|
|
|
FormatPreNine,
|
|
|
FormatPreTen,
|
|
|
FormatPreEle,
|
|
|
- FormatPreTwelve
|
|
|
+ FormatPreTwelve,
|
|
|
+ FormatPreThirteen
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -77,23 +79,22 @@ export default {
|
|
|
this.clickRightTime = this.formatArr.length - this.lineShowNum
|
|
|
//获取容器宽度,以确定一个format应占宽度
|
|
|
const parentWidth = $('.format-wrap').width()
|
|
|
- this.itemOccupyMargin = ((parentWidth/this.lineShowNum).toFixed(2) - this.itemWidth)/2
|
|
|
+ this.itemOccupyMargin = ((parentWidth/this.lineShowNum - this.itemWidth - 0.5)/2).toFixed(2)
|
|
|
},
|
|
|
scrollPrev(){
|
|
|
if(this.clickLeftTime<=0) return
|
|
|
this.clickLeftTime--
|
|
|
this.clickRightTime++
|
|
|
- this.scrollFormat('prev',this.clickLeftTime)
|
|
|
+ this.scrollFormat(this.clickLeftTime)
|
|
|
},
|
|
|
scrollNext(){
|
|
|
if(this.clickRightTime===0) return
|
|
|
this.clickRightTime--
|
|
|
this.clickLeftTime++
|
|
|
- this.scrollFormat('next',this.clickLeftTime)
|
|
|
+ this.scrollFormat(this.clickLeftTime)
|
|
|
},
|
|
|
- scrollFormat(type,multiple){
|
|
|
- const factor = type==='prev'?1:-1
|
|
|
- this.scrollOffset = factor*(multiple*this.itemWidth+this.itemOccupyMargin)
|
|
|
+ scrollFormat(multiple){
|
|
|
+ this.scrollOffset = -(multiple*this.itemWidth+Number(this.itemOccupyMargin))
|
|
|
},
|
|
|
previewComponentName(modelId) {
|
|
|
return countComponentName(modelId,'pre')
|