「网页端,在首页上修改一个日程,没有填写截止日期的地方。」
经确认:用户说的是「任务」,不是「日程」 —— 日程表(calendar_events)本身没有截止日期字段,只有任务表(tasks.due_at)有。
calendar_events
tasks.due_at
due_at
SHOW COLUMNS
datetime
_edit_form.php
<span class="mv-lb">截止时间</span>
index.php:7056
tasks/edit
renderPartial('tasks/_edit_form')
mountAntdSingleDT
dt-native
bootAntd
data-dt-antd-single
due_at_date
due_at_hour
fb-antd
layout.php:109
ls
.dt-native
app.css:865
display: contents
app.css:6192
.dt-input.is-antd > .dt-native { display:none }
app.css:870~880
fbBootAntd
entry_popup.js:290
loadEdit()
静态路径全部正常。 如果 antd 挂不上,用户应该看到原生年/月/日下拉 (display:contents + 没有 is-antd 类),而不是"什么都没有"。
display:contents
is-antd
请提供以下任一,用于定位:
AntD 日期控件已挂上 N 处
antd 单点时间控件挂载失败,留在自建下拉:...
AntD DatePicker 未启用:...
class
bootAntd() 开头第 1923 行:
bootAntd()
if (!hosts.length && !dateRanges.length && !dates.length && !singles.length) { return; }
首页首屏的任务卡里没有 antd 控件(只有点开浮层后才有)。 页面加载时 singles.length === 0 ⇒ 直接 return ⇒ window.antd 从未被加载。
singles.length === 0
window.antd
浮层打开时 entry_popup.js 会调 fbBootAntd(),此时才开始下载 1.8MB 的 antd-with-locales.min.js。这个下载期间:
entry_popup.js
fbBootAntd()
antd-with-locales.min.js
如果你是在"刚点开就截图"的时机看,可能只是还没加载完。 但如果是"等很久也看不到",那就不是这个原因。
不想在没有确认现象的情况下盲改 —— 这条链路已经静态检查了三轮全部正常, 继续猜只会浪费时间。等用户提供截图或 Console 输出。
与 #66(日程地点无法修改)不同:那是日程 calendar_events.location;本单是任务 tasks.due_at 在浮层编辑表单里的显示问题,属任务模块。
经确认:用户说的是任务(日程表没截止日期字段)。
app.js?v=2890f9e5:1971 AntD 日期控件已挂上 5 处
AntD 控件已经挂上了 5 处 ⇒ 资源加载、挂载逻辑全部正常。问题不在前端控件。
tasks/panel
_panel.php
<?php if ($tpDue !== ''): ?> <div class="kv-row"><dt>截止</dt><dd>…</dd></div> <?php endif; ?>
entry_popup.js 的 paintDetail():
paintDetail()
var isEvent = (data.source === 'event'); // 「编辑」「删除」只有 source === 'event' 才点亮
而 source 由 fb_entry_json() 算:
source
fb_entry_json()
$evKind = (string)($ev['kind'] ?? 'custom'); // 任务卡没传 kind ⇒ 默认 'custom' $evRef = (int)($ev['ref_id'] ?? 0); // 任务卡没传 ref_id ⇒ 0 $evOwn = ($evKind === 'custom' && $evRef > 0); // ⇒ false 'source' => $evOwn ? 'event' : 'derived', // ⇒ 'derived'
$evRef = 0 ⇒ $evOwn = false ⇒ source = 'derived' ⇒ 编辑/删除都不显示。
$evRef = 0
$evOwn = false
source = 'derived'
templates/home/_card_tasks.php:55:
templates/home/_card_tasks.php:55
data-fb-entry='<?= fb_entry_json([ 'title' => ..., 'status_word' => ..., 'note' => ..., 'panel' => url('tasks/panel', ['id' => ...]), ], url('tasks/show', [...]), \App\Auth::canWrite() ? url('tasks/edit', [...]) : '', // ← edit 传了 [...]) ?>'
edit 地址传了,但 $ev['ref_id'] 没传 ⇒ $evOwn 判 false ⇒ 那颗按钮永远不显。
edit
$ev['ref_id']
$evOwn
irony:_card_tasks.php 是唯一给 panel 的卡片(注释里还写着"只有任务会给这个字段"), 但它同时是唯一没给 ref_id 的调用方。
_card_tasks.php
panel
在任务卡的 fb_entry_json 第一个参数里补 ref_id:
fb_entry_json
ref_id
'ref_id' => (int)$t['id'],
这样 $evOwn 为 true ⇒ source='event' ⇒ 编辑/删除按钮显示 ⇒ 点「编辑」进 _edit_form.php ⇒ 看到 AntD 的「截止时间」。
source='event'
⚠️ 不能给 kind:任务的 kind 传什么值?fb_entry_json 的判据是 kind === 'custom',任务不是 custom 也不是 movie/trip 那种派生本。 最干净的做法是只补 ref_id,让 kind 走默认的 'custom' —— 对 fb_entry_json 来说它只关心"这条能不能在这里改",任务确实能改(有 tasks/edit)。
kind
kind === 'custom'
'custom'
⚠️ del 也会跟着变成非空(tasks 的删除地址)—— 这是正确的, 任务本来就能删,只是之前因为同一个 bug 也一并没显。
del
tasks
No dependencies set.
The note is not visible to the blocked user.
首页改任务时看不到「截止时间」
用户(2026-11-05)
经确认:用户说的是「任务」,不是「日程」 ——
日程表(
calendar_events)本身没有截止日期字段,只有任务表(tasks.due_at)有。已排除的方向(避免重复劳动)
due_atSHOW COLUMNSdatetime_edit_form.php<span class="mv-lb">截止时间</span>index.php:7056tasks/edit→renderPartial('tasks/_edit_form')mountAntdSingleDT前置元素dt-native1 处bootAntd查询选择器data-dt-antd-single1 处due_at_date/due_at_hour各 1 处fb-antdmetalayout.php:109ls服务器.dt-native默认显示app.css:865display: contents(可见)app.css:6192.dt-input.is-antd > .dt-native { display:none }app.css:870~880fbBootAntd调用entry_popup.js:290loadEdit()里 AJAX 插入后调用静态路径全部正常。 如果 antd 挂不上,用户应该看到原生年/月/日下拉
(
display:contents+ 没有is-antd类),而不是"什么都没有"。需要的信息
请提供以下任一,用于定位:
AntD 日期控件已挂上 N 处antd 单点时间控件挂载失败,留在自建下拉:...AntD DatePicker 未启用:...due_at,看那块的class里有没有is-antd一个已知的架构隐患(可能是根因)
bootAntd()开头第 1923 行:首页首屏的任务卡里没有 antd 控件(只有点开浮层后才有)。
页面加载时
singles.length === 0⇒ 直接 return ⇒window.antd从未被加载。浮层打开时
entry_popup.js会调fbBootAntd(),此时才开始下载 1.8MB 的antd-with-locales.min.js。这个下载期间:如果你是在"刚点开就截图"的时机看,可能只是还没加载完。
但如果是"等很久也看不到",那就不是这个原因。
待确认后再改
不想在没有确认现象的情况下盲改 —— 这条链路已经静态检查了三轮全部正常,
继续猜只会浪费时间。等用户提供截图或 Console 输出。
为什么单独建单
与 #66(日程地点无法修改)不同:那是日程 calendar_events.location;本单是任务 tasks.due_at 在浮层编辑表单里的显示问题,属任务模块。
首页改任务时看不到「截止时间」
用户(2026-11-05)
经确认:用户说的是任务(日程表没截止日期字段)。
用户提供的 Console 输出(决定性线索)
AntD 控件已经挂上了 5 处 ⇒ 资源加载、挂载逻辑全部正常。问题不在前端控件。
真正的根因:底栏根本没有「编辑」按钮
链路
tasks/panel(_panel.php,可操作面板)_edit_form.php(那里才有 AntD 控件)为什么编辑按钮不显示
entry_popup.js的paintDetail():而
source由fb_entry_json()算:$evRef = 0⇒$evOwn = false⇒source = 'derived'⇒ 编辑/删除都不显示。任务卡漏传了什么
templates/home/_card_tasks.php:55:edit地址传了,但$ev['ref_id']没传 ⇒$evOwn判 false ⇒ 那颗按钮永远不显。irony:
_card_tasks.php是唯一给panel的卡片(注释里还写着"只有任务会给这个字段"),但它同时是唯一没给 ref_id 的调用方。
修法
在任务卡的
fb_entry_json第一个参数里补ref_id:这样
$evOwn为 true ⇒source='event'⇒ 编辑/删除按钮显示 ⇒点「编辑」进
_edit_form.php⇒ 看到 AntD 的「截止时间」。⚠️ 不能给
kind:任务的 kind 传什么值?fb_entry_json的判据是kind === 'custom',任务不是 custom 也不是 movie/trip 那种派生本。最干净的做法是只补
ref_id,让kind走默认的'custom'——对
fb_entry_json来说它只关心"这条能不能在这里改",任务确实能改(有tasks/edit)。⚠️
del也会跟着变成非空(tasks的删除地址)—— 这是正确的,任务本来就能删,只是之前因为同一个 bug 也一并没显。
验收
已排除(避免重复劳动)
tasks.due_at字段_edit_form.php有截止时间tasks/edit路由dt-native/data-dt-antd-single/隐藏字段全在.dt-native默认可见display:contents