perf: empty img to functional component

pull/2682/head
tanjinzhou 2020-07-30 15:56:10 +08:00
parent 60541d7d1b
commit d7354af9ec
4 changed files with 61 additions and 62 deletions

@ -1 +1 @@
Subproject commit a234ba5ccfe4ab14f1619ddc156aef5bf05a7f18 Subproject commit 3d603c83c0d128769b81ffe12ef9d8cbd5dbb166

View File

@ -1,7 +1,4 @@
export default { const Empty = () => {
functional: true,
PRESENTED_IMAGE_DEFAULT: true,
render() {
return ( return (
<svg width="184" height="152" viewBox="0 0 184 152" xmlns="http://www.w3.org/2000/svg"> <svg width="184" height="152" viewBox="0 0 184 152" xmlns="http://www.w3.org/2000/svg">
<g fill="none" fillRule="evenodd"> <g fill="none" fillRule="evenodd">
@ -43,5 +40,8 @@ export default {
</g> </g>
</svg> </svg>
); );
},
}; };
Empty.PRESENTED_IMAGE_DEFAULT = true;
export default Empty;

View File

@ -1,7 +1,4 @@
export default { const Simple = () => {
functional: true,
PRESENTED_IMAGE_SIMPLE: true,
render() {
return ( return (
<svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"> <svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 1)" fill="none" fillRule="evenodd"> <g transform="translate(0 1)" fill="none" fillRule="evenodd">
@ -16,5 +13,7 @@ export default {
</g> </g>
</svg> </svg>
); );
},
}; };
Simple.PRESENTED_IMAGE_SIMPLE = true;
export default Simple;

View File

@ -4,7 +4,7 @@
</div> </div>
</template> </template>
<script> <script>
import demo from '../antdv-demo/docs/dropdown/demo/index'; import demo from '../antdv-demo/docs/empty/demo/index';
export default { export default {
components: { components: {