-
Notifications
You must be signed in to change notification settings - Fork 3
Feat/layout and home : layout组件和首页UI #5
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5d1d880
feat(layout,index): 创建default-layout, 编写index(首页)UI
ZheYi101 b1ba4d0
Merge branch 'master' into feat/layout-and-home
ZheYi101 3ac0a99
feat(index/style): 文字位置
ZheYi101 ca8aa33
fix(layout/*,index/*): 删除无用旧文件; 优化代码
ZheYi101 fd2ef8b
feat(index): 首页管理员信息UI展示优化; 所有class名重改为小驼峰
ZheYi101 93c99d3
fix(router): index页在本处import as indexPage避免混淆命名
ZheYi101 5918b89
fix(index): 漏删一个空css规则集
ZheYi101 d6b3d38
fix(config/router): 大小写拼错
ZheYi101 7232553
Update apps/admin/src/layouts/default-layout/index.vue
ZheYi101 240d49a
fix(layout/routerBack): 返回逻辑
ZheYi101 0a12bba
feat(layout/navBar;index/style): 修改navBar的箭头颜色; index页按钮添加下padding
ZheYi101 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
File renamed without changes.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| .layoutContainer { | ||
| display: flex; | ||
| flex-direction: column; | ||
| min-height: 100vh; | ||
| background-color: var(--van-background); | ||
| } | ||
|
|
||
| .layoutMain { | ||
| flex: 1; | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| .navBar { | ||
| :global(.van-icon-arrow-left:before) { | ||
| color: black; | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| <template> | ||
| <!-- 此处layoutContainer设置了min-height:100vh, 避免内容过少时背景色无法完全覆盖 --> | ||
| <div :class="styles.layoutContainer"> | ||
| <van-nav-bar | ||
| v-if="title" | ||
| :title="title" | ||
| left-arrow | ||
| :class="styles.navBar" | ||
| @click-left="handleBackClick" | ||
| /> | ||
| <main :class="styles.layoutMain"> | ||
| <slot /> | ||
| </main> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { computed } from "vue"; | ||
| import { useRoute, useRouter } from "vue-router"; | ||
|
|
||
| import { useTitleMeta } from "./composables/use-title-meta"; | ||
| import styles from "./index.module.scss"; | ||
|
|
||
| interface Props { | ||
| title?: string; | ||
| } | ||
|
|
||
| const props = defineProps<Props>(); | ||
| const router = useRouter(); | ||
| const route = useRoute(); | ||
|
|
||
| const handleBackClick = () => { | ||
| router.back(); | ||
| }; | ||
DumbDaiDai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| useTitleMeta(); | ||
|
|
||
| const title = computed(() => { | ||
| if (props.title) { | ||
| return props.title; | ||
| } | ||
| // 获取当前路由的 meta 中的 title (如果没有 则不展示nav-bar, 如首页就不展示) | ||
| const currentRoute = route.matched[route.matched.length - 1]; | ||
| return currentRoute?.meta.title as string | undefined; | ||
| }); | ||
| </script> | ||
18 changes: 0 additions & 18 deletions
18
apps/admin/src/layouts/tab-page-layout/components/app-tabbar/index.vue
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| <template> | ||
| <van-cell-group title="管理员信息"> | ||
| <van-cell title="管理员">{{ adminName }}</van-cell> | ||
| <van-cell title="路线">{{ walkRoute }}</van-cell> | ||
| <van-cell title="点位">{{ walkPoint }}</van-cell> | ||
| </van-cell-group> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { ref } from "vue"; | ||
|
|
||
| // TODO: 从接口中获取adminInfo | ||
| const walkRoute = ref("屏峰全程"); | ||
| const walkPoint = ref("XXX"); | ||
| const adminName = ref("XXX"); | ||
| </script> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| .main { | ||
| .functionButtonContainer { | ||
| padding: 0 8px; | ||
| } | ||
| .functionButton { | ||
| text-align: center; | ||
| margin-top: 8px; | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <template> | ||
| <default-layout> | ||
| <admin-info /> | ||
| <section :class="styles.main"> | ||
| <van-cell-group title="签到"> | ||
| <van-cell title="扫码签到" is-link /> | ||
| <van-cell title="输入签到" is-link /> | ||
| </van-cell-group> | ||
ZheYi101 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <van-cell-group title="起终点人员管理"> | ||
| <van-cell title="单人登记" is-link /> | ||
| <van-cell title="重组队伍" is-link to="/team-rebuild" /> | ||
| <div :class="styles.functionButtonContainer"> | ||
| <van-button type="primary" plain :class="styles.functionButton" block> | ||
| 待出发→进行中 | ||
| </van-button> | ||
| <van-button type="primary" plain :class="styles.functionButton" block> | ||
| 直接提交队伍 | ||
| </van-button> | ||
| </div> | ||
| </van-cell-group> | ||
|
|
||
| <van-cell-group title="数据大盘"> | ||
| <van-cell title="屏峰地图可视化" is-link /> | ||
| <van-cell title="莫干山地图可视化" is-link /> | ||
| <van-cell title="表格数据查看" is-link /> | ||
| </van-cell-group> | ||
| </section> | ||
| </default-layout> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import DefaultLayout from "@/layouts/default-layout/index.vue"; | ||
|
|
||
| import AdminInfo from "./components/adminInfo/index.vue"; | ||
| import styles from "./index.module.scss"; | ||
| </script> | ||
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <template> | ||
| <default-layout> </default-layout> | ||
ZheYi101 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import DefaultLayout from "@/layouts/default-layout/index.vue"; | ||
| </script> | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.