1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <view class="fs-empty-box" :style="{ padding: padding }">
- <image :src="src" mode="widthFix" :style="{ width: imageWidth }"></image>
- <view class="content">{{ text }}</view>
- </view>
- </template>
- <script>
- /**
- * 无数据组件
- * @description 无数据组件
- * @property {String} src 图片地址
- * @property {String} text 文字
- * @property {String} padding 内边距
- * @property {String} imageWidth 图片宽度
- */
- export default {
- name: 'fs-empty'
- }
- </script>
- <script setup>
- import empty from './empty.png'
- const props = defineProps({
- src: {
- type: String,
- default: empty
- },
- text: {
- type: String,
- default: '暂无数据'
- },
- padding: {
- type: String,
- default: '200rpx 30rpx'
- },
- imageWidth: {
- type: String,
- default: '400rpx'
- }
- })
- </script>
- <style lang="scss" scoped>
- .fs-empty-box {
- text-align: center;
- .content {
- margin-top: 20rpx;
- }
- }
- </style>
|