@dckj-npm/dc-material 0.1.128 → 0.1.129

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 (337) hide show
  1. package/README.md +17 -17
  2. package/build/index.js +8 -8
  3. package/build/lowcode/assets-daily.json +13 -13
  4. package/build/lowcode/assets-dev.json +2 -2
  5. package/build/lowcode/assets-prod.json +13 -13
  6. package/build/lowcode/index.js +1 -1
  7. package/build/lowcode/meta.design.js +1 -1
  8. package/build/lowcode/meta.js +1 -1
  9. package/build/lowcode/preview.js +10 -10
  10. package/build/lowcode/render/default/view.css +1 -1
  11. package/build/lowcode/render/default/view.js +9 -9
  12. package/build/lowcode/view.css +1 -1
  13. package/build/lowcode/view.js +9 -9
  14. package/dist/BizComps.css +1 -1
  15. package/dist/BizComps.js +5 -5
  16. package/dist/BizComps.js.map +1 -1
  17. package/es/components/bottom-navigation/index.scss +24 -24
  18. package/es/components/button/index.js +2 -2
  19. package/es/components/button/index.scss +16 -16
  20. package/es/components/carousel/carousel.scss +32 -32
  21. package/es/components/colorful-button/index.scss +5 -5
  22. package/es/components/colorful-input/index.scss +5 -5
  23. package/es/components/goods-card-list/goods-card-list-common.scss +118 -118
  24. package/es/components/goods-card-list/goods-card-list.scss +112 -112
  25. package/es/components/grid-nav/index.scss +41 -41
  26. package/es/components/integral-task/index.js +2 -2
  27. package/es/components/integral-task/index.scss +35 -35
  28. package/es/components/menu-list/index.js +2 -2
  29. package/es/components/menu-list/index.scss +16 -16
  30. package/es/components/menu-list/menu-list-item.scss +49 -49
  31. package/es/components/message-list/index.js +2 -2
  32. package/es/components/message-list/index.scss +22 -22
  33. package/es/components/message-list/message-list-item.js +2 -2
  34. package/es/components/message-list/message-list-item.scss +60 -60
  35. package/es/components/notice-bar/components/ScrollSwitcher.js +45 -0
  36. package/es/components/notice-bar/components/ScrollSwitcher.scss +17 -0
  37. package/es/components/notice-bar/index.scss +42 -59
  38. package/es/components/notice-bar/notice-bar-item.js +2 -5
  39. package/es/components/notice-bar/notice-bar-item.scss +26 -26
  40. package/es/components/notice-bar/notice-bar.js +51 -15
  41. package/es/components/position/index.scss +27 -27
  42. package/es/components/position/position-list.js +3 -2
  43. package/es/components/radio-group/index.js +2 -2
  44. package/es/components/radio-group/index.scss +40 -40
  45. package/es/components/rich-text/index.js +2 -2
  46. package/es/components/rich-text/index.scss +19 -19
  47. package/es/components/search-bar/index.scss +13 -14
  48. package/es/components/swiper/index.scss +12 -33
  49. package/es/components/swiper/swiper.js +16 -59
  50. package/es/components/tab/index.js +2 -2
  51. package/es/components/tab/index.scss +39 -39
  52. package/es/components/tab-container/index.scss +47 -47
  53. package/es/components/tag/index.js +2 -2
  54. package/es/components/tag/index.scss +24 -24
  55. package/es/components/teletext-list/index.js +2 -2
  56. package/es/components/teletext-list/index.scss +19 -19
  57. package/es/components/teletext-list/teletext-list-item.js +2 -2
  58. package/es/components/teletext-list/teletext-list-item.scss +55 -57
  59. package/es/components/teletext-list/teletext-list.js +2 -2
  60. package/es/components/title/index.js +2 -2
  61. package/es/components/title/title-1.scss +25 -25
  62. package/es/components/title/title-2.scss +22 -22
  63. package/es/index.js +0 -4
  64. package/es/index.scss +5 -5
  65. package/es/utils/children-node-handle.js +7 -7
  66. package/es/utils/time-util.js +3 -3
  67. package/es/variables.scss +3 -3
  68. package/lib/components/bottom-navigation/index.scss +24 -24
  69. package/lib/components/button/index.js +2 -2
  70. package/lib/components/button/index.scss +16 -16
  71. package/lib/components/carousel/carousel.scss +32 -32
  72. package/lib/components/colorful-button/index.scss +5 -5
  73. package/lib/components/colorful-input/index.scss +5 -5
  74. package/lib/components/goods-card-list/goods-card-list-common.scss +118 -118
  75. package/lib/components/goods-card-list/goods-card-list.scss +112 -112
  76. package/lib/components/grid-nav/index.scss +41 -41
  77. package/lib/components/integral-task/index.js +2 -2
  78. package/lib/components/integral-task/index.scss +35 -35
  79. package/lib/components/menu-list/index.js +2 -2
  80. package/lib/components/menu-list/index.scss +16 -16
  81. package/lib/components/menu-list/menu-list-item.scss +49 -49
  82. package/lib/components/message-list/index.js +2 -2
  83. package/lib/components/message-list/index.scss +22 -22
  84. package/lib/components/message-list/message-list-item.js +2 -2
  85. package/lib/components/message-list/message-list-item.scss +60 -60
  86. package/lib/components/notice-bar/components/ScrollSwitcher.js +52 -0
  87. package/lib/components/notice-bar/components/ScrollSwitcher.scss +17 -0
  88. package/lib/components/notice-bar/index.scss +42 -59
  89. package/lib/components/notice-bar/notice-bar-item.js +2 -5
  90. package/lib/components/notice-bar/notice-bar-item.scss +26 -26
  91. package/lib/components/notice-bar/notice-bar.js +53 -15
  92. package/lib/components/position/index.scss +27 -27
  93. package/lib/components/position/position-list.js +3 -2
  94. package/lib/components/radio-group/index.scss +40 -40
  95. package/lib/components/rich-text/index.scss +19 -19
  96. package/lib/components/search-bar/index.scss +13 -14
  97. package/lib/components/swiper/index.scss +12 -33
  98. package/lib/components/swiper/swiper.js +19 -60
  99. package/lib/components/tab/index.js +2 -2
  100. package/lib/components/tab/index.scss +39 -39
  101. package/lib/components/tab-container/index.scss +47 -47
  102. package/lib/components/tag/index.js +2 -2
  103. package/lib/components/tag/index.scss +24 -24
  104. package/lib/components/teletext-list/index.scss +19 -19
  105. package/lib/components/teletext-list/teletext-list-item.js +2 -2
  106. package/lib/components/teletext-list/teletext-list-item.scss +55 -57
  107. package/lib/components/teletext-list/teletext-list.js +2 -2
  108. package/lib/components/title/title-1.scss +25 -25
  109. package/lib/components/title/title-2.scss +22 -22
  110. package/lib/index.js +1 -5
  111. package/lib/index.scss +5 -5
  112. package/lib/utils/children-node-handle.js +7 -7
  113. package/lib/utils/time-util.js +3 -3
  114. package/lib/variables.scss +3 -3
  115. package/lowcode/button2/meta.ts +76 -76
  116. package/lowcode/custom-radio-group/meta.ts +312 -312
  117. package/lowcode/custom-radio-group-item/meta.ts +230 -230
  118. package/lowcode/d-c-form/meta.ts +62 -0
  119. package/lowcode/d-c-slider/meta.design.ts +174 -174
  120. package/lowcode/d-c-slider/meta.ts +343 -343
  121. package/lowcode/d-c-slider/snippets.ts +68 -68
  122. package/lowcode/goods-card-list/meta.ts +270 -270
  123. package/lowcode/goods-card-list-common/meta.ts +270 -270
  124. package/lowcode/grid-nav/meta.ts +227 -227
  125. package/lowcode/integral-task/meta.ts +212 -212
  126. package/lowcode/menu-list/meta.ts +154 -154
  127. package/lowcode/message-list/meta.ts +209 -209
  128. package/lowcode/navigation/meta.ts +177 -177
  129. package/lowcode/notice-bar/meta.ts +230 -230
  130. package/lowcode/position/meta.ts +162 -162
  131. package/lowcode/rich-text/meta.ts +72 -72
  132. package/lowcode/search-bar/meta.ts +57 -57
  133. package/lowcode/stream-list/meta.ts +209 -209
  134. package/lowcode/swiper/meta.ts +236 -236
  135. package/lowcode/tab-container/meta.ts +71 -71
  136. package/lowcode/tab-container/props.ts +194 -194
  137. package/lowcode/tab-container-item/meta.ts +195 -195
  138. package/lowcode/tab-message/meta.ts +105 -105
  139. package/lowcode/tag-c/meta.ts +76 -76
  140. package/lowcode/teletext-list/meta.ts +332 -332
  141. package/lowcode/title1/meta.ts +60 -60
  142. package/lowcode/title2/meta.ts +94 -94
  143. package/lowcode_es/button2/meta.d.ts +22 -22
  144. package/lowcode_es/custom-radio-group/meta.d.ts +22 -22
  145. package/lowcode_es/custom-radio-group-item/meta.d.ts +23 -23
  146. package/lowcode_es/d-c-form/meta.d.ts +22 -0
  147. package/lowcode_es/d-c-form/meta.js +64 -0
  148. package/lowcode_es/d-c-slider/meta.d.ts +150 -150
  149. package/lowcode_es/d-c-slider/meta.design.d.ts +101 -101
  150. package/lowcode_es/d-c-slider/snippets.d.ts +36 -36
  151. package/lowcode_es/goods-card-list/meta.d.ts +22 -22
  152. package/lowcode_es/goods-card-list-common/meta.d.ts +22 -22
  153. package/lowcode_es/grid-nav/meta.d.ts +22 -22
  154. package/lowcode_es/integral-task/meta.d.ts +22 -22
  155. package/lowcode_es/menu-list/meta.d.ts +22 -22
  156. package/lowcode_es/message-list/meta.d.ts +22 -22
  157. package/lowcode_es/meta.js +27 -26
  158. package/lowcode_es/navigation/meta.d.ts +22 -22
  159. package/lowcode_es/notice-bar/meta.d.ts +22 -22
  160. package/lowcode_es/position/meta.d.ts +22 -22
  161. package/lowcode_es/rich-text/meta.d.ts +22 -22
  162. package/lowcode_es/search-bar/meta.d.ts +22 -22
  163. package/lowcode_es/stream-list/meta.d.ts +22 -22
  164. package/lowcode_es/swiper/meta.d.ts +22 -22
  165. package/lowcode_es/tab-container/meta.d.ts +22 -22
  166. package/lowcode_es/tab-container/props.d.ts +90 -90
  167. package/lowcode_es/tab-container-item/meta.d.ts +22 -22
  168. package/lowcode_es/tab-message/meta.d.ts +22 -22
  169. package/lowcode_es/tag-c/meta.d.ts +22 -22
  170. package/lowcode_es/teletext-list/meta.d.ts +22 -22
  171. package/lowcode_es/title1/meta.d.ts +22 -22
  172. package/lowcode_es/title2/meta.d.ts +22 -22
  173. package/lowcode_es/view.js +3 -3
  174. package/lowcode_lib/button2/meta.d.ts +22 -22
  175. package/lowcode_lib/custom-radio-group/meta.d.ts +22 -22
  176. package/lowcode_lib/custom-radio-group-item/meta.d.ts +23 -23
  177. package/lowcode_lib/d-c-form/meta.d.ts +22 -0
  178. package/lowcode_lib/d-c-form/meta.js +69 -0
  179. package/lowcode_lib/d-c-slider/meta.d.ts +150 -150
  180. package/lowcode_lib/d-c-slider/meta.design.d.ts +101 -101
  181. package/lowcode_lib/d-c-slider/snippets.d.ts +36 -36
  182. package/lowcode_lib/goods-card-list/meta.d.ts +22 -22
  183. package/lowcode_lib/goods-card-list-common/meta.d.ts +22 -22
  184. package/lowcode_lib/grid-nav/meta.d.ts +22 -22
  185. package/lowcode_lib/integral-task/meta.d.ts +22 -22
  186. package/lowcode_lib/menu-list/meta.d.ts +22 -22
  187. package/lowcode_lib/message-list/meta.d.ts +22 -22
  188. package/lowcode_lib/meta.js +27 -26
  189. package/lowcode_lib/navigation/meta.d.ts +22 -22
  190. package/lowcode_lib/notice-bar/meta.d.ts +22 -22
  191. package/lowcode_lib/position/meta.d.ts +22 -22
  192. package/lowcode_lib/rich-text/meta.d.ts +22 -22
  193. package/lowcode_lib/search-bar/meta.d.ts +22 -22
  194. package/lowcode_lib/stream-list/meta.d.ts +22 -22
  195. package/lowcode_lib/swiper/meta.d.ts +22 -22
  196. package/lowcode_lib/tab-container/meta.d.ts +22 -22
  197. package/lowcode_lib/tab-container/props.d.ts +90 -90
  198. package/lowcode_lib/tab-container-item/meta.d.ts +22 -22
  199. package/lowcode_lib/tab-message/meta.d.ts +22 -22
  200. package/lowcode_lib/tag-c/meta.d.ts +22 -22
  201. package/lowcode_lib/teletext-list/meta.d.ts +22 -22
  202. package/lowcode_lib/title1/meta.d.ts +22 -22
  203. package/lowcode_lib/title2/meta.d.ts +22 -22
  204. package/lowcode_lib/view.js +2 -2
  205. package/package.json +2 -2
  206. package/es/components/bottom-navigation/bottom-navigation.d.ts +0 -15
  207. package/es/components/bottom-navigation/index.d.ts +0 -3
  208. package/es/components/button/button.d.ts +0 -14
  209. package/es/components/button/index.d.ts +0 -6
  210. package/es/components/carousel/carousel.d.ts +0 -14
  211. package/es/components/colorful-button/colorful-button.d.ts +0 -12
  212. package/es/components/colorful-button/index.d.ts +0 -3
  213. package/es/components/colorful-input/colorful-input.d.ts +0 -8
  214. package/es/components/colorful-input/index.d.ts +0 -3
  215. package/es/components/goods-card-list/goods-card-list-common.d.ts +0 -5
  216. package/es/components/goods-card-list/goods-card-list.d.ts +0 -5
  217. package/es/components/goods-card-list/index.d.ts +0 -4
  218. package/es/components/goods-card-list/types.d.ts +0 -45
  219. package/es/components/grid-nav/grid-nav.d.ts +0 -13
  220. package/es/components/grid-nav/index.d.ts +0 -3
  221. package/es/components/integral-task/index.d.ts +0 -6
  222. package/es/components/integral-task/integral-task.d.ts +0 -40
  223. package/es/components/menu-list/index.d.ts +0 -6
  224. package/es/components/menu-list/menu-list-item.d.ts +0 -5
  225. package/es/components/menu-list/menu-list.d.ts +0 -5
  226. package/es/components/menu-list/types.d.ts +0 -23
  227. package/es/components/message-list/index.d.ts +0 -6
  228. package/es/components/message-list/message-list-item.d.ts +0 -33
  229. package/es/components/message-list/message-list.d.ts +0 -28
  230. package/es/components/notice-bar/index.d.ts +0 -3
  231. package/es/components/notice-bar/notice-bar-item.d.ts +0 -18
  232. package/es/components/notice-bar/notice-bar.d.ts +0 -37
  233. package/es/components/position/entity.d.ts +0 -5
  234. package/es/components/position/index.d.ts +0 -3
  235. package/es/components/position/position-left.d.ts +0 -9
  236. package/es/components/position/position-list.d.ts +0 -11
  237. package/es/components/position/position.d.ts +0 -8
  238. package/es/components/radio-group/index.d.ts +0 -8
  239. package/es/components/radio-group/radio-group-item.d.ts +0 -48
  240. package/es/components/radio-group/radio-group.d.ts +0 -52
  241. package/es/components/rich-text/index.d.ts +0 -6
  242. package/es/components/rich-text/rich-text.d.ts +0 -14
  243. package/es/components/search-bar/index.d.ts +0 -3
  244. package/es/components/search-bar/search-bar.d.ts +0 -7
  245. package/es/components/stream-list/index.d.ts +0 -6
  246. package/es/components/stream-list/index.js +0 -6
  247. package/es/components/stream-list/index.scss +0 -26
  248. package/es/components/stream-list/stream-list.d.ts +0 -54
  249. package/es/components/stream-list/stream-list.js +0 -159
  250. package/es/components/swiper/index.d.ts +0 -3
  251. package/es/components/swiper/swiper.d.ts +0 -26
  252. package/es/components/tab/index.d.ts +0 -6
  253. package/es/components/tab/tab.d.ts +0 -27
  254. package/es/components/tab-container/index.d.ts +0 -3
  255. package/es/components/tab-container/tab-container.d.ts +0 -10
  256. package/es/components/tab-container-item/index.d.ts +0 -3
  257. package/es/components/tab-container-item/tab-container-item.d.ts +0 -11
  258. package/es/components/tag/index.d.ts +0 -6
  259. package/es/components/tag/tag.d.ts +0 -14
  260. package/es/components/teletext-list/index.d.ts +0 -6
  261. package/es/components/teletext-list/teletext-list-item.d.ts +0 -33
  262. package/es/components/teletext-list/teletext-list.d.ts +0 -52
  263. package/es/components/title/index.d.ts +0 -8
  264. package/es/components/title/title-1.d.ts +0 -10
  265. package/es/components/title/title-2.d.ts +0 -18
  266. package/es/index.d.ts +0 -44
  267. package/es/utils/children-node-handle.d.ts +0 -9
  268. package/es/utils/component-wrapper.d.ts +0 -9
  269. package/es/utils/debounce.d.ts +0 -1
  270. package/es/utils/time-util.d.ts +0 -5
  271. package/es/variables.d.ts +0 -2
  272. package/lib/components/bottom-navigation/bottom-navigation.d.ts +0 -15
  273. package/lib/components/bottom-navigation/index.d.ts +0 -3
  274. package/lib/components/button/button.d.ts +0 -14
  275. package/lib/components/button/index.d.ts +0 -6
  276. package/lib/components/carousel/carousel.d.ts +0 -14
  277. package/lib/components/colorful-button/colorful-button.d.ts +0 -12
  278. package/lib/components/colorful-button/index.d.ts +0 -3
  279. package/lib/components/colorful-input/colorful-input.d.ts +0 -8
  280. package/lib/components/colorful-input/index.d.ts +0 -3
  281. package/lib/components/goods-card-list/goods-card-list-common.d.ts +0 -5
  282. package/lib/components/goods-card-list/goods-card-list.d.ts +0 -5
  283. package/lib/components/goods-card-list/index.d.ts +0 -4
  284. package/lib/components/goods-card-list/types.d.ts +0 -45
  285. package/lib/components/grid-nav/grid-nav.d.ts +0 -13
  286. package/lib/components/grid-nav/index.d.ts +0 -3
  287. package/lib/components/integral-task/index.d.ts +0 -6
  288. package/lib/components/integral-task/integral-task.d.ts +0 -40
  289. package/lib/components/menu-list/index.d.ts +0 -6
  290. package/lib/components/menu-list/menu-list-item.d.ts +0 -5
  291. package/lib/components/menu-list/menu-list.d.ts +0 -5
  292. package/lib/components/menu-list/types.d.ts +0 -23
  293. package/lib/components/message-list/index.d.ts +0 -6
  294. package/lib/components/message-list/message-list-item.d.ts +0 -33
  295. package/lib/components/message-list/message-list.d.ts +0 -28
  296. package/lib/components/notice-bar/index.d.ts +0 -3
  297. package/lib/components/notice-bar/notice-bar-item.d.ts +0 -18
  298. package/lib/components/notice-bar/notice-bar.d.ts +0 -37
  299. package/lib/components/position/entity.d.ts +0 -5
  300. package/lib/components/position/index.d.ts +0 -3
  301. package/lib/components/position/position-left.d.ts +0 -9
  302. package/lib/components/position/position-list.d.ts +0 -11
  303. package/lib/components/position/position.d.ts +0 -8
  304. package/lib/components/radio-group/index.d.ts +0 -8
  305. package/lib/components/radio-group/radio-group-item.d.ts +0 -48
  306. package/lib/components/radio-group/radio-group.d.ts +0 -52
  307. package/lib/components/rich-text/index.d.ts +0 -6
  308. package/lib/components/rich-text/rich-text.d.ts +0 -14
  309. package/lib/components/search-bar/index.d.ts +0 -3
  310. package/lib/components/search-bar/search-bar.d.ts +0 -7
  311. package/lib/components/stream-list/index.d.ts +0 -6
  312. package/lib/components/stream-list/index.js +0 -6
  313. package/lib/components/stream-list/index.scss +0 -26
  314. package/lib/components/stream-list/stream-list.d.ts +0 -54
  315. package/lib/components/stream-list/stream-list.js +0 -166
  316. package/lib/components/swiper/index.d.ts +0 -3
  317. package/lib/components/swiper/swiper.d.ts +0 -26
  318. package/lib/components/tab/index.d.ts +0 -6
  319. package/lib/components/tab/tab.d.ts +0 -27
  320. package/lib/components/tab-container/index.d.ts +0 -3
  321. package/lib/components/tab-container/tab-container.d.ts +0 -10
  322. package/lib/components/tab-container-item/index.d.ts +0 -3
  323. package/lib/components/tab-container-item/tab-container-item.d.ts +0 -11
  324. package/lib/components/tag/index.d.ts +0 -6
  325. package/lib/components/tag/tag.d.ts +0 -14
  326. package/lib/components/teletext-list/index.d.ts +0 -6
  327. package/lib/components/teletext-list/teletext-list-item.d.ts +0 -33
  328. package/lib/components/teletext-list/teletext-list.d.ts +0 -52
  329. package/lib/components/title/index.d.ts +0 -8
  330. package/lib/components/title/title-1.d.ts +0 -10
  331. package/lib/components/title/title-2.d.ts +0 -18
  332. package/lib/index.d.ts +0 -44
  333. package/lib/utils/children-node-handle.d.ts +0 -9
  334. package/lib/utils/component-wrapper.d.ts +0 -9
  335. package/lib/utils/debounce.d.ts +0 -1
  336. package/lib/utils/time-util.d.ts +0 -5
  337. package/lib/variables.d.ts +0 -2
