組合源碼 · 這個應用在程式裡長這樣點擊展開
// src/scenarios/registry.tsx
{
id: 'restaurant-pos',
name: '餐廳快速點單',
industry: 'restaurant',
scenarios: [
'command-search',
'pipeline-board',
],
description: '鍵盤快速下單 + 廚房出餐流程',
}
// 渲染只需:
import { getIndustry } from '@/scenarios/industries';
import { getScenario } from '@/scenarios/registry';
const ctx = getIndustry('restaurant');
const command_search = getScenario('command-search')!.render(ctx);
const pipeline_board = getScenario('pipeline-board')!.render(ctx);
沒有 bespoke 元件、沒有複製貼上。換產業只要改
industry 那一行。指令搜尋 · command-search
⌕ESC
最近 訂單
o-1024#1024 宮保雞丁套餐 x2↵
o-1025#1025 椒麻雞飯 + 蛋花湯
o-1026#1026 招牌牛肉麵 x3
快速動作
+建立訂單⌘N
☰開啟訂單中心⌘L
✦查看今日營運⌘D
↻切換出餐流程視圖⌘B
流程看板 · pipeline-board
出餐流程
依狀態分組 訂單
新訂單
2#1025 椒麻雞飯 + 蛋花湯
Uber Eats
o-1025自
#1029 紅燒獅子頭飯
外帶
o-1029櫃
製作中
2#1024 宮保雞丁套餐 x2
桌號 A3
o-1024阿
#1028 客家小炒 + 白飯 x2
桌號 A1
o-1028阿
待取餐
1#1026 招牌牛肉麵 x3
桌號 B1
o-1026小
已送達
1#1027 三杯雞便當
foodpanda
o-1027自