✨ support async load (e17036d) add react guide (40d88b1) added inject parameter to specify the svgDom insertion position, close#36(8fb0ad7) support typescript,close#22(b56a491) 1.0.5(2021-09-27) Bug Fixes loadSvg time (25ccc89) run error (66cbae4) cors:fix#4(14753dc) ssr:...
</template> @@ -95,7 +95,7 @@ Here the svg sprite map has been generated ``` **icons Directory Structure** ### **Icons Directory Structure** ```bash # src/icons @@ -129,7 +129,54 @@ Here the svg sprite map has been generated ``` React is used in the same way. ...
React way /src/components/SvgIcon.jsx exportdefaultfunctionSvgIcon({name,prefix='icon',color='#333',...props}){constsymbolId=`#${prefix}-${name}`return(<svg{...props}aria-hidden="true"><usehref={symbolId}fill={color}/></svg>)} ...
React 方式 /src/components/SvgIcon.jsx exportdefaultfunctionSvgIcon({name,prefix='icon',color='#333',...props}){constsymbolId=`#${prefix}-${name}`return(<svg{...props}aria-hidden="true"><usehref={symbolId}fill={color}/></svg>)} ...
react-dom:refact-dom }); export default defineConfig({ build: { rollupOptions: { external: ['moment', 'react,react-dom'], plugins: [globals], } } }); eg: 在 index.html 模版中引入对应库的CDN。 <!--前端框架调试版本-->
Commits on Sep 13, 2021 Merge pull request vbenjs#18 from Asim-Tahir/feat/react-guide anncwbcommittedSep 13, 2021 Verified 3d13eaa Commits on Aug 3, 2021 chore: release 1.0.4 anncwbcommittedAug 3, 2021 Verified e3eb769 chore: release 1.0.4 anncwbcommittedAug 3, 2021 Verified ...