fix: 小修改
continuous-integration/drone/push Build is passing Details

This commit is contained in:
张哲铜 2025-12-10 21:39:27 +08:00
parent 1b9fb3069d
commit 2ba65eee32
3 changed files with 38 additions and 0 deletions

View File

@ -27,6 +27,7 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits<{
'layer-ready': [layerManager: ReturnType<typeof useSimpleDomLayer>]
'preview': []
}>()
//
@ -360,6 +361,19 @@ onMounted(async () => {
}"
/>
<!-- 预览按钮 -->
<view
class="absolute right-2 top-2 z-20 flex items-center justify-center rounded-full bg-black/50"
:style="{
width: '32px',
height: '32px',
pointerEvents: 'auto',
}"
@click.stop="emit('preview')"
>
<text class="text-white" :style="{ fontSize: '16px' }">🔍</text>
</view>
<!-- 标记层容器 -->
<view
class="absolute left-0 top-0"

View File

@ -182,6 +182,19 @@ function handleScoreDelete(value: number) {
}
}
/**
* 处理图片预览
*/
function handlePreview(imageIndex: number) {
const urls = props.question.imageUrls
if (!urls?.length) return
uni.previewImage({
urls,
current: urls[imageIndex],
})
}
/**
* 处理文本输入
*/
@ -358,6 +371,7 @@ defineExpose({
:on-score-delete="handleScoreDelete"
@layer-ready="(manager) => handleLayerReady(imageIndex, manager)"
@quick-score="handleQuickScore"
@preview="handlePreview(imageIndex)"
/>
<!-- 第一个图片显示分数 -->

View File

@ -69,6 +69,16 @@ onLoad(() => {
},
})
})
// tabbar
onShow(() => {
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
if (currentPage?.route) {
// route pagePath
tabbarStore.setAutoCurIdx(currentPage.route)
}
})
const activeColor = '#1890ff'
const inactiveColor = '#666'
function getColorByIndex(index: number) {