style(prettier): reset code style with prettier
This commit is contained in:
@@ -3,14 +3,8 @@
|
||||
<div class="source">
|
||||
<slot />
|
||||
</div>
|
||||
<div
|
||||
ref="meta"
|
||||
class="meta"
|
||||
>
|
||||
<div
|
||||
v-if="$slots.description"
|
||||
class="description"
|
||||
>
|
||||
<div ref="meta" class="meta">
|
||||
<div v-if="$slots.description" class="description">
|
||||
<slot name="description" />
|
||||
</div>
|
||||
<div class="language-html">
|
||||
@@ -22,7 +16,11 @@
|
||||
class="control"
|
||||
@click="toggleShow"
|
||||
>
|
||||
<i :class="[show ? 'layui-icon layui-icon-up' : 'layui-icon layui-icon-down']" />
|
||||
<i
|
||||
:class="[
|
||||
show ? 'layui-icon layui-icon-up' : 'layui-icon layui-icon-down',
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -34,10 +32,10 @@ const meta = ref<HTMLElement>({} as HTMLElement)
|
||||
const isFixContorl = ref(false)
|
||||
const codeAreaHeight = ref(0)
|
||||
|
||||
const show = ref(false);
|
||||
const show = ref(false)
|
||||
|
||||
const toggleShow = function() {
|
||||
show.value = !show.value;
|
||||
const toggleShow = function () {
|
||||
show.value = !show.value
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
<template>
|
||||
<select :name="name" lay-verify="required"></select>
|
||||
<select :name="name" lay-verify="required" />
|
||||
<div
|
||||
class="layui-unselect layui-form-select"
|
||||
@click="open"
|
||||
:class="[openState ? 'layui-form-selected' : '']"
|
||||
@click="open"
|
||||
>
|
||||
<div class="layui-select-title">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Search"
|
||||
class="layui-input layui-unselect"
|
||||
@input="change"
|
||||
:value="name"
|
||||
style="
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: none;
|
||||
color: whitesmoke;
|
||||
"
|
||||
/><i class="layui-edge"></i>
|
||||
@input="change"
|
||||
/><i class="layui-edge" />
|
||||
</div>
|
||||
<dl class="layui-anim layui-anim-upbit" style="">
|
||||
<dd v-if="menus.length <= 0" class="layui-select-tips">无内容</dd>
|
||||
<dd
|
||||
v-else
|
||||
v-for="data in menus"
|
||||
:value = "name"
|
||||
@click="jump(data)"
|
||||
v-else
|
||||
:key="data"
|
||||
:value="name"
|
||||
class="layui-select-tips"
|
||||
@click="jump(data)"
|
||||
>
|
||||
{{ data.title }}
|
||||
</dd>
|
||||
@@ -38,11 +38,11 @@
|
||||
<script setup name="LaySelect" lang="ts">
|
||||
import { defineProps, Ref, ref } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { Recordable } from '/@src/module/type'
|
||||
|
||||
const props =
|
||||
defineProps<{
|
||||
datas?: object[]
|
||||
}>()
|
||||
const props = defineProps<{
|
||||
datas?: Recordable[]
|
||||
}>()
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@@ -60,16 +60,16 @@ const jump = function (data: any) {
|
||||
router.push(data.path)
|
||||
}
|
||||
|
||||
const change = function(e: any) {
|
||||
const change = function (e: any) {
|
||||
name.value = e.target.value
|
||||
if(e.target.value === ""){
|
||||
if (e.target.value === '') {
|
||||
menus.value = props.datas
|
||||
}else{
|
||||
menus.value = searchList(e.target.value, props.datas);
|
||||
} else {
|
||||
menus.value = searchList(e.target.value, props.datas)
|
||||
}
|
||||
}
|
||||
|
||||
const searchList = function (str: String, container: any) {
|
||||
const searchList = function (str: string, container: any) {
|
||||
var newList = []
|
||||
var startChar = str.charAt(0)
|
||||
var strLen = str.length
|
||||
@@ -100,4 +100,4 @@ const searchList = function (str: String, container: any) {
|
||||
}
|
||||
return newList
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-nocheck
|
||||
import { createApp } from './main'
|
||||
import { renderToString } from '@vue/server-renderer'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="width:100%;height:300px">
|
||||
<lay-layout>
|
||||
<lay-header style="background:#393D49">
|
||||
<lay-header style="background: #393d49">
|
||||
<lay-logo>
|
||||
<img src="../assets/logo.png" />
|
||||
</lay-logo>
|
||||
@@ -10,7 +10,7 @@
|
||||
style="margin-top: 10px; margin-bottom: 0px"
|
||||
>
|
||||
<lay-form>
|
||||
<lay-search :datas="menus"></lay-search>
|
||||
<lay-search :datas="menus" />
|
||||
</lay-form>
|
||||
</ul>
|
||||
<ul
|
||||
@@ -38,8 +38,8 @@
|
||||
style="padding: 6px"
|
||||
>
|
||||
<li
|
||||
:key="menu"
|
||||
v-for="menu in menus"
|
||||
:key="menu"
|
||||
:class="[
|
||||
currentPath === menu.path ? 'layui-menu-item-checked2' : '',
|
||||
]"
|
||||
@@ -58,7 +58,7 @@
|
||||
</lay-side>
|
||||
<lay-body>
|
||||
<div style="padding: 20px">
|
||||
<router-view></router-view>
|
||||
<router-view />
|
||||
</div>
|
||||
</lay-body>
|
||||
</lay-layout>
|
||||
@@ -254,7 +254,8 @@ export default {
|
||||
title: '图标选择',
|
||||
subTitle: 'iconPicker',
|
||||
path: '/zh-CN/components/iconPicker',
|
||||
},{
|
||||
},
|
||||
{
|
||||
id: 29,
|
||||
title: '分页',
|
||||
subTitle: 'page',
|
||||
@@ -304,19 +305,19 @@ export default {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
@media screen and (max-width:768px) {
|
||||
.layui-side {
|
||||
width: 0px!important;
|
||||
@media screen and (max-width: 768px) {
|
||||
.layui-side {
|
||||
width: 0px !important;
|
||||
}
|
||||
.layui-body {
|
||||
left: 0px!important;
|
||||
width: 100%!important;
|
||||
left: 0px !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
.layui-logo {
|
||||
display: none!important;
|
||||
display: none !important;
|
||||
}
|
||||
.layui-layout-left {
|
||||
left: 0px!important;
|
||||
left: 0px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -11,6 +11,6 @@ export function createRouter(): Router {
|
||||
const baseUrl = import.meta.env.BASE_URL
|
||||
return _createRouter({
|
||||
history: createWebHashHistory(baseUrl),
|
||||
routes: routes
|
||||
routes: routes,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,8 @@ const zhCN = [
|
||||
path: '/zh-CN/guide/install',
|
||||
component: () => import('../../docs/zh-CN/guide/install.md'),
|
||||
meta: { title: '安装' },
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/guide/changelog',
|
||||
component: () => import('../../docs/zh-CN/guide/changelog.md'),
|
||||
meta: { title: '更新' },
|
||||
@@ -43,7 +44,8 @@ const zhCN = [
|
||||
path: '/zh-CN/components/container',
|
||||
component: () => import('../../docs/zh-CN/components/container.md'),
|
||||
meta: { title: '容器' },
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/components/breadcrumb',
|
||||
component: () => import('../../docs/zh-CN/components/breadcrumb.md'),
|
||||
meta: { title: '面包屑' },
|
||||
@@ -52,27 +54,33 @@ const zhCN = [
|
||||
path: '/zh-CN/components/button',
|
||||
component: () => import('../../docs/zh-CN/components/button.md'),
|
||||
meta: { title: '按钮' },
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/components/icon',
|
||||
component: () => import('../../docs/zh-CN/components/icon.md'),
|
||||
meta: { title: '图标' },
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/components/panel',
|
||||
component: () => import('../../docs/zh-CN/components/panel.md'),
|
||||
meta: { title: '面板' },
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/components/animation',
|
||||
component: () => import('../../docs/zh-CN/components/animation.md'),
|
||||
meta: { title: '动画' },
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/components/card',
|
||||
component: () => import('../../docs/zh-CN/components/cards.md'),
|
||||
meta: { title: '卡片' },
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/components/grid',
|
||||
component: () => import('../../docs/zh-CN/components/grid.md'),
|
||||
meta: { title: '栅格' },
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/components/form',
|
||||
component: () => import('../../docs/zh-CN/components/form.md'),
|
||||
meta: { title: '表单' },
|
||||
@@ -136,22 +144,26 @@ const zhCN = [
|
||||
path: '/zh-CN/components/rate',
|
||||
component: () => import('../../docs/zh-CN/components/rate.md'),
|
||||
meta: { title: '评分' },
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/components/dropdown',
|
||||
component: () => import('../../docs/zh-CN/components/dropdown.md'),
|
||||
meta: { title: '下拉' },
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/components/tab',
|
||||
component: () => import('../../docs/zh-CN/components/tab.md'),
|
||||
meta: { title: '选项卡' },
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/components/iconPicker',
|
||||
component: () => import('../../docs/zh-CN/components/iconPicker.md'),
|
||||
meta: { title: '图标选择' },
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/components/tree',
|
||||
component: () => import('../../docs/zh-CN/components/tree.md'),
|
||||
meta: { title: '树形组件' }
|
||||
meta: { title: '树形组件' },
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/components/page',
|
||||
@@ -162,7 +174,7 @@ const zhCN = [
|
||||
path: '/zh-CN/components/transfer',
|
||||
component: () => import('../../docs/zh-CN/components/transfer.md'),
|
||||
meta: { title: '穿梭框' },
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -62,7 +62,6 @@ h1 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
h3 {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
@@ -159,7 +158,8 @@ table td {
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.site-doc-icon li .doc-icon-name, .site-doc-icon li .doc-icon-code {
|
||||
.site-doc-icon li .doc-icon-name,
|
||||
.site-doc-icon li .doc-icon-code {
|
||||
color: #c2c2c2;
|
||||
}
|
||||
|
||||
@@ -184,8 +184,8 @@ table td {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
transition: all .3s;
|
||||
-webkit-transition: all .3s;
|
||||
transition: all 0.3s;
|
||||
-webkit-transition: all 0.3s;
|
||||
}
|
||||
|
||||
.site-doc-icon li .layui-icon {
|
||||
@@ -199,7 +199,7 @@ table td {
|
||||
|
||||
.site-doc-necolor li div {
|
||||
border-radius: 0;
|
||||
color: #000!important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.site-doc-color li div {
|
||||
@@ -268,8 +268,8 @@ table td {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
transition: all .3s;
|
||||
-webkit-transition: all .3s;
|
||||
transition: all 0.3s;
|
||||
-webkit-transition: all 0.3s;
|
||||
}
|
||||
|
||||
.anim .site-doc-icon li .layui-anim {
|
||||
@@ -286,4 +286,4 @@ table td {
|
||||
|
||||
.anim .site-doc-icon li .code {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user