-
Notifications
You must be signed in to change notification settings - Fork 834
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
243 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<template> | ||
<nut-space> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
</nut-space> | ||
</template> |
8 changes: 8 additions & 0 deletions
8
packages/nutui-taro-demo/src/layout/pages/space/direction.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<template> | ||
<nut-space direction="vertical" fill> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
</nut-space> | ||
</template> |
14 changes: 14 additions & 0 deletions
14
packages/nutui-taro-demo/src/layout/pages/space/gutter.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<template> | ||
<!-- gutter --> | ||
<nut-space :gutter="20" style="margin-bottom: 10px"> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
</nut-space> | ||
<!-- css variable --> | ||
<nut-space :style="{ '--nut-space-gap': '30px' }"> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
</nut-space> | ||
</template> |
82 changes: 35 additions & 47 deletions
82
packages/nutui-taro-demo/src/layout/pages/space/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,38 @@ | ||
<template> | ||
<Demo> | ||
<h2>基础用法</h2> | ||
<nut-cell> | ||
<nut-space> | ||
<nut-button type="primary">按钮</nut-button> | ||
<nut-button type="primary">按钮</nut-button> | ||
<nut-button type="primary">按钮</nut-button> | ||
<nut-button type="primary">按钮</nut-button> | ||
</nut-space> | ||
</nut-cell> | ||
<h2>垂直排列</h2> | ||
<nut-cell> | ||
<nut-space direction="vertical" fill> | ||
<nut-button type="primary" block>按钮</nut-button> | ||
<nut-button type="primary" block>按钮</nut-button> | ||
<nut-button type="primary" block>按钮</nut-button> | ||
<nut-button type="primary" block>按钮</nut-button> | ||
</nut-space> | ||
</nut-cell> | ||
<h2>自定义间距</h2> | ||
<nut-cell> | ||
<nut-space :gutter="20"> | ||
<nut-button type="primary">按钮</nut-button> | ||
<nut-button type="primary">按钮</nut-button> | ||
<nut-button type="primary">按钮</nut-button> | ||
</nut-space> | ||
</nut-cell> | ||
<nut-cell :style="{ '--nut-space-gap': '30px' }"> | ||
<nut-space> | ||
<nut-button type="primary">按钮</nut-button> | ||
<nut-button type="primary">按钮</nut-button> | ||
<nut-button type="primary">按钮</nut-button> | ||
</nut-space> | ||
</nut-cell> | ||
<h2>自动换行</h2> | ||
<nut-cell> | ||
<nut-space wrap> | ||
<nut-button type="primary" block>按钮</nut-button> | ||
<nut-button type="primary" block>按钮</nut-button> | ||
<nut-button type="primary" block>按钮</nut-button> | ||
<nut-button type="primary" block>按钮</nut-button> | ||
<nut-button type="primary" block>按钮</nut-button> | ||
<nut-button type="primary" block>按钮</nut-button> | ||
<nut-button type="primary" block>按钮</nut-button> | ||
<nut-button type="primary" block>按钮</nut-button> | ||
</nut-space> | ||
</nut-cell> | ||
<Demo class="full"> | ||
<h2>{{ t('basic') }}</h2> | ||
<Basic /> | ||
|
||
<h2>{{ t('direction') }}</h2> | ||
<Direction /> | ||
|
||
<h2>{{ t('gutter') }}</h2> | ||
<Gutter /> | ||
|
||
<h2>{{ t('wrap') }}</h2> | ||
<Wrap /> | ||
</Demo> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { useTranslate } from '../../../utils'; | ||
import Basic from './basic.vue'; | ||
import Direction from './direction.vue'; | ||
import Gutter from './gutter.vue'; | ||
import Wrap from './wrap.vue'; | ||
const t = useTranslate({ | ||
'zh-CN': { | ||
basic: '基础用法', | ||
direction: '垂直排列', | ||
gutter: '自定义间距', | ||
wrap: '自动换行' | ||
}, | ||
'en-US': { | ||
basic: 'Basic Usage', | ||
direction: 'Custom Direction', | ||
gutter: 'Custom gutter', | ||
wrap: 'Word wrap' | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<template> | ||
<nut-space wrap> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
</nut-space> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<template> | ||
<nut-space> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
</nut-space> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<template> | ||
<nut-space direction="vertical" fill> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
</nut-space> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<template> | ||
<!-- gutter --> | ||
<nut-space :gutter="20" style="margin-bottom: 10px"> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
</nut-space> | ||
<!-- css variable --> | ||
<nut-space :style="{ '--nut-space-gap': '30px' }"> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
<nut-button>Button</nut-button> | ||
</nut-space> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<Demo class="full"> | ||
<h2>{{ t('basic') }}</h2> | ||
<Basic /> | ||
|
||
<h2>{{ t('direction') }}</h2> | ||
<Direction /> | ||
|
||
<h2>{{ t('gutter') }}</h2> | ||
<Gutter /> | ||
|
||
<h2>{{ t('wrap') }}</h2> | ||
<Wrap /> | ||
</Demo> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { useTranslate } from '@/sites/utils'; | ||
import Basic from './basic.vue'; | ||
import Direction from './direction.vue'; | ||
import Gutter from './gutter.vue'; | ||
import Wrap from './wrap.vue'; | ||
const t = useTranslate({ | ||
'zh-CN': { | ||
basic: '基础用法', | ||
direction: '垂直排列', | ||
gutter: '自定义间距', | ||
wrap: '自动换行' | ||
}, | ||
'en-US': { | ||
basic: 'Basic Usage', | ||
direction: 'Custom Direction', | ||
gutter: 'Custom gutter', | ||
wrap: 'Word wrap' | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<template> | ||
<nut-space wrap> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
<nut-button block>Button</nut-button> | ||
</nut-space> | ||
</template> |
Oops, something went wrong.