fix: 来源多选的默认值

feature/pivot
Lei OT 2 years ago
parent ede377dcca
commit 2a85a989df

@ -13,7 +13,7 @@ class SiteSelect extends Component {
const { store, mode, value, onChange, show_all, ...extProps } = this.props;
const _mode = mode || store?.group_select_mode || null;
const _show_all = ['tags', 'multiple'].includes(_mode) ? false : show_all;
const __value = ['tags', 'multiple'].includes(_mode) ? (value.constructor === Object ? [value] : value) : undefined;
const __value = ['tags', 'multiple'].includes(_mode) ? (value?.constructor === Object ? [value] : value) : undefined;
const _value = !['tags', 'multiple'].includes(_mode)
? value || store?.webcode || undefined
: (__value || store?.webcode || []).filter((item) => String(item?.value || item.key).toLowerCase() !== 'all');

Loading…
Cancel
Save