[优化] 文档 logo 与 菜单
This commit is contained in:
parent
fc65d268a5
commit
1689ba0375
BIN
docs/src/assets/logo.png
Normal file
BIN
docs/src/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
@ -2,10 +2,12 @@
|
|||||||
<div class="width:100%;height:300px">
|
<div class="width:100%;height:300px">
|
||||||
<lay-layout>
|
<lay-layout>
|
||||||
<lay-header>
|
<lay-header>
|
||||||
<lay-logo> layui-vue </lay-logo>
|
<lay-logo>
|
||||||
|
<img src="../assets/logo.png">
|
||||||
|
</lay-logo>
|
||||||
</lay-header>
|
</lay-header>
|
||||||
<lay-side>
|
<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/layout">布局</router-link></li>
|
||||||
<li><router-link to="/zh-CN/components/button">按钮</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>
|
<li><router-link to="/zh-CN/components/icon">图标</router-link></li>
|
||||||
@ -37,3 +39,13 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
.layui-logo img {
|
||||||
|
height: 31px;
|
||||||
|
width: 82px;
|
||||||
|
left: 15px;
|
||||||
|
top: 16px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
@ -1,4 +1,3 @@
|
|||||||
// copy from [vitepress](https://github.com/vuejs/vitepress)
|
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import MarkdownIt from 'markdown-it'
|
import MarkdownIt from 'markdown-it'
|
||||||
import { RuleBlock } from 'markdown-it/lib/parser_block'
|
import { RuleBlock } from 'markdown-it/lib/parser_block'
|
||||||
|
@ -1,7 +1,48 @@
|
|||||||
<template>
|
<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 }"
|
||||||
|
></i
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
v-if="modelValue == label"
|
||||||
|
class="layui-anim layui-icon layui-anim-scaleSpring"
|
||||||
|
:class="{ 'layui-form-radioed': modelValue == label }"
|
||||||
|
></i
|
||||||
|
>
|
||||||
|
<span><slot></slot></span>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="LayRadio" lang="ts">
|
<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>
|
</script>
|
Loading…
Reference in New Issue
Block a user