[优化] 栅格文档
This commit is contained in:
20
src/module/empty/index.less
Normal file
20
src/module/empty/index.less
Normal file
@@ -0,0 +1,20 @@
|
||||
.layui-empty {
|
||||
margin: 0 8px;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.layui-empty-image {
|
||||
height: 100px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.layui-empty-image img {
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.layui-empty-description {
|
||||
margin: 0;
|
||||
}
|
||||
@@ -1,3 +1,23 @@
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "LayEmpty",
|
||||
};
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineProps, withDefaults } from "vue";
|
||||
import "./index.less";
|
||||
|
||||
export interface LayEmptyProps {
|
||||
description?: string;
|
||||
image?: string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<LayEmptyProps>(), {
|
||||
description: "暂无数据",
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="layui-empty">
|
||||
<div class="layui-empty-image">
|
||||
@@ -7,17 +27,4 @@
|
||||
{{ description }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="LayEmpty" lang="ts">
|
||||
import { defineProps, withDefaults } from 'vue'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
description?: string
|
||||
}>(),
|
||||
{
|
||||
description: '暂无数据',
|
||||
}
|
||||
)
|
||||
</script>
|
||||
</template>
|
||||
Reference in New Issue
Block a user