feat: 添加新建任务按钮功能,聚焦待办列输入框
This commit is contained in:
@@ -14,6 +14,7 @@ defineProps<{ hiddenNote?: string; selecting?: boolean }>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
archive: []
|
||||
'new-task': []
|
||||
'batch-add': []
|
||||
'toggle-select': []
|
||||
'manage-tags': []
|
||||
@@ -177,11 +178,38 @@ defineExpose({ focusSearch })
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 操作:主操作(批量添加)+ 两个视图开关,全部平铺,不再收进菜单 -->
|
||||
<!--
|
||||
操作:主操作(新建任务)+ 三个次要操作(批量添加 / 多选 / 显示归档)。
|
||||
主次靠「实心 vs 描边」表达:真正高频的是「再加一条」,批量录入是偶发动作,
|
||||
早先把它做成唯一实心按钮,把用户最常做的事藏进了每列的输入框。
|
||||
新建任务在 ≥640 一律带文字(主操作不该在平板上退化成一个小图标),
|
||||
三个次要操作在 <1024 收成图标,靠 title / aria-label 保留可访问名。
|
||||
-->
|
||||
<div class="ml-auto flex shrink-0 items-center gap-1.5 max-sm:order-2">
|
||||
<button
|
||||
type="button"
|
||||
class="flex h-9 items-center gap-1.5 rounded-lg bg-sky-700 px-3 text-[13px] font-medium whitespace-nowrap text-white transition hover:bg-sky-800 active:scale-[0.98] max-lg:w-9 max-lg:justify-center max-lg:px-0 dark:bg-sky-500 dark:text-slate-950 dark:hover:bg-sky-400"
|
||||
class="flex h-9 items-center gap-1.5 rounded-lg bg-sky-700 px-3 text-[13px] font-medium whitespace-nowrap text-white transition hover:bg-sky-800 active:scale-[0.98] dark:bg-sky-500 dark:text-slate-950 dark:hover:bg-sky-400"
|
||||
aria-label="新建任务"
|
||||
title="新建任务(N)"
|
||||
@click="emit('new-task')"
|
||||
>
|
||||
<svg
|
||||
viewBox="0 0 20 20"
|
||||
class="size-4 shrink-0"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.7"
|
||||
stroke-linecap="round"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path d="M10 4.5v11M4.5 10h11" />
|
||||
</svg>
|
||||
<span class="max-sm:hidden">新建任务</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="flex h-9 items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 text-[13px] whitespace-nowrap text-slate-600 transition hover:border-slate-300 hover:bg-slate-50 max-lg:w-9 max-lg:justify-center max-lg:px-0 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:border-zinc-600 dark:hover:bg-zinc-800"
|
||||
aria-label="批量添加"
|
||||
title="批量添加"
|
||||
@click="emit('batch-add')"
|
||||
|
||||
Reference in New Issue
Block a user