1、优化空组件、自定义图标组件; 2、优化检测更新提示; 3、增加多提打印(暂不支持图片打印)

unocss
chris 6 months ago
parent 601e687c48
commit 8f0855a0e7

@ -1,3 +1,7 @@
.ch-empty {
padding: 60rpx 60rpx;
padding: 20rpx 30rpx;
}
.ch-empty--text {
color: #bbb;
}

@ -1,6 +1,7 @@
<template>
<ch-flex class="ch-empty" justify="center" items="center">
<ch-flex class="ch-empty" justify="center" items="center" direction="column">
<ch-icon name="empty" :size="100" color="#bbb"></ch-icon>
<text class="ch-empty--text">暂无数据</text>
</ch-flex>
</template>

@ -0,0 +1,3 @@
.ch-icon {
line-height: 1.5;
}

@ -30,6 +30,6 @@ const style = computed(() => {
})
</script>
<style lang="scss">
<style lang="scss" scoped>
@import './ch-icon.scss';
</style>

@ -2,7 +2,7 @@
"name" : "smart_campus",
"appid" : "__UNI__C183B0D",
"description" : "",
"versionName" : "0.0.0.3",
"versionName" : "0.0.0.4",
"versionCode" : 100,
"transformPx" : false,
/* 5+App */

@ -34,6 +34,8 @@
<text>{{ item.name }}</text>
</ch-flex>
</uni-grid-item>
<uni-grid-item>
</uni-grid-item>
</uni-grid>
</view>
</template>
@ -72,7 +74,7 @@ const data = reactive({
icon: task,
url: '/pages/task/task'
}
]
],
})
const { gridList, userInfo } = toRefs(data);

@ -5,9 +5,9 @@
<ch-nav-btn icon="paperplane-filled" iconSize="28" color="#fff" @click="print">
打印
</ch-nav-btn>
<ch-nav-btn icon="paperplane-filled" iconSize="28" color="#fff" @click="printImg">
<!-- <ch-nav-btn icon="paperplane-filled" iconSize="28" color="#fff" @click="printImg">
图片
</ch-nav-btn>
</ch-nav-btn> -->
</block>
</ch-nav-bar>
<canvas ref="canvasRef" canvas-id="imgCanvas" id="imgCanvas" :style="`width: ${canvasW}px; height: ${canvasH}px;`"/>
@ -139,6 +139,13 @@ import { getImgData } from '@/api/common.js';
//
function print(){
if (!writeId.value) {
uni.showToast({
icon: 'none',
title: '请连接打印机'
})
return;
}
const printerJobs = new PrinterJobs();
const quesArr = questions.value.forEach(ques => {

@ -118,7 +118,14 @@ function checkChange (e) {
}
function print () {
const quesList = checkIds.value.map(id => questionList.value.find(item => item.questionid == id))
uni.setStorage({
key: 'questions',
data: JSON.stringify(quesList)
})
uni.navigateTo({
url: '/pages/print/print'
})
}
function cancel () {

@ -43,6 +43,12 @@ function checkAppUpdate () {
})
checkUpdate().then(res => {
console.log('检查更新结果:', res)
if (res.code === 0) {
uni.showToast({
icon: 'none',
title: '暂无更新'
})
}
}).catch(error => {
console.log("检查更新错误:", error)
}).finally(() => {

Loading…
Cancel
Save