mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
perf: 代码和样式优化
This commit is contained in:
parent
d619c9d737
commit
d3e0a6533e
@ -17,15 +17,13 @@
|
||||
>
|
||||
<template #item="{ element, index }">
|
||||
<div
|
||||
class="thumbnail-wrapper"
|
||||
:class="{ 'active': slideIndex === index }"
|
||||
class="thumbnail-item"
|
||||
:class="{ 'selected': slideIndex === index }"
|
||||
@mousedown="changSlideIndex(index)"
|
||||
v-contextmenu="contextmenusThumbnailItem"
|
||||
>
|
||||
<div class="slide-index">{{ fillDigit(index + 1, 2) }}</div>
|
||||
<div class="thumbnail">
|
||||
<ThumbnailSlide :slide="element" :size="120" />
|
||||
</div>
|
||||
<div class="label">{{ fillDigit(index + 1, 2) }}</div>
|
||||
<ThumbnailSlide class="thumbnail" :slide="element" :size="120" />
|
||||
</div>
|
||||
</template>
|
||||
</Draggable>
|
||||
@ -194,7 +192,7 @@ export default defineComponent({
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
.thumbnail-wrapper {
|
||||
.thumbnail-item {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
@ -204,8 +202,8 @@ export default defineComponent({
|
||||
outline: 1px solid rgba($color: $themeColor, $alpha: .15);
|
||||
}
|
||||
|
||||
&.active {
|
||||
.slide-index {
|
||||
&.selected {
|
||||
.label {
|
||||
color: $themeColor;
|
||||
}
|
||||
.thumbnail {
|
||||
@ -213,11 +211,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
}
|
||||
.thumbnail {
|
||||
width: 120px;
|
||||
height: 67.5px;
|
||||
}
|
||||
.slide-index {
|
||||
.label {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
width: 20px;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="hamster-ppt-editor">
|
||||
<div class="pptist-editor">
|
||||
<EditorHeader class="layout-header" />
|
||||
<div class="layout-content">
|
||||
<Thumbnails class="layout-content-left" />
|
||||
@ -41,7 +41,7 @@ export default defineComponent({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.hamster-ppt-editor {
|
||||
.pptist-editor {
|
||||
height: 100%;
|
||||
}
|
||||
.layout-header {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="hamster-ppt-screen">
|
||||
<div class="pptist-screen">
|
||||
<div
|
||||
class="slide-list"
|
||||
@mousewheel="$event => mousewheelListener($event)"
|
||||
@ -268,7 +268,7 @@ export default defineComponent({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.hamster-ppt-screen {
|
||||
.pptist-screen {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
@ -6,7 +6,7 @@
|
||||
}"
|
||||
>
|
||||
<div
|
||||
class="elements-wrapper"
|
||||
class="elements"
|
||||
:style="{
|
||||
width: VIEWPORT_SIZE + 'px',
|
||||
height: VIEWPORT_SIZE * VIEWPORT_ASPECT_RATIO + 'px',
|
||||
@ -68,7 +68,7 @@ export default defineComponent({
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
.elements-wrapper {
|
||||
.elements {
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
.background {
|
||||
|
Loading…
x
Reference in New Issue
Block a user