@next-bricks/presentational-bricks 1.339.7 → 1.339.8

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/dist/stories.json CHANGED
@@ -7939,6 +7939,55 @@
7939
7939
  }
7940
7940
  ]
7941
7941
  },
7942
+ {
7943
+ "snippetId": "presentational-bricks.brick-tag[confirm-before-close]",
7944
+ "title": {
7945
+ "zh": "删除前二次确认",
7946
+ "en": ""
7947
+ },
7948
+ "message": {
7949
+ "zh": "配置 confirmBeforeClose 后,点击关闭会先触发 tag.close.confirm,外部确认后调用 confirmClose 才会真正删除。",
7950
+ "en": ""
7951
+ },
7952
+ "bricks": [
7953
+ {
7954
+ "brick": "presentational-bricks.brick-tag",
7955
+ "properties": {
7956
+ "showCard": false,
7957
+ "closable": true,
7958
+ "confirmBeforeClose": true,
7959
+ "tagList": [
7960
+ {
7961
+ "key": "confirm1",
7962
+ "label": "confirm1"
7963
+ },
7964
+ {
7965
+ "key": "confirm2",
7966
+ "label": "confirm2"
7967
+ },
7968
+ {
7969
+ "key": "confirm3",
7970
+ "label": "confirm3"
7971
+ }
7972
+ ]
7973
+ },
7974
+ "events": {
7975
+ "tag.close.confirm": {
7976
+ "action": "console.log",
7977
+ "args": [
7978
+ "${EVENT.detail}"
7979
+ ]
7980
+ },
7981
+ "tag.close": {
7982
+ "action": "console.log",
7983
+ "args": [
7984
+ "${EVENT.detail}"
7985
+ ]
7986
+ }
7987
+ }
7988
+ }
7989
+ ]
7990
+ },
7942
7991
  {
7943
7992
  "description": {
7944
7993
  "title": "多种颜色",
@@ -8552,6 +8601,14 @@
8552
8601
  "description": "标签是否可以关闭",
8553
8602
  "group": "basic"
8554
8603
  },
8604
+ {
8605
+ "name": "confirmBeforeClose",
8606
+ "type": "boolean",
8607
+ "required": false,
8608
+ "default": "false",
8609
+ "description": "关闭标签前是否需要外部二次确认。开启后点击关闭会先触发 `tag.close.confirm`,确认后调用 `confirmClose` 才会真正关闭。",
8610
+ "group": "basic"
8611
+ },
8555
8612
  {
8556
8613
  "name": "componentType",
8557
8614
  "type": "TagTypeProps",
@@ -8661,6 +8718,23 @@
8661
8718
  "type": "tag.close",
8662
8719
  "detail": "{ current: Record<string, any>; tagList: Record<string, any>[] }",
8663
8720
  "description": "当前关闭的 tag 和剩余的tagList"
8721
+ },
8722
+ {
8723
+ "type": "tag.close.confirm",
8724
+ "detail": "{ current: Record<string, any>; requestId: string; tagList: Record<string, any>[] }",
8725
+ "description": "请求关闭的 tag 和关闭后的 tagList,可用于外部二次确认"
8726
+ }
8727
+ ],
8728
+ "methods": [
8729
+ {
8730
+ "name": "cancelClose",
8731
+ "params": "requestId",
8732
+ "description": "取消关闭当前等待二次确认的标签。不传 requestId 时取消最近一次请求。"
8733
+ },
8734
+ {
8735
+ "name": "confirmClose",
8736
+ "params": "requestId",
8737
+ "description": "确认关闭当前等待二次确认的标签。不传 requestId 时确认最近一次请求。"
8664
8738
  }
8665
8739
  ],
8666
8740
  "interface": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/presentational-bricks",
3
- "version": "1.339.7",
3
+ "version": "1.339.8",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "https://github.com/easyops-cn/next-basics/tree/master/bricks/presentational-bricks",
6
6
  "license": "GPL-3.0",
@@ -86,5 +86,5 @@
86
86
  "@next-dll/ace": "*",
87
87
  "@next-dll/react-dnd": "*"
88
88
  },
89
- "gitHead": "60c125a918108fb46045d76dca086362ae906f65"
89
+ "gitHead": "a8561833fb9ae611af17c2110d630aa0d7d9f12f"
90
90
  }