基础样式交互完成
This commit is contained in:
@@ -32,9 +32,15 @@ export function CompactSearchBox({
|
||||
};
|
||||
|
||||
const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
|
||||
if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) {
|
||||
e.preventDefault();
|
||||
handleSearch();
|
||||
if (e.key === 'Enter') {
|
||||
if (e.shiftKey) {
|
||||
// Shift+回车:允许换行,不做任何处理
|
||||
return;
|
||||
} else {
|
||||
// 单独回车:触发搜索
|
||||
e.preventDefault();
|
||||
handleSearch();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -32,9 +32,15 @@ export function ContractSearchHero({
|
||||
};
|
||||
|
||||
const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
|
||||
if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) {
|
||||
e.preventDefault();
|
||||
handleSearch();
|
||||
if (e.key === 'Enter') {
|
||||
if (e.shiftKey) {
|
||||
// Shift+回车:允许换行,不做任何处理
|
||||
return;
|
||||
} else {
|
||||
// 单独回车:触发搜索
|
||||
e.preventDefault();
|
||||
handleSearch();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ export default function ContractTemplateSearchIndex() {
|
||||
|
||||
// 模拟分类数据
|
||||
const categories = [
|
||||
{ name: '销售合同', icon: 'ri-handshake-line', count: 128 },
|
||||
{ name: '销售合同', icon: 'ri-contract-line', count: 128 },
|
||||
{ name: '采购合同', icon: 'ri-shopping-cart-line', count: 96 },
|
||||
{ name: '物流运输', icon: 'ri-truck-line', count: 64 },
|
||||
{ name: '人事劳务', icon: 'ri-user-settings-line', count: 52 },
|
||||
|
||||
Reference in New Issue
Block a user