[优化] 文档 logo 与 菜单

This commit is contained in:
就眠仪式 2021-09-29 01:48:18 +08:00
parent fc65d268a5
commit 1689ba0375
4 changed files with 58 additions and 6 deletions

BIN
docs/src/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -2,10 +2,12 @@
<div class="width:100%;height:300px">
<lay-layout>
<lay-header>
<lay-logo> layui-vue </lay-logo>
<lay-logo>
<img src="../assets/logo.png">
</lay-logo>
</lay-header>
<lay-side>
<ul>
<ul class="layui-menu layui-menu-lg">
<li><router-link to="/zh-CN/components/layout">布局</router-link></li>
<li><router-link to="/zh-CN/components/button">按钮</router-link></li>
<li><router-link to="/zh-CN/components/icon">图标</router-link></li>
@ -37,3 +39,13 @@ export default {
},
}
</script>
<style>
.layui-logo img {
height: 31px;
width: 82px;
left: 15px;
top: 16px;
}
</style>

View File

@ -1,4 +1,3 @@
// copy from [vitepress](https://github.com/vuejs/vitepress)
import fs from 'fs'
import MarkdownIt from 'markdown-it'
import { RuleBlock } from 'markdown-it/lib/parser_block'

View File

@ -1,7 +1,48 @@
<template>
<div></div>
<span>
<input type="radio" :value="label" :name="name" />
<div
class="layui-unselect layui-form-radio"
@click="handleClick"
:class="{
'layui-form-radioed': modelValue == label,
'layui-radio-disbaled layui-disabled': disabled,
}"
>
<i
v-if="modelValue != label"
class="layui-anim layui-icon layui-anim-scaleSpring"
:class="{ 'layui-form-radioed': modelValue != label }"
>&#xe63f;</i
>
<i
v-if="modelValue == label"
class="layui-anim layui-icon layui-anim-scaleSpring"
:class="{ 'layui-form-radioed': modelValue == label }"
>&#xe643;</i
>
<span><slot></slot></span>
</div>
</span>
</template>
<script setup name="LayRadio" lang="ts">
import { defineProps, defineEmits } from '@vue/runtime-core'
const props =
defineProps<{
modelValue: string
disabled?: boolean
label?: string
name: string
}>()
const emit = defineEmits(['update:modelValue'])
const handleClick = function () {
if (props.disabled) {
return false
}
emit('update:modelValue', !props.modelValue)
}
</script>