refactor(wms): 重构发货计划列表为卡片布局并优化选择逻辑
将表格布局改为卡片布局,提升用户体验。修改选择逻辑以适配卡片布局,同时更新相关样式。替换测试框架为Jest并添加日期格式化测试用例。
This commit is contained in:
12
klp-ui/src/utils/klp.test.js
Normal file
12
klp-ui/src/utils/klp.test.js
Normal file
@@ -0,0 +1,12 @@
|
||||
// 为日期格式化函数编写测试用例
|
||||
import {expect, test} from '@jest/globals';
|
||||
import { parseTime } from './klp.js'
|
||||
|
||||
test('formatDate', () => {
|
||||
expect(parseTime('2023-12-25', '{y}-{m}-{d}')).toBe('2023-12-25')
|
||||
})
|
||||
|
||||
test('formatDate with custom format', () => {
|
||||
const date = new Date('2023-12-25')
|
||||
expect(parseTime(date, '{y}年{m}月{d}日')).toBe('2023年12月25日')
|
||||
})
|
||||
Reference in New Issue
Block a user