Merged
Conversation
There was a problem hiding this comment.
Pull request overview
此 PR 旨在将版权年份从手动维护改为自动基于当前年份生成,避免每年手动更新。
Changes:
- 在 Electron Builder 配置中将版权年份改为使用
new Date().getFullYear()生成 - 在 GUI 页脚展示中将年份改为动态渲染当前年份
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/gui/vue.config.js | Electron Builder 版权信息年份改为构建时动态生成 |
| packages/gui/linux-arm64.vue.config.js | ARM64 Linux 构建配置同样改为构建时动态生成版权年份 |
| packages/gui/src/view/App.vue | 页脚版权年份改为运行时动态渲染当前年份 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
226
to
228
| <div class="mt5"> | ||
| ©2020-2026 docmirror.cn by | ||
| ©2020-{{ new Date().getFullYear() }} docmirror.cn by | ||
| <a @click="openExternal('https://github.com/greper')">Greper</a>, |
There was a problem hiding this comment.
Avoid creating a new Date instance directly in the template interpolation. This expression is re-evaluated on every re-render and makes the template less declarative; define a currentYear data/computed property (or method) in the script section and interpolate that instead.
Collaborator
There was a problem hiding this comment.
@afatcat-xie 修复该问题并通过测试后可合并(建议缓存该Date()对象)
md要不是copilot不能在跨仓库pr上使用我就指挥copilot修了
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ⅰ. 描述此PR的作用:
修改版权日期为自动更新
Ⅱ. 此PR修复了哪个issue吗?
无
Ⅲ. 界面变化截屏
并没有,只不过使用一个函数(Date().getFullYear())来动态获取时间(xxxx)插入版权2020-xxxx