没有合适的资源?快使用搜索试试~ 我知道了~
async-htm-to-string:将带有htm标签的模板异步呈现为字符串
共22个文件
yml:5个
js:5个
json:4个
需积分: 9 0 下载量 201 浏览量
2021-03-18
01:26:12
上传
评论
收藏 18KB ZIP 举报
温馨提示
异步htm到字符串 将带有标签的模板异步呈现为字符串。 用法 简单的 yarn add async-htm-to-string const { html , renderToString } = require ( 'async-htm-to-string' ) ; const customTag = ( { prefix } , children ) => html ` < div> ${ prefix } - ${ children } </ div> ` ; const dynamicContent = 'bar' ; // Will equal "<div>foo-bar</div> const result = await renderToString ( html ` < ${ customTag } prefix ="foo" > ${ dynamicContent }
资源推荐
资源详情
资源评论
收起资源包目录
async-htm-to-string-main.zip (22个子文件)
async-htm-to-string-main
.gitignore 209B
.eslintrc 45B
package.json 3KB
declaration.tsconfig.json 204B
LICENSE 1KB
index.js 10KB
tsconfig.json 621B
.github
FUNDING.yml 66B
workflows
codeql-analysis.yml 2KB
nodejs.yml 524B
lint.yml 296B
dependabot.yml 463B
README.md 2KB
.eslintignore 26B
index.test-d.ts 3KB
renovate.json 39B
test
.eslintrc 86B
render-complex.spec.js 10KB
html.spec.js 4KB
render-basic.spec.js 2KB
fixtures.js 1KB
.editorconfig 147B
共 22 条
- 1
资源评论
活宝spring
- 粉丝: 28
- 资源: 4686
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功