Skip to content

Commit

Permalink
feat: add test demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jahnli committed Nov 27, 2024
1 parent d0da2a8 commit 2b69ecc
Show file tree
Hide file tree
Showing 12 changed files with 163 additions and 11 deletions.
34 changes: 27 additions & 7 deletions src/split/demos/enUS/mutil-panel.demo.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
<markdown>
# Multiple Panels
</markdown>
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
name: 'SplitMultiPanel'
})
</script>

<template>
<n-split direction="horizontal" style="height: 200px">
<n-split style="height: 200px" :default-size="[0.2, 0.4, 0.4]">
<template #1>
Pane 1
<div class="split-panel">
Panel 1
</div>
</template>
<template #2>
Pane 2
<div class="split-panel">
Panel 2
</div>
</template>
<template #3>
Pane 3
<div class="split-panel">
Panel 3
</div>
</template>
</n-split>
</template>

<style scoped>
.split-panel {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(128, 128, 128, 0.3);
}
</style>
6 changes: 6 additions & 0 deletions src/split/demos/zhCN/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ single-px-default-size-debug.vue
single-number-default-size-debug.vue
single-px-size-threshold-debug.vue
single-number-size-threshold-debug.vue
mutil-number-default-size-debug.vue
mutil-number-size-debug.vue
mutil-number-size-threshold-debug.vue
mutil-px-default-size-debug.vue
mutil-px-size-debug.vue
mutil-px-size-threshold-debug.vue
```

## API
Expand Down
21 changes: 21 additions & 0 deletions src/split/demos/zhCN/mutil-number-default-size-debug.demo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<markdown>
# 多个 number 类型 default-size 调试
</markdown>

<template>
<n-split
direction="horizontal"
style="height: 200px"
:default-size="[0.3, 0.2, 0.5]"
>
<template #1>
Pane 1
</template>
<template #2>
Pane 2
</template>
<template #3>
Pane 3
</template>
</n-split>
</template>
17 changes: 17 additions & 0 deletions src/split/demos/zhCN/mutil-number-size-debug.demo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<markdown>
# 多个 number 类型 size 调试
</markdown>

<template>
<n-split direction="horizontal" style="height: 200px" :size="[0.3, 0.2, 0.5]">
<template #1>
Pane 1
</template>
<template #2>
Pane 2
</template>
<template #3>
Pane 3
</template>
</n-split>
</template>
23 changes: 23 additions & 0 deletions src/split/demos/zhCN/mutil-number-size-threshold-debug.demo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<markdown>
# 多个 number 类型 size threshold 调试
</markdown>

<template>
<n-split
direction="horizontal"
style="height: 200px"
:size="[0.3, 0.2, 0.5]"
:min="[0.1, 0.2, 0.3]"
:max="[0.4, 0.5, 0.9]"
>
<template #1>
Pane 1
</template>
<template #2>
Pane 2
</template>
<template #3>
Pane 3
</template>
</n-split>
</template>
21 changes: 21 additions & 0 deletions src/split/demos/zhCN/mutil-px-default-size-debug.demo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<markdown>
# 多个 px 类型 default-size 调试
</markdown>

<template>
<n-split
direction="horizontal"
style="height: 200px"
:default-size="['200px', '200px', '200px']"
>
<template #1>
Pane 1
</template>
<template #2>
Pane 2
</template>
<template #3>
Pane 3
</template>
</n-split>
</template>
21 changes: 21 additions & 0 deletions src/split/demos/zhCN/mutil-px-size-debug.demo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<markdown>
# 多个 px 类型 size 调试
</markdown>

<template>
<n-split
direction="horizontal"
style="height: 200px"
:size="['200px', '200px', '200px']"
>
<template #1>
Pane 1
</template>
<template #2>
Pane 2
</template>
<template #3>
Pane 3
</template>
</n-split>
</template>
23 changes: 23 additions & 0 deletions src/split/demos/zhCN/mutil-px-size-threshold-debug.demo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<markdown>
# 多个 px 类型 size threshold 调试
</markdown>

<template>
<n-split
direction="horizontal"
style="height: 200px"
:size="['200px', '200px', '200px']"
:min="['100px', '100px', '100px']"
:max="['400px', '400px', '400px']"
>
<template #1>
Pane 1
</template>
<template #2>
Pane 2
</template>
<template #3>
Pane 3
</template>
</n-split>
</template>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<markdown>
# 单 number 类型 default size 调试 &#10004;
# 单 number 类型 default-size 调试
</markdown>

<template>
Expand Down
2 changes: 1 addition & 1 deletion src/split/demos/zhCN/single-number-size-debug.demo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<markdown>
# 单 number 类型 size 调试 &#10004;
# 单 number 类型 size 调试
</markdown>

<template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<markdown>
# 单 number 类型 default size threshold 调试 &#10004;
# 单 number 类型 default-size threshold 调试
</markdown>

<template>
Expand Down
2 changes: 1 addition & 1 deletion src/split/demos/zhCN/single-px-default-size-debug.demo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<markdown>
# 单 px 类型 default size 调试
# 单 px 类型 default-size 调试
</markdown>

<template>
Expand Down

0 comments on commit 2b69ecc

Please sign in to comment.