V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  haodaking  ›  全部回复第 3 页 / 共 3 页
回复总数  44
1  2  3  
2023-03-27 16:46:49 +08:00
回复了 sugarkeek 创建的主题 上海 数字人民币还有哪些优惠活动吗
招商银行:北京 M+6 级会员及以上可以领 10 元消费红包
https://cmbt.cn/A41EcU8FY
2023-03-13 10:34:27 +08:00
回复了 Mason2021 创建的主题 程序员 分享: Zed 编辑器邀请链接
2022-09-07 15:28:22 +08:00
回复了 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-01-19 17:15:21 +08:00
回复了 krliang 创建的主题 问与答 还有 10+天就要春节了,大家要回老家过年么?
想回,车票还没抢到
1  2  3  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2608 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 01:43 · PVG 09:43 · LAX 18:43 · JFK 21:43
♥ Do have faith in what you're doing.