feat(web): 优化折行的使用
This commit is contained in:
@@ -179,20 +179,27 @@ export function timeField(field, label, width = 150) {
|
||||
}
|
||||
}
|
||||
|
||||
export function stringWrapField(field, label, width = undefined) {
|
||||
return stringField(field, label, width, true)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} field
|
||||
* @param {string} label
|
||||
* @param {number} width
|
||||
* @param {boolean} wrap
|
||||
*/
|
||||
export function stringField(field, label, width = undefined) {
|
||||
export function stringField(field, label, width = undefined, wrap = false) {
|
||||
let data = {
|
||||
name: field,
|
||||
label: label,
|
||||
className: 'nowrap',
|
||||
}
|
||||
if (width) {
|
||||
data['width'] = width
|
||||
}
|
||||
if (wrap) {
|
||||
data['className'] = 'nowrap'
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user