新增组织管理内容
This commit is contained in:
@@ -4,9 +4,8 @@
|
||||
<img
|
||||
v-if="!hideImg"
|
||||
class="block mb-[20px]"
|
||||
width="300"
|
||||
height="240"
|
||||
src="/src/assets/imgs/jyh/nodata.png"
|
||||
:width="imgWidth"
|
||||
:src="src"
|
||||
alt="NoData"
|
||||
/>
|
||||
</slot>
|
||||
@@ -17,16 +16,36 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
hideImg: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
small: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
imgSrc: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const src = computed(() => {
|
||||
if (props.imgSrc) {
|
||||
return props.imgSrc;
|
||||
}
|
||||
return props.small ? '/src/assets/imgs/jyh/nodata_small.svg' : '/src/assets/imgs/jyh/nodata.svg';
|
||||
});
|
||||
const imgWidth = computed(() => {
|
||||
if (props.width) {
|
||||
return props.width;
|
||||
}
|
||||
return props.small ? '128px' : '300px';
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.bg-white {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user