小程序端使用Hanzi Writer小程序插件使用,使用npm安装。 npm install hanzi-writer-miniprogram 具体用法参见。 如果只是安装使用教程,就没有写的必要了,这里总结一下开发过程中遇到的问题。 1、笔画数据加载问题 Hanzi Writer 需要加载笔画渲染数据才能绘制字符,默认情况下,Hanzi Writer 将使用 ajax 从jsdelivr CDN加载...
vargetCharDataUrl =functiongetCharDataUrl(char){return'https://wxapi.db101.cn/v1/hz/search/'...
npm install hanzi-writer-miniprogram Usage In yourpage.json, first add the following to enable thehanzi-writer-viewcomponent: {"usingComponents": {"hanzi-writer-view":"hanzi-writer-miniprogram/hanzi-writer-view"} } Then, add ahanzi-writer-viewcomponent to your page. You must add anid,width,...
Github开源地址:https://github.com/chanind/hanzi-writer 作者:https://github.com/chanind 汉字数据来自Make Me a Hanzi项目, 提供 9000 +常用简体字和繁体字。 Hanzi Writer 库仅仅 30 kb (压缩后仅 9kb!), 所以添加它不会使网页体积增大。
{ width: 7rem; } #hz-writer{ width: 300px !important; height: 300px !important; } .read{ margin: 10px 0; } /* 拼音---start */ .pinyin{ width: 90vw; height: 30px; border-top: 1px solid #bfbfbf; border-bottom: 1px solid #bfbfbf; margin: 15px auto; } .pinyin_top{ height...
Github开源地址:https://github.com/chanind/hanzi-writer 作者:https://github.com/chanind 汉字数据来自Make Me a Hanzi项目, 提供 9000 +常用简体字和繁体字。 Hanzi Writer 库仅仅 30 kb (压缩后仅 9kb!), 所以添加它不会使网页体积增大。
npm install hanzi-writer-miniprogram Usage In yourpage.json, first add the following to enable thehanzi-writer-viewcomponent: {"usingComponents": {"hanzi-writer-view":"hanzi-writer-miniprogram/hanzi-writer-view"} } Then, add ahanzi-writer-viewcomponent to your page. You must add anid,width,...