fix: 修复文档

This commit is contained in:
就眠儀式 2022-04-02 17:08:34 +08:00
parent 542e2ca531
commit 8f69699953

View File

@ -16,16 +16,19 @@
<router-link class="layui-inline site-down" to="/zh-CN/guide"> <router-link class="layui-inline site-down" to="/zh-CN/guide">
Get Started Get Started
</router-link> </router-link>
<a class="layui-inline site-down" href="javascript:void(0);" @click="changeTheme"> <a
class="layui-inline site-down"
{{ theme === 'dark' ? 'Turn Off' : 'Turn On'}} href="javascript:void(0);"
@click="changeTheme"
>
{{ theme === "dark" ? "Turn Off" : "Turn On" }}
</a> </a>
</div> </div>
<div class="site-version"> <div class="site-version">
<span <span
>{{ t("home.version") }}<cite class="site-showv" >{{ t("home.version") }}<cite class="site-showv">{{
>{{ layuiVueVersion }}</cite layuiVueVersion
></span }}</cite></span
> >
<span <span
>{{ t("home.download") }}<em class="site-showdowns" >{{ t("home.download") }}<em class="site-showdowns"
@ -33,7 +36,6 @@
></span ></span
> >
</div> </div>
</div>
<div class="site-banner-other"> <div class="site-banner-other">
<a <a
href="https://gitee.com/layui-vue" href="https://gitee.com/layui-vue"
@ -61,6 +63,7 @@
</a> </a>
</div> </div>
</div> </div>
</div>
<div style="margin-left: 10%; margin-right: 10%; margin-top: 40px"> <div style="margin-left: 10%; margin-right: 10%; margin-top: 40px">
<div> <div>
<ul class="layui-row layui-col-space30 site-idea"> <ul class="layui-row layui-col-space30 site-idea">
@ -108,28 +111,28 @@
</template> </template>
<script> <script>
import { inject, provide } from 'vue'; import { inject, provide } from "vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
export default { export default {
name: "index", name: "index",
setup() { setup() {
const { t } = useI18n(); const { t } = useI18n();
const layuiVueVersion = inject('LayuiVueVersion') const layuiVueVersion = inject("LayuiVueVersion");
const theme = inject("theme"); const theme = inject("theme");
const changeTheme = () => { const changeTheme = () => {
if(theme.value === 'dark') { if (theme.value === "dark") {
theme.value = 'light'; theme.value = "light";
} else { } else {
theme.value = 'dark'; theme.value = "dark";
}
} }
};
return { return {
t, t,
theme, theme,
changeTheme, changeTheme,
layuiVueVersion layuiVueVersion,
}; };
}, },
}; };
@ -183,7 +186,9 @@ body {
font-size: 16px; font-size: 16px;
color: #476582; color: #476582;
font-weight: 500; font-weight: 500;
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
transition: all 0.5s; transition: all 0.5s;
-webkit-transition: all 0.5s; -webkit-transition: all 0.5s;
letter-spacing: 0.2px; letter-spacing: 0.2px;
@ -269,8 +274,9 @@ body {
margin-top: -4px; margin-top: -4px;
} }
.site-banner-other { .site-banner-other {
position: absolute; position: relative;
left: 0; left: 0;
top: 40px;
bottom: 90px; bottom: 90px;
width: 100%; width: 100%;
text-align: center; text-align: center;