feat: PDD 商品页工具条文案与宽度调整 (#23)
三处: - 「创建」改成「添加 PDD 商品」。同一条工具条上还有「创建采集任务」, 两个都以「创建」开头,第一次用的人分不清哪个是加商品、哪个是发起采集。 - 搜索框收到 30%。 - 「搜索」按钮紧挨输入框——这是收窄的自然结果:表单里没有会伸展的 元素之后,多余空间留在按钮之后,按钮就不会被顶到很右边。 用 .search-narrow 类而不是改 .toolbar input[type="text"]: 后者被五个页面共用(蝦皮/顺运宝/任务/客户端/PDD 各一个搜索框), 改了会把另外四页一起改掉。 用 flex 而不是 width:工具条是 flex 布局,width 会被 flex-grow 盖掉。 min-width: 160px 仍从通用规则继承,窄屏时不会缩到没法输入。 表单上的 grow 类保留,它负责把「删除」按钮顶到最右侧。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
{{/* 三段式布局的第一段:顶部工具条。
|
||||
和另外四个页面保持一致,见 docs/admin/05-ui-specification.md §2。 */}}
|
||||
<div class="toolbar">
|
||||
<button type="button" data-modal-open="create-modal">创建</button>
|
||||
{{/* 文案写全「添加 PDD 商品」:这条工具条上还有「创建采集任务」,
|
||||
两个都以「创建」开头的话,第一次用的人分不清哪个是加商品、哪个是发起采集。 */}}
|
||||
<button type="button" data-modal-open="create-modal">添加 PDD 商品</button>
|
||||
|
||||
{{/* 「创建采集任务」和「删除」用的是**同一个表单**,靠按钮上的
|
||||
formaction 决定提交到哪个地址。这样表格里的勾选框只需要挂一份,
|
||||
@@ -28,7 +30,10 @@
|
||||
{{end}}
|
||||
</select>
|
||||
<label for="q">商品 ID/链接</label>
|
||||
<input id="q" type="text" name="q" value="{{.Keyword}}" placeholder="商品 ID 或链接的一部分">
|
||||
{{/* search-narrow 把这个框收到 30%,让「搜索」按钮能紧挨着它。
|
||||
用类名而不是改 .toolbar input[type="text"]——那条规则被 5 个页面共用。 */}}
|
||||
<input id="q" type="text" name="q" value="{{.Keyword}}"
|
||||
class="search-narrow" placeholder="商品 ID 或链接的一部分">
|
||||
<button type="submit">搜索</button>
|
||||
</form>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user