1. 新增layout.uts统一管理页面尺寸与安全区计算 2. 修正图片资源路径到static/mobile目录 3. 调整App.vue与AppIcon组件样式适配多端 4. 为微信小程序配置打包忽略规则减少包体积 5. 修复API请求错误抛出类型,完善类型定义 6. 补充README文档说明项目运行与维护规范 7. 优化多个页面的样式与生命周期逻辑
21 lines
951 B
Plaintext
21 lines
951 B
Plaintext
<template>
|
|
<image class="app-icon" :class="(muted ? 'muted-icon ' : '') + (isVector ? 'vector-icon' : '')" :style="iconStyle" :src="iconSrc" mode="aspectFit"></image>
|
|
</template>
|
|
|
|
<script setup lang="uts">
|
|
const props = defineProps({ name: { type: String, default: 'sparkles' }, size: { type: Number, default: 42 }, muted: { type: Boolean, default: false } })
|
|
const isVector = computed(() => props.name == 'chevron-right' || props.name == 'arrow-right')
|
|
const iconSrc = computed(() => isVector.value ? '/static/icons/' + (props.name == 'chevron-right' ? 'chevron-circle' : 'arrow-right') + '.svg' : '/static/mobile/icons-generated/' + props.name + '.png')
|
|
const iconStyle = computed(() => 'width:' + props.size + 'rpx;height:' + props.size + 'rpx;')
|
|
</script>
|
|
|
|
<style>
|
|
.app-icon {
|
|
/* #ifndef APP */
|
|
display: block;
|
|
/* #endif */
|
|
flex-shrink: 0; transform: scale(1.2); }
|
|
.vector-icon { transform: none; }
|
|
.muted-icon { opacity: .48; }
|
|
</style>
|