12345678910111213141516171819202122232425262728293031 |
- <template>
- <van-empty :image="imageSrc" :description="description" />
- </template>
- <script>
- import { mapGetters } from 'vuex'
- export default {
- name: 'simple-empty',
- props: {
- image: {
- type: String,
- default: '',
- },
- name: {
- type: String,
- default: '',
- },
- description: {
- type: String,
- default: '描述文字',
- },
- },
- computed: {
- ...mapGetters(['static']),
- imageSrc() {
- return this.image || this.static + '/' + this.name
- },
- },
- }
- </script>
|