From 9dffaa875b8420bf53b8c44d327f064c14511055 Mon Sep 17 00:00:00 2001
From: 2betop <2betop.cn@gmail.com>
Date: Thu, 28 May 2020 20:28:11 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20AssocicatedCheckboxes=20?=
=?UTF-8?q?=E8=8D=89=E7=A8=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/AssociatedCheckboxes.tsx | 17 +++++++++++++++++
src/components/ChainedCheckboxes.tsx | 19 ++++++++++++++++++-
src/components/TabsTransfer.tsx | 1 +
3 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 src/components/AssociatedCheckboxes.tsx
diff --git a/src/components/AssociatedCheckboxes.tsx b/src/components/AssociatedCheckboxes.tsx
new file mode 100644
index 000000000..b105e2d7b
--- /dev/null
+++ b/src/components/AssociatedCheckboxes.tsx
@@ -0,0 +1,17 @@
+/**
+ * 关联多选框,仅支持两层关联选择。
+ * 左边先点选,然后右边再次点选。
+ * 可以满足,先从 tree 中选中一个元素,然后查出来一个列表再次勾选。
+ */
+
+import React from 'react';
+
+export interface AssociatedCheckboxesProps {}
+
+export class AssociatedCheckboxes extends React.Component<
+ AssociatedCheckboxesProps
+> {
+ render() {
+ return
todo
;
+ }
+}
diff --git a/src/components/ChainedCheckboxes.tsx b/src/components/ChainedCheckboxes.tsx
index 4725d16a6..1a75915f0 100644
--- a/src/components/ChainedCheckboxes.tsx
+++ b/src/components/ChainedCheckboxes.tsx
@@ -1,3 +1,6 @@
+/**
+ * 级联多选框,支持无限极。从左侧到右侧一层层点选。
+ */
import {Checkboxes, CheckboxesProps} from './Checkboxes';
import {themeable} from '../theme';
import React from 'react';
@@ -8,12 +11,16 @@ import {getTreeDepth} from '../utils/helper';
import times from 'lodash/times';
import Spinner from './Spinner';
+export interface ChainedCheckboxesProps extends CheckboxesProps {
+ defaultSelectedIndex?: string;
+}
+
export interface ChainedCheckboxesState {
selected: Array;
}
export class ChainedCheckboxes extends Checkboxes<
- CheckboxesProps,
+ ChainedCheckboxesProps,
ChainedCheckboxesState
> {
valueArray: Array