-
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
14 changed files
with
143 additions
and
296 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
packages/nutui-taro-demo/src/exhibition/pages/empty/basic.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,3 @@ | ||
<template> | ||
<nut-empty description="404"></nut-empty> | ||
</template> |
7 changes: 7 additions & 0 deletions
7
packages/nutui-taro-demo/src/exhibition/pages/empty/bottom.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,7 @@ | ||
<template> | ||
<nut-empty image="error" description="Error"> | ||
<div style="margin-top: 10px"> | ||
<nut-button type="primary">Refresh</nut-button> | ||
</div> | ||
</nut-empty> | ||
</template> |
6 changes: 6 additions & 0 deletions
6
packages/nutui-taro-demo/src/exhibition/pages/empty/custom.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,6 @@ | ||
<template> | ||
<nut-empty | ||
image="https://static-ftcms.jd.com/p/files/61a9e3313985005b3958672e.png" | ||
description="Description" | ||
></nut-empty> | ||
</template> |
69 changes: 27 additions & 42 deletions
69
packages/nutui-taro-demo/src/exhibition/pages/empty/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,53 +1,38 @@ | ||
<template> | ||
<Demo> | ||
<h2>基础用法</h2> | ||
<div class="show"> | ||
<nut-empty description="无数据"></nut-empty> | ||
</div> | ||
<h2>{{ t('basic') }}</h2> | ||
<Basic /> | ||
|
||
<h2>图片类型,内置3个</h2> | ||
<div class="show"> | ||
<nut-tabs v-model="tabValue"> | ||
<nut-tab-pane title="无内容"> | ||
<nut-empty image="empty" description="无内容"></nut-empty> | ||
</nut-tab-pane> | ||
<nut-tab-pane title="加载失败/错误"> | ||
<nut-empty image="error" description="加载失败/错误"></nut-empty> | ||
</nut-tab-pane> | ||
<nut-tab-pane title="无网络"> | ||
<nut-empty image="network" description="无网络"></nut-empty> | ||
</nut-tab-pane> | ||
</nut-tabs> | ||
</div> | ||
<h2>{{ t('type') }}</h2> | ||
<Type /> | ||
|
||
<h2>自定义图片</h2> | ||
<div class="show"> | ||
<nut-empty | ||
image="https://static-ftcms.jd.com/p/files/61a9e3313985005b3958672e.png" | ||
description="无优惠券" | ||
></nut-empty> | ||
</div> | ||
<h2>{{ t('custom') }}</h2> | ||
<Custom /> | ||
|
||
<h2>底部内容</h2> | ||
<div class="show"> | ||
<nut-empty image="error" description="加载失败"> | ||
<div style="margin-top: 10px"> | ||
<nut-button icon="refresh" type="primary">重试</nut-button> | ||
</div> | ||
</nut-empty> | ||
</div> | ||
<h2>{{ t('bottom') }}</h2> | ||
<Bottom /> | ||
</Demo> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
const tabValue = ref(0); | ||
</script> | ||
import { useTranslate } from '../../../utils'; | ||
import Basic from './basic.vue'; | ||
import Type from './type.vue'; | ||
import Custom from './custom.vue'; | ||
import Bottom from './bottom.vue'; | ||
<style lang="scss"> | ||
.demo { | ||
.show { | ||
background: #ffffff; | ||
const t = useTranslate({ | ||
'zh-CN': { | ||
basic: '基础用法', | ||
type: '图片类型', | ||
custom: '自定义图片', | ||
bottom: '底部内容' | ||
}, | ||
'en-US': { | ||
basic: 'Basic Usage', | ||
type: 'Image Type', | ||
custom: 'Custom Image', | ||
bottom: 'Bottom Content' | ||
} | ||
} | ||
</style> | ||
}); | ||
</script> |
17 changes: 17 additions & 0 deletions
17
packages/nutui-taro-demo/src/exhibition/pages/empty/type.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,17 @@ | ||
<template> | ||
<nut-tabs v-model="tabValue"> | ||
<nut-tab-pane title="empty" pane-key="0"> | ||
<nut-empty image="empty" description="empty"></nut-empty> | ||
</nut-tab-pane> | ||
<nut-tab-pane title="error" pane-key="1"> | ||
<nut-empty image="error" description="error"></nut-empty> | ||
</nut-tab-pane> | ||
<nut-tab-pane title="network" pane-key="2"> | ||
<nut-empty image="network" description="network"></nut-empty> | ||
</nut-tab-pane> | ||
</nut-tabs> | ||
</template> | ||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
const tabValue = ref('0'); | ||
</script> |
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,3 @@ | ||
<template> | ||
<nut-empty description="404"></nut-empty> | ||
</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,7 @@ | ||
<template> | ||
<nut-empty image="error" description="Error"> | ||
<div style="margin-top: 10px"> | ||
<nut-button type="primary">Refresh</nut-button> | ||
</div> | ||
</nut-empty> | ||
</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,6 @@ | ||
<template> | ||
<nut-empty | ||
image="https://static-ftcms.jd.com/p/files/61a9e3313985005b3958672e.png" | ||
description="Description" | ||
></nut-empty> | ||
</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> | ||
<h2>{{ t('basic') }}</h2> | ||
<Basic /> | ||
|
||
<h2>{{ t('type') }}</h2> | ||
<Type /> | ||
|
||
<h2>{{ t('custom') }}</h2> | ||
<Custom /> | ||
|
||
<h2>{{ t('bottom') }}</h2> | ||
<Bottom /> | ||
</Demo> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { useTranslate } from '@/sites/utils'; | ||
import Basic from './basic.vue'; | ||
import Type from './type.vue'; | ||
import Custom from './custom.vue'; | ||
import Bottom from './bottom.vue'; | ||
const t = useTranslate({ | ||
'zh-CN': { | ||
basic: '基础用法', | ||
type: '图片类型', | ||
custom: '自定义图片', | ||
bottom: '底部内容' | ||
}, | ||
'en-US': { | ||
basic: 'Basic Usage', | ||
type: 'Image Type', | ||
custom: 'Custom Image', | ||
bottom: 'Bottom Content' | ||
} | ||
}); | ||
</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,17 @@ | ||
<template> | ||
<nut-tabs v-model="tabValue"> | ||
<nut-tab-pane title="empty" pane-key="0"> | ||
<nut-empty image="empty" description="empty"></nut-empty> | ||
</nut-tab-pane> | ||
<nut-tab-pane title="error" pane-key="1"> | ||
<nut-empty image="error" description="error"></nut-empty> | ||
</nut-tab-pane> | ||
<nut-tab-pane title="network" pane-key="2"> | ||
<nut-empty image="network" description="network"></nut-empty> | ||
</nut-tab-pane> | ||
</nut-tabs> | ||
</template> | ||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
const tabValue = ref('0'); | ||
</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
Oops, something went wrong.