import React, {Component} from 'react'; import {Select} from 'antd'; import {observer} from 'mobx-react'; import { sites } from '../../libs/ht'; class SiteSelect extends Component { constructor(props) { super(props); } render() { 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 || store?.webcode || undefined : (__value || store?.webcode || []).filter((item) => String(item?.value || item.key).toLowerCase() !== 'all'); return (