/** * PisellGlobalSearch lowcode snippets * * 注意:providers 是函数 / ReactNode,无法被 JSON 序列化; * 在 lowcode 画布中拖入后,需要在 pro-code 项目里通过: * import { allProviders } from '@pisell/private-materials'; * 把 providers 显式传入,组件才会工作。 * * ⚠️ 阶段性:当前全局搜索仅支持「订单」一个业务域; * `showAllTab` 默认就是 true(无需 snippet 显式声明),All / Orders 始终露出来。 * 默认 Tab 不在 snippet / meta 里固化——由组件内部统一兜底为 All(__all__), * 避免多处控制导致默认落到 order。 */ export default [ { title: '全局搜索 · 顶栏 Icon(生产形态 · 订单)', screenshot: '', schema: { componentName: 'PisellGlobalSearch', props: { singleModePageSize: 20, lookupProps: { triggerType: 'icon', displayType: 'modal', modalWidth: 1080, placeholder: 'Search orders…', showHistory: true, historyKey: 'pisell_global_search_history', showScan: false, }, }, }, }, { title: '全局搜索 · 内嵌 Input(订单)', screenshot: '', schema: { componentName: 'PisellGlobalSearch', props: { lookupProps: { triggerType: 'input', displayType: 'modal', modalWidth: 1080, placeholder: '搜索订单…', showHistory: true, showClear: true, }, }, }, }, { title: '全局搜索 · Button 触发(订单)', screenshot: '', schema: { componentName: 'PisellGlobalSearch', props: { lookupProps: { triggerType: 'button', buttonText: 'Search orders', displayType: 'modal', modalWidth: 1080, }, }, }, }, { title: '全局搜索 · 移动端 Drawer(订单 · 底部)', screenshot: '', schema: { componentName: 'PisellGlobalSearch', props: { lookupProps: { triggerType: 'icon', displayType: 'drawer', drawerPlacement: 'bottom', drawerWidth: '100%', placeholder: '搜索订单', showHistory: true, }, }, }, }, ];