-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from terwer/dev
feat:#1 新增设置页面
- Loading branch information
Showing
10 changed files
with
216 additions
and
49 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -20,7 +20,13 @@ yarn | |
## dev | ||
|
||
```bash | ||
vercel dev | ||
yarn dev | ||
``` | ||
|
||
or | ||
|
||
```bash | ||
yarn vdev | ||
``` | ||
|
||
## deploy | ||
|
This file contains 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
This file contains 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
This file contains 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 @@ | ||
<template> | ||
<footer> | ||
footer . | ||
<NuxtLink href="/setting">Setting</NuxtLink> | ||
</footer> | ||
</template> | ||
|
||
<script lang="ts"> | ||
export default { | ||
name: "Footer" | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
</style> |
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,12 +1,16 @@ | ||
<template> | ||
<div> | ||
<Header/> | ||
<slot/> | ||
<slot /> | ||
<Footer/> | ||
</div> | ||
</template> | ||
<script> | ||
import Header from "../components/default/Header"; | ||
|
||
<script lang="ts"> | ||
import Header from "~/components/default/Header.vue"; | ||
import Footer from "~/components/default/Footer.vue"; | ||
export default { | ||
components: {Header} | ||
components: {Footer, Header} | ||
} | ||
</script> |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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,86 @@ | ||
<template> | ||
<div class="setting"> | ||
<el-form> | ||
<h1>Setting</h1> | ||
<el-form-item label="Lang"> | ||
<el-space :spacer="spacer"> | ||
<client-only> | ||
<el-select v-model="lang" placeholder="Select"> | ||
<el-option | ||
v-for="item in langOptions" | ||
:key="item.value" | ||
:label="item.label" | ||
:value="item.value" | ||
/> | ||
</el-select> | ||
</client-only> | ||
<el-button type="primary" @click="enableCustomLayout">Update layout</el-button> | ||
</el-space> | ||
</el-form-item> | ||
<el-form-item label="Layout"> | ||
<el-space :spacer="spacer"> | ||
<client-only> | ||
<el-select v-model="value" placeholder="Select"> | ||
<el-option | ||
v-for="item in options" | ||
:key="item.value" | ||
:label="item.label" | ||
:value="item.value" | ||
/> | ||
</el-select> | ||
</client-only> | ||
<el-button type="primary" @click="enableCustomLayout">Update layout</el-button> | ||
</el-space> | ||
</el-form-item> | ||
<el-form-item label="Dark mode"> | ||
<el-button type="primary">Change mode</el-button> | ||
</el-form-item> | ||
</el-form> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import {ElButton, ElDivider, ElForm, ElFormItem, ElOption, ElSelect, ElSpace} from "element-plus"; | ||
import {h, ref} from 'vue' | ||
const value = ref('default') | ||
const options = [ | ||
{ | ||
value: 'default', | ||
label: 'default', | ||
}, | ||
] | ||
const lang = ref('zh_CN') | ||
const langOptions = [ | ||
{ | ||
value: 'zh_CN', | ||
label: '简体中文', | ||
}, | ||
{ | ||
value: 'en_US', | ||
label: 'English', | ||
}, | ||
] | ||
// 使用这一行可以不使用通用布局 | ||
// definePageMeta({ | ||
// layout: false, | ||
// }); | ||
const route = useRoute() | ||
function enableCustomLayout() { | ||
route.meta.layout = "default" | ||
} | ||
const spacer = h(ElDivider, {direction: 'vertical'}) | ||
</script> | ||
|
||
<script lang="ts"> | ||
export default { | ||
name: "seting" | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
</style> |
d7fa24d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
jvue-front – ./
terwer.space
jvue-front-git-main-terwergreen.vercel.app
jvue-front-terwergreen.vercel.app
www.terwer.space
jvue-front.vercel.app