|
@@ -58,7 +58,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { getAssetUrl } from '@/api/asset'
|
|
|
|
|
|
|
+import { getThumbnailUrl } from '@/api/asset'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'CImage',
|
|
name: 'CImage',
|
|
@@ -92,7 +92,7 @@ export default {
|
|
|
height: `${height}px`,
|
|
height: `${height}px`,
|
|
|
'font-size': `${Math.min(width, height) / 3 | 0}px`,
|
|
'font-size': `${Math.min(width, height) / 3 | 0}px`,
|
|
|
'border-radius': `${radius}px`,
|
|
'border-radius': `${radius}px`,
|
|
|
- 'background-image': !this.isEmpty && this.isNormal ? `url(${getAssetUrl(this.url)})` : 'none'
|
|
|
|
|
|
|
+ 'background-image': !this.isEmpty && this.isNormal ? `url(${getThumbnailUrl(this.url)})` : 'none'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
className () {
|
|
className () {
|
|
@@ -110,17 +110,17 @@ export default {
|
|
|
},
|
|
},
|
|
|
slideStyles () {
|
|
slideStyles () {
|
|
|
return {
|
|
return {
|
|
|
- 'background-image': this.url ? `url(${getAssetUrl(this.url)})` : 'none'
|
|
|
|
|
|
|
+ 'background-image': this.url ? `url(${getThumbnailUrl(this.url)})` : 'none'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
flipFrontStyles () {
|
|
flipFrontStyles () {
|
|
|
return {
|
|
return {
|
|
|
- 'background-image': this.frontUrl ? `url(${getAssetUrl(this.frontUrl)})` : 'none'
|
|
|
|
|
|
|
+ 'background-image': this.frontUrl ? `url(${getThumbnailUrl(this.frontUrl)})` : 'none'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
flipBackStyles () {
|
|
flipBackStyles () {
|
|
|
return {
|
|
return {
|
|
|
- 'background-image': this.backUrl ? `url(${getAssetUrl(this.backUrl)})` : 'none'
|
|
|
|
|
|
|
+ 'background-image': this.backUrl ? `url(${getThumbnailUrl(this.backUrl)})` : 'none'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
isNormal () {
|
|
isNormal () {
|
|
@@ -245,7 +245,6 @@ export default {
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
|
|
.c-image {
|
|
.c-image {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
@@ -255,10 +254,10 @@ export default {
|
|
|
display: inline-flex;
|
|
display: inline-flex;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- background-color: rgba(255, 255, 255, .8);
|
|
|
|
|
|
|
+ background-color: rgba(255, 255, 255, 0.8);
|
|
|
|
|
|
|
|
&::before {
|
|
&::before {
|
|
|
- content: '\e612';
|
|
|
|
|
|
|
+ content: "\e612";
|
|
|
font-size: inherit;
|
|
font-size: inherit;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -279,7 +278,7 @@ export default {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
- transition: transform .3s;
|
|
|
|
|
|
|
+ transition: transform 0.3s;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -297,7 +296,8 @@ export default {
|
|
|
transform: rotateY(180deg);
|
|
transform: rotateY(180deg);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .front, .back {
|
|
|
|
|
|
|
+ .front,
|
|
|
|
|
+ .back {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
top: 0;
|
|
top: 0;
|
|
|
left: 0;
|
|
left: 0;
|