-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: multi tab by episode group in SubjectDetails.vue when episode c…
…ount gt 20 (#655) * optimize: default theme simple * feat: multi tab by episode group in SubjectDetails.vue when episode count gt 20 * feat: add ep group for AttachmentReferenceService.matchingAttachmentsAndSubjectEpisodes * feat: hide episode matching btn in SubjectDetails.vue for ep group not MAIN. * docs: update CHANGELOG.MD
- Loading branch information
Showing
45 changed files
with
1,931 additions
and
1,136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,11 @@ | |
|
||
# 0.15.4 | ||
|
||
## 新特性 | ||
|
||
- Console条目详情页剧集过多时分TAB #654 | ||
- Console条目详情页其它剧集分组隐藏批量匹配按钮 | ||
|
||
## 主题 | ||
|
||
- 修复默认主题剧集序号选择问题 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,79 @@ | ||
<script setup lang="ts"> | ||
import Cropper from 'cropperjs'; | ||
import "cropperjs/dist/cropper.css"; | ||
import 'cropperjs/dist/cropper.css'; | ||
import {onMounted, ref, watch} from 'vue'; | ||
const props = withDefaults( | ||
defineProps<{ | ||
url: string; | ||
aspectRatio?: number; | ||
aspectRatio?: number; | ||
}>(), | ||
{ | ||
url: '', | ||
aspectRatio: 430 / 600, | ||
aspectRatio: 430 / 600, | ||
} | ||
); | ||
const emit = defineEmits<{ | ||
// eslint-disable-next-line no-unused-vars | ||
(event: 'clip-img', base64Encode: string | undefined): void; | ||
}>(); | ||
watch(props, (val)=>{ | ||
cropper.value?.setAspectRatio(val.aspectRatio); | ||
cropper.value?.replace(val.url); | ||
}) | ||
watch(props, (val) => { | ||
cropper.value?.setAspectRatio(val.aspectRatio); | ||
cropper.value?.replace(val.url); | ||
}); | ||
const croimg = ref({}); | ||
const cropper = ref<Cropper>(); | ||
const clipImgEmitBase64 = (cvs: HTMLCanvasElement) => { | ||
if (!cvs) return; | ||
const base64 = cvs.toDataURL('image/webp', 1); | ||
emit('clip-img', base64); | ||
} | ||
if (!cvs) return; | ||
const base64 = cvs.toDataURL('image/webp', 1); | ||
emit('clip-img', base64); | ||
}; | ||
onMounted(()=>{ | ||
cropper.value = new Cropper(croimg.value as HTMLImageElement, { | ||
aspectRatio: props.aspectRatio, | ||
viewMode: 1, | ||
dragMode: 'move', | ||
autoCropArea: 1, | ||
ready(){ | ||
clipImgEmitBase64(cropper.value?.getCroppedCanvas({imageSmoothingQuality: 'high'}) as HTMLCanvasElement); | ||
}, | ||
cropend(){ | ||
clipImgEmitBase64(cropper.value?.getCroppedCanvas({imageSmoothingQuality: 'high'}) as HTMLCanvasElement); | ||
}, | ||
zoom(){ | ||
clipImgEmitBase64(cropper.value?.getCroppedCanvas({imageSmoothingQuality: 'high'}) as HTMLCanvasElement); | ||
}, | ||
}) | ||
}) | ||
onMounted(() => { | ||
cropper.value = new Cropper(croimg.value as HTMLImageElement, { | ||
aspectRatio: props.aspectRatio, | ||
viewMode: 1, | ||
dragMode: 'move', | ||
autoCropArea: 1, | ||
ready() { | ||
clipImgEmitBase64( | ||
cropper.value?.getCroppedCanvas({ | ||
imageSmoothingQuality: 'high', | ||
}) as HTMLCanvasElement | ||
); | ||
}, | ||
cropend() { | ||
clipImgEmitBase64( | ||
cropper.value?.getCroppedCanvas({ | ||
imageSmoothingQuality: 'high', | ||
}) as HTMLCanvasElement | ||
); | ||
}, | ||
zoom() { | ||
clipImgEmitBase64( | ||
cropper.value?.getCroppedCanvas({ | ||
imageSmoothingQuality: 'high', | ||
}) as HTMLCanvasElement | ||
); | ||
}, | ||
}); | ||
}); | ||
</script> | ||
<template> | ||
<div> | ||
<img ref="croimg" class="fit img" :src="props.url" /> | ||
</div> | ||
<div> | ||
<img ref="croimg" class="fit img" :src="props.url" /> | ||
</div> | ||
</template> | ||
<style lang="scss" scoped> | ||
.img { | ||
display: block; | ||
// object-fit: contain; | ||
max-width: 100%; | ||
// width: 100%; | ||
// height: 100%; | ||
display: block; | ||
// object-fit: contain; | ||
max-width: 100%; | ||
// width: 100%; | ||
// height: 100%; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.