ファイル
yudao-init/src/views/copilot/factoryData/components/ContainerIcon.vue
‘937886381’ 2d67ca4347 修改ui
2024-07-09 17:01:11 +08:00

64 行
1.3 KiB
Vue

<!--
* @Author: zhp
* @Date: 2024-06-03 15:38:31
* @LastEditTime: 2024-07-09 16:49:22
* @LastEditors: zhp
* @Description:
-->
<!--
filename: ContainerIcon.vue
author: liubin
date: 2024-04-09 16:41:36
description:
-->
<template>
<div class="container-icon" :style="bgStyle"></div>
</template>
<script>
import prod from "@/assets/images/companyData/prod-minor.png";
import store from "@/assets/images/companyData/store.png";
import energy from "@/assets/images/companyData/energy.png";
import order from "@/assets/images/companyData/order.png";
export default {
name: "ContainerIcon",
components: {},
props: {
icon: {
type: String,
default: "prod",
},
},
data() {
return {};
},
computed: {
bgStyle() {
return {
prod:
"background: url(" + prod + ") no-repeat center center / 100% 100%",
store:
"background: url(" + store + ") no-repeat center center / 100% 100%",
energy:
"background: url(" + energy + ") no-repeat center center / 100% 100%",
order:
"background: url(" + order + ") no-repeat center center / 100% 100%",
}[this.icon];
},
},
methods: {},
};
</script>
<style scoped lang="scss">
.container-icon {
// width: 32px;
// height: 32px;
width: 1.4vw;
height: 1.4vw;
background: #ccc2;
}
</style>