123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <view class="tm-empty flex-center flex-col my-32">
- <view class="py-32">
- <tm-icons @click="$emit('click')" :color="color" :name="icon?icon:listIcon[model].name" :size="size"></tm-icons>
- </view>
- <view class="text-size-n" :class="[
- `text-${color}`,
- 'py-12'
- ]">{{label?label:listIcon[model].label}}</view>
- <view>
- <slot></slot>
- </view>
- </view>
- </template>
- <script>
-
- import tmIcons from "@/tm-vuetify/components/tm-icons/tm-icons.vue"
- export default {
- components:{tmIcons},
- name: "tm-empty",
- props: {
- model: {
- type: String,
- default: 'refresh'
- },
- color: {
- type: String,
- default: 'grey-lighten-1'
- },
- size: {
- type: String|Number,
- default: 120
- },
- label:{
- type:String,
- default:''
- },
-
- icon:{
- type:String,
- default:''
- }
- },
- data() {
- return {
- listIcon: {
- bug: {
- name: 'icon-bug-report',
- label: '软件出现了bug'
- },
- refresh:{
- name: 'icon-redo',
- label: '刷新试下'
- },
- listEmpty:{
- name: 'icon-box-fill',
- label: '数据为空哦'
- }
- }
- };
- }
- }
- </script>
- <style lang="scss">
- </style>
|