|
|
@@ -101,7 +101,7 @@ const pickerValue = ref(formatPickerDate(current.value))
|
|
|
|
|
|
// 明确的canvas尺寸(将由 getCanvasSize 初始化以匹配设备宽度)
|
|
|
const canvasWidth = ref(700) // 初始值,会在 mounted 时覆盖
|
|
|
-const canvasHeight = ref(240)
|
|
|
+const canvasHeight = ref(280)
|
|
|
|
|
|
// 获取Canvas实际尺寸的函数 - 参考微信小程序示例使用固定尺寸
|
|
|
function getCanvasSize(): Promise<{ width: number; height: number }> {
|
|
|
@@ -109,7 +109,7 @@ function getCanvasSize(): Promise<{ width: number; height: number }> {
|
|
|
// 使用固定尺寸,参考微信小程序示例
|
|
|
const windowWidth = uni.getSystemInfoSync().windowWidth;
|
|
|
const width = windowWidth; // 占满屏幕宽度
|
|
|
- const height = 240 / 750 * windowWidth; // 240rpx转换为px,与CSS高度匹配
|
|
|
+ const height = 280 / 750 * windowWidth; // 280rpx转换为px,与CSS高度匹配
|
|
|
resolve({ width, height });
|
|
|
});
|
|
|
}
|
|
|
@@ -763,7 +763,7 @@ async function confirmDeleteRecord(id: string) {
|
|
|
/* 关键修复:确保canvas样式正确,参考微信小程序示例 */
|
|
|
.chart-canvas {
|
|
|
width: 750rpx;
|
|
|
- height: 240rpx;
|
|
|
+ height: 280rpx;
|
|
|
background-color: #FFFFFF;
|
|
|
display: block;
|
|
|
}
|
|
|
@@ -895,7 +895,7 @@ async function confirmDeleteRecord(id: string) {
|
|
|
}
|
|
|
|
|
|
.input {
|
|
|
- width: 240rpx;
|
|
|
+ width: 150rpx;
|
|
|
text-align: right;
|
|
|
padding: 16rpx;
|
|
|
border-radius: 14rpx;
|