@dckj-npm/dc-material 0.1.28 → 0.1.30

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.
Files changed (291) hide show
  1. package/build/docs/404.html +47 -0
  2. package/build/docs/_demos/:uuid +47 -0
  3. package/build/docs/colorful-button.html +4 -4
  4. package/build/docs/colorful-input.html +4 -4
  5. package/build/docs/index.html +4 -4
  6. package/build/docs/umi.19a78b0f.js +1 -0
  7. package/build/docs/{umi.1db9e2cc.css → umi.5357b0f6.css} +1 -1
  8. package/build/docs/~demos/:uuid.html +47 -0
  9. package/build/docs/~demos/colorful-button-demo.html +4 -4
  10. package/build/docs/~demos/colorful-input-demo.html +4 -4
  11. package/build/index.js +12 -19
  12. package/build/lowcode/assets-daily.json +13 -13
  13. package/build/lowcode/assets-dev.json +2 -2
  14. package/build/lowcode/assets-prod.json +13 -13
  15. package/build/lowcode/index.js +1 -1
  16. package/build/lowcode/meta.design.js +1 -1
  17. package/build/lowcode/meta.js +1 -1
  18. package/build/lowcode/preview.js +10 -10
  19. package/build/lowcode/render/default/view.css +1 -1
  20. package/build/lowcode/render/default/view.js +10 -10
  21. package/build/lowcode/view.css +1 -1
  22. package/build/lowcode/view.js +10 -10
  23. package/dist/BizComps.css +1 -1
  24. package/dist/BizComps.js +4 -4
  25. package/dist/BizComps.js.map +1 -1
  26. package/es/assets/icon/position/arror.png +0 -0
  27. package/es/components/bottom-navigation/bottom-navigation.d.ts +15 -15
  28. package/es/components/bottom-navigation/index.d.ts +3 -3
  29. package/es/components/bottom-navigation/index.scss +23 -23
  30. package/es/components/button/button.d.ts +14 -14
  31. package/es/components/button/index.d.ts +6 -6
  32. package/es/components/button/index.js +2 -2
  33. package/es/components/carousel/carousel.d.ts +14 -0
  34. package/es/components/carousel/carousel.js +75 -0
  35. package/es/components/carousel/carousel.scss +32 -0
  36. package/es/components/colorful-button/colorful-button.d.ts +12 -12
  37. package/es/components/colorful-button/index.d.ts +3 -3
  38. package/es/components/colorful-input/colorful-input.d.ts +8 -8
  39. package/es/components/colorful-input/index.d.ts +3 -3
  40. package/es/components/goods-card-list/goods-card-list.d.ts +5 -0
  41. package/es/components/goods-card-list/goods-card-list.js +139 -0
  42. package/es/components/goods-card-list/goods-card-list.scss +93 -0
  43. package/es/components/goods-card-list/index.d.ts +3 -0
  44. package/es/components/goods-card-list/index.js +2 -0
  45. package/es/components/goods-card-list/types.d.ts +41 -0
  46. package/es/components/goods-card-list/types.js +1 -0
  47. package/es/components/grid-nav/grid-nav.d.ts +13 -13
  48. package/es/components/grid-nav/index.d.ts +3 -3
  49. package/es/components/grid-nav/index.scss +37 -37
  50. package/es/components/integral-task/index.d.ts +6 -6
  51. package/es/components/integral-task/index.js +2 -2
  52. package/es/components/integral-task/integral-task.d.ts +40 -40
  53. package/es/components/menu-list/index.d.ts +6 -6
  54. package/es/components/menu-list/index.js +2 -2
  55. package/es/components/menu-list/index.scss +16 -16
  56. package/es/components/menu-list/menu-list-item.d.ts +5 -5
  57. package/es/components/menu-list/menu-list-item.scss +49 -49
  58. package/es/components/menu-list/menu-list.d.ts +5 -5
  59. package/es/components/menu-list/types.d.ts +23 -23
  60. package/es/components/message-list/index.d.ts +6 -6
  61. package/es/components/message-list/index.js +2 -2
  62. package/es/components/message-list/index.scss +22 -22
  63. package/es/components/message-list/message-list-item.d.ts +29 -29
  64. package/es/components/message-list/message-list-item.js +2 -2
  65. package/es/components/message-list/message-list-item.scss +49 -49
  66. package/es/components/message-list/message-list.d.ts +32 -32
  67. package/es/components/notice-bar/index.d.ts +3 -3
  68. package/es/components/notice-bar/index.scss +26 -26
  69. package/es/components/notice-bar/notice-bar-item.d.ts +31 -31
  70. package/es/components/notice-bar/notice-bar-item.scss +26 -26
  71. package/es/components/notice-bar/notice-bar.d.ts +50 -50
  72. package/es/components/position/entity.d.ts +5 -5
  73. package/es/components/position/index.d.ts +3 -3
  74. package/es/components/position/index.scss +27 -23
  75. package/es/components/position/position-left.d.ts +9 -9
  76. package/es/components/position/position-list.d.ts +12 -12
  77. package/es/components/position/position.d.ts +8 -8
  78. package/es/components/radio-group/index.d.ts +8 -8
  79. package/es/components/radio-group/index.js +2 -2
  80. package/es/components/radio-group/index.scss +40 -40
  81. package/es/components/radio-group/radio-group-item.d.ts +48 -48
  82. package/es/components/radio-group/radio-group.d.ts +52 -52
  83. package/es/components/search-bar/index.d.ts +3 -3
  84. package/es/components/search-bar/index.scss +13 -13
  85. package/es/components/search-bar/search-bar.d.ts +7 -7
  86. package/es/components/swiper/index.d.ts +3 -3
  87. package/es/components/swiper/swiper.d.ts +47 -47
  88. package/es/components/tab/index.d.ts +6 -6
  89. package/es/components/tab/index.js +2 -2
  90. package/es/components/tab/index.scss +22 -22
  91. package/es/components/tab/tab.d.ts +23 -23
  92. package/es/components/tab-container/index.d.ts +3 -3
  93. package/es/components/tab-container/index.scss +47 -47
  94. package/es/components/tab-container/tab-container.d.ts +10 -10
  95. package/es/components/tab-container-item/index.d.ts +3 -3
  96. package/es/components/tab-container-item/tab-container-item.d.ts +9 -9
  97. package/es/components/tag/index.d.ts +6 -6
  98. package/es/components/tag/index.js +2 -2
  99. package/es/components/tag/tag.d.ts +14 -14
  100. package/es/components/teletext-list/index.d.ts +6 -6
  101. package/es/components/teletext-list/index.js +2 -2
  102. package/es/components/teletext-list/index.scss +19 -19
  103. package/es/components/teletext-list/teletext-list-item.d.ts +42 -42
  104. package/es/components/teletext-list/teletext-list-item.js +10 -7
  105. package/es/components/teletext-list/teletext-list-item.scss +55 -55
  106. package/es/components/teletext-list/teletext-list.d.ts +61 -61
  107. package/es/components/teletext-list/teletext-list.js +2 -2
  108. package/es/components/title/index.d.ts +8 -8
  109. package/es/components/title/index.js +2 -2
  110. package/es/components/title/title-1.d.ts +10 -10
  111. package/es/components/title/title-1.scss +25 -25
  112. package/es/components/title/title-2.d.ts +18 -18
  113. package/es/components/title/title-2.scss +22 -22
  114. package/es/index.d.ts +40 -38
  115. package/es/index.js +4 -0
  116. package/es/index.scss +5 -5
  117. package/es/utils/children-node-handle.d.ts +9 -9
  118. package/es/utils/children-node-handle.js +0 -2
  119. package/es/utils/component-wrapper.d.ts +9 -9
  120. package/es/utils/debounce.d.ts +1 -0
  121. package/es/utils/debounce.js +14 -0
  122. package/es/variables.d.ts +2 -2
  123. package/lib/assets/icon/position/arror.png +0 -0
  124. package/lib/components/bottom-navigation/bottom-navigation.d.ts +15 -15
  125. package/lib/components/bottom-navigation/index.d.ts +3 -3
  126. package/lib/components/bottom-navigation/index.scss +23 -23
  127. package/lib/components/button/button.d.ts +14 -14
  128. package/lib/components/button/index.d.ts +6 -6
  129. package/lib/components/button/index.js +2 -2
  130. package/lib/components/carousel/carousel.d.ts +14 -0
  131. package/lib/components/carousel/carousel.js +81 -0
  132. package/lib/components/carousel/carousel.scss +32 -0
  133. package/lib/components/colorful-button/colorful-button.d.ts +12 -12
  134. package/lib/components/colorful-button/index.d.ts +3 -3
  135. package/lib/components/colorful-input/colorful-input.d.ts +8 -8
  136. package/lib/components/colorful-input/index.d.ts +3 -3
  137. package/lib/components/goods-card-list/goods-card-list.d.ts +5 -0
  138. package/lib/components/goods-card-list/goods-card-list.js +146 -0
  139. package/lib/components/goods-card-list/goods-card-list.scss +93 -0
  140. package/lib/components/goods-card-list/index.d.ts +3 -0
  141. package/lib/components/goods-card-list/index.js +6 -0
  142. package/lib/components/goods-card-list/types.d.ts +41 -0
  143. package/lib/components/goods-card-list/types.js +3 -0
  144. package/lib/components/grid-nav/grid-nav.d.ts +13 -13
  145. package/lib/components/grid-nav/index.d.ts +3 -3
  146. package/lib/components/grid-nav/index.scss +37 -37
  147. package/lib/components/integral-task/index.d.ts +6 -6
  148. package/lib/components/integral-task/index.js +2 -2
  149. package/lib/components/integral-task/integral-task.d.ts +40 -40
  150. package/lib/components/menu-list/index.d.ts +6 -6
  151. package/lib/components/menu-list/index.js +2 -2
  152. package/lib/components/menu-list/index.scss +16 -16
  153. package/lib/components/menu-list/menu-list-item.d.ts +5 -5
  154. package/lib/components/menu-list/menu-list-item.scss +49 -49
  155. package/lib/components/menu-list/menu-list.d.ts +5 -5
  156. package/lib/components/menu-list/types.d.ts +23 -23
  157. package/lib/components/message-list/index.d.ts +6 -6
  158. package/lib/components/message-list/index.js +2 -2
  159. package/lib/components/message-list/index.scss +22 -22
  160. package/lib/components/message-list/message-list-item.d.ts +29 -29
  161. package/lib/components/message-list/message-list-item.js +2 -2
  162. package/lib/components/message-list/message-list-item.scss +49 -49
  163. package/lib/components/message-list/message-list.d.ts +32 -32
  164. package/lib/components/notice-bar/index.d.ts +3 -3
  165. package/lib/components/notice-bar/index.scss +26 -26
  166. package/lib/components/notice-bar/notice-bar-item.d.ts +31 -31
  167. package/lib/components/notice-bar/notice-bar-item.scss +26 -26
  168. package/lib/components/notice-bar/notice-bar.d.ts +50 -50
  169. package/lib/components/position/entity.d.ts +5 -5
  170. package/lib/components/position/index.d.ts +3 -3
  171. package/lib/components/position/index.scss +27 -23
  172. package/lib/components/position/position-left.d.ts +9 -9
  173. package/lib/components/position/position-list.d.ts +12 -12
  174. package/lib/components/position/position.d.ts +8 -8
  175. package/lib/components/radio-group/index.d.ts +8 -8
  176. package/lib/components/radio-group/index.scss +40 -40
  177. package/lib/components/radio-group/radio-group-item.d.ts +48 -48
  178. package/lib/components/radio-group/radio-group.d.ts +52 -52
  179. package/lib/components/search-bar/index.d.ts +3 -3
  180. package/lib/components/search-bar/index.scss +13 -13
  181. package/lib/components/search-bar/search-bar.d.ts +7 -7
  182. package/lib/components/swiper/index.d.ts +3 -3
  183. package/lib/components/swiper/swiper.d.ts +47 -47
  184. package/lib/components/tab/index.d.ts +6 -6
  185. package/lib/components/tab/index.js +2 -2
  186. package/lib/components/tab/index.scss +22 -22
  187. package/lib/components/tab/tab.d.ts +23 -23
  188. package/lib/components/tab-container/index.d.ts +3 -3
  189. package/lib/components/tab-container/index.scss +47 -47
  190. package/lib/components/tab-container/tab-container.d.ts +10 -10
  191. package/lib/components/tab-container-item/index.d.ts +3 -3
  192. package/lib/components/tab-container-item/tab-container-item.d.ts +9 -9
  193. package/lib/components/tag/index.d.ts +6 -6
  194. package/lib/components/tag/index.js +2 -2
  195. package/lib/components/tag/tag.d.ts +14 -14
  196. package/lib/components/teletext-list/index.d.ts +6 -6
  197. package/lib/components/teletext-list/index.scss +19 -19
  198. package/lib/components/teletext-list/teletext-list-item.d.ts +42 -42
  199. package/lib/components/teletext-list/teletext-list-item.js +10 -7
  200. package/lib/components/teletext-list/teletext-list-item.scss +55 -55
  201. package/lib/components/teletext-list/teletext-list.d.ts +61 -61
  202. package/lib/components/teletext-list/teletext-list.js +2 -2
  203. package/lib/components/title/index.d.ts +8 -8
  204. package/lib/components/title/title-1.d.ts +10 -10
  205. package/lib/components/title/title-1.scss +25 -25
  206. package/lib/components/title/title-2.d.ts +18 -18
  207. package/lib/components/title/title-2.scss +22 -22
  208. package/lib/index.d.ts +40 -38
  209. package/lib/index.js +5 -1
  210. package/lib/index.scss +5 -5
  211. package/lib/utils/children-node-handle.d.ts +9 -9
  212. package/lib/utils/children-node-handle.js +0 -2
  213. package/lib/utils/component-wrapper.d.ts +9 -9
  214. package/lib/utils/debounce.d.ts +1 -0
  215. package/lib/utils/debounce.js +18 -0
  216. package/lib/variables.d.ts +2 -2
  217. package/lowcode/custom-radio-group/meta.ts +293 -293
  218. package/lowcode/custom-radio-group-item/meta.ts +229 -229
  219. package/lowcode/d-c-slider/meta.design.ts +173 -173
  220. package/lowcode/d-c-slider/meta.ts +342 -342
  221. package/lowcode/d-c-slider/snippets.ts +68 -68
  222. package/lowcode/goods-card-list/meta.ts +262 -0
  223. package/lowcode/grid-nav/meta.ts +212 -212
  224. package/lowcode/menu-list/meta.ts +147 -147
  225. package/lowcode/message-list/meta.ts +205 -205
  226. package/lowcode/navigation/meta.ts +173 -173
  227. package/lowcode/notice-bar/meta.ts +291 -291
  228. package/lowcode/search-bar/meta.ts +54 -54
  229. package/lowcode/tab-container/meta.ts +69 -69
  230. package/lowcode/tab-container/props.ts +194 -194
  231. package/lowcode/tab-container-item/meta.ts +195 -195
  232. package/lowcode/tag-c/meta.ts +75 -75
  233. package/lowcode/teletext-list/meta.ts +329 -329
  234. package/lowcode/title1/meta.ts +59 -59
  235. package/lowcode/title2/meta.ts +93 -93
  236. package/lowcode_es/button2/meta.d.ts +22 -22
  237. package/lowcode_es/custom-radio-group/meta.d.ts +22 -22
  238. package/lowcode_es/custom-radio-group-item/meta.d.ts +23 -23
  239. package/lowcode_es/d-c-slider/meta.d.ts +148 -148
  240. package/lowcode_es/d-c-slider/meta.design.d.ts +100 -100
  241. package/lowcode_es/d-c-slider/snippets.d.ts +36 -36
  242. package/lowcode_es/goods-card-list/meta.d.ts +22 -0
  243. package/lowcode_es/goods-card-list/meta.js +245 -0
  244. package/lowcode_es/grid-nav/meta.d.ts +22 -22
  245. package/lowcode_es/integral-task/meta.d.ts +22 -22
  246. package/lowcode_es/menu-list/meta.d.ts +22 -22
  247. package/lowcode_es/message-list/meta.d.ts +22 -22
  248. package/lowcode_es/meta.js +23 -22
  249. package/lowcode_es/navigation/meta.d.ts +22 -22
  250. package/lowcode_es/notice-bar/meta.d.ts +22 -22
  251. package/lowcode_es/position/meta.d.ts +22 -22
  252. package/lowcode_es/search-bar/meta.d.ts +22 -22
  253. package/lowcode_es/swiper/meta.d.ts +22 -22
  254. package/lowcode_es/tab-container/meta.d.ts +22 -22
  255. package/lowcode_es/tab-container/props.d.ts +90 -90
  256. package/lowcode_es/tab-container-item/meta.d.ts +22 -22
  257. package/lowcode_es/tab-message/meta.d.ts +22 -22
  258. package/lowcode_es/tag-c/meta.d.ts +22 -22
  259. package/lowcode_es/teletext-list/meta.d.ts +22 -22
  260. package/lowcode_es/title1/meta.d.ts +22 -22
  261. package/lowcode_es/title2/meta.d.ts +22 -22
  262. package/lowcode_es/view.js +3 -3
  263. package/lowcode_lib/button2/meta.d.ts +22 -22
  264. package/lowcode_lib/custom-radio-group/meta.d.ts +22 -22
  265. package/lowcode_lib/custom-radio-group-item/meta.d.ts +23 -23
  266. package/lowcode_lib/d-c-slider/meta.d.ts +148 -148
  267. package/lowcode_lib/d-c-slider/meta.design.d.ts +100 -100
  268. package/lowcode_lib/d-c-slider/snippets.d.ts +36 -36
  269. package/lowcode_lib/goods-card-list/meta.d.ts +22 -0
  270. package/lowcode_lib/goods-card-list/meta.js +250 -0
  271. package/lowcode_lib/grid-nav/meta.d.ts +22 -22
  272. package/lowcode_lib/integral-task/meta.d.ts +22 -22
  273. package/lowcode_lib/menu-list/meta.d.ts +22 -22
  274. package/lowcode_lib/message-list/meta.d.ts +22 -22
  275. package/lowcode_lib/meta.js +23 -22
  276. package/lowcode_lib/navigation/meta.d.ts +22 -22
  277. package/lowcode_lib/notice-bar/meta.d.ts +22 -22
  278. package/lowcode_lib/position/meta.d.ts +22 -22
  279. package/lowcode_lib/search-bar/meta.d.ts +22 -22
  280. package/lowcode_lib/swiper/meta.d.ts +22 -22
  281. package/lowcode_lib/tab-container/meta.d.ts +22 -22
  282. package/lowcode_lib/tab-container/props.d.ts +90 -90
  283. package/lowcode_lib/tab-container-item/meta.d.ts +22 -22
  284. package/lowcode_lib/tab-message/meta.d.ts +22 -22
  285. package/lowcode_lib/tag-c/meta.d.ts +22 -22
  286. package/lowcode_lib/teletext-list/meta.d.ts +22 -22
  287. package/lowcode_lib/title1/meta.d.ts +22 -22
  288. package/lowcode_lib/title2/meta.d.ts +22 -22
  289. package/lowcode_lib/view.js +2 -2
  290. package/package.json +3 -3
  291. package/build/docs/umi.c18d41ab.js +0 -1
