V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
V2EX  ›  haodaking  ›  全部回复第 3 页 / 共 3 页
回复总数  46
1  2  3  
❮ ❯
2023 年 5 月 29 日
回复了 levelworm 创建的主题 › 生活 › 四十岁的我极其羡慕二十岁的自己的身体
周一到周五,每天早上锻炼半小时(蹲起、哑铃、俯卧撑); 7 点起床; 8 点出发; 9 点上班;
2023 年 5 月 9 日
回复了 zhenyoung 创建的主题 › 程序员 › 翻译插件
2023 年 3 月 27 日
回复了 sugarkeek 创建的主题 › 上海 › 数字人民币还有哪些优惠活动吗
招商银行:北京 M+6 级会员及以上可以领 10 元消费红包
https://cmbt.cn/A41EcU8FY
2023 年 3 月 13 日
回复了 Mason2021 创建的主题 › 程序员 › 分享: Zed 编辑器邀请链接
2022 年 9 月 7 日
回复了 SniperXu 创建的主题 › Vue.js › vue3+vite 动态引入 SVG ICON 的问题
https://codesandbox.io/s/magical-carson-n6540i?file=/src/Icon.vue

Icon.vue

<script lang="ts">
import { defineComponent, computed, defineAsyncComponent } from "vue";

export default defineComponent({
props: ["icon"],
setup(props) {
const iconCompoent = computed(() => {
return defineAsyncComponent(async () => {
return (await import("@vicons/ionicons5"))[props.icon];
});
});
return {
iconCompoent,
};
},
});
</script>

<template>
<n-icon :component="iconCompoent" />
</template>


使用


Demo.vue

<template>
<Icon icon="GameController" />
<Icon icon="GameController" size="40" color="#0e7a0d" />
</template>

<script lang="ts">
import { defineComponent } from "vue";
import Icon from "./Icon.vue";
export default defineComponent({
components: {
Icon,
},
});
</script>
2022 年 1 月 19 日
回复了 krliang 创建的主题 › 问与答 › 还有 10+天就要春节了,大家要回老家过年么?
想回,车票还没抢到
1  2  3  
❮ ❯
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4711 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 33ms · UTC 06:08 · PVG 14:08 · LAX 22:08 · JFK 01:08
♥ Do have faith in what you're doing.