Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hook): 替换窗口大小变化监听器 #638

Merged
merged 6 commits into from
Nov 17, 2023
Merged

feat(hook): 替换窗口大小变化监听器 #638

merged 6 commits into from
Nov 17, 2023

Conversation

timi137137
Copy link
Collaborator

@timi137137 timi137137 commented Nov 15, 2023

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

closed #460

💡 需求背景和解决方案

📝 更新日志

  • feat(hook): 替换窗口大小变化监听器

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

Copy link

github-actions bot commented Nov 15, 2023

完成

@uyarn
Copy link
Collaborator

uyarn commented Nov 16, 2023

conflict

package.json Show resolved Hide resolved
@timi137137
Copy link
Collaborator Author

@uyarn 为何使用@vueuse/core替换掉原生监听器呢? 这是出于几种考量

  • add/remove listener出现次数太多,按照开发思维,我们应当注重模块化与重用性,虽然目前还没做到最高效的模块化,但这是一个很不错的开头
  • vueuse的初衷是 它的初衷就是将一切原本并不支持响应式的JS API变得支持响应式,省去程序员自己写相关代码
  • 在实战开发中,有不少需求有可能会涉及使用JS API,使用vueuse已经封装好的API能有效减少用户的开发时间

@uyarn uyarn merged commit 2dd41f4 into develop Nov 17, 2023
4 checks passed
@timi137137 timi137137 deleted the feat/hook branch November 17, 2023 04:11
PengYYYYY added a commit that referenced this pull request Dec 6, 2023
* chore: update version (#616)

* fix: echarts resize error (#622)

* fix: mock menu (#630)

* fix(i18n): pages.result.fail.modify中文未定义 (#632)

* fix(i18n): 修复用户中心词条不生效的问题 (#634)

* fix: 修复husky可能找不到npx命令的问题 (#635)

* fix(i18n): 修复用户中心词条不生效的问题 (#634) (#636)

* feat: 升级依赖到最新版本 (#637)

* feat: 升级依赖到最新版本

* fix(style): 使用新版格式修复文件

* fix(style): eslint自动格式化

* feat(hook): 替换窗口大小变化监听器 (#638)

* feat(hook): 替换窗口大小变化监听器

* feat(state): 替换响应式数据监听器

* feat(clipboard): 移除无用依赖,替换剪贴方法

* fix: 补上遗漏的逗号

* fix: 移除重复出现的依赖项

* feat: use $t (#640)

* fix: ts error (#652)

* fix: 修复循环过深的问题 (#650)

* fix: 修复循环过深的问题

* fix: 修复依赖更新导致的类型错误

---------

Co-authored-by: Cosmos <cosmosliu@foxmail.com>
Co-authored-by: liweijie0812 <674416404@qq.com>
Co-authored-by: 悠静萝莉 <i@mikuhl.cn>
Co-authored-by: PY <pengyue970715@gmail.com>
uyarn added a commit that referenced this pull request Jan 10, 2024
* fix: setting radio height

* build(deps): bump tdesign-vue-next from 0.20.2 to 0.20.3 (#283)

Bumps [tdesign-vue-next](https://github.com/Tencent/tdesign-vue-next) from 0.20.2 to 0.20.3.
- [Release notes](https://github.com/Tencent/tdesign-vue-next/releases)
- [Changelog](https://github.com/Tencent/tdesign-vue-next/blob/develop/CHANGELOG.md)
- [Commits](Tencent/tdesign-vue-next@0.20.2...0.20.3)

---
updated-dependencies:
- dependency-name: tdesign-vue-next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: loginRedirect add redirect (#287)

Co-authored-by: Setli <set_li@163.com>

* fix: tab-router refresh fail (#289)

* fix: 修复持久化的问题 (#316)

* fix: 修正首次进入页面时由于userStore数据还未初始化导致的白屏的问题

* Update user.ts

fix: 优化逻辑

* fix: 修复路径重复拼接的问题 (#319)

* feat: upgrade tdesign to 0.23 (#322)

* feat: add backend dynamic router permission code (#394) (#397)

* chore: 大致雏形

* feat: complete permission code

* feat: 修复渲染问题并完善权限代码

* chore: release 0.7.0

* chore: 更新依赖

* chore: fix echarts version

* feat: upgrade dependencies

* chore: mock route map

* chore: hash router

* chore: concat fixed routers

* chore: fix dependencies

* feat: optimize

* chore: remove roles from get menu process

* chore: remain fe permssion code

Co-authored-by: 悠静萝莉 <i@mikuhl.cn>

Co-authored-by: 悠静萝莉 <i@mikuhl.cn>

* chore: sync main for develop (#549)

* feat: upgrade vite4 (#533)

* chore: 升级vite4

* docs: 项目简介 修改

* fix: 打包后预览提示TypeError

* chore: @vitejs/plugin-vue,@vitejs/plugin-vue-jsx升级

* docs: 项目简介 修改

* fix: 204无内容直接返回判断 (#539)

* feat(axios util): support params stringify (#544)

* fix(permission store): clear routes when logout (#545)

fix #541

* chore: release 0.7.7 (#548)

* chore: release 0.7.7

* chore: dump tdesign version

---------

Co-authored-by: liweijie0812 <674416404@qq.com>
Co-authored-by: ngyyuusora <jiliangsoft@live.com>

* chore: update version (#616)

* fix: echarts resize error (#622)

* fix: mock menu (#630)

* fix(i18n): pages.result.fail.modify中文未定义 (#632)

* fix(i18n): 修复用户中心词条不生效的问题 (#634)

* fix: 修复husky可能找不到npx命令的问题 (#635)

* fix(i18n): 修复用户中心词条不生效的问题 (#634) (#636)

* feat: 升级依赖到最新版本 (#637)

* feat: 升级依赖到最新版本

* fix(style): 使用新版格式修复文件

* fix(style): eslint自动格式化

* feat(hook): 替换窗口大小变化监听器 (#638)

* feat(hook): 替换窗口大小变化监听器

* feat(state): 替换响应式数据监听器

* feat(clipboard): 移除无用依赖,替换剪贴方法

* fix: 补上遗漏的逗号

* fix: 移除重复出现的依赖项

* feat: use $t (#640)

* fix: ts error (#652)

* fix: 修复循环过深的问题 (#650)

* fix: 修复循环过深的问题

* fix: 修复依赖更新导致的类型错误

* chore: fix type (#653)

* chore: fix type

* chore: remove console

* fix: hotfix useRoute bug after vue 3.4 release (#660)

* chore: sync main to site

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Setli <darkgame@163.com>
Co-authored-by: Setli <set_li@163.com>
Co-authored-by: PDieE <23275429@qq.com>
Co-authored-by: 悠静萝莉 <i@mikuhl.cn>
Co-authored-by: liweijie0812 <674416404@qq.com>
Co-authored-by: ngyyuusora <jiliangsoft@live.com>
Co-authored-by: Cosmos <cosmosliu@foxmail.com>
Co-authored-by: PY <pengyue970715@gmail.com>
timi137137 added a commit that referenced this pull request Jan 16, 2024
* fix: setting radio height

* build(deps): bump tdesign-vue-next from 0.20.2 to 0.20.3 (#283)

Bumps [tdesign-vue-next](https://github.com/Tencent/tdesign-vue-next) from 0.20.2 to 0.20.3.
- [Release notes](https://github.com/Tencent/tdesign-vue-next/releases)
- [Changelog](https://github.com/Tencent/tdesign-vue-next/blob/develop/CHANGELOG.md)
- [Commits](Tencent/tdesign-vue-next@0.20.2...0.20.3)

---
updated-dependencies:
- dependency-name: tdesign-vue-next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: loginRedirect add redirect (#287)

Co-authored-by: Setli <set_li@163.com>

* fix: tab-router refresh fail (#289)

* fix: 修复持久化的问题 (#316)

* fix: 修正首次进入页面时由于userStore数据还未初始化导致的白屏的问题

* Update user.ts

fix: 优化逻辑

* fix: 修复路径重复拼接的问题 (#319)

* feat: upgrade tdesign to 0.23 (#322)

* feat: add backend dynamic router permission code (#394) (#397)

* chore: 大致雏形

* feat: complete permission code

* feat: 修复渲染问题并完善权限代码

* chore: release 0.7.0

* chore: 更新依赖

* chore: fix echarts version

* feat: upgrade dependencies

* chore: mock route map

* chore: hash router

* chore: concat fixed routers

* chore: fix dependencies

* feat: optimize

* chore: remove roles from get menu process

* chore: remain fe permssion code

Co-authored-by: 悠静萝莉 <i@mikuhl.cn>

Co-authored-by: 悠静萝莉 <i@mikuhl.cn>

* chore: sync main for develop (#549)

* feat: upgrade vite4 (#533)

* chore: 升级vite4

* docs: 项目简介 修改

* fix: 打包后预览提示TypeError

* chore: @vitejs/plugin-vue,@vitejs/plugin-vue-jsx升级

* docs: 项目简介 修改

* fix: 204无内容直接返回判断 (#539)

* feat(axios util): support params stringify (#544)

* fix(permission store): clear routes when logout (#545)

fix #541

* chore: release 0.7.7 (#548)

* chore: release 0.7.7

* chore: dump tdesign version

---------

Co-authored-by: liweijie0812 <674416404@qq.com>
Co-authored-by: ngyyuusora <jiliangsoft@live.com>

* chore: update version (#616)

* fix: echarts resize error (#622)

* fix: mock menu (#630)

* fix(i18n): pages.result.fail.modify中文未定义 (#632)

* fix(i18n): 修复用户中心词条不生效的问题 (#634)

* fix: 修复husky可能找不到npx命令的问题 (#635)

* fix(i18n): 修复用户中心词条不生效的问题 (#634) (#636)

* feat: 升级依赖到最新版本 (#637)

* feat: 升级依赖到最新版本

* fix(style): 使用新版格式修复文件

* fix(style): eslint自动格式化

* feat(hook): 替换窗口大小变化监听器 (#638)

* feat(hook): 替换窗口大小变化监听器

* feat(state): 替换响应式数据监听器

* feat(clipboard): 移除无用依赖,替换剪贴方法

* fix: 补上遗漏的逗号

* fix: 移除重复出现的依赖项

* feat: use $t (#640)

* fix: ts error (#652)

* fix: 修复循环过深的问题 (#650)

* fix: 修复循环过深的问题

* fix: 修复依赖更新导致的类型错误

* chore: fix type (#653)

* chore: fix type

* chore: remove console

* fix: hotfix useRoute bug after vue 3.4 release (#660)

* fix: 修复路由切换时过渡动画异常的问题 (#666)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Setli <darkgame@163.com>
Co-authored-by: Setli <set_li@163.com>
Co-authored-by: PDieE <23275429@qq.com>
Co-authored-by: 悠静萝莉 <i@mikuhl.cn>
Co-authored-by: liweijie0812 <674416404@qq.com>
Co-authored-by: ngyyuusora <jiliangsoft@live.com>
Co-authored-by: Cosmos <cosmosliu@foxmail.com>
Co-authored-by: PY <pengyue970715@gmail.com>
Co-authored-by: mokeyjay <i@mok.moe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Resize] 使用vueuse代替windows resize hook
2 participants