@@ -1,54 +1,54 @@
1
-
2
- import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';
3
-
4
- const SearchBarMeta: IPublicTypeComponentMetadata = {
5
- "group": '低代码组件',
6
- "componentName": "SearchBar",
7
- "title": "搜索栏",
8
- "docUrl": "",
9
- "screenshot": "",
10
- "devMode": "proCode",
11
- "npm": {
12
- "package": "@dckj-npm/dc-material",
13
- "version": "0.1.0",
14
- "exportName": "SearchBar",
15
- "main": "src\\index.tsx",
16
- "destructuring": true,
17
- "subName": ""
18
- },
19
- "configure": {
20
- supports: {
21
- style: true,
22
- events: [{
23
- name: 'onClick',
24
- // template: "onSearch(params,${extParams}){\n window.location.href=`http://localhost:4500/preview.html?pathId=${params.pathId}`;\n console.log(params.pathId) \n}"
25
- }],
26
- },
27
- "props": [
28
- {
29
- name: 'defaultValue',
30
- title: '绑定跳转',
31
- setter: 'StringSetter',
32
- supportVariable: true,
33
- description: '搜索框绑定跳转',
34
- defaultValue: '请输入'
35
- },
36
- ],
37
- "component": {}
38
- }
39
- };
40
- const snippets: IPublicTypeSnippet[] = [
41
- {
42
- "title": "搜索栏",
43
- "screenshot": "",
44
- "schema": {
45
- "componentName": "SearchBar",
46
- "props": {}
47
- }
48
- }
49
- ];
50
-
51
- export default {
52
- ...SearchBarMeta,
53
- snippets
54
- };
1
+
2
+ import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';
3
+
4
+ const SearchBarMeta: IPublicTypeComponentMetadata = {
5
+ "group": '低代码组件',
6
+ "componentName": "SearchBar",
7
+ "title": "搜索栏",
8
+ "docUrl": "",
9
+ "screenshot": "",
10
+ "devMode": "proCode",
11
+ "npm": {
12
+ "package": "@dckj-npm/dc-material",
13
+ "version": "0.1.0",
14
+ "exportName": "SearchBar",
15
+ "main": "src\\index.tsx",
16
+ "destructuring": true,
17
+ "subName": ""
18
+ },
19
+ "configure": {
20
+ supports: {
21
+ style: true,
22
+ events: [{
23
+ name: 'onClick',
24
+ // template: "onSearch(params,${extParams}){\n window.location.href=`http://localhost:4500/preview.html?pathId=${params.pathId}`;\n console.log(params.pathId) \n}"
25
+ }],
26
+ },
27
+ "props": [
28
+ {
29
+ name: 'defaultValue',
30
+ title: '绑定跳转',
31
+ setter: 'StringSetter',
32
+ supportVariable: true,
33
+ description: '搜索框绑定跳转',
34
+ defaultValue: '请输入'
35
+ },
36
+ ],
37
+ "component": {}
38
+ }
39
+ };
40
+ const snippets: IPublicTypeSnippet[] = [
41
+ {
42
+ "title": "搜索栏",
43
+ "screenshot": "",
44
+ "schema": {
45
+ "componentName": "SearchBar",
46
+ "props": {}
47
+ }
48
+ }
49
+ ];
50
+
51
+ export default {
52
+ ...SearchBarMeta,
53
+ snippets
54
+ };
@@ -1,70 +1,70 @@
1
- import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from "@alilc/lowcode-types";
2
-
3
- import props from "./props";
4
-
5
- const snippets: IPublicTypeSnippet[] = [
6
- {
7
- title: "选项卡",
8
- schema: {
9
- componentName: "TabContainer",
10
- props: {
11
- shape: "pure",
12
- size: "medium",
13
- excessMode: "slide",
14
- },
15
- children: [
16
- {
17
- componentName: "TabContainerItem",
18
- props: {
19
- title: "标签项1",
20
- primaryKey: "tab-item-1",
21
- },
22
- },
23
- {
24
- componentName: "TabContainerItem",
25
- props: {
26
- title: "标签项2",
27
- primaryKey: "tab-item-2",
28
- },
29
- },
30
- ],
31
- },
32
- },
33
- ];
34
-
35
- const TabContainerMeta: IPublicTypeComponentMetadata = {
36
- "group": "低代码组件",
37
- componentName: "TabContainer",
38
- title: "选项卡",
39
- category: "布局容器类",
40
- docUrl: "",
41
- screenshot:
42
- "https://img.alicdn.com/imgextra/i4/O1CN01mh9LPG268B90t8DaA_!!6000000007616-55-tps-56-56.svg",
43
- devMode: "proCode",
44
- npm: {
45
- "package": "@dckj-npm/dc-material",
46
- "version": "0.1.13",
47
- "exportName": "TabContainer",
48
- "main": "src\\index.tsx",
49
- "destructuring": true,
50
- "subName": ""
51
- },
52
- configure: {
53
- component: {
54
- isContainer: true,
55
- nestingRule: {
56
- childWhitelist: ["TabContainerItem"],
57
- },
58
- },
59
- props,
60
- supports: {
61
- style: true,
62
- },
63
- },
64
- snippets,
65
- };
66
-
67
- export default {
68
- ...TabContainerMeta,
69
- snippets
1
+ import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from "@alilc/lowcode-types";
2
+
3
+ import props from "./props";
4
+
5
+ const snippets: IPublicTypeSnippet[] = [
6
+ {
7
+ title: "选项卡",
8
+ schema: {
9
+ componentName: "TabContainer",
10
+ props: {
11
+ shape: "pure",
12
+ size: "medium",
13
+ excessMode: "slide",
14
+ },
15
+ children: [
16
+ {
17
+ componentName: "TabContainerItem",
18
+ props: {
19
+ title: "标签项1",
20
+ primaryKey: "tab-item-1",
21
+ },
22
+ },
23
+ {
24
+ componentName: "TabContainerItem",
25
+ props: {
26
+ title: "标签项2",
27
+ primaryKey: "tab-item-2",
28
+ },
29
+ },
30
+ ],
31
+ },
32
+ },
33
+ ];
34
+
35
+ const TabContainerMeta: IPublicTypeComponentMetadata = {
36
+ "group": "低代码组件",
37
+ componentName: "TabContainer",
38
+ title: "选项卡",
39
+ category: "布局容器类",
40
+ docUrl: "",
41
+ screenshot:
42
+ "https://img.alicdn.com/imgextra/i4/O1CN01mh9LPG268B90t8DaA_!!6000000007616-55-tps-56-56.svg",
43
+ devMode: "proCode",
44
+ npm: {
45
+ "package": "@dckj-npm/dc-material",
46
+ "version": "0.1.13",
47
+ "exportName": "TabContainer",
48
+ "main": "src\\index.tsx",
49
+ "destructuring": true,
50
+ "subName": ""
51
+ },
52
+ configure: {
53
+ component: {
54
+ isContainer: true,
55
+ nestingRule: {
56
+ childWhitelist: ["TabContainerItem"],
57
+ },
58
+ },
59
+ props,
60
+ supports: {
61
+ style: true,
62
+ },
63
+ },
64
+ snippets,
65
+ };
66
+
67
+ export default {
68
+ ...TabContainerMeta,
69
+ snippets
70
70
  };
@@ -1,194 +1,194 @@
1
- export default [
2
- {
3
- name: 'items',
4
- title: '标签项',
5
- setter: {
6
- componentName: 'ArraySetter',
7
- props: {
8
- itemSetter: {
9
- componentName: 'ObjectSetter',
10
- props: {
11
- config: {
12
- items: [
13
- {
14
- name: 'title',
15
- title: '名称',
16
- defaultValue: '标签项',
17
- important: true,
18
- setter: 'StringSetter',
19
- },
20
- {
21
- name: 'primaryKey',
22
- title: '项目编号',
23
- condition: () => false,
24
- setter: 'StringSetter',
25
- },
26
- {
27
- name: 'closeable',
28
- title: '可关闭',
29
- initialValue: false,
30
- setter: 'BoolSetter',
31
- },
32
- {
33
- name: 'disabled',
34
- title: '是否禁用',
35
- initialValue: false,
36
- setter: 'BoolSetter',
37
- },
38
- ],
39
- },
40
- },
41
- initialValue: () => {
42
- return {
43
- primaryKey: String(Math.floor(Math.random() * 10000)),
44
- title: '标签项',
45
- closeable: false,
46
- disabled: false,
47
- };
48
- },
49
- },
50
- },
51
- },
52
- extraProps: {
53
- getValue(target) {
54
- const map = target.node.children.map((child) => {
55
- const primaryKey = child.getPropValue('primaryKey')
56
- ? String(child.getPropValue('primaryKey'))
57
- : child.id;
58
- return {
59
- primaryKey,
60
- title: child.getPropValue('title') || '标签项',
61
- closeable: child.getPropValue('closeable'),
62
- disabled: child.getPropValue('disabled'),
63
- };
64
- });
65
- return map;
66
- },
67
- setValue(target, value) {
68
- const { node } = target;
69
- const map = {};
70
- if (!Array.isArray(value)) {
71
- value = [];
72
- }
73
- value.forEach((item) => {
74
- const tabitem = Object.assign({}, item);
75
- map[item.primaryKey] = tabitem;
76
- });
77
-
78
- node.children.mergeChildren(
79
- (child) => {
80
- const primaryKey = String(child.getPropValue('primaryKey'));
81
- if (Object.hasOwnProperty.call(map, primaryKey)) {
82
- child.setPropValue('title', map[primaryKey].title);
83
- child.setPropValue('closeable', map[primaryKey].closeable);
84
- child.setPropValue('disabled', map[primaryKey].disabled);
85
- delete map[primaryKey];
86
- return false;
87
- }
88
- return true;
89
- },
90
- () => {
91
- const items: any = [];
92
- for (const primaryKey in map) {
93
- if (Object.hasOwnProperty.call(map, primaryKey)) {
94
- items.push({
95
- componentName: 'TabContainerItem',
96
- props: map[primaryKey],
97
- });
98
- }
99
- }
100
- return items;
101
- },
102
- (child1, child2) => {
103
- const a = value.findIndex(
104
- (item) => String(item.primaryKey) === String(child1.getPropValue('primaryKey')),
105
- );
106
- const b = value.findIndex(
107
- (item) => String(item.primaryKey) === String(child2.getPropValue('primaryKey')),
108
- );
109
- return a - b;
110
- },
111
- );
112
- },
113
- },
114
- },
115
- {
116
- name: 'shape',
117
- title: '形态',
118
- defaultValue: 'pure',
119
- setter: {
120
- componentName: 'RadioGroupSetter',
121
- props: {
122
- options: [
123
- { title: '普通型', value: 'pure' },
124
- { title: '包裹型', value: 'wrapped' },
125
- { title: '文本型', value: 'text' },
126
- { title: '胶囊型', value: 'capsule' },
127
- ],
128
- },
129
- },
130
- },
131
- {
132
- name: 'size',
133
- title: '尺寸',
134
- defaultValue: 'medium',
135
- setter: {
136
- componentName: 'RadioGroupSetter',
137
- props: {
138
- options: [
139
- { title: '小', value: 'small' },
140
- { title: '中', value: 'medium' },
141
- ],
142
- },
143
- },
144
- },
145
- {
146
- name: 'excessMode',
147
- title: '选项卡过多时的滑动模式',
148
- defaultValue: 'slide',
149
- setter: {
150
- componentName: 'RadioGroupSetter',
151
- props: {
152
- options: [
153
- { title: '滑动', value: 'slide' },
154
- { title: '下拉', value: 'dropdown' },
155
- ],
156
- },
157
- },
158
- },
159
- {
160
- name: 'tabPosition',
161
- title: {
162
- label: '导航选项卡的位置',
163
- tip: '只适用于包裹型(wrapped)选项卡',
164
- },
165
- condition: (target) => {
166
- const shape = target.getProps().getPropValue('shape');
167
- return shape === 'wrapped';
168
- },
169
- defaultValue: 'top',
170
- setter: {
171
- componentName: 'RadioGroupSetter',
172
- props: {
173
- options: [
174
- {
175
- title: '顶部',
176
- value: 'top',
177
- },
178
- {
179
- title: '底部',
180
- value: 'bottom',
181
- },
182
- {
183
- title: '左边',
184
- value: 'left',
185
- },
186
- {
187
- title: '右边',
188
- value: 'right',
189
- },
190
- ],
191
- },
192
- },
193
- },
194
- ];
1
+ export default [
2
+ {
3
+ name: 'items',
4
+ title: '标签项',
5
+ setter: {
6
+ componentName: 'ArraySetter',
7
+ props: {
8
+ itemSetter: {
9
+ componentName: 'ObjectSetter',
10
+ props: {
11
+ config: {
12
+ items: [
13
+ {
14
+ name: 'title',
15
+ title: '名称',
16
+ defaultValue: '标签项',
17
+ important: true,
18
+ setter: 'StringSetter',
19
+ },
20
+ {
21
+ name: 'primaryKey',
22
+ title: '项目编号',
23
+ condition: () => false,
24
+ setter: 'StringSetter',
25
+ },
26
+ {
27
+ name: 'closeable',
28
+ title: '可关闭',
29
+ initialValue: false,
30
+ setter: 'BoolSetter',
31
+ },
32
+ {
33
+ name: 'disabled',
34
+ title: '是否禁用',
35
+ initialValue: false,
36
+ setter: 'BoolSetter',
37
+ },
38
+ ],
39
+ },
40
+ },
41
+ initialValue: () => {
42
+ return {
43
+ primaryKey: String(Math.floor(Math.random() * 10000)),
44
+ title: '标签项',
45
+ closeable: false,
46
+ disabled: false,
47
+ };
48
+ },
49
+ },
50
+ },
51
+ },
52
+ extraProps: {
53
+ getValue(target) {
54
+ const map = target.node.children.map((child) => {
55
+ const primaryKey = child.getPropValue('primaryKey')
56
+ ? String(child.getPropValue('primaryKey'))
57
+ : child.id;
58
+ return {
59
+ primaryKey,
60
+ title: child.getPropValue('title') || '标签项',
61
+ closeable: child.getPropValue('closeable'),
62
+ disabled: child.getPropValue('disabled'),
63
+ };
64
+ });
65
+ return map;
66
+ },
67
+ setValue(target, value) {
68
+ const { node } = target;
69
+ const map = {};
70
+ if (!Array.isArray(value)) {
71
+ value = [];
72
+ }
73
+ value.forEach((item) => {
74
+ const tabitem = Object.assign({}, item);
75
+ map[item.primaryKey] = tabitem;
76
+ });
77
+
78
+ node.children.mergeChildren(
79
+ (child) => {
80
+ const primaryKey = String(child.getPropValue('primaryKey'));
81
+ if (Object.hasOwnProperty.call(map, primaryKey)) {
82
+ child.setPropValue('title', map[primaryKey].title);
83
+ child.setPropValue('closeable', map[primaryKey].closeable);
84
+ child.setPropValue('disabled', map[primaryKey].disabled);
85
+ delete map[primaryKey];
86
+ return false;
87
+ }
88
+ return true;
89
+ },
90
+ () => {
91
+ const items: any = [];
92
+ for (const primaryKey in map) {
93
+ if (Object.hasOwnProperty.call(map, primaryKey)) {
94
+ items.push({
95
+ componentName: 'TabContainerItem',
96
+ props: map[primaryKey],
97
+ });
98
+ }
99
+ }
100
+ return items;
101
+ },
102
+ (child1, child2) => {
103
+ const a = value.findIndex(
104
+ (item) => String(item.primaryKey) === String(child1.getPropValue('primaryKey')),
105
+ );
106
+ const b = value.findIndex(
107
+ (item) => String(item.primaryKey) === String(child2.getPropValue('primaryKey')),
108
+ );
109
+ return a - b;
110
+ },
111
+ );
112
+ },
113
+ },
114
+ },
115
+ {
116
+ name: 'shape',
117
+ title: '形态',
118
+ defaultValue: 'pure',
119
+ setter: {
120
+ componentName: 'RadioGroupSetter',
121
+ props: {
122
+ options: [
123
+ { title: '普通型', value: 'pure' },
124
+ { title: '包裹型', value: 'wrapped' },
125
+ { title: '文本型', value: 'text' },
126
+ { title: '胶囊型', value: 'capsule' },
127
+ ],
128
+ },
129
+ },
130
+ },
131
+ {
132
+ name: 'size',
133
+ title: '尺寸',
134
+ defaultValue: 'medium',
135
+ setter: {
136
+ componentName: 'RadioGroupSetter',
137
+ props: {
138
+ options: [
139
+ { title: '小', value: 'small' },
140
+ { title: '中', value: 'medium' },
141
+ ],
142
+ },
143
+ },
144
+ },
145
+ {
146
+ name: 'excessMode',
147
+ title: '选项卡过多时的滑动模式',
148
+ defaultValue: 'slide',
149
+ setter: {
150
+ componentName: 'RadioGroupSetter',
151
+ props: {
152
+ options: [
153
+ { title: '滑动', value: 'slide' },
154
+ { title: '下拉', value: 'dropdown' },
155
+ ],
156
+ },
157
+ },
158
+ },
159
+ {
160
+ name: 'tabPosition',
161
+ title: {
162
+ label: '导航选项卡的位置',
163
+ tip: '只适用于包裹型(wrapped)选项卡',
164
+ },
165
+ condition: (target) => {
166
+ const shape = target.getProps().getPropValue('shape');
167
+ return shape === 'wrapped';
168
+ },
169
+ defaultValue: 'top',
170
+ setter: {
171
+ componentName: 'RadioGroupSetter',
172
+ props: {
173
+ options: [
174
+ {
175
+ title: '顶部',
176
+ value: 'top',
177
+ },
178
+ {
179
+ title: '底部',
180
+ value: 'bottom',
181
+ },
182
+ {
183
+ title: '左边',
184
+ value: 'left',
185
+ },
186
+ {
187
+ title: '右边',
188
+ value: 'right',
189
+ },
190
+ ],
191
+ },
192
+ },
193
+ },
194
+ ];