fix
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 39s
Docker Build & Deploy / Deploy to Production (push) Successful in 19s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 39s
Docker Build & Deploy / Deploy to Production (push) Successful in 19s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
This commit is contained in:
@@ -331,6 +331,7 @@ const updateVarianceChart = (chart, budgets) => {
|
||||
|
||||
const categories = data.map(item => item.name)
|
||||
const values = data.map(item => item.value)
|
||||
const maxVal = Math.max(...values.map(v => Math.abs(v))) || 1
|
||||
|
||||
const textColor = getCssVar('--van-text-color')
|
||||
const splitLineColor = getCssVar('--chart-split')
|
||||
@@ -387,11 +388,25 @@ const updateVarianceChart = (chart, budgets) => {
|
||||
stack: 'Total',
|
||||
barWidth: 20, // Fixed bar width
|
||||
data: values.map((val, index) => {
|
||||
// 如果柱子太短(小于15%),文字显示在外部,否则显示在内部
|
||||
const ratio = Math.abs(val) / maxVal
|
||||
const isShort = ratio < 0.15
|
||||
let position
|
||||
let color
|
||||
|
||||
if (val >= 0) {
|
||||
position = isShort ? 'right' : 'insideLeft'
|
||||
} else {
|
||||
position = isShort ? 'left' : 'insideRight'
|
||||
}
|
||||
|
||||
color = isShort ? textColor : '#fff'
|
||||
|
||||
return {
|
||||
value: val,
|
||||
label: {
|
||||
position: val >= 0 ? 'insideLeft' : 'insideRight',
|
||||
color: '#fff'
|
||||
position: position,
|
||||
color: color
|
||||
}
|
||||
}
|
||||
}),
|
||||
@@ -522,8 +537,8 @@ const updateBurndownChart = () => {
|
||||
data: dates,
|
||||
axisLabel: {
|
||||
color: axisLabelColor,
|
||||
interval: Math.ceil(daysInMonth / 8) - 1,
|
||||
rotate: 45
|
||||
interval: 'auto',
|
||||
rotate: 0
|
||||
},
|
||||
splitLine: { show: false },
|
||||
axisLine: {
|
||||
|
||||
@@ -30,16 +30,16 @@
|
||||
</template>
|
||||
</van-field>
|
||||
<!-- 新增:硬性消费复选框 -->
|
||||
<van-field label="硬性消费">
|
||||
<van-field :label="form.category === BudgetCategory.Expense ? '硬性消费' : '硬性收入'">
|
||||
<template #input>
|
||||
<div class="mandatory-wrapper">
|
||||
<van-checkbox
|
||||
v-model="form.isMandatoryExpense"
|
||||
:disabled="form.noLimit"
|
||||
>
|
||||
硬性消费
|
||||
{{ form.category === BudgetCategory.Expense ? '硬性消费' : '硬性收入' }}
|
||||
<span class="mandatory-tip">
|
||||
当前周期 月/年 按天数自动累加
|
||||
当前周期 月/年 按天数自动累加(无记录时)
|
||||
</span>
|
||||
</van-checkbox>
|
||||
</div>
|
||||
|
||||
@@ -311,6 +311,10 @@ onBeforeUnmount(() => {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.van-calendar__header-title){
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-calendar {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user