style: 优化布局和交互(Loading/空状态/骨架屏)
This commit is contained in:
@@ -6,10 +6,11 @@ const GOODS_BASE = '/api/v1/admin/good/user_goods'
|
||||
const fd = (data) => {
|
||||
const f = new FormData()
|
||||
Object.entries(data).forEach(([k, v]) => {
|
||||
if (v === undefined || v === null || v === '') return
|
||||
// 数组类型逐个 append(如 network_ids)
|
||||
if (v === undefined || v === null) return
|
||||
if (Array.isArray(v)) {
|
||||
v.forEach(item => f.append(k, item))
|
||||
} else if (typeof v === 'boolean') {
|
||||
f.append(k, v ? 'true' : 'false')
|
||||
} else {
|
||||
f.append(k, v)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user