refactor(components): 重构图片资源引用方式,使用动态路径

将静态图片路径改为从valueUrl动态获取,统一管理图片资源路径
添加新的SVG图标资源
修复BI组件401未授权时的登录跳转逻辑
优化签到组件图片资源路径
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-12-08 19:09:04 +08:00
parent 003b5992a5
commit 6ce06b133a
29 changed files with 268 additions and 187 deletions

View File

@@ -7,8 +7,12 @@ export const hotSearch = defineComponent({
props: {},
setup(props) {
let valueUrl = ref("");
onMounted(() => {
init();
const valueA = document.querySelector(".valueA");
valueUrl.value = valueA.innerText;
});
const init = () => {
@@ -20,10 +24,10 @@ export const hotSearch = defineComponent({
const list = ref([]);
return { list };
return { valueUrl, list };
},
components: {},
template: `<div class="hot-tag" v-if="list.length > 0"> <div class="hot-tag-title"> <img class="icon" src="/img/triangle-violet.svg" /> 热门搜索 </div> <div class="list flexflex"> <a class="item" v-for="item in list" :href="'/search/' + item.keyword" target="_blank">{{ item.keyword }}</a> </div></div>`,
template: `<div class="hot-tag" v-if="list.length > 0"> <div class="hot-tag-title"> <img class="icon" :src="valueUrl + '/img/triangle-violet.svg'" /> 热门搜索 </div> <div class="list flexflex"> <a class="item" v-for="item in list" :href="'/search/' + item.keyword" target="_blank">{{ item.keyword }}</a> </div></div>`,
});