hookehuyr

fix(plan): 隐藏 PeriodInput 组件的触发区域

PeriodInput 组件现在支持通过 hideTrigger 属性隐藏触发区域,
使其纯粹作为弹窗组件使用,由 SelectPickerGlobal 的"自定义输入"选项触发。

- 新增 hideTrigger prop,控制是否显示触发区域
- SavingsTemplate 中使用 :hide-trigger="true" 避免显示多余的选择器
- 解决了多阶段模式下出现额外触发区域的问题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
## 2026-03-04
### 16:40:36 - fix(plan): 隐藏 PeriodInput 组件的触发区域
**影响文件**:
- `src/components/plan/PlanFields/PeriodInput.vue`
**变更摘要**:
- 隐藏 PeriodInput 组件的触发区域
---
### 16:28:49 - fix(plan): 支持从出生年月日推算年龄判断多阶段提取方案
......
<template>
<view>
<!-- 标签 -->
<view v-if="label" class="text-sm text-gray-600 mb-2 flex items-center">
<view v-if="label && !hideTrigger" class="text-sm text-gray-600 mb-2 flex items-center">
<text v-if="required" class="text-red-500 mr-1">*</text>
<text>{{ label }}</text>
</view>
<!-- 触发区域 -->
<!-- 触发区域(可隐藏) -->
<view
v-if="!hideTrigger"
class="flex justify-between items-center border border-gray-200 rounded-lg p-3 bg-gray-50"
@tap="openInput"
>
......@@ -203,6 +204,17 @@ const props = defineProps({
allowed_formats: ['终身', '一笔过'],
custom_validators: []
})
},
/**
* 是否隐藏触发区域
* @description 设置为 true 时,不渲染触发区域,只渲染弹窗
* 用于由其他组件(如 SelectPickerGlobal 的"自定义输入"选项)触发弹窗的场景
* @type {boolean}
*/
hideTrigger: {
type: Boolean,
default: false
}
})
......
......@@ -153,6 +153,7 @@
inputLabel="请输入提取期"
inputPlaceholder="请输入年数"
:validation-rules="periodValidationRules"
:hide-trigger="true"
@confirm="onPeriodInputConfirm"
@cancel="onPeriodInputCancel"
/>
......