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

增加设置页面,优化菜单外观 #49

Merged
merged 13 commits into from
Jun 18, 2024
Merged

Conversation

putianyi889
Copy link
Contributor

  • 设置页面SettingView.vue,代码极简,没有脚本内容
  • 增加LocalStorage用于本地设置
  • 去掉右上角的欢迎部分,原"我的地盘"文本替换为用户名,移到右上角。注册、登录、退出改成按钮
  • 语言切换外观改成图标(不知道怎么让光标悬停时改变光标)
  • 禁用菜单自动收起,计划将来自定义收起规则兼容窄屏
  • 增加菜单仅显示图标的选项
  • 增加隐藏语言切换按钮的选项
  • 一些代码格式化与本地化

@eee555
Copy link
Owner

eee555 commented Jun 18, 2024

光标悬停时改变光标
div:hover {
cursor: pointer; /* 手指 */
}
或者
div:hover {
cursor: url('path/to/custom-cursor.cur'), auto;
}

@putianyi889 putianyi889 marked this pull request as draft June 18, 2024 10:23
@eee555
Copy link
Owner

eee555 commented Jun 18, 2024

front_end/src/store/index.ts里存的是当前app里全局的数据,每次网页刷新就没有了。要使刷新后还有,请使用localstorage。例如
localstorage.setItem('username', 'JohnDoe');

var user = { name: 'JohnDoe', age: 30 };
localstorage.setItem('user', JSON.stringify(user));

var storedUser = JSON.parse(localstorage.getItem('user'));
console.log(storedUser.name);

@putianyi889
Copy link
Contributor Author

要使刷新后还有,请使用localstorage。

localstorage接口是通过一个pinia插件调用的
https://github.com/prazdevs/pinia-plugin-persistedstate?tab=readme-ov-file

@putianyi889 putianyi889 marked this pull request as ready for review June 18, 2024 12:07
@eee555 eee555 merged commit b465524 into eee555:main Jun 18, 2024
2 checks passed
@putianyi889 putianyi889 mentioned this pull request Jun 19, 2024
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.

2 participants