diff --git a/app/components/contract-template/CompactSearchBox.tsx b/app/components/contract-template/CompactSearchBox.tsx index 1e97f54..f8f2c96 100644 --- a/app/components/contract-template/CompactSearchBox.tsx +++ b/app/components/contract-template/CompactSearchBox.tsx @@ -32,9 +32,15 @@ export function CompactSearchBox({ }; const handleKeyDown = (e: React.KeyboardEvent) => { - if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) { - e.preventDefault(); - handleSearch(); + if (e.key === 'Enter') { + if (e.shiftKey) { + // Shift+回车:允许换行,不做任何处理 + return; + } else { + // 单独回车:触发搜索 + e.preventDefault(); + handleSearch(); + } } }; diff --git a/app/components/contract-template/ContractSearchHero.tsx b/app/components/contract-template/ContractSearchHero.tsx index aed5cc2..bde2cda 100644 --- a/app/components/contract-template/ContractSearchHero.tsx +++ b/app/components/contract-template/ContractSearchHero.tsx @@ -32,9 +32,15 @@ export function ContractSearchHero({ }; const handleKeyDown = (e: React.KeyboardEvent) => { - if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) { - e.preventDefault(); - handleSearch(); + if (e.key === 'Enter') { + if (e.shiftKey) { + // Shift+回车:允许换行,不做任何处理 + return; + } else { + // 单独回车:触发搜索 + e.preventDefault(); + handleSearch(); + } } }; diff --git a/app/routes/contract-template.search._index.tsx b/app/routes/contract-template.search._index.tsx index f90ce8c..fe48245 100644 --- a/app/routes/contract-template.search._index.tsx +++ b/app/routes/contract-template.search._index.tsx @@ -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 }, diff --git a/html/合同模板页面.html b/html/合同模板页面.html index 873e9b1..dd681a9 100644 --- a/html/合同模板页面.html +++ b/html/合同模板页面.html @@ -804,7 +804,7 @@ 为您找到 24 个相关模板
-