refactor: replace legacy icon usages with unified ZnIcon
Replace van-icon and uni-icons custom icon usages with the unified ZnIcon component in GoodFacility, CreateServiceOrder and GoodDetail components. Remove unused iconsMap imports from all modified files, and delete the redundant @font-face style declaration for znicons in GoodDetail.
This commit is contained in:
@@ -37,9 +37,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else class="w-full h-full flex flex-items-center flex-justify-center" @click="handleChooseImage">
|
<div v-else class="w-full h-full flex flex-items-center flex-justify-center" @click="handleChooseImage">
|
||||||
<uni-icons fontFamily="znicons" size="24" color="#6A717F">
|
<zn-icon name="zn-camera" size="24" color="#6A717F"></zn-icon>
|
||||||
{{ iconsMap["zn-camera"] }}
|
|
||||||
</uni-icons>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -74,7 +72,7 @@ import { ref, computed, onMounted, nextTick, defineProps, watch } from "vue";
|
|||||||
import { SCROLL_TO_BOTTOM } from "@/constants/constant";
|
import { SCROLL_TO_BOTTOM } from "@/constants/constant";
|
||||||
import { createWorkOrder } from "@/api/workOrder";
|
import { createWorkOrder } from "@/api/workOrder";
|
||||||
import { uploadFile } from "@/api/upload";
|
import { uploadFile } from "@/api/upload";
|
||||||
import { iconsMap } from "@/assets/fonts/znicons";
|
import ZnIcon from "@/components/ZnIcon/index.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
toolCall: {
|
toolCall: {
|
||||||
|
|||||||
@@ -12,9 +12,7 @@
|
|||||||
1,
|
1,
|
||||||
}">
|
}">
|
||||||
<div class="flex flex-items-center flex-row flex-shrink-0 mr-8">
|
<div class="flex flex-items-center flex-row flex-shrink-0 mr-8">
|
||||||
<van-icon fontFamily="znicons" size="20" color="#333">
|
<zn-icon :name="moduleItem.moduleIcon" size="20" color="#333"></zn-icon>
|
||||||
{{ iconsMap[moduleItem.moduleIcon] }}
|
|
||||||
</van-icon>
|
|
||||||
<span class="ml-4 font-size-14 color-171717 line-height-20">
|
<span class="ml-4 font-size-14 color-171717 line-height-20">
|
||||||
{{ moduleItem.moduleTitle }}
|
{{ moduleItem.moduleTitle }}
|
||||||
</span>
|
</span>
|
||||||
@@ -33,7 +31,7 @@
|
|||||||
import { defineProps } from "vue";
|
import { defineProps } from "vue";
|
||||||
import Vue3MarkdownIt from 'vue3-markdown-it';
|
import Vue3MarkdownIt from 'vue3-markdown-it';
|
||||||
import ModuleTitle from "@/components/ModuleTitle/index.vue";
|
import ModuleTitle from "@/components/ModuleTitle/index.vue";
|
||||||
import { iconsMap } from "@/assets/fonts/znicons";
|
import ZnIcon from "@/components/ZnIcon/index.vue";
|
||||||
|
|
||||||
// Props定义
|
// Props定义
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -47,10 +45,3 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
@font-face {
|
|
||||||
font-family: znicons;
|
|
||||||
src: url("@/assets/fonts/znicons.ttf");
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -5,9 +5,7 @@
|
|||||||
'border-bottom': index < goodsData.commodityEquipment.length - 1,
|
'border-bottom': index < goodsData.commodityEquipment.length - 1,
|
||||||
}">
|
}">
|
||||||
<div class="flex items-center flex-row shrink-0">
|
<div class="flex items-center flex-row shrink-0">
|
||||||
<van-icon fontFamily="znicons" size="20" color="#171717">
|
<zn-icon :name="moduleItem.icon" size="20" color="#171717"></zn-icon>
|
||||||
|
|
||||||
</van-icon>
|
|
||||||
<span class="ml-[4px] text-[12px] text-[#171717] leading-[20px]">
|
<span class="ml-[4px] text-[12px] text-[#171717] leading-[20px]">
|
||||||
{{ moduleItem.title }}
|
{{ moduleItem.title }}
|
||||||
</span>
|
</span>
|
||||||
@@ -24,7 +22,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { iconsMap } from "@/assets/fonts/znicons";
|
import ZnIcon from "@/components/ZnIcon/index.vue";
|
||||||
import { defineProps } from "vue";
|
import { defineProps } from "vue";
|
||||||
|
|
||||||
// Props定义
|
// Props定义
|
||||||
|
|||||||
Reference in New Issue
Block a user