chenweiyi
3eb734ccc4
feat(components): [skeleton] throttle supports values as object (#17041)
* fix(components): [skeleton] `throttle` property not working
* fix: lint fix
* feat: add func & doc & test
* feat: remove test modify
* feat: increase document examples, improve document descriptions
* fix(components): [skeleton] `throttle` property not working
* fix: lint fix
* feat: add func & doc & test
* feat: remove test modify
* feat: increase document examples, improve document descriptions
* feat: 重构`useThrottleRender`钩子以提高代码可读性和效率
- 简化了对`throttle`参数的判断逻辑,通过`isNumber`函数判断是否为数字
- 将`leadingDispatch`和`trailingDispatch`函数合并为`dispatcher`函数,根据传入的类型判断执行逻辑
- 优化了`watch`回调函数,使用`dispatcher`函数替代重复的判断逻辑
* feat: 写法优化
* feat: 引入`isObject`函数替代原有的`typeof throttle === 'object'`判断方式
* feat: 优化骨架屏文档结构和示例
* feat: 完善文字描述和修改对应的文件名
* Update docs/en-US/component/skeleton.md
Co-authored-by: btea <2356281422@qq.com>
* Update docs/en-US/component/skeleton.md
Co-authored-by: btea <2356281422@qq.com>
* feat: Optimize code writing
* Update docs/en-US/component/skeleton.md
Co-authored-by: btea <2356281422@qq.com>
* Update docs/en-US/component/skeleton.md
* feat: modify doc
* feat: md
* feat: 补充 useThrottleRender 钩子的测试用例
* feat: 将 SkeletonThrottle 类型移动到hook中, 重命名为 ThrottleType 以提高通用性
---------
Co-authored-by: btea <2356281422@qq.com>
2024-11-07 21:31:16 +08:00
..
2022-01-31 23:43:56 +08:00
2024-02-23 16:23:45 +08:00
2024-03-13 14:46:02 +08:00
2024-11-05 21:27:56 +08:00
2024-04-15 16:29:21 +08:00
2022-04-10 13:47:19 +08:00
2024-04-12 14:35:55 +08:00
2024-08-22 14:33:13 +08:00
2024-04-15 16:29:21 +08:00
2024-04-15 16:29:21 +08:00
2023-06-15 01:10:36 +08:00
2024-02-19 20:10:44 +08:00
2024-04-15 16:29:21 +08:00
2024-04-15 16:29:21 +08:00
2024-07-13 09:59:31 +08:00
2024-09-12 22:13:25 +08:00
2021-12-21 15:51:33 +08:00
2024-04-15 16:29:21 +08:00
2024-04-15 16:29:21 +08:00
2024-08-09 12:53:26 +08:00
2024-08-09 12:53:26 +08:00
2024-08-22 21:39:09 +08:00
2024-01-25 15:03:34 +08:00
2024-04-15 16:29:21 +08:00
2024-04-15 16:29:21 +08:00
2024-08-05 07:36:12 +08:00
2022-03-13 16:16:11 -04:00
2024-06-24 09:06:40 +00:00
2024-04-15 16:29:21 +08:00
2022-05-24 09:48:08 +08:00
2024-02-19 20:10:44 +08:00
2024-09-23 15:14:29 +08:00
2024-04-15 16:29:21 +08:00
2023-01-29 22:23:28 +08:00
2022-08-20 10:36:12 +09:00
2024-08-05 02:20:39 +00:00
2024-07-28 20:08:54 +08:00
2024-03-26 12:03:51 +08:00
2024-04-15 16:29:21 +08:00
2021-12-21 15:51:33 +08:00
2024-04-15 16:29:21 +08:00
2024-06-21 11:29:51 +08:00
2024-08-23 08:29:34 +08:00
2024-04-15 16:29:21 +08:00
2024-04-15 16:29:21 +08:00
2024-07-13 09:59:31 +08:00
2024-04-15 16:29:21 +08:00
2022-03-15 19:50:50 +08:00
2022-05-24 09:41:11 +00:00
2024-10-31 22:52:43 +08:00
2024-05-28 14:50:22 +08:00
2024-05-28 14:50:22 +08:00
2024-11-07 21:31:16 +08:00
2024-04-15 16:29:21 +08:00
2024-04-15 16:29:21 +08:00
2024-08-22 14:33:13 +08:00
2024-02-19 20:10:44 +08:00
2024-04-15 16:29:21 +08:00
2024-09-13 14:13:33 +08:00
2024-08-27 09:40:11 +08:00
2024-04-15 16:29:21 +08:00
2024-08-30 18:41:11 +08:00
2023-10-13 11:26:54 +08:00
2022-09-08 19:22:47 +08:00
2024-02-19 20:10:44 +08:00
2024-02-19 20:10:44 +08:00
2024-04-15 16:29:21 +08:00
2024-04-15 16:29:21 +08:00
2024-01-31 10:35:36 +08:00
2023-12-22 09:16:34 +00:00
2023-12-14 19:22:14 +08:00
2024-05-25 12:29:13 +08:00
2024-07-31 13:48:17 +00:00
2024-02-19 20:10:44 +08:00
2022-04-25 20:21:18 +08:00
2024-04-15 16:29:21 +08:00
2023-11-29 12:12:09 +08:00
2022-03-13 14:19:51 +08:00