ant-design-vue/components/skeleton/demo/index.vue

67 lines
1.6 KiB
Vue
Raw Normal View History

2018-12-10 03:34:51 +00:00
<script>
2019-01-12 03:33:27 +00:00
import Basic from './basic.md';
import Active from './active.md';
import Children from './children.md';
import Complex from './complex.md';
import List from './list.md';
import CN from '../index.zh-CN.md';
import US from '../index.en-US.md';
2018-12-10 03:34:51 +00:00
const md = {
cn: `# 加载占位图
在需要等待加载内容的位置提供一个占位图
## 何时使用
- 网络较慢需要长时间等待加载处理的情况下
- 图文信息内容较多的列表/卡片中
2019-03-18 12:35:24 +00:00
- 只适合用在第一次加载数据的场景
- 可以被 Spin 完全代替但是在可用的场景下可以比 Spin 提供更好的视觉效果和用户体验
2018-12-10 03:34:51 +00:00
## 代码演示`,
us: `# Skeleton
Provide a placeholder at the place which need waiting for loading.
# When To Use
- When resource needs long time to load, like low network speed.
- The component contains much information. Such as List or Card.
2019-03-18 12:35:24 +00:00
- Only works when loading data at first time.
- Could be replaced by Spin in all situation, but provide better user experience then spin if it works.
2018-12-10 03:34:51 +00:00
## Examples
`,
2019-01-12 03:33:27 +00:00
};
2018-12-10 03:34:51 +00:00
export default {
category: 'Components',
subtitle: '加载占位图',
type: 'Feedback',
title: 'Skeleton',
cols: 1,
render () {
return (
<div>
<md cn={md.cn} us={md.us}/>
<br/>
<Basic/>
<br />
<Complex />
<br />
<Active />
<br />
<Children />
<br />
<List />
<br/>
<api>
<template slot='cn'>
<CN/>
</template>
<US/>
</api>
</div>
2019-01-12 03:33:27 +00:00
);
2018-12-10 03:34:51 +00:00
},
2019-01-12 03:33:27 +00:00
};
2018-12-10 03:34:51 +00:00
</script>