图片优化

This commit is contained in:
小李 2026-06-30 14:11:18 +08:00
parent ccdab994a8
commit 597ace78aa
32 changed files with 598 additions and 528 deletions

View File

@ -8,10 +8,10 @@
<view class="button-container">
<button class="btn-save-image" @click="saveImage">保存图片</button>
</view>
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" hidden
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" hidden v-if="data.bgImage"
:css="`width:${data.width}px;height:${data.width / 4 * 3}px;`">
<l-painter-view
:css="`position: relative;width:${data.width}px;height:${data.width / 4 * 3}px;background-image: url('/static/image/other/gzd.png');`">
:css="`position: relative;width:${data.width}px;height:${data.width / 4 * 3}px;background-image: url('${data.bgImage}');`">
<!-- 头部年月 -->
<l-painter-view :css="`position: absolute;left:480px;top:336px;`">
<l-painter-text :css="data.textCssTime" :text="data.form.year" />
@ -183,7 +183,7 @@
<script setup>
//
import ZdyNavbar from "@/components/nav-bar/nav-bar.vue"
import { imgLocal } from '@/utils/common.js';
import {
ref,
reactive,
@ -207,6 +207,7 @@ const data = reactive({
title: "工资条",
bgColor: '#EDEDED',
},
bgImage:'',
width: 375,
height: 495,
code: '',
@ -248,7 +249,7 @@ function progress(e){
if(e==1){
uni.hideLoading()
}
console.log(e)
// console.log(e)
}
//
function edit() {
@ -437,7 +438,7 @@ function saveImage() {
}
}
onLoad((option) => {
onLoad(async(option) => {
//
proxy.$apiUserEvent('all', {
type: 'event',
@ -445,6 +446,9 @@ onLoad((option) => {
prefix: '.uni.other.',
value: "工资单"
})
data.bgImage = await imgLocal.getLocalImage('other/gzd.png');
console.log(data.bgImage)
})
onReady(() => {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 861 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 732 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

File diff suppressed because it is too large Load Diff