1.分割面板
This commit is contained in:
40
example/docs/zh-CN/components/splitPanel.md
Normal file
40
example/docs/zh-CN/components/splitPanel.md
Normal file
@@ -0,0 +1,40 @@
|
||||
::: anchor
|
||||
:::
|
||||
|
||||
::: title 基础使用
|
||||
:::
|
||||
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<lay-split-panel style="height: 300px">
|
||||
<lay-split-panel-item>1</lay-split-panel-item>
|
||||
<lay-split-panel-item>2</lay-split-panel-item>
|
||||
</lay-split-panel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue';
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const loading = ref(true);
|
||||
const active = ref(-1);
|
||||
const nexts = () => {
|
||||
if (active.value++ >=3) active.value = 0
|
||||
};
|
||||
const previous = () => {
|
||||
if (active.value-- ===0) active.value = 0
|
||||
};
|
||||
return {
|
||||
loading,
|
||||
active
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
@@ -76,6 +76,12 @@ const zhCN = [
|
||||
component: Component,
|
||||
meta: { title: "组件" },
|
||||
children: [
|
||||
{
|
||||
path: "/zh-CN/components/splitPanel",
|
||||
component: () =>
|
||||
import("../../docs/zh-CN/components/splitPanel.md"),
|
||||
meta: { title: "分割面板" },
|
||||
},
|
||||
{
|
||||
path: "/zh-CN/components/skeleton",
|
||||
component: () => import("../../docs/zh-CN/components/skeleton.md"),
|
||||
|
||||
Reference in New Issue
Block a user