赞
踩
一、antd默认级联选择如下
antd默认级联选择
1.1、需求是有几个分类的设置,需要保存在后台,提供添加和删除个人设置
最终需求1
最终需求2
二、实现上图功能
2.1、通过props传入所需值
className="customerCascader"
options={this.state.options}
userDetail={this.userDetail}
defaultValues={this.state.defaultValues}
defaultEntryId={this.state.defaultEntryId}
preferenceKeyType={PreferenceKeys.DMTLayoutPreference}
selectedPreference={(selected, selectedPreference) => this.selectedPreference(selected, selectedPreference)}
defaultGridConfigure={this.state.defaultGridConfigure}
changeLayoutOrFilter={selectedConfigure => this.changeLayoutOrFilter(selectedConfigure)}
switchLoadingIndicator={(show, hint) => this.switchLoadingIndicator(show, hint)}
deletedPreference={deletedId => this.deletedPreference(deletedId)}
/>
注:options:为数据源 defaultValues:默认显示的选中项
import React from 'react';
import PropT
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。