@@ -1,54 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import React from 'react';
3
- import './index.scss';
4
- export interface PageHelperType<T = any> {
5
- page: number;
6
- rows: number;
7
- isLastPage: boolean;
8
- total: number;
9
- list: T[];
10
- }
11
- export interface StreamListProps {
12
- /**
13
- * 子组件内容
14
- */
15
- children: ReactNode;
16
- /**
17
- * 请求下一页数据的函数
18
- * @param page
19
- * @param rows
20
- */
21
- onNextPage?: (options: {
22
- page: number;
23
- rows?: number;
24
- }) => Promise<PageHelperType>;
25
- /**
26
- * 请求刷新数据的函数
27
- */
28
- onRefreshPage?: () => Promise<PageHelperType>;
29
- /**
30
- * 是否是最后一页
31
- */
32
- isLastPage?: boolean;
33
- /**
34
- * 当前页
35
- */
36
- nowPage?: number;
37
- /**
38
- * 刷新中的文字提示
39
- */
40
- refreshingText?: string;
41
- /**
42
- * 加载中的文字提示
43
- */
44
- loadingText?: string;
45
- /**
46
- * 加载更多的文字提示
47
- */
48
- loadMoreText?: string;
49
- }
50
- /**
51
- * StreamList 组件
52
- */
53
- declare const StreamList: React.FC<StreamListProps>;
54
- export default StreamList;
@@ -1,159 +0,0 @@
1
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
- import React, { useEffect, useRef, useState } from 'react';
4
- import "./index.scss";
5
- /**
6
- * StreamList 组件
7
- */
8
- var StreamList = function StreamList(_ref) {
9
- var children = _ref.children,
10
- onNextPage = _ref.onNextPage,
11
- onRefreshPage = _ref.onRefreshPage,
12
- _ref$refreshingText = _ref.refreshingText,
13
- refreshingText = _ref$refreshingText === void 0 ? '正在刷新中...' : _ref$refreshingText,
14
- _ref$loadingText = _ref.loadingText,
15
- loadingText = _ref$loadingText === void 0 ? '加载中...' : _ref$loadingText,
16
- _ref$loadMoreText = _ref.loadMoreText,
17
- loadMoreText = _ref$loadMoreText === void 0 ? '加载更多' : _ref$loadMoreText,
18
- _ref$isLastPage = _ref.isLastPage,
19
- isLastPage = _ref$isLastPage === void 0 ? false : _ref$isLastPage,
20
- _ref$nowPage = _ref.nowPage,
21
- nowPage = _ref$nowPage === void 0 ? 1 : _ref$nowPage;
22
- var _useState = useState(false),
23
- isLoading = _useState[0],
24
- setIsLoading = _useState[1];
25
- var _useState2 = useState(false),
26
- isRefreshing = _useState2[0],
27
- setIsRefreshing = _useState2[1];
28
- // 下拉刷新的阈值
29
- var threshold = 50;
30
- // 最大下拉距离
31
- var maxPullDistance = 100;
32
- var _useState3 = useState(0),
33
- pullDistance = _useState3[0],
34
- setPullDistance = _useState3[1];
35
- var startYRef = useRef(0);
36
- var _useState4 = useState(false),
37
- isDragging = _useState4[0],
38
- setIsDragging = _useState4[1];
39
- var observerRef = useRef(null);
40
- // 防止初始加载直接请求下一页
41
- var hasInitialLoad = useRef(false);
42
-
43
- // 监听加载下一页数据
44
- useEffect(function () {
45
- if (isRefreshing || isLastPage) {
46
- // @ts-ignore
47
- return;
48
- }
49
- var spinElement = document.querySelector('.spin');
50
- if (spinElement && !observerRef.current) {
51
- // 创建 IntersectionObserver 观察器
52
- observerRef.current = new IntersectionObserver(function (entries) {
53
- var entry = entries[0];
54
- if (entry.isIntersecting && !isLoading) {
55
- setIsLoading(true);
56
- var nextPage = nowPage + 1;
57
- onNextPage({
58
- page: nextPage
59
- }).then(function (res) {})["catch"](function (err) {
60
- console.error('加载下一页失败:', err);
61
- })["finally"](function () {
62
- return setIsLoading(false);
63
- });
64
- }
65
- }, {
66
- threshold: 0.4
67
- });
68
- // 观察加载更多元素
69
- observerRef.current.observe(spinElement);
70
- }
71
- return function () {
72
- if (observerRef.current) {
73
- // 清除观察者
74
- observerRef.current.disconnect();
75
- observerRef.current = null;
76
- }
77
- };
78
- }, [nowPage, isLoading, isRefreshing, isLastPage]);
79
-
80
- // 初始化加载标记
81
- useEffect(function () {
82
- hasInitialLoad.current = true;
83
- }, []);
84
-
85
- // 处理触摸和鼠标事件
86
- var handleTouchStart = function handleTouchStart(e) {
87
- startYRef.current = 'touches' in e ? e.touches[0].clientY : e.clientY;
88
- setIsDragging(true);
89
- };
90
- var handleTouchMove = function handleTouchMove(e) {
91
- if (isRefreshing || !isDragging && !('touches' in e)) return;
92
- var clientY = 'touches' in e ? e.touches[0].clientY : e.clientY;
93
- var distance = clientY - startYRef.current;
94
-
95
- // 更新下拉距离
96
- if (distance > 0 && distance <= maxPullDistance) {
97
- setPullDistance(distance);
98
- } else if (distance > maxPullDistance) {
99
- setPullDistance(maxPullDistance);
100
- }
101
- };
102
- var handleTouchEnd = /*#__PURE__*/function () {
103
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
104
- return _regeneratorRuntime.wrap(function _callee$(_context) {
105
- while (1) switch (_context.prev = _context.next) {
106
- case 0:
107
- setIsDragging(false);
108
- if (pullDistance > threshold) {
109
- setIsRefreshing(true);
110
- setPullDistance(0);
111
- onRefreshPage().then(function (res) {})["catch"](function (err) {
112
- console.error('刷新失败:', err);
113
- })["finally"](function () {
114
- setIsRefreshing(false);
115
- });
116
- } else {
117
- setPullDistance(0); // 重置下拉距离
118
- }
119
- case 2:
120
- case "end":
121
- return _context.stop();
122
- }
123
- }, _callee);
124
- }));
125
- return function handleTouchEnd() {
126
- return _ref2.apply(this, arguments);
127
- };
128
- }();
129
- return /*#__PURE__*/React.createElement("div", {
130
- onTouchStart: handleTouchStart,
131
- onTouchMove: handleTouchMove,
132
- onTouchEnd: handleTouchEnd,
133
- onMouseDown: handleTouchStart,
134
- onMouseMove: handleTouchMove,
135
- onMouseUp: handleTouchEnd,
136
- className: "stream-list-container"
137
- }, /*#__PURE__*/React.createElement("div", {
138
- className: "refresh-indicator",
139
- style: {
140
- position: 'fixed',
141
- top: 0,
142
- left: 0,
143
- right: 0,
144
- transform: "translateY(" + (isRefreshing ? threshold : pullDistance) + "px)",
145
- transition: isRefreshing || pullDistance === 0 ? 'transform 0.3s ease' : 'none'
146
- }
147
- }, isRefreshing && /*#__PURE__*/React.createElement("span", null, refreshingText)), /*#__PURE__*/React.createElement("div", {
148
- style: {
149
- transform: "translateY(" + (isRefreshing ? threshold : pullDistance) + "px)",
150
- transition: 'transform 0.3s ease'
151
- }
152
- }, children), !isRefreshing && !isLastPage && (isLoading ? /*#__PURE__*/React.createElement("div", {
153
- className: "loading-text"
154
- }, loadingText) : /*#__PURE__*/React.createElement("div", {
155
- className: "spin"
156
- }, loadMoreText)));
157
- };
158
- StreamList.displayName = 'StreamList';
159
- export default StreamList;
@@ -1,3 +0,0 @@
1
- import Swiper from './swiper';
2
- export type { ComponentProps } from './swiper';
3
- export default Swiper;
@@ -1,26 +0,0 @@
1
- import * as React from 'react';
2
- import './index.scss';
3
- export interface ComponentProps {
4
- /**
5
- * 切换速度,单位ms
6
- */
7
- speed?: number;
8
- /**
9
- * 高度
10
- */
11
- height: number;
12
- /**
13
- * 自动播放
14
- */
15
- autoplay: boolean;
16
- /**
17
- * 循环播放
18
- */
19
- loop: boolean;
20
- /**
21
- * 图片路径
22
- */
23
- picUrls: string[];
24
- }
25
- declare const DCSlider: React.FC<ComponentProps>;
26
- export default DCSlider;
@@ -1,6 +0,0 @@
1
- /**
2
- * 标签tag
3
- */
4
- import Tab from './tab';
5
- export type { TabProps } from './tab';
6
- export default Tab;
@@ -1,27 +0,0 @@
1
- import * as React from 'react';
2
- import './index.scss';
3
- export interface TabProps {
4
- /**
5
- * 选中背景颜色
6
- */
7
- selectedBGColor: string;
8
- /**
9
- * 选中字体颜色
10
- */
11
- selectedFontColor: string;
12
- /**
13
- * 尺寸 small | large
14
- */
15
- size: string;
16
- /**
17
- * 点击事件
18
- * @param e
19
- */
20
- onClickHandle?: (e: string) => void;
21
- /**
22
- * 未读消息数量
23
- */
24
- unreadCount?: number;
25
- }
26
- declare const Tab: React.FC<TabProps>;
27
- export default Tab;
@@ -1,3 +0,0 @@
1
- import { TabContainer } from '../tab-container/tab-container';
2
- export type { TabContainerProps } from '../tab-container/tab-container';
3
- export default TabContainer;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { Tab } from '@alifd/next';
3
- import './index.scss';
4
- export interface TabContainerProps extends React.ComponentProps<typeof Tab> {
5
- className?: string;
6
- }
7
- export declare const TabContainer: {
8
- (props: TabContainerProps): JSX.Element;
9
- displayName: string;
10
- };
@@ -1,3 +0,0 @@
1
- import { TabContainerItem } from './tab-container-item';
2
- export type { TabContainerItemProps } from './tab-container-item';
3
- export default TabContainerItem;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { Tab } from '@alifd/next';
3
- export interface TabContainerItemProps extends React.ComponentProps<typeof Tab> {
4
- className?: string;
5
- tab: string;
6
- key: string;
7
- }
8
- export declare const TabContainerItem: {
9
- (props: TabContainerItemProps): JSX.Element;
10
- displayName: string;
11
- };
@@ -1,6 +0,0 @@
1
- /**
2
- * 标签tag
3
- */
4
- import Tag from './tag';
5
- export type { TagProps } from './tag';
6
- export default Tag;
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import './index.scss';
3
- export interface TagProps {
4
- /**
5
- * 标签名称
6
- */
7
- name: string;
8
- /**
9
- * 标签颜色
10
- */
11
- color: string;
12
- }
13
- declare const Tag: React.FC<TagProps>;
14
- export default Tag;
@@ -1,6 +0,0 @@
1
- /**
2
- * 图文列表
3
- */
4
- import TeletextList from './teletext-list';
5
- export type { TeletextListProps } from './teletext-list';
6
- export { TeletextList, };
@@ -1,33 +0,0 @@
1
- import React from 'react';
2
- import './teletext-list-item.scss';
3
- /**
4
- * 数据
5
- */
6
- export interface TeletextListItemProps {
7
- /**
8
- * 点击事件
9
- */
10
- onClick?: (e: any) => void;
11
- /**
12
- * 标题
13
- */
14
- title?: string;
15
- /**
16
- * 图片地址
17
- */
18
- image?: string[];
19
- /**
20
- * 图片位置
21
- */
22
- imagePlacement?: 'left' | 'right' | 'none';
23
- /**
24
- * 说明
25
- */
26
- description?: string;
27
- /**
28
- * 标签列表
29
- */
30
- tags?: string;
31
- }
32
- declare const TeletextListItem: React.FC<TeletextListItemProps>;
33
- export default TeletextListItem;
@@ -1,52 +0,0 @@
1
- import React from 'react';
2
- import './index.scss';
3
- /**
4
- * 数据
5
- */
6
- interface DataProps {
7
- /**
8
- * 标题
9
- */
10
- title?: string;
11
- /**
12
- * 图片地址
13
- */
14
- image?: string[];
15
- /**
16
- * 说明
17
- */
18
- description?: string;
19
- /**
20
- * 标签列表
21
- */
22
- tags?: string;
23
- /**
24
- * 链接地址
25
- */
26
- link?: string;
27
- }
28
- export interface TeletextListProps {
29
- /**
30
- * 标题
31
- */
32
- title?: string;
33
- /**
34
- * 数据
35
- */
36
- dataList?: DataProps[];
37
- /**
38
- * 点击事件
39
- * @param e
40
- */
41
- onClick?: (e: any) => void;
42
- /**
43
- * 子节点
44
- */
45
- children: React.ReactChild;
46
- /**
47
- * 图片位置
48
- */
49
- imagePlacement?: 'left' | 'right' | 'none';
50
- }
51
- declare const TeletextList: React.FC<TeletextListProps>;
52
- export default TeletextList;
@@ -1,8 +0,0 @@
1
- /**
2
- * 标题
3
- */
4
- import Title1 from './title-1';
5
- import Title2 from './title-2';
6
- export type { Title1Props } from './title-1';
7
- export type { Title2Props } from './title-2';
8
- export { Title1, Title2 };
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import './title-1.scss';
3
- export interface Title1Props {
4
- /**
5
- * 标题
6
- */
7
- title?: string;
8
- }
9
- declare const Title1: React.FC<Title1Props>;
10
- export default Title1;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import './title-2.scss';
3
- export interface Title2Props {
4
- /**
5
- * 标题
6
- */
7
- title?: string;
8
- /**
9
- * 颜色
10
- */
11
- color?: string;
12
- /**
13
- * tip颜色
14
- */
15
- tipColor?: string;
16
- }
17
- declare const Title2: React.FC<Title2Props>;
18
- export default Title2;
package/es/index.d.ts DELETED
@@ -1,44 +0,0 @@
1
- export type { ComponentProps } from './components/swiper';
2
- export { default as Swiper } from './components/swiper';
3
- export type { NavigationProps } from './components/bottom-navigation';
4
- export { default as Navigation } from './components/bottom-navigation';
5
- export type { MenuListDataProps, MenuListProps } from './components/menu-list';
6
- export { default as MenuList } from './components/menu-list';
7
- export type { TeletextListProps } from './components/teletext-list';
8
- export { TeletextList } from './components/teletext-list';
9
- export type { Title1Props } from './components/title';
10
- export { Title1 } from './components/title';
11
- export type { Title2Props } from './components/title';
12
- export { Title2 } from './components/title';
13
- export type { GridNavProps } from './components/grid-nav';
14
- export { default as GridNav } from './components/grid-nav';
15
- export type { SearchBarProps } from './components/search-bar';
16
- export { default as SearchBar } from './components/search-bar';
17
- export type { LocationProps } from './components/position';
18
- export { default as Position } from './components/position';
19
- export type { TagProps } from './components/tag';
20
- export { default as TagC } from './components/tag';
21
- export type { MessageListProps } from './components/message-list';
22
- export { default as MessageList } from './components/message-list';
23
- export type { TabProps } from './components/tab';
24
- export { default as TabMessage } from './components/tab';
25
- export type { NoticeBarProps } from './components/notice-bar';
26
- export { default as NoticeBar } from './components/notice-bar';
27
- export type { TabContainerProps } from './components/tab-container';
28
- export { default as TabContainer } from './components/tab-container';
29
- export type { TabContainerItemProps } from './components/tab-container-item';
30
- export { default as TabContainerItem } from './components/tab-container-item';
31
- export type { IntegralTaskProps } from './components/integral-task';
32
- export { default as IntegralTask } from './components/integral-task';
33
- export type { ButtonProps } from './components/button';
34
- export { default as Button2 } from './components/button';
35
- export type { RadioGroupProps, RadioGroupItemProps } from './components/radio-group';
36
- export { CustomRadioGroup, CustomRadioGroupItem } from './components/radio-group';
37
- export type { GoodsCardListProps } from './components/goods-card-list';
38
- export { GoodsCardList, GoodsCardListCommon } from './components/goods-card-list';
39
- export type { RichTextProps } from './components/rich-text';
40
- export { RichText } from './components/rich-text';
41
- export type { StreamListProps } from './components/stream-list';
42
- export { StreamList } from './components/stream-list';
43
- declare const bizCssPrefix = "bizpack";
44
- export { bizCssPrefix };
@@ -1,9 +0,0 @@
1
- /**
2
- * 从children数组中获取指定组件
3
- * @author ZhuGangMin
4
- * @date 2024-09-21 14:07:02
5
- * @param children 父组件传递过来children
6
- * @param key 组件的key
7
- * @param props 要覆盖的属性
8
- */
9
- export declare function convertChildren(children: any, key: string, props?: any): React.DetailedReactHTMLElement<any, HTMLElement>;
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- export declare const ValueWrapper: (NextFormComponent: React.ElementType, displayName: string) => {
3
- (props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
4
- displayName: string;
5
- };
6
- export declare const DynamicPropWrapper: (prop: string, NextFormComponent: React.ElementType, displayName: string) => {
7
- (props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
8
- displayName: string;
9
- };
@@ -1 +0,0 @@
1
- export declare function debounce<T extends (...args: any[]) => void>(func: T, delay: number): (this: any, ...args: Parameters<T>) => void;
@@ -1,5 +0,0 @@
1
- /**
2
- * 时间计算
3
- * @param timeString
4
- */
5
- export declare function formatTime(timeString: any): string;
package/es/variables.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const bizCssPrefix = "bizpack";
2
- export { bizCssPrefix };
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- import './index.scss';
3
- interface Navigation {
4
- text: string;
5
- icon: string;
6
- selectedIcon: string;
7
- pageId: string;
8
- }
9
- export interface NavigationProps {
10
- itemArray: Navigation[];
11
- selectedColor: string;
12
- onClick?: (pageId: string) => void;
13
- }
14
- declare const Navigation: React.FC<NavigationProps>;
15
- export default Navigation;
@@ -1,3 +0,0 @@
1
- import Navigation from './bottom-navigation';
2
- export type { NavigationProps } from './bottom-navigation';
3
- export default Navigation;
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import './index.scss';
3
- export interface ButtonProps {
4
- /**
5
- * 标签名称
6
- */
7
- name: string;
8
- /**
9
- * 标签颜色
10
- */
11
- color: string;
12
- }
13
- declare const Button: React.FC<ButtonProps>;
14
- export default Button;
@@ -1,6 +0,0 @@
1
- /**
2
- * 标签tag
3
- */
4
- import Button from './button';
5
- export type { ButtonProps } from './button';
6
- export default Button;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import './carousel.scss';
3
- export interface CarouselProps {
4
- /**
5
- * 图片列表
6
- */
7
- images: string[];
8
- /**
9
- * 定时播放的时间
10
- */
11
- interval?: number;
12
- }
13
- declare const Carousel: React.FC<CarouselProps>;
14
- export default Carousel;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import './index.scss';
3
- export interface ColorfulButtonProps {
4
- /**
5
- * 类型
6
- */
7
- type?: "primary" | "secondary" | "normal";
8
- color?: string;
9
- style?: object;
10
- }
11
- declare const ColorfulButton: React.FC<ColorfulButtonProps>;
12
- export default ColorfulButton;
@@ -1,3 +0,0 @@
1
- import ColorfulButton from './colorful-button';
2
- export type { ColorfulButtonProps } from './colorful-button';
3
- export default ColorfulButton;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import './index.scss';
3
- export interface ColorfulInputProps {
4
- color?: string;
5
- style?: object;
6
- }
7
- declare const ColorfulInput: React.FC<ColorfulInputProps>;
8
- export default ColorfulInput;
@@ -1,3 +0,0 @@
1
- import ColorfulInput from './colorful-input';
2
- export type { ColorfulInputProps } from './colorful-input';
3
- export default ColorfulInput;
@@ -1,5 +0,0 @@
1
- import type { GoodsCardListProps } from './types';
2
- import React from 'react';
3
- import './goods-card-list-common.scss';
4
- declare const GoodsCardListCommon: React.FC<GoodsCardListProps>;
5
- export default GoodsCardListCommon;
@@ -1,5 +0,0 @@
1
- import type { GoodsCardListProps } from './types';
2
- import React from 'react';
3
- import './goods-card-list.scss';
4
- declare const GoodsCardList: React.FC<GoodsCardListProps>;
5
- export default GoodsCardList;