@splicetree/plugin-selectable 0.3.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @splicetree/plugin-selectable
2
2
 
3
+ ## 1.0.0
4
+
3
5
  ## 0.3.0
4
6
 
5
7
  ### Minor Changes
package/README.md CHANGED
@@ -37,6 +37,18 @@ const tree = createSpliceTree(data, {
37
37
 
38
38
  ## Api
39
39
 
40
+ - Configuration
41
+
42
+ | 选项 | 类型 | 默认值 | 说明 |
43
+ | ----------------------------------------- | ----------- | ------ | ---------------------------- |
44
+ | `configuration.selectable.multiple` | `boolean` | `false`| 是否启用多选 |
45
+ | `configuration.selectable.defaultSelected`| `string[]` | `[]` | 初始选中节点 id 集合 |
46
+
47
+ - 行为
48
+ - 单选:点击选中当前节点
49
+ - 多选:
50
+ - 普通点击采用单选语义:清空其它选中,仅选中当前节点;再次点击已选中节点则取消选中
51
+ - `Ctrl/Cmd` 切换选中;`Shift` 范围选择
40
52
  - 实例
41
53
  - `selectedKeys: Set<string>` 当前选中集合
42
54
  - `lastSelectedKey?: string` 最近一次选中的 id
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@splicetree/plugin-selectable",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "1.0.0",
5
5
  "author": {
6
6
  "email": "michael.cocova@gmail.com",
7
7
  "name": "Michael Cocova"
@@ -23,7 +23,7 @@
23
23
  "access": "public"
24
24
  },
25
25
  "devDependencies": {
26
- "@splicetree/core": "0.3.0"
26
+ "@splicetree/core": "1.0.0"
27
27
  },
28
28
  "scripts": {
29
29
  "dev": "tsdown --watch",