docs: 修复2.0文档
This commit is contained in:
parent
3e5d5b357e
commit
8c4303ffb7
|
@ -1,8 +1,8 @@
|
|||
module.exports = {
|
||||
title: 'cnchar', // 标题
|
||||
description: '功能全面、多端支持的汉字拼音笔画js库', // 描述
|
||||
dest: './docs/assets/v2/', // 基本url
|
||||
base: '/cnchar/',
|
||||
dest: './docs/v2/', // 基本url
|
||||
base: '/cnchar/v2/',
|
||||
// 注入到当前页面的 HTML <head> 中的标签
|
||||
head: [
|
||||
['link', {rel: 'icon', href: 'https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/v1/images/i.ico'}], // 增加一个自定义的 favicon
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,62 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>cnchar</title>
|
||||
<meta name="description" content="功能全面、多端支持的汉字拼音笔画js库">
|
||||
<meta name="generator" content="VuePress 1.4.0">
|
||||
<link rel="icon" href="https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/v1/images/i.ico">
|
||||
|
||||
<link rel="preload" href="/cnchar/assets/v2/assets/css/0.styles.e22a701b.css" as="style"><link rel="preload" href="/cnchar/assets/v2/assets/js/app.936adb96.js" as="script"><link rel="preload" href="/cnchar/assets/v2/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/assets/v2/assets/js/8.716a2d5f.js" as="script"><link rel="preload" href="/cnchar/assets/v2/assets/js/4.6d3f1d6a.js" as="script"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/11.94c125ca.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/12.9efd22de.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/13.a75f5e37.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/14.dcb336fd.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/15.5320422e.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/16.24698d0e.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/17.01fbc09e.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/3.1c094398.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/assets/v2/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/v2/assets/css/0.styles.e22a701b.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container no-sidebar"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-exact-active router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link router-link-exact-active router-link-active">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="http://www.gitee.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link router-link-exact-active router-link-active">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="http://www.gitee.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <!----> </aside> <main class="page"> <div class="theme-default-content content__default"><p><div class="home-wrapper"><div><img src="/cnchar/assets/v2/assets/img/logo.6cd28633.png" alt srcset class="logo"></div> <div class="title">cnchar</div> <div class="desc">功能全面、多端支持的汉字拼音笔画js库</div> <div class="test"><div class="test-input el-input"><!----><input type="text" autocomplete="off" placeholder="输入一些汉字试试" class="el-input__inner"><!----><!----><!----><!----></div> <div class="show-area" style="display:none;"><div> <span class="split">|</span> 共笔</div> <div>繁体: <span class="split">|</span> 火星文: </div> <div>笔顺: </div> <div id="draw-area"></div></div></div> <div class="start-w"><button type="button" class="el-button el-button--primary"><!----><!----><span>开始 <i class="ei-location-arrow"></i></span></button></div> <div class="feature-w"><div class="f-i"><div class="f-t"><i class="ei-rocket"></i>功能全面</div> <div class="f-des">拼音、笔画数</div> <div class="f-des">多音字词</div> <div class="f-des">繁体字、火星文</div> <div class="f-des">汉字笔顺</div> <div class="f-des">多种模式绘制汉字</div> <div class="f-des">汉字推算</div> <div class="f-des">...</div></div> <div class="f-i"><div class="f-t"><i class="ei-tablet"></i>多端支持</div> <div class="f-des">浏览器</div> <div class="f-des">nodejs</div> <div class="f-des">小程序/小游戏</div> <div class="f-des">ReactNative/Weex/Uniapp/Electron</div> <div class="f-des">webpack</div> <div class="f-des">typescript支持</div> <div class="f-des">...</div></div> <div class="f-i"><div class="f-t"><i class="ei-cubes"></i>按需取用</div> <div class="f-des">功能分包</div> <div class="f-des">体积小巧</div> <div class="f-des">简单易用</div> <div class="f-des">npm</div> <div class="f-des">cdn</div></div></div> <div class="copy-right">MIT Licensed | Copyright © 2020 present <a href="https://www.github.com/theajack" target="view_window">theajack</a></div></div></p></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">4/13/2020, 4:46:50 PM</span></div></footer> <!----> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/v2/assets/js/app.936adb96.js" defer></script><script src="/cnchar/assets/v2/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/assets/v2/assets/js/8.716a2d5f.js" defer></script><script src="/cnchar/assets/v2/assets/js/4.6d3f1d6a.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.location.href = 'https://theajack.gitee.io/cnchar/v2'
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 216 B After Width: | Height: | Size: 216 B |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{625:function(t,r,a){"use strict";a.r(r);var n=a(21),s=Object(n.a)({},(function(){var t=this,r=t.$createElement,a=t._self._c||r;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h2",{attrs:{id:"_1-介绍"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-介绍"}},[t._v("#")]),t._v(" 1. 介绍")]),t._v(" "),a("p",[a("code",[t._v("cnchar-poly")]),t._v(" 库是用于支持多音词的库,该库本身并不提供新的api")]),t._v(" "),a("p",[t._v("引入该库之后,"),a("code",[t._v("cnchar.spell()")]),t._v(" 方法才会支持多音词,否则对于多音字会返回默认读音")]),t._v(" "),a("p",[t._v("npm安装")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("npm i cnchar-poly\n")])])]),a("p",[t._v("cdn使用")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"html"}},[t._v('\n<script src="https://cdn.jsdelivr.net/npm/cnchar-poly/cnchar.poly.min.js"><\/script>\n ')])],1),t._v(" "),a("p",[t._v("使用")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[t._v("\nimport cnchar from 'cnchar';\nimport poly from 'cnchar-poly';\ncnchar.use(poly); // use 在浏览器环境中非必须\n ")])],1),t._v(" "),a("h2",{attrs:{id:"_2-实例"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-实例"}},[t._v("#")]),t._v(" 2. 实例")]),t._v(" "),a("p",[t._v("以下演示几个多音词的例子")]),t._v(" "),a("p",[a("codebox",{attrs:{id:"poly"}})],1),t._v(" "),a("p",[t._v("由于多音词依赖分词与词库,且cnchar是一个静态的js库,所以可能会有诸多不准确的读音")]),t._v(" "),a("p",[t._v("如果遇到不准缺的多音词,欢迎提"),a("a",{attrs:{href:"https://github.com/theajack/cnchar/issues/new",target:"_blank",rel:"noopener noreferrer"}},[t._v("issue或pr"),a("OutboundLink")],1)])])}),[],!1,null,null,null);r.default=s.exports}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{626:function(t,r,a){"use strict";a.r(r);var n=a(21),s=Object(n.a)({},(function(){var t=this,r=t.$createElement,a=t._self._c||r;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h2",{attrs:{id:"_1-介绍"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-介绍"}},[t._v("#")]),t._v(" 1. 介绍")]),t._v(" "),a("p",[a("code",[t._v("cnchar-poly")]),t._v(" 库是用于支持多音词的库,该库本身并不提供新的api")]),t._v(" "),a("p",[t._v("引入该库之后,"),a("code",[t._v("cnchar.spell()")]),t._v(" 方法才会支持多音词,否则对于多音字会返回默认读音")]),t._v(" "),a("p",[t._v("npm安装")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("npm i cnchar-poly\n")])])]),a("p",[t._v("cdn使用")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"html"}},[t._v('\n<script src="https://cdn.jsdelivr.net/npm/cnchar-poly/cnchar.poly.min.js"><\/script>\n ')])],1),t._v(" "),a("p",[t._v("使用")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[t._v("\nimport cnchar from 'cnchar';\nimport poly from 'cnchar-poly';\ncnchar.use(poly); // use 在浏览器环境中非必须\n ")])],1),t._v(" "),a("h2",{attrs:{id:"_2-实例"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-实例"}},[t._v("#")]),t._v(" 2. 实例")]),t._v(" "),a("p",[t._v("以下演示几个多音词的例子")]),t._v(" "),a("p",[a("codebox",{attrs:{id:"poly"}})],1),t._v(" "),a("p",[t._v("由于多音词依赖分词与词库,且cnchar是一个静态的js库,所以可能会有诸多不准确的读音")]),t._v(" "),a("p",[t._v("如果遇到不准缺的多音词,欢迎提"),a("a",{attrs:{href:"https://github.com/theajack/cnchar/issues/new",target:"_blank",rel:"noopener noreferrer"}},[t._v("issue或pr"),a("OutboundLink")],1)])])}),[],!1,null,null,null);r.default=s.exports}}]);
|
|
@ -1 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{630:function(r,t,n){"use strict";n.r(t);var a=n(21),c=Object(a.a)({},(function(){var r=this,t=r.$createElement,n=r._self._c||t;return n("ContentSlotsDistributor",{attrs:{"slot-key":r.$parent.slotKey}},[n("h2",{attrs:{id:"_1-介绍"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-介绍"}},[r._v("#")]),r._v(" 1. 介绍")]),r._v(" "),n("p",[n("code",[r._v("cnchar-trad")]),r._v(" 库是用于繁体字,除此之外,该库还提供繁体、简体、火星文之间的相互转换")]),r._v(" "),n("p",[r._v("引入该库之后,cnchar的所有api都支持 "),n("code",[r._v("simple")]),r._v("和"),n("code",[r._v("trad")]),r._v("参数,用于只使用简体或繁体,默认两种字体都使用")]),r._v(" "),n("p",[r._v("npm安装")]),r._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[r._v("npm i cnchar-trad\n")])])]),n("p",[r._v("cdn使用")]),r._v(" "),n("div",[n("highlight-code",{attrs:{lang:"html"}},[r._v('\n<script src="https://cdn.jsdelivr.net/npm/cnchar-trad/cnchar.trad.min.js"><\/script>\n ')])],1),r._v(" "),n("p",[r._v("使用")]),r._v(" "),n("div",[n("highlight-code",{attrs:{lang:"javascript"}},[r._v("\nimport cnchar from 'cnchar';\nimport trad from 'cnchar-trad';\ncnchar.use(trad); // use 在浏览器环境中非必须\n ")])],1),r._v(" "),n("h2",{attrs:{id:"_2-繁体字支持"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_2-繁体字支持"}},[r._v("#")]),r._v(" 2. 繁体字支持")]),r._v(" "),n("p",[r._v("以下演示几个繁体字支持的例子")]),r._v(" "),n("p",[n("codebox",{attrs:{id:"trad"}})],1),r._v(" "),n("h2",{attrs:{id:"_3-字体转换-convert"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_3-字体转换-convert"}},[r._v("#")]),r._v(" 3. 字体转换(convert)")]),r._v(" "),n("p",[r._v("引入 cnchar-trad 库之后,在cnchar上会生成一个 "),n("code",[r._v("convert")]),r._v(" 对象,功能是支持字体转换,另外在string.prototype 上也会附加上对应的方法,用法如下:")]),r._v(" "),n("div",[n("highlight-code",{attrs:{lang:"javascript"}},[r._v("\ncnchar.convert.simpleToTrad(string); // 简体 => 繁体\ncnchar.convert.simpleToSpark(string); // 简体 => 火星文\ncnchar.convert.tradToSimple(string); // 繁体 => 简体\ncnchar.convert.tradToSpark(string); // 繁体 => 火星文\ncnchar.convert.sparkToSimple(string); // 火星文 => 简体\ncnchar.convert.sparkToTrad(string); // 火星文 => 繁体\nstring.convertSimpleToTrad();\nstring.convertSimpleToSpark();\nstring.convertTradToSimple();\nstring.convertTradToSpark();\nstring.convertSparkToSimple();\nstring.convertSparkToTrad();\n ")])],1),r._v(" "),n("p",[r._v("以下是几个实例:")]),r._v(" "),n("p",[n("codebox",{attrs:{id:"convert"}})],1)])}),[],!1,null,null,null);t.default=c.exports}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{620:function(r,t,n){"use strict";n.r(t);var a=n(21),c=Object(a.a)({},(function(){var r=this,t=r.$createElement,n=r._self._c||t;return n("ContentSlotsDistributor",{attrs:{"slot-key":r.$parent.slotKey}},[n("h2",{attrs:{id:"_1-介绍"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-介绍"}},[r._v("#")]),r._v(" 1. 介绍")]),r._v(" "),n("p",[n("code",[r._v("cnchar-trad")]),r._v(" 库是用于繁体字,除此之外,该库还提供繁体、简体、火星文之间的相互转换")]),r._v(" "),n("p",[r._v("引入该库之后,cnchar的所有api都支持 "),n("code",[r._v("simple")]),r._v("和"),n("code",[r._v("trad")]),r._v("参数,用于只使用简体或繁体,默认两种字体都使用")]),r._v(" "),n("p",[r._v("npm安装")]),r._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[r._v("npm i cnchar-trad\n")])])]),n("p",[r._v("cdn使用")]),r._v(" "),n("div",[n("highlight-code",{attrs:{lang:"html"}},[r._v('\n<script src="https://cdn.jsdelivr.net/npm/cnchar-trad/cnchar.trad.min.js"><\/script>\n ')])],1),r._v(" "),n("p",[r._v("使用")]),r._v(" "),n("div",[n("highlight-code",{attrs:{lang:"javascript"}},[r._v("\nimport cnchar from 'cnchar';\nimport trad from 'cnchar-trad';\ncnchar.use(trad); // use 在浏览器环境中非必须\n ")])],1),r._v(" "),n("h2",{attrs:{id:"_2-繁体字支持"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_2-繁体字支持"}},[r._v("#")]),r._v(" 2. 繁体字支持")]),r._v(" "),n("p",[r._v("以下演示几个繁体字支持的例子")]),r._v(" "),n("p",[n("codebox",{attrs:{id:"trad"}})],1),r._v(" "),n("h2",{attrs:{id:"_3-字体转换-convert"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_3-字体转换-convert"}},[r._v("#")]),r._v(" 3. 字体转换(convert)")]),r._v(" "),n("p",[r._v("引入 cnchar-trad 库之后,在cnchar上会生成一个 "),n("code",[r._v("convert")]),r._v(" 对象,功能是支持字体转换,另外在string.prototype 上也会附加上对应的方法,用法如下:")]),r._v(" "),n("div",[n("highlight-code",{attrs:{lang:"javascript"}},[r._v("\ncnchar.convert.simpleToTrad(string); // 简体 => 繁体\ncnchar.convert.simpleToSpark(string); // 简体 => 火星文\ncnchar.convert.tradToSimple(string); // 繁体 => 简体\ncnchar.convert.tradToSpark(string); // 繁体 => 火星文\ncnchar.convert.sparkToSimple(string); // 火星文 => 简体\ncnchar.convert.sparkToTrad(string); // 火星文 => 繁体\nstring.convertSimpleToTrad();\nstring.convertSimpleToSpark();\nstring.convertTradToSimple();\nstring.convertTradToSpark();\nstring.convertSparkToSimple();\nstring.convertSparkToTrad();\n ")])],1),r._v(" "),n("p",[r._v("以下是几个实例:")]),r._v(" "),n("p",[n("codebox",{attrs:{id:"convert"}})],1)])}),[],!1,null,null,null);t.default=c.exports}}]);
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{623:function(r,c,a){"use strict";a.r(c);var n=a(21),t=Object(n.a)({},(function(){var r=this,c=r.$createElement,a=r._self._c||c;return a("ContentSlotsDistributor",{attrs:{"slot-key":r.$parent.slotKey}},[a("h2",{attrs:{id:"_1-npm安装"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-npm安装"}},[r._v("#")]),r._v(" 1. npm安装")]),r._v(" "),a("p",[r._v("cnchar包含了一个基本库和四个功能库,用于实现不同的功能,您可以按需安装其中的功能库,但是 "),a("code",[r._v("cnchar")]),r._v(" 这个基础库是必须安装的")]),r._v(" "),a("p",[r._v("安装"),a("a",{attrs:{href:"https://npmjs.com/package/cnchar",target:"_blank",rel:"noopener noreferrer"}},[r._v("主库"),a("OutboundLink")],1),r._v(":")]),r._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[r._v("npm i cnchar\n")])])]),a("p",[r._v("按需安装功能库:")]),r._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[r._v("npm i cnchar-poly cnchar-order cnchar-trad cnchar-draw\n")])])]),a("p",[r._v("浏览器环境中功能库可以直接使用:")]),r._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[r._v("\n import cnchar from 'cnchar';\n // 以下功能库请按需使用\n import 'cnchar-poly';\n import 'cnchar-order';\n import 'cnchar-trad';\n import 'cnchar-draw';\n ")])],1),r._v(" "),a("p",[r._v("非浏览器环境中功能库需要使用use方法加载,且不支持 "),a("code",[r._v("cnchar-draw")]),r._v(" 库:")]),r._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[r._v("\n import cnchar from 'cnchar';\n // 以下功能库请按需使用\n import poly from 'cnchar-poly';\n import order from 'cnchar-order';\n import trad from 'cnchar-trad';\n cnchar.use(poly, order, trad);\n ")])],1),r._v(" "),a("p",[r._v("commonjs 模块")]),r._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[r._v("\n var cnchar = require('cnchar');\n // 以下功能库请按需使用\n var poly = require('cnchar-poly');\n var order = require('cnchar-order');\n var trad = require('cnchar-trad');\n cnchar.use(poly, order, trad);\n ")])],1),r._v(" "),a("h2",{attrs:{id:"_2-cdn引用"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-cdn引用"}},[r._v("#")]),r._v(" 2. CDN引用")]),r._v(" "),a("p",[r._v("使用 script 标签使用:")]),r._v(" "),a("div",[a("highlight-code",{attrs:{lang:"html"}},[r._v('\n <script src="https://cdn.jsdelivr.net/npm/cnchar/cnchar.min.js"><\/script>\n \x3c!--以下功能库请按需使用--\x3e\n <script src="https://cdn.jsdelivr.net/npm/cnchar-poly/cnchar.poly.min.js"><\/script>\n <script src="https://cdn.jsdelivr.net/npm/cnchar-order/cnchar.order.min.js"><\/script>\n <script src="https://cdn.jsdelivr.net/npm/cnchar-trad/cnchar.trad.min.js"><\/script>\n <script src="https://cdn.jsdelivr.net/npm/cnchar-draw/cnchar.draw.min.js"><\/script>\n ')])],1),r._v(" "),a("h2",{attrs:{id:"_3-cnchar-all"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-cnchar-all"}},[r._v("#")]),r._v(" 3. cnchar-all")]),r._v(" "),a("p",[r._v("如果您需要使用cnchar及其插件的所有功能,可以通过安装"),a("code",[r._v("cnchar-all")]),r._v("来使用完整功能,这个库引用了上面的五个库")]),r._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[r._v("npm i cnchar-all\n")])])]),a("p",[r._v("commonjs 模块")]),r._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[r._v("\n import cnchar from 'cnchar-all';\n ")])],1),r._v(" "),a("p",[r._v("cdn方式")]),r._v(" "),a("div",[a("highlight-code",{attrs:{lang:"html"}},[r._v('\n <script src="https://cdn.jsdelivr.net/npm/cnchar-all/cnchar.all.min.js"><\/script>\n ')])],1),r._v(" "),a("h2",{attrs:{id:"_4-简单使用"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-简单使用"}},[r._v("#")]),r._v(" 4. 简单使用")]),r._v(" "),a("p",[r._v("cnchar 具有两个最核心的方法"),a("code",[r._v("spell")]),r._v(" 和 "),a("code",[r._v("stroke")]),r._v(",分别用于获取汉字的拼音和笔画数:")]),r._v(" "),a("p",[a("codebox",{attrs:{id:"easy-use",title:"spell/stroke"}})],1),r._v(" "),a("p",[r._v("这只是一个最简单的使用,这两个方法具有很多参数可选,具体请参阅 "),a("a",{attrs:{href:""}},[r._v("cnchar")]),r._v(" 部分")])])}),[],!1,null,null,null);c.default=t.exports}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{622:function(r,c,a){"use strict";a.r(c);var n=a(21),t=Object(n.a)({},(function(){var r=this,c=r.$createElement,a=r._self._c||c;return a("ContentSlotsDistributor",{attrs:{"slot-key":r.$parent.slotKey}},[a("h2",{attrs:{id:"_1-npm安装"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-npm安装"}},[r._v("#")]),r._v(" 1. npm安装")]),r._v(" "),a("p",[r._v("cnchar包含了一个基本库和四个功能库,用于实现不同的功能,您可以按需安装其中的功能库,但是 "),a("code",[r._v("cnchar")]),r._v(" 这个基础库是必须安装的")]),r._v(" "),a("p",[r._v("安装"),a("a",{attrs:{href:"https://npmjs.com/package/cnchar",target:"_blank",rel:"noopener noreferrer"}},[r._v("主库"),a("OutboundLink")],1),r._v(":")]),r._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[r._v("npm i cnchar\n")])])]),a("p",[r._v("按需安装功能库:")]),r._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[r._v("npm i cnchar-poly cnchar-order cnchar-trad cnchar-draw\n")])])]),a("p",[r._v("浏览器环境中功能库可以直接使用:")]),r._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[r._v("\n import cnchar from 'cnchar';\n // 以下功能库请按需使用\n import 'cnchar-poly';\n import 'cnchar-order';\n import 'cnchar-trad';\n import 'cnchar-draw';\n ")])],1),r._v(" "),a("p",[r._v("非浏览器环境中功能库需要使用use方法加载,且不支持 "),a("code",[r._v("cnchar-draw")]),r._v(" 库:")]),r._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[r._v("\n import cnchar from 'cnchar';\n // 以下功能库请按需使用\n import poly from 'cnchar-poly';\n import order from 'cnchar-order';\n import trad from 'cnchar-trad';\n cnchar.use(poly, order, trad);\n ")])],1),r._v(" "),a("p",[r._v("commonjs 模块")]),r._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[r._v("\n var cnchar = require('cnchar');\n // 以下功能库请按需使用\n var poly = require('cnchar-poly');\n var order = require('cnchar-order');\n var trad = require('cnchar-trad');\n cnchar.use(poly, order, trad);\n ")])],1),r._v(" "),a("h2",{attrs:{id:"_2-cdn引用"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-cdn引用"}},[r._v("#")]),r._v(" 2. CDN引用")]),r._v(" "),a("p",[r._v("使用 script 标签使用:")]),r._v(" "),a("div",[a("highlight-code",{attrs:{lang:"html"}},[r._v('\n <script src="https://cdn.jsdelivr.net/npm/cnchar/cnchar.min.js"><\/script>\n \x3c!--以下功能库请按需使用--\x3e\n <script src="https://cdn.jsdelivr.net/npm/cnchar-poly/cnchar.poly.min.js"><\/script>\n <script src="https://cdn.jsdelivr.net/npm/cnchar-order/cnchar.order.min.js"><\/script>\n <script src="https://cdn.jsdelivr.net/npm/cnchar-trad/cnchar.trad.min.js"><\/script>\n <script src="https://cdn.jsdelivr.net/npm/cnchar-draw/cnchar.draw.min.js"><\/script>\n ')])],1),r._v(" "),a("h2",{attrs:{id:"_3-cnchar-all"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-cnchar-all"}},[r._v("#")]),r._v(" 3. cnchar-all")]),r._v(" "),a("p",[r._v("如果您需要使用cnchar及其插件的所有功能,可以通过安装"),a("code",[r._v("cnchar-all")]),r._v("来使用完整功能,这个库引用了上面的五个库")]),r._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[r._v("npm i cnchar-all\n")])])]),a("p",[r._v("commonjs 模块")]),r._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[r._v("\n import cnchar from 'cnchar-all';\n ")])],1),r._v(" "),a("p",[r._v("cdn方式")]),r._v(" "),a("div",[a("highlight-code",{attrs:{lang:"html"}},[r._v('\n <script src="https://cdn.jsdelivr.net/npm/cnchar-all/cnchar.all.min.js"><\/script>\n ')])],1),r._v(" "),a("h2",{attrs:{id:"_4-简单使用"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-简单使用"}},[r._v("#")]),r._v(" 4. 简单使用")]),r._v(" "),a("p",[r._v("cnchar 具有两个最核心的方法"),a("code",[r._v("spell")]),r._v(" 和 "),a("code",[r._v("stroke")]),r._v(",分别用于获取汉字的拼音和笔画数:")]),r._v(" "),a("p",[a("codebox",{attrs:{id:"easy-use",title:"spell/stroke"}})],1),r._v(" "),a("p",[r._v("这只是一个最简单的使用,这两个方法具有很多参数可选,具体请参阅 "),a("a",{attrs:{href:""}},[r._v("cnchar")]),r._v(" 部分")])])}),[],!1,null,null,null);c.default=t.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -8,25 +8,25 @@
|
|||
<meta name="generator" content="VuePress 1.4.0">
|
||||
<link rel="icon" href="https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/v1/images/i.ico">
|
||||
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.e22a701b.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.936adb96.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/assets/js/10.6983a4ff.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.1c094398.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/11.94c125ca.js"><link rel="prefetch" href="/cnchar/assets/js/12.9efd22de.js"><link rel="prefetch" href="/cnchar/assets/js/13.a75f5e37.js"><link rel="prefetch" href="/cnchar/assets/js/14.dcb336fd.js"><link rel="prefetch" href="/cnchar/assets/js/15.5320422e.js"><link rel="prefetch" href="/cnchar/assets/js/16.24698d0e.js"><link rel="prefetch" href="/cnchar/assets/js/17.01fbc09e.js"><link rel="prefetch" href="/cnchar/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/assets/js/8.716a2d5f.js"><link rel="prefetch" href="/cnchar/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.e22a701b.css">
|
||||
<link rel="preload" href="/cnchar/v2/assets/css/0.styles.9f430868.css" as="style"><link rel="preload" href="/cnchar/v2/assets/js/app.cb8474c5.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/10.6983a4ff.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/3.1c094398.js" as="script"><link rel="prefetch" href="/cnchar/v2/assets/js/11.cc6e19fc.js"><link rel="prefetch" href="/cnchar/v2/assets/js/12.462a0d66.js"><link rel="prefetch" href="/cnchar/v2/assets/js/13.d4dc98f5.js"><link rel="prefetch" href="/cnchar/v2/assets/js/14.f5f6672e.js"><link rel="prefetch" href="/cnchar/v2/assets/js/15.68737575.js"><link rel="prefetch" href="/cnchar/v2/assets/js/16.3053b002.js"><link rel="prefetch" href="/cnchar/v2/assets/js/17.0328be00.js"><link rel="prefetch" href="/cnchar/v2/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/v2/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/v2/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/v2/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/v2/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/v2/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/v2/assets/js/8.716a2d5f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/v2/assets/css/0.styles.9f430868.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/v2/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link router-link-exact-active router-link-active">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -34,21 +34,21 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link router-link-exact-active router-link-active">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -56,7 +56,7 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="active sidebar-link">cnchar</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_2-spell-方法" class="sidebar-link">2. spell 方法</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_3-stroke-方法" class="sidebar-link">3. stroke 方法</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_4-通过拼音查询原汉字" class="sidebar-link">4. 通过拼音查询原汉字</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_5-通过笔画数查询原汉字" class="sidebar-link">5. 通过笔画数查询原汉字</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_6-查询拼音详细信息" class="sidebar-link">6. 查询拼音详细信息</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_7-其他api" class="sidebar-link">7. 其他api</a></li></ul></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-介绍"><a href="#_1-介绍" class="header-anchor">#</a> 1. 介绍</h2> <p>cnchar 库是基本库,主要包含汉字 <code>拼音</code> 和 <code>笔画数</code> 的获取</p> <p>除此之外,还支持 <code>通过拼音查询原汉字</code>, <code>通过笔画数查询原汉字</code>, <code>查询拼音详细信息</code> 等功能</p> <p>ts类型声明:<a href="https://github.com/theajack/cnchar/blob/master/src/main/index.d.ts" target="_blank" rel="noopener noreferrer">cnchar.d.ts<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p> <h2 id="_2-spell-方法"><a href="#_2-spell-方法" class="header-anchor">#</a> 2. spell 方法</h2> <p>spell 方法用户获取汉字拼音,支持 数组分割、首字母,大小写、候选多音字、音调、繁简体功能</p> <h3 id="_2-1-api使用"><a href="#_2-1-api使用" class="header-anchor">#</a> 2.1. api使用</h3> <p>api调用方式如下,所有 arg 参数都是可选的</p> <div><pre><code class="hljs javascript">cnchar.spell(string,arg1,arg2,...);
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/v2/doc/cnchar.html" class="active sidebar-link">cnchar</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/cnchar.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/cnchar.html#_2-spell-方法" class="sidebar-link">2. spell 方法</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/cnchar.html#_3-stroke-方法" class="sidebar-link">3. stroke 方法</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/cnchar.html#_4-通过拼音查询原汉字" class="sidebar-link">4. 通过拼音查询原汉字</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/cnchar.html#_5-通过笔画数查询原汉字" class="sidebar-link">5. 通过笔画数查询原汉字</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/cnchar.html#_6-查询拼音详细信息" class="sidebar-link">6. 查询拼音详细信息</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/cnchar.html#_7-其他api" class="sidebar-link">7. 其他api</a></li></ul></li><li><a href="/cnchar/v2/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/v2/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/v2/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/v2/doc/draw.html" class="sidebar-link">cnchar-draw</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-介绍"><a href="#_1-介绍" class="header-anchor">#</a> 1. 介绍</h2> <p>cnchar 库是基本库,主要包含汉字 <code>拼音</code> 和 <code>笔画数</code> 的获取</p> <p>除此之外,还支持 <code>通过拼音查询原汉字</code>, <code>通过笔画数查询原汉字</code>, <code>查询拼音详细信息</code> 等功能</p> <p>ts类型声明:<a href="https://github.com/theajack/cnchar/blob/master/src/main/index.d.ts" target="_blank" rel="noopener noreferrer">cnchar.d.ts<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p> <h2 id="_2-spell-方法"><a href="#_2-spell-方法" class="header-anchor">#</a> 2. spell 方法</h2> <p>spell 方法用户获取汉字拼音,支持 数组分割、首字母,大小写、候选多音字、音调、繁简体功能</p> <h3 id="_2-1-api使用"><a href="#_2-1-api使用" class="header-anchor">#</a> 2.1. api使用</h3> <p>api调用方式如下,所有 arg 参数都是可选的</p> <div><pre><code class="hljs javascript">cnchar.spell(string,arg1,arg2,...);
|
||||
string.spell(arg1,arg2,...); <span class="hljs-comment">// string prototype 调用</span></code></pre></div> <p>以下是几个简单的例子:</p> <p><div class="code-box" data-v-54d15265><div data-v-54d15265><span class="code-title" data-v-54d15265>spell</span> <span class="code-desc" data-v-54d15265></span> <i title="在线运行" class="ei-play code-btn" data-v-54d15265></i> <i title="复制代码" class="ei-copy code-btn" data-v-54d15265></i></div> <pre data-v-54d15265><code class="hljs"></code></pre> <div style="display:none;" data-v-54d15265><div class="output-title" data-v-54d15265>运行结果</div> <div class="output-area" data-v-54d15265><div class="show-toggle" data-v-54d15265><i class="ei-angle-up" data-v-54d15265></i> <span class="show-text" data-v-54d15265>隐藏结果</span></div> <div style="display:;" data-v-54d15265></div></div></div> <div class="powered-by" data-v-54d15265>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-54d15265><i class="ei-cube-alt" data-v-54d15265></i> JSBox</a></div></div></p> <h3 id="_2-2-参数说明"><a href="#_2-2-参数说明" class="header-anchor">#</a> 2.2. 参数说明</h3> <p>arg 参数信息如下:</p> <table><thead><tr><th style="text-align:center;">参数</th> <th style="text-align:center;">作用</th> <th style="text-align:center;">是否默认</th> <th style="text-align:center;">依赖库</th> <th style="text-align:center;">备注</th></tr></thead> <tbody><tr><td style="text-align:center;">array</td> <td style="text-align:center;">返回数组</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">--</td></tr> <tr><td style="text-align:center;">first</td> <td style="text-align:center;">返回拼音首字母</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">--</td></tr> <tr><td style="text-align:center;">up</td> <td style="text-align:center;">将结果全部大写</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">--</td></tr> <tr><td style="text-align:center;">low</td> <td style="text-align:center;">将结果全部小写</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">会被 up 参数覆盖</td></tr> <tr><td style="text-align:center;">poly</td> <td style="text-align:center;">使用候选多音字</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">--</td></tr> <tr><td style="text-align:center;">tone</td> <td style="text-align:center;">启用音调</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">--</td></tr> <tr><td style="text-align:center;">simple</td> <td style="text-align:center;">是否禁用繁体字的拼音功能</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-trad</td> <td style="text-align:center;">使用 cnchar-trad 之后,默认对繁体字拼音进行转换,该参数用于禁用繁体字拼音</td></tr></tbody></table> <h2 id="_3-stroke-方法"><a href="#_3-stroke-方法" class="header-anchor">#</a> 3. stroke 方法</h2> <h3 id="_2-1-api使用-2"><a href="#_2-1-api使用-2" class="header-anchor">#</a> 2.1. api使用</h3> <p>api调用方式如下,所有 arg 参数都是可选的</p> <div><pre><code class="hljs javascript">cnchar.stroke(string,arg1,arg2,...);
|
||||
string.stroke(arg1,arg2,...); <span class="hljs-comment">// string prototype 调用</span></code></pre></div> <p>以下是几个简单的例子:</p> <p><div class="code-box" data-v-54d15265><div data-v-54d15265><span class="code-title" data-v-54d15265>stroke</span> <span class="code-desc" data-v-54d15265></span> <i title="在线运行" class="ei-play code-btn" data-v-54d15265></i> <i title="复制代码" class="ei-copy code-btn" data-v-54d15265></i></div> <pre data-v-54d15265><code class="hljs"></code></pre> <div style="display:none;" data-v-54d15265><div class="output-title" data-v-54d15265>运行结果</div> <div class="output-area" data-v-54d15265><div class="show-toggle" data-v-54d15265><i class="ei-angle-up" data-v-54d15265></i> <span class="show-text" data-v-54d15265>隐藏结果</span></div> <div style="display:;" data-v-54d15265></div></div></div> <div class="powered-by" data-v-54d15265>
|
||||
|
@ -84,11 +84,11 @@ cnchar.use(poly, order, trad); <span class="hljs-comment">// 参数顺序无关
|
|||
<span class="hljs-keyword">import</span> <span class="hljs-string">'cnchar-draw'</span>;</code></pre></div> <h3 id="_7-2-type"><a href="#_7-2-type" class="header-anchor">#</a> 7.2 .type</h3> <p>type 对象用户获取当前可用的 <code>spell</code> 、 <code>stroke</code> 、 <code>orderToWord</code> 、<code>spellToWord</code>、<code>strokeToWord</code> 参数类型:</p> <p><div class="code-box" data-v-54d15265><div data-v-54d15265><span class="code-title" data-v-54d15265>type</span> <span class="code-desc" data-v-54d15265></span> <i title="在线运行" class="ei-play code-btn" data-v-54d15265></i> <i title="复制代码" class="ei-copy code-btn" data-v-54d15265></i></div> <pre data-v-54d15265><code class="hljs"></code></pre> <div style="display:none;" data-v-54d15265><div class="output-title" data-v-54d15265>运行结果</div> <div class="output-area" data-v-54d15265><div class="show-toggle" data-v-54d15265><i class="ei-angle-up" data-v-54d15265></i> <span class="show-text" data-v-54d15265>隐藏结果</span></div> <div style="display:;" data-v-54d15265></div></div></div> <div class="powered-by" data-v-54d15265>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-54d15265><i class="ei-cube-alt" data-v-54d15265></i> JSBox</a></div></div></p> <h3 id="_7-3-check"><a href="#_7-3-check" class="header-anchor">#</a> 7.3 .check</h3> <p>该值是一个 布尔类型,用于控制是否开启参数校验,默认值为 true</p> <p>cnchar带有的参数校验功能能够对 <code>spell</code> 和 <code>stroke</code> 传入的参数进行检查,在控制台显示 <code>无效·</code>,<code>忽略</code>和<code>冗余</code>的参数</p> <div><pre><code class="hljs javascript">cnchar.check = <span class="hljs-literal">false</span>; <span class="hljs-comment">// 关闭参数校验</span></code></pre></div> <h3 id="_7-4-version"><a href="#_7-4-version" class="header-anchor">#</a> 7.4 .version</h3> <p>获取当前版本:</p> <p><div class="code-box" data-v-54d15265><div data-v-54d15265><span class="code-title" data-v-54d15265>version</span> <span class="code-desc" data-v-54d15265></span> <i title="在线运行" class="ei-play code-btn" data-v-54d15265></i> <i title="复制代码" class="ei-copy code-btn" data-v-54d15265></i></div> <pre data-v-54d15265><code class="hljs"></code></pre> <div style="display:none;" data-v-54d15265><div class="output-title" data-v-54d15265>运行结果</div> <div class="output-area" data-v-54d15265><div class="show-toggle" data-v-54d15265><i class="ei-angle-up" data-v-54d15265></i> <span class="show-text" data-v-54d15265>隐藏结果</span></div> <div style="display:;" data-v-54d15265></div></div></div> <div class="powered-by" data-v-54d15265>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-54d15265><i class="ei-cube-alt" data-v-54d15265></i> JSBox</a></div></div></p> <h3 id="_7-5-plugins"><a href="#_7-5-plugins" class="header-anchor">#</a> 7.5 .plugins</h3> <p>当前使用的功能库列表,最多的情况为 <code>["order", "trad", "poly", "draw"]</code></p> <p><div class="code-box" data-v-54d15265><div data-v-54d15265><span class="code-title" data-v-54d15265>plugins</span> <span class="code-desc" data-v-54d15265></span> <i title="在线运行" class="ei-play code-btn" data-v-54d15265></i> <i title="复制代码" class="ei-copy code-btn" data-v-54d15265></i></div> <pre data-v-54d15265><code class="hljs"></code></pre> <div style="display:none;" data-v-54d15265><div class="output-title" data-v-54d15265>运行结果</div> <div class="output-area" data-v-54d15265><div class="show-toggle" data-v-54d15265><i class="ei-angle-up" data-v-54d15265></i> <span class="show-text" data-v-54d15265>隐藏结果</span></div> <div style="display:;" data-v-54d15265></div></div></div> <div class="powered-by" data-v-54d15265>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-54d15265><i class="ei-cube-alt" data-v-54d15265></i> JSBox</a></div></div></p></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">4/12/2020, 10:44:57 PM</span></div></footer> <div class="page-nav"><p class="inner"><!----> <span class="next"><a href="/cnchar/doc/poly.html">
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-54d15265><i class="ei-cube-alt" data-v-54d15265></i> JSBox</a></div></div></p></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">4/12/2020, 10:44:57 PM</span></div></footer> <div class="page-nav"><p class="inner"><!----> <span class="next"><a href="/cnchar/v2/doc/poly.html">
|
||||
cnchar-poly
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.936adb96.js" defer></script><script src="/cnchar/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/assets/js/10.6983a4ff.js" defer></script><script src="/cnchar/assets/js/3.1c094398.js" defer></script>
|
||||
<script src="/cnchar/v2/assets/js/app.cb8474c5.js" defer></script><script src="/cnchar/v2/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/v2/assets/js/10.6983a4ff.js" defer></script><script src="/cnchar/v2/assets/js/3.1c094398.js" defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -8,25 +8,25 @@
|
|||
<meta name="generator" content="VuePress 1.4.0">
|
||||
<link rel="icon" href="https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/v1/images/i.ico">
|
||||
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.e22a701b.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.936adb96.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/assets/js/11.94c125ca.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.1c094398.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/assets/js/12.9efd22de.js"><link rel="prefetch" href="/cnchar/assets/js/13.a75f5e37.js"><link rel="prefetch" href="/cnchar/assets/js/14.dcb336fd.js"><link rel="prefetch" href="/cnchar/assets/js/15.5320422e.js"><link rel="prefetch" href="/cnchar/assets/js/16.24698d0e.js"><link rel="prefetch" href="/cnchar/assets/js/17.01fbc09e.js"><link rel="prefetch" href="/cnchar/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/assets/js/8.716a2d5f.js"><link rel="prefetch" href="/cnchar/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.e22a701b.css">
|
||||
<link rel="preload" href="/cnchar/v2/assets/css/0.styles.9f430868.css" as="style"><link rel="preload" href="/cnchar/v2/assets/js/app.cb8474c5.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/11.cc6e19fc.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/3.1c094398.js" as="script"><link rel="prefetch" href="/cnchar/v2/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/v2/assets/js/12.462a0d66.js"><link rel="prefetch" href="/cnchar/v2/assets/js/13.d4dc98f5.js"><link rel="prefetch" href="/cnchar/v2/assets/js/14.f5f6672e.js"><link rel="prefetch" href="/cnchar/v2/assets/js/15.68737575.js"><link rel="prefetch" href="/cnchar/v2/assets/js/16.3053b002.js"><link rel="prefetch" href="/cnchar/v2/assets/js/17.0328be00.js"><link rel="prefetch" href="/cnchar/v2/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/v2/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/v2/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/v2/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/v2/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/v2/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/v2/assets/js/8.716a2d5f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/v2/assets/css/0.styles.9f430868.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/v2/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -34,21 +34,21 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -56,7 +56,7 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="active sidebar-link">cnchar-draw</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/draw.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/draw.html#_2-使用" class="sidebar-link">2. 使用</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/draw.html#_3-常规绘制实例" class="sidebar-link">3. 常规绘制实例</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/draw.html#_4-笔顺绘制实例" class="sidebar-link">4. 笔顺绘制实例</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/draw.html#_5-动画绘制模式" class="sidebar-link">5. 动画绘制模式</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/draw.html#_6-测验模式" class="sidebar-link">6. 测验模式</a></li></ul></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-介绍"><a href="#_1-介绍" class="header-anchor">#</a> 1. 介绍</h2> <p><code>cnchar-draw</code> 库的汉字绘制功能封装基于 <a href="https://github.com/chanind/hanzi-writer" target="_blank" rel="noopener noreferrer">hanzi-writer<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>, 特此表示感谢!</p> <p><code>cnchar-draw</code> 库是用于支持可视化绘制汉字,有 normal,animation,stroke,test 四种模式可选,该库仅在浏览器环境下可用,且该库支持脱离cnchar使用</p> <p>另外,该库支持繁体字且不依赖 <code>cnahr-trad</code>库</p> <p>draw 的参数比较繁多,首先需要理解的是,draw 分为四种绘制模式:</p> <ul><li>normal: 常规绘制</li> <li>animation: 带有绘制动画,支持连续绘制、同时绘制、循环绘制</li> <li>stroke: 按汉字笔顺单步绘制</li> <li>test: 测试模式,用户可以在容器内绘制汉字,cnchar-draw会检测是否绘制正确</li></ul> <p>具体使用也可以参考<code>cnchar-draw</code>的类型声明文件:<a href="https://github.com/theajack/cnchar/blob/master/src/plugin/draw/index.d.ts" target="_blank" rel="noopener noreferrer">cnchar.draw.d.ts<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p> <p>npm安装</p> <div class="language- extra-class"><pre class="language-text"><code>npm i cnchar-draw
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/v2/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/v2/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/v2/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/v2/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/v2/doc/draw.html" class="active sidebar-link">cnchar-draw</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/draw.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/draw.html#_2-使用" class="sidebar-link">2. 使用</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/draw.html#_3-常规绘制实例" class="sidebar-link">3. 常规绘制实例</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/draw.html#_4-笔顺绘制实例" class="sidebar-link">4. 笔顺绘制实例</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/draw.html#_5-动画绘制模式" class="sidebar-link">5. 动画绘制模式</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/draw.html#_6-测验模式" class="sidebar-link">6. 测验模式</a></li></ul></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-介绍"><a href="#_1-介绍" class="header-anchor">#</a> 1. 介绍</h2> <p><code>cnchar-draw</code> 库的汉字绘制功能封装基于 <a href="https://github.com/chanind/hanzi-writer" target="_blank" rel="noopener noreferrer">hanzi-writer<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>, 特此表示感谢!</p> <p><code>cnchar-draw</code> 库是用于支持可视化绘制汉字,有 normal,animation,stroke,test 四种模式可选,该库仅在浏览器环境下可用,且该库支持脱离cnchar使用</p> <p>另外,该库支持繁体字且不依赖 <code>cnahr-trad</code>库</p> <p>draw 的参数比较繁多,首先需要理解的是,draw 分为四种绘制模式:</p> <ul><li>normal: 常规绘制</li> <li>animation: 带有绘制动画,支持连续绘制、同时绘制、循环绘制</li> <li>stroke: 按汉字笔顺单步绘制</li> <li>test: 测试模式,用户可以在容器内绘制汉字,cnchar-draw会检测是否绘制正确</li></ul> <p>具体使用也可以参考<code>cnchar-draw</code>的类型声明文件:<a href="https://github.com/theajack/cnchar/blob/master/src/plugin/draw/index.d.ts" target="_blank" rel="noopener noreferrer">cnchar.draw.d.ts<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p> <p>npm安装</p> <div class="language- extra-class"><pre class="language-text"><code>npm i cnchar-draw
|
||||
</code></pre></div><p>cdn使用</p> <div><pre><code class="hljs html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/cnchar-draw/cnchar.draw.min.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre></div> <p>使用</p> <div><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> cnchar <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar'</span>;
|
||||
<span class="hljs-keyword">import</span> draw <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar-draw'</span>;
|
||||
cnchar.use(draw); <span class="hljs-comment">// use 在浏览器环境中非必须</span></code></pre></div> <p>脱离cnchar 独立使用</p> <div><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> draw <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar-draw'</span>;
|
||||
|
@ -110,9 +110,9 @@ draw(<span class="hljs-string">'你好'</span>)</code></pre></div> <h2 id="_2-
|
|||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-54d15265><i class="ei-cube-alt" data-v-54d15265></i> JSBox</a></div></div></p> <h2 id="_6-测验模式"><a href="#_6-测验模式" class="header-anchor">#</a> 6. 测验模式</h2> <p>当<code>type=test</code>时,测验模式启用,该模式用户可以在容器内绘制汉字,cnchar-draw会检测是否绘制正确</p> <p>请用鼠标在绘制出的<strong>测验</strong>两个字上按顺序画上笔画</p> <p><div class="code-box" data-v-54d15265><div data-v-54d15265><span class="code-title" data-v-54d15265>test-draw</span> <span class="code-desc" data-v-54d15265></span> <i title="在线运行" class="ei-play code-btn" data-v-54d15265></i> <i title="复制代码" class="ei-copy code-btn" data-v-54d15265></i></div> <pre data-v-54d15265><code class="hljs"></code></pre> <div style="display:none;" data-v-54d15265><div class="output-title" data-v-54d15265>运行结果</div> <div class="output-area" data-v-54d15265><div class="show-toggle" data-v-54d15265><i class="ei-angle-up" data-v-54d15265></i> <span class="show-text" data-v-54d15265>隐藏结果</span></div> <div style="display:;" data-v-54d15265></div></div></div> <div class="powered-by" data-v-54d15265>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-54d15265><i class="ei-cube-alt" data-v-54d15265></i> JSBox</a></div></div></p></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">4/13/2020, 4:46:50 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/trad.html" class="prev">
|
||||
<a href="/cnchar/v2/doc/trad.html" class="prev">
|
||||
cnchar-trad
|
||||
</a></span> <!----></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.936adb96.js" defer></script><script src="/cnchar/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/assets/js/11.94c125ca.js" defer></script><script src="/cnchar/assets/js/3.1c094398.js" defer></script>
|
||||
<script src="/cnchar/v2/assets/js/app.cb8474c5.js" defer></script><script src="/cnchar/v2/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/v2/assets/js/11.cc6e19fc.js" defer></script><script src="/cnchar/v2/assets/js/3.1c094398.js" defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -8,25 +8,25 @@
|
|||
<meta name="generator" content="VuePress 1.4.0">
|
||||
<link rel="icon" href="https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/v1/images/i.ico">
|
||||
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.e22a701b.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.936adb96.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/assets/js/9.5b3a4467.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/assets/js/11.94c125ca.js"><link rel="prefetch" href="/cnchar/assets/js/12.9efd22de.js"><link rel="prefetch" href="/cnchar/assets/js/13.a75f5e37.js"><link rel="prefetch" href="/cnchar/assets/js/14.dcb336fd.js"><link rel="prefetch" href="/cnchar/assets/js/15.5320422e.js"><link rel="prefetch" href="/cnchar/assets/js/16.24698d0e.js"><link rel="prefetch" href="/cnchar/assets/js/17.01fbc09e.js"><link rel="prefetch" href="/cnchar/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/assets/js/3.1c094398.js"><link rel="prefetch" href="/cnchar/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/assets/js/8.716a2d5f.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.e22a701b.css">
|
||||
<link rel="preload" href="/cnchar/v2/assets/css/0.styles.9f430868.css" as="style"><link rel="preload" href="/cnchar/v2/assets/js/app.cb8474c5.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/9.5b3a4467.js" as="script"><link rel="prefetch" href="/cnchar/v2/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/v2/assets/js/11.cc6e19fc.js"><link rel="prefetch" href="/cnchar/v2/assets/js/12.462a0d66.js"><link rel="prefetch" href="/cnchar/v2/assets/js/13.d4dc98f5.js"><link rel="prefetch" href="/cnchar/v2/assets/js/14.f5f6672e.js"><link rel="prefetch" href="/cnchar/v2/assets/js/15.68737575.js"><link rel="prefetch" href="/cnchar/v2/assets/js/16.3053b002.js"><link rel="prefetch" href="/cnchar/v2/assets/js/17.0328be00.js"><link rel="prefetch" href="/cnchar/v2/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/v2/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/v2/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/3.1c094398.js"><link rel="prefetch" href="/cnchar/v2/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/v2/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/v2/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/v2/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/v2/assets/js/8.716a2d5f.js">
|
||||
<link rel="stylesheet" href="/cnchar/v2/assets/css/0.styles.9f430868.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/v2/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -34,21 +34,21 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -56,7 +56,7 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="组件说明"><a href="#组件说明" class="header-anchor">#</a> 组件说明</h1></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">4/10/2020, 12:11:14 AM</span></div></footer> <!----> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.936adb96.js" defer></script><script src="/cnchar/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/assets/js/9.5b3a4467.js" defer></script>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/v2/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/v2/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/v2/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/v2/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/v2/doc/draw.html" class="sidebar-link">cnchar-draw</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="组件说明"><a href="#组件说明" class="header-anchor">#</a> 组件说明</h1></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">4/10/2020, 12:11:14 AM</span></div></footer> <!----> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/v2/assets/js/app.cb8474c5.js" defer></script><script src="/cnchar/v2/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/v2/assets/js/9.5b3a4467.js" defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -8,25 +8,25 @@
|
|||
<meta name="generator" content="VuePress 1.4.0">
|
||||
<link rel="icon" href="https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/v1/images/i.ico">
|
||||
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.e22a701b.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.936adb96.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/assets/js/12.9efd22de.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.1c094398.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/assets/js/11.94c125ca.js"><link rel="prefetch" href="/cnchar/assets/js/13.a75f5e37.js"><link rel="prefetch" href="/cnchar/assets/js/14.dcb336fd.js"><link rel="prefetch" href="/cnchar/assets/js/15.5320422e.js"><link rel="prefetch" href="/cnchar/assets/js/16.24698d0e.js"><link rel="prefetch" href="/cnchar/assets/js/17.01fbc09e.js"><link rel="prefetch" href="/cnchar/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/assets/js/8.716a2d5f.js"><link rel="prefetch" href="/cnchar/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.e22a701b.css">
|
||||
<link rel="preload" href="/cnchar/v2/assets/css/0.styles.9f430868.css" as="style"><link rel="preload" href="/cnchar/v2/assets/js/app.cb8474c5.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/12.462a0d66.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/3.1c094398.js" as="script"><link rel="prefetch" href="/cnchar/v2/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/v2/assets/js/11.cc6e19fc.js"><link rel="prefetch" href="/cnchar/v2/assets/js/13.d4dc98f5.js"><link rel="prefetch" href="/cnchar/v2/assets/js/14.f5f6672e.js"><link rel="prefetch" href="/cnchar/v2/assets/js/15.68737575.js"><link rel="prefetch" href="/cnchar/v2/assets/js/16.3053b002.js"><link rel="prefetch" href="/cnchar/v2/assets/js/17.0328be00.js"><link rel="prefetch" href="/cnchar/v2/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/v2/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/v2/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/v2/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/v2/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/v2/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/v2/assets/js/8.716a2d5f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/v2/assets/css/0.styles.9f430868.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/v2/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -34,21 +34,21 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -56,7 +56,7 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="active sidebar-link">cnchar-order</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/order.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/order.html#_2-stroke参数" class="sidebar-link">2. stroke参数</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/order.html#_3-实例" class="sidebar-link">3. 实例</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/order.html#_4-笔画推出原汉字-ordertoword" class="sidebar-link">4. 笔画推出原汉字(orderToWord)</a></li></ul></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-介绍"><a href="#_1-介绍" class="header-anchor">#</a> 1. 介绍</h2> <p><code>cnchar-order</code> 库是用于支持获取汉字笔顺及其名称、形状,除此之外,该库还提供一个<code>orderToWord</code>方法,可以根据笔画序列推出原汉字,以及提供一个汉字所有笔划的json属性</p> <p>引入该库之后,<code>cnchar.stroke()</code> 方法才会支持 <code>order</code> 等参数</p> <p>npm安装</p> <div class="language- extra-class"><pre class="language-text"><code>npm i cnchar-order
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/v2/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/v2/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/v2/doc/order.html" class="active sidebar-link">cnchar-order</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/order.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/order.html#_2-stroke参数" class="sidebar-link">2. stroke参数</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/order.html#_3-实例" class="sidebar-link">3. 实例</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/order.html#_4-笔画推出原汉字-ordertoword" class="sidebar-link">4. 笔画推出原汉字(orderToWord)</a></li></ul></li><li><a href="/cnchar/v2/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/v2/doc/draw.html" class="sidebar-link">cnchar-draw</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-介绍"><a href="#_1-介绍" class="header-anchor">#</a> 1. 介绍</h2> <p><code>cnchar-order</code> 库是用于支持获取汉字笔顺及其名称、形状,除此之外,该库还提供一个<code>orderToWord</code>方法,可以根据笔画序列推出原汉字,以及提供一个汉字所有笔划的json属性</p> <p>引入该库之后,<code>cnchar.stroke()</code> 方法才会支持 <code>order</code> 等参数</p> <p>npm安装</p> <div class="language- extra-class"><pre class="language-text"><code>npm i cnchar-order
|
||||
</code></pre></div><p>cdn使用</p> <div><pre><code class="hljs html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/cnchar-order/cnchar.order.min.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre></div> <p>使用</p> <div><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> cnchar <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar'</span>;
|
||||
<span class="hljs-keyword">import</span> order <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar-order'</span>;
|
||||
cnchar.use(order); <span class="hljs-comment">// use 在浏览器环境中非必须</span></code></pre></div> <h2 id="_2-stroke参数"><a href="#_2-stroke参数" class="header-anchor">#</a> 2. stroke参数</h2> <table><thead><tr><th style="text-align:center;">参数</th> <th style="text-align:center;">作用</th> <th style="text-align:center;">是否默认</th> <th style="text-align:center;">依赖库</th> <th style="text-align:center;">备注</th></tr></thead> <tbody><tr><td style="text-align:center;">array</td> <td style="text-align:center;">返回数组</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">使用 cnchar-order 且启用 order 参数后该参数被忽略</td></tr> <tr><td style="text-align:center;">order</td> <td style="text-align:center;">启用笔画顺序</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-order</td> <td style="text-align:center;">--</td></tr> <tr><td style="text-align:center;">letter</td> <td style="text-align:center;">使用笔画顺序字母序列</td> <td style="text-align:center;">是</td> <td style="text-align:center;">cnchar-order</td> <td style="text-align:center;">当启用 order 后,该值是默认值</td></tr> <tr><td style="text-align:center;">detail</td> <td style="text-align:center;">使用笔画顺序详情作为返回值,每个汉字对应一个 json</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-order</td> <td style="text-align:center;">优先级小于 letter</td></tr> <tr><td style="text-align:center;">shape</td> <td style="text-align:center;">使用笔画形状作为返回值</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-order</td> <td style="text-align:center;">优先级小于 detail</td></tr> <tr><td style="text-align:center;">name</td> <td style="text-align:center;">使用笔画名称作为返回值</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-order</td> <td style="text-align:center;">优先级小于 shape</td></tr> <tr><td style="text-align:center;">count</td> <td style="text-align:center;">使用笔画数作为返回值</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-poly</td> <td style="text-align:center;">优先级小于 name</td></tr> <tr><td style="text-align:center;">simple</td> <td style="text-align:center;">是否禁用繁体字的笔画功能</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-trad</td> <td style="text-align:center;">使用 cnchar-trad 之后,默认对繁体字启用笔画功能,该参数用于禁用繁体字笔画功能</td></tr></tbody></table> <p>以上五种模式优先级为 <strong>letter < detail < shape < name < count</strong></p> <h2 id="_3-实例"><a href="#_3-实例" class="header-anchor">#</a> 3. 实例</h2> <p>以下演示几个多音词的例子</p> <p><div class="code-box" data-v-54d15265><div data-v-54d15265><span class="code-title" data-v-54d15265>order</span> <span class="code-desc" data-v-54d15265></span> <i title="在线运行" class="ei-play code-btn" data-v-54d15265></i> <i title="复制代码" class="ei-copy code-btn" data-v-54d15265></i></div> <pre data-v-54d15265><code class="hljs"></code></pre> <div style="display:none;" data-v-54d15265><div class="output-title" data-v-54d15265>运行结果</div> <div class="output-area" data-v-54d15265><div class="show-toggle" data-v-54d15265><i class="ei-angle-up" data-v-54d15265></i> <span class="show-text" data-v-54d15265>隐藏结果</span></div> <div style="display:;" data-v-54d15265></div></div></div> <div class="powered-by" data-v-54d15265>
|
||||
|
@ -65,13 +65,13 @@ cnchar.use(order); <span class="hljs-comment">// use 在浏览器环境中非必
|
|||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-54d15265><i class="ei-cube-alt" data-v-54d15265></i> JSBox</a></div></div></p> <p>注:其中以下五对笔画没有进行区分,使用的是同样的字母表示:
|
||||
<strong>卧钩 = 斜钩</strong>、<strong>横折弯 = 横折折</strong>、<strong>横折折折钩 = 横撇弯钩</strong>、<strong>横撇 = 横钩</strong>、<strong>竖折折 = 竖折撇</strong></p></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">4/12/2020, 10:44:57 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/poly.html" class="prev">
|
||||
<a href="/cnchar/v2/doc/poly.html" class="prev">
|
||||
cnchar-poly
|
||||
</a></span> <span class="next"><a href="/cnchar/doc/trad.html">
|
||||
</a></span> <span class="next"><a href="/cnchar/v2/doc/trad.html">
|
||||
cnchar-trad
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.936adb96.js" defer></script><script src="/cnchar/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/assets/js/12.9efd22de.js" defer></script><script src="/cnchar/assets/js/3.1c094398.js" defer></script>
|
||||
<script src="/cnchar/v2/assets/js/app.cb8474c5.js" defer></script><script src="/cnchar/v2/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/v2/assets/js/12.462a0d66.js" defer></script><script src="/cnchar/v2/assets/js/3.1c094398.js" defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -8,25 +8,25 @@
|
|||
<meta name="generator" content="VuePress 1.4.0">
|
||||
<link rel="icon" href="https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/v1/images/i.ico">
|
||||
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.e22a701b.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.936adb96.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/assets/js/13.a75f5e37.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.1c094398.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/assets/js/11.94c125ca.js"><link rel="prefetch" href="/cnchar/assets/js/12.9efd22de.js"><link rel="prefetch" href="/cnchar/assets/js/14.dcb336fd.js"><link rel="prefetch" href="/cnchar/assets/js/15.5320422e.js"><link rel="prefetch" href="/cnchar/assets/js/16.24698d0e.js"><link rel="prefetch" href="/cnchar/assets/js/17.01fbc09e.js"><link rel="prefetch" href="/cnchar/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/assets/js/8.716a2d5f.js"><link rel="prefetch" href="/cnchar/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.e22a701b.css">
|
||||
<link rel="preload" href="/cnchar/v2/assets/css/0.styles.9f430868.css" as="style"><link rel="preload" href="/cnchar/v2/assets/js/app.cb8474c5.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/13.d4dc98f5.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/3.1c094398.js" as="script"><link rel="prefetch" href="/cnchar/v2/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/v2/assets/js/11.cc6e19fc.js"><link rel="prefetch" href="/cnchar/v2/assets/js/12.462a0d66.js"><link rel="prefetch" href="/cnchar/v2/assets/js/14.f5f6672e.js"><link rel="prefetch" href="/cnchar/v2/assets/js/15.68737575.js"><link rel="prefetch" href="/cnchar/v2/assets/js/16.3053b002.js"><link rel="prefetch" href="/cnchar/v2/assets/js/17.0328be00.js"><link rel="prefetch" href="/cnchar/v2/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/v2/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/v2/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/v2/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/v2/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/v2/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/v2/assets/js/8.716a2d5f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/v2/assets/css/0.styles.9f430868.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/v2/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -34,21 +34,21 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -56,19 +56,19 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="active sidebar-link">cnchar-poly</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/poly.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/poly.html#_2-实例" class="sidebar-link">2. 实例</a></li></ul></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-介绍"><a href="#_1-介绍" class="header-anchor">#</a> 1. 介绍</h2> <p><code>cnchar-poly</code> 库是用于支持多音词的库,该库本身并不提供新的api</p> <p>引入该库之后,<code>cnchar.spell()</code> 方法才会支持多音词,否则对于多音字会返回默认读音</p> <p>npm安装</p> <div class="language- extra-class"><pre class="language-text"><code>npm i cnchar-poly
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/v2/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/v2/doc/poly.html" class="active sidebar-link">cnchar-poly</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/poly.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/poly.html#_2-实例" class="sidebar-link">2. 实例</a></li></ul></li><li><a href="/cnchar/v2/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/v2/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/v2/doc/draw.html" class="sidebar-link">cnchar-draw</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-介绍"><a href="#_1-介绍" class="header-anchor">#</a> 1. 介绍</h2> <p><code>cnchar-poly</code> 库是用于支持多音词的库,该库本身并不提供新的api</p> <p>引入该库之后,<code>cnchar.spell()</code> 方法才会支持多音词,否则对于多音字会返回默认读音</p> <p>npm安装</p> <div class="language- extra-class"><pre class="language-text"><code>npm i cnchar-poly
|
||||
</code></pre></div><p>cdn使用</p> <div><pre><code class="hljs html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/cnchar-poly/cnchar.poly.min.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre></div> <p>使用</p> <div><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> cnchar <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar'</span>;
|
||||
<span class="hljs-keyword">import</span> poly <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar-poly'</span>;
|
||||
cnchar.use(poly); <span class="hljs-comment">// use 在浏览器环境中非必须</span></code></pre></div> <h2 id="_2-实例"><a href="#_2-实例" class="header-anchor">#</a> 2. 实例</h2> <p>以下演示几个多音词的例子</p> <p><div class="code-box" data-v-54d15265><div data-v-54d15265><span class="code-title" data-v-54d15265>poly</span> <span class="code-desc" data-v-54d15265></span> <i title="在线运行" class="ei-play code-btn" data-v-54d15265></i> <i title="复制代码" class="ei-copy code-btn" data-v-54d15265></i></div> <pre data-v-54d15265><code class="hljs"></code></pre> <div style="display:none;" data-v-54d15265><div class="output-title" data-v-54d15265>运行结果</div> <div class="output-area" data-v-54d15265><div class="show-toggle" data-v-54d15265><i class="ei-angle-up" data-v-54d15265></i> <span class="show-text" data-v-54d15265>隐藏结果</span></div> <div style="display:;" data-v-54d15265></div></div></div> <div class="powered-by" data-v-54d15265>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-54d15265><i class="ei-cube-alt" data-v-54d15265></i> JSBox</a></div></div></p> <p>由于多音词依赖分词与词库,且cnchar是一个静态的js库,所以可能会有诸多不准确的读音</p> <p>如果遇到不准缺的多音词,欢迎提<a href="https://github.com/theajack/cnchar/issues/new" target="_blank" rel="noopener noreferrer">issue或pr<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">4/12/2020, 10:44:57 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/cnchar.html" class="prev">
|
||||
<a href="/cnchar/v2/doc/cnchar.html" class="prev">
|
||||
cnchar
|
||||
</a></span> <span class="next"><a href="/cnchar/doc/order.html">
|
||||
</a></span> <span class="next"><a href="/cnchar/v2/doc/order.html">
|
||||
cnchar-order
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.936adb96.js" defer></script><script src="/cnchar/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/assets/js/13.a75f5e37.js" defer></script><script src="/cnchar/assets/js/3.1c094398.js" defer></script>
|
||||
<script src="/cnchar/v2/assets/js/app.cb8474c5.js" defer></script><script src="/cnchar/v2/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/v2/assets/js/13.d4dc98f5.js" defer></script><script src="/cnchar/v2/assets/js/3.1c094398.js" defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -8,25 +8,25 @@
|
|||
<meta name="generator" content="VuePress 1.4.0">
|
||||
<link rel="icon" href="https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/v1/images/i.ico">
|
||||
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.e22a701b.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.936adb96.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/assets/js/14.dcb336fd.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.1c094398.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/assets/js/11.94c125ca.js"><link rel="prefetch" href="/cnchar/assets/js/12.9efd22de.js"><link rel="prefetch" href="/cnchar/assets/js/13.a75f5e37.js"><link rel="prefetch" href="/cnchar/assets/js/15.5320422e.js"><link rel="prefetch" href="/cnchar/assets/js/16.24698d0e.js"><link rel="prefetch" href="/cnchar/assets/js/17.01fbc09e.js"><link rel="prefetch" href="/cnchar/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/assets/js/8.716a2d5f.js"><link rel="prefetch" href="/cnchar/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.e22a701b.css">
|
||||
<link rel="preload" href="/cnchar/v2/assets/css/0.styles.9f430868.css" as="style"><link rel="preload" href="/cnchar/v2/assets/js/app.cb8474c5.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/14.f5f6672e.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/3.1c094398.js" as="script"><link rel="prefetch" href="/cnchar/v2/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/v2/assets/js/11.cc6e19fc.js"><link rel="prefetch" href="/cnchar/v2/assets/js/12.462a0d66.js"><link rel="prefetch" href="/cnchar/v2/assets/js/13.d4dc98f5.js"><link rel="prefetch" href="/cnchar/v2/assets/js/15.68737575.js"><link rel="prefetch" href="/cnchar/v2/assets/js/16.3053b002.js"><link rel="prefetch" href="/cnchar/v2/assets/js/17.0328be00.js"><link rel="prefetch" href="/cnchar/v2/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/v2/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/v2/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/v2/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/v2/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/v2/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/v2/assets/js/8.716a2d5f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/v2/assets/css/0.styles.9f430868.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/v2/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -34,21 +34,21 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -56,7 +56,7 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="active sidebar-link">cnchar-trad</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/trad.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/trad.html#_2-繁体字支持" class="sidebar-link">2. 繁体字支持</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/trad.html#_3-字体转换-convert" class="sidebar-link">3. 字体转换(convert)</a></li></ul></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-介绍"><a href="#_1-介绍" class="header-anchor">#</a> 1. 介绍</h2> <p><code>cnchar-trad</code> 库是用于繁体字,除此之外,该库还提供繁体、简体、火星文之间的相互转换</p> <p>引入该库之后,cnchar的所有api都支持 <code>simple</code>和<code>trad</code>参数,用于只使用简体或繁体,默认两种字体都使用</p> <p>npm安装</p> <div class="language- extra-class"><pre class="language-text"><code>npm i cnchar-trad
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/v2/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/v2/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/v2/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/v2/doc/trad.html" class="active sidebar-link">cnchar-trad</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/trad.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/trad.html#_2-繁体字支持" class="sidebar-link">2. 繁体字支持</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/doc/trad.html#_3-字体转换-convert" class="sidebar-link">3. 字体转换(convert)</a></li></ul></li><li><a href="/cnchar/v2/doc/draw.html" class="sidebar-link">cnchar-draw</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-介绍"><a href="#_1-介绍" class="header-anchor">#</a> 1. 介绍</h2> <p><code>cnchar-trad</code> 库是用于繁体字,除此之外,该库还提供繁体、简体、火星文之间的相互转换</p> <p>引入该库之后,cnchar的所有api都支持 <code>simple</code>和<code>trad</code>参数,用于只使用简体或繁体,默认两种字体都使用</p> <p>npm安装</p> <div class="language- extra-class"><pre class="language-text"><code>npm i cnchar-trad
|
||||
</code></pre></div><p>cdn使用</p> <div><pre><code class="hljs html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/cnchar-trad/cnchar.trad.min.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre></div> <p>使用</p> <div><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> cnchar <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar'</span>;
|
||||
<span class="hljs-keyword">import</span> trad <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar-trad'</span>;
|
||||
cnchar.use(trad); <span class="hljs-comment">// use 在浏览器环境中非必须</span></code></pre></div> <h2 id="_2-繁体字支持"><a href="#_2-繁体字支持" class="header-anchor">#</a> 2. 繁体字支持</h2> <p>以下演示几个繁体字支持的例子</p> <p><div class="code-box" data-v-54d15265><div data-v-54d15265><span class="code-title" data-v-54d15265>trad</span> <span class="code-desc" data-v-54d15265></span> <i title="在线运行" class="ei-play code-btn" data-v-54d15265></i> <i title="复制代码" class="ei-copy code-btn" data-v-54d15265></i></div> <pre data-v-54d15265><code class="hljs"></code></pre> <div style="display:none;" data-v-54d15265><div class="output-title" data-v-54d15265>运行结果</div> <div class="output-area" data-v-54d15265><div class="show-toggle" data-v-54d15265><i class="ei-angle-up" data-v-54d15265></i> <span class="show-text" data-v-54d15265>隐藏结果</span></div> <div style="display:;" data-v-54d15265></div></div></div> <div class="powered-by" data-v-54d15265>
|
||||
|
@ -74,13 +74,13 @@ string.convertSparkToSimple();
|
|||
string.convertSparkToTrad();</code></pre></div> <p>以下是几个实例:</p> <p><div class="code-box" data-v-54d15265><div data-v-54d15265><span class="code-title" data-v-54d15265>convert</span> <span class="code-desc" data-v-54d15265></span> <i title="在线运行" class="ei-play code-btn" data-v-54d15265></i> <i title="复制代码" class="ei-copy code-btn" data-v-54d15265></i></div> <pre data-v-54d15265><code class="hljs"></code></pre> <div style="display:none;" data-v-54d15265><div class="output-title" data-v-54d15265>运行结果</div> <div class="output-area" data-v-54d15265><div class="show-toggle" data-v-54d15265><i class="ei-angle-up" data-v-54d15265></i> <span class="show-text" data-v-54d15265>隐藏结果</span></div> <div style="display:;" data-v-54d15265></div></div></div> <div class="powered-by" data-v-54d15265>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-54d15265><i class="ei-cube-alt" data-v-54d15265></i> JSBox</a></div></div></p></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">4/12/2020, 10:44:57 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/order.html" class="prev">
|
||||
<a href="/cnchar/v2/doc/order.html" class="prev">
|
||||
cnchar-order
|
||||
</a></span> <span class="next"><a href="/cnchar/doc/draw.html">
|
||||
</a></span> <span class="next"><a href="/cnchar/v2/doc/draw.html">
|
||||
cnchar-draw
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.936adb96.js" defer></script><script src="/cnchar/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/assets/js/14.dcb336fd.js" defer></script><script src="/cnchar/assets/js/3.1c094398.js" defer></script>
|
||||
<script src="/cnchar/v2/assets/js/app.cb8474c5.js" defer></script><script src="/cnchar/v2/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/v2/assets/js/14.f5f6672e.js" defer></script><script src="/cnchar/v2/assets/js/3.1c094398.js" defer></script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
|
@ -8,25 +8,25 @@
|
|||
<meta name="generator" content="VuePress 1.4.0">
|
||||
<link rel="icon" href="https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/v1/images/i.ico">
|
||||
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.e22a701b.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.936adb96.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/assets/js/16.24698d0e.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.1c094398.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/assets/js/11.94c125ca.js"><link rel="prefetch" href="/cnchar/assets/js/12.9efd22de.js"><link rel="prefetch" href="/cnchar/assets/js/13.a75f5e37.js"><link rel="prefetch" href="/cnchar/assets/js/14.dcb336fd.js"><link rel="prefetch" href="/cnchar/assets/js/15.5320422e.js"><link rel="prefetch" href="/cnchar/assets/js/17.01fbc09e.js"><link rel="prefetch" href="/cnchar/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/assets/js/8.716a2d5f.js"><link rel="prefetch" href="/cnchar/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.e22a701b.css">
|
||||
<link rel="preload" href="/cnchar/v2/assets/css/0.styles.9f430868.css" as="style"><link rel="preload" href="/cnchar/v2/assets/js/app.cb8474c5.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/16.3053b002.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/3.1c094398.js" as="script"><link rel="prefetch" href="/cnchar/v2/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/v2/assets/js/11.cc6e19fc.js"><link rel="prefetch" href="/cnchar/v2/assets/js/12.462a0d66.js"><link rel="prefetch" href="/cnchar/v2/assets/js/13.d4dc98f5.js"><link rel="prefetch" href="/cnchar/v2/assets/js/14.f5f6672e.js"><link rel="prefetch" href="/cnchar/v2/assets/js/15.68737575.js"><link rel="prefetch" href="/cnchar/v2/assets/js/17.0328be00.js"><link rel="prefetch" href="/cnchar/v2/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/v2/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/v2/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/4.6d3f1d6a.js"><link rel="prefetch" href="/cnchar/v2/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/v2/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/v2/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/v2/assets/js/8.716a2d5f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/v2/assets/css/0.styles.9f430868.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/v2/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link router-link-active">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link router-link-active">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -34,21 +34,21 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link router-link-active">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link router-link-active">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -56,7 +56,7 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>使用说明</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/guide/" class="sidebar-link">简介</a></li><li><a href="/cnchar/guide/start.html" class="active sidebar-link">快速上手</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/guide/start.html#_1-npm安装" class="sidebar-link">1. npm安装</a></li><li class="sidebar-sub-header"><a href="/cnchar/guide/start.html#_2-cdn引用" class="sidebar-link">2. CDN引用</a></li><li class="sidebar-sub-header"><a href="/cnchar/guide/start.html#_3-cnchar-all" class="sidebar-link">3. cnchar-all</a></li><li class="sidebar-sub-header"><a href="/cnchar/guide/start.html#_4-简单使用" class="sidebar-link">4. 简单使用</a></li></ul></li><li><a href="/cnchar/guide/version.html" class="sidebar-link">更新日志</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-npm安装"><a href="#_1-npm安装" class="header-anchor">#</a> 1. npm安装</h2> <p>cnchar包含了一个基本库和四个功能库,用于实现不同的功能,您可以按需安装其中的功能库,但是 <code>cnchar</code> 这个基础库是必须安装的</p> <p>安装<a href="https://npmjs.com/package/cnchar" target="_blank" rel="noopener noreferrer">主库<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>:</p> <div class="language- extra-class"><pre class="language-text"><code>npm i cnchar
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>使用说明</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/v2/guide/" class="sidebar-link">简介</a></li><li><a href="/cnchar/v2/guide/start.html" class="active sidebar-link">快速上手</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/v2/guide/start.html#_1-npm安装" class="sidebar-link">1. npm安装</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/guide/start.html#_2-cdn引用" class="sidebar-link">2. CDN引用</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/guide/start.html#_3-cnchar-all" class="sidebar-link">3. cnchar-all</a></li><li class="sidebar-sub-header"><a href="/cnchar/v2/guide/start.html#_4-简单使用" class="sidebar-link">4. 简单使用</a></li></ul></li><li><a href="/cnchar/v2/guide/version.html" class="sidebar-link">更新日志</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-npm安装"><a href="#_1-npm安装" class="header-anchor">#</a> 1. npm安装</h2> <p>cnchar包含了一个基本库和四个功能库,用于实现不同的功能,您可以按需安装其中的功能库,但是 <code>cnchar</code> 这个基础库是必须安装的</p> <p>安装<a href="https://npmjs.com/package/cnchar" target="_blank" rel="noopener noreferrer">主库<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>:</p> <div class="language- extra-class"><pre class="language-text"><code>npm i cnchar
|
||||
</code></pre></div><p>按需安装功能库:</p> <div class="language- extra-class"><pre class="language-text"><code>npm i cnchar-poly cnchar-order cnchar-trad cnchar-draw
|
||||
</code></pre></div><p>浏览器环境中功能库可以直接使用:</p> <div><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> cnchar <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar'</span>;
|
||||
<span class="hljs-comment">// 以下功能库请按需使用</span>
|
||||
|
@ -82,13 +82,13 @@ cnchar.use(poly, order, trad);</code></pre></div> <h2 id="_2-cdn引用"><a href=
|
|||
</code></pre></div><p>commonjs 模块</p> <div><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> cnchar <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar-all'</span>;</code></pre></div> <p>cdn方式</p> <div><pre><code class="hljs html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/cnchar-all/cnchar.all.min.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre></div> <h2 id="_4-简单使用"><a href="#_4-简单使用" class="header-anchor">#</a> 4. 简单使用</h2> <p>cnchar 具有两个最核心的方法<code>spell</code> 和 <code>stroke</code>,分别用于获取汉字的拼音和笔画数:</p> <p><div class="code-box" data-v-54d15265><div data-v-54d15265><span class="code-title" data-v-54d15265>spell/stroke</span> <span class="code-desc" data-v-54d15265></span> <i title="在线运行" class="ei-play code-btn" data-v-54d15265></i> <i title="复制代码" class="ei-copy code-btn" data-v-54d15265></i></div> <pre data-v-54d15265><code class="hljs"></code></pre> <div style="display:none;" data-v-54d15265><div class="output-title" data-v-54d15265>运行结果</div> <div class="output-area" data-v-54d15265><div class="show-toggle" data-v-54d15265><i class="ei-angle-up" data-v-54d15265></i> <span class="show-text" data-v-54d15265>隐藏结果</span></div> <div style="display:;" data-v-54d15265></div></div></div> <div class="powered-by" data-v-54d15265>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-54d15265><i class="ei-cube-alt" data-v-54d15265></i> JSBox</a></div></div></p> <p>这只是一个最简单的使用,这两个方法具有很多参数可选,具体请参阅 <a href="">cnchar</a> 部分</p></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">4/12/2020, 10:44:57 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/guide/" class="prev router-link-active">
|
||||
<a href="/cnchar/v2/guide/" class="prev router-link-active">
|
||||
简介
|
||||
</a></span> <span class="next"><a href="/cnchar/guide/version.html">
|
||||
</a></span> <span class="next"><a href="/cnchar/v2/guide/version.html">
|
||||
更新日志
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.936adb96.js" defer></script><script src="/cnchar/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/assets/js/16.24698d0e.js" defer></script><script src="/cnchar/assets/js/3.1c094398.js" defer></script>
|
||||
<script src="/cnchar/v2/assets/js/app.cb8474c5.js" defer></script><script src="/cnchar/v2/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/v2/assets/js/16.3053b002.js" defer></script><script src="/cnchar/v2/assets/js/3.1c094398.js" defer></script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
|
@ -8,25 +8,25 @@
|
|||
<meta name="generator" content="VuePress 1.4.0">
|
||||
<link rel="icon" href="https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/v1/images/i.ico">
|
||||
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.e22a701b.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.936adb96.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/assets/js/8.716a2d5f.js" as="script"><link rel="preload" href="/cnchar/assets/js/4.6d3f1d6a.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/assets/js/11.94c125ca.js"><link rel="prefetch" href="/cnchar/assets/js/12.9efd22de.js"><link rel="prefetch" href="/cnchar/assets/js/13.a75f5e37.js"><link rel="prefetch" href="/cnchar/assets/js/14.dcb336fd.js"><link rel="prefetch" href="/cnchar/assets/js/15.5320422e.js"><link rel="prefetch" href="/cnchar/assets/js/16.24698d0e.js"><link rel="prefetch" href="/cnchar/assets/js/17.01fbc09e.js"><link rel="prefetch" href="/cnchar/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/assets/js/3.1c094398.js"><link rel="prefetch" href="/cnchar/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.e22a701b.css">
|
||||
<link rel="preload" href="/cnchar/v2/assets/css/0.styles.9f430868.css" as="style"><link rel="preload" href="/cnchar/v2/assets/js/app.cb8474c5.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/2.338d50e2.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/8.716a2d5f.js" as="script"><link rel="preload" href="/cnchar/v2/assets/js/4.6d3f1d6a.js" as="script"><link rel="prefetch" href="/cnchar/v2/assets/js/10.6983a4ff.js"><link rel="prefetch" href="/cnchar/v2/assets/js/11.cc6e19fc.js"><link rel="prefetch" href="/cnchar/v2/assets/js/12.462a0d66.js"><link rel="prefetch" href="/cnchar/v2/assets/js/13.d4dc98f5.js"><link rel="prefetch" href="/cnchar/v2/assets/js/14.f5f6672e.js"><link rel="prefetch" href="/cnchar/v2/assets/js/15.68737575.js"><link rel="prefetch" href="/cnchar/v2/assets/js/16.3053b002.js"><link rel="prefetch" href="/cnchar/v2/assets/js/17.0328be00.js"><link rel="prefetch" href="/cnchar/v2/assets/js/18.b6c135fb.js"><link rel="prefetch" href="/cnchar/v2/assets/js/19.421f793f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/20.4c918771.js"><link rel="prefetch" href="/cnchar/v2/assets/js/21.8c24635f.js"><link rel="prefetch" href="/cnchar/v2/assets/js/3.1c094398.js"><link rel="prefetch" href="/cnchar/v2/assets/js/5.9e6d2707.js"><link rel="prefetch" href="/cnchar/v2/assets/js/6.37ec8c51.js"><link rel="prefetch" href="/cnchar/v2/assets/js/7.576e924c.js"><link rel="prefetch" href="/cnchar/v2/assets/js/9.5b3a4467.js">
|
||||
<link rel="stylesheet" href="/cnchar/v2/assets/css/0.styles.9f430868.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container no-sidebar"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-exact-active router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link router-link-exact-active router-link-active">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container no-sidebar"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/v2/" class="home-link router-link-exact-active router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link router-link-exact-active router-link-active">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -34,21 +34,21 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link router-link-exact-active router-link-active">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/v2/" class="nav-link router-link-exact-active router-link-active">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/cnchar/v2/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/cnchar.html" class="nav-link">
|
||||
cnchar
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/poly.html" class="nav-link">
|
||||
cnchar-poly
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/order.html" class="nav-link">
|
||||
cnchar-order
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/trad.html" class="nav-link">
|
||||
cnchar-trad
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/v2/doc/draw.html" class="nav-link">
|
||||
cnchar-draw
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -56,7 +56,7 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <!----> </aside> <main class="page"> <div class="theme-default-content content__default"><p><div class="home-wrapper"><div><img src="/cnchar/assets/img/logo.6cd28633.png" alt srcset class="logo"></div> <div class="title">cnchar</div> <div class="desc">功能全面、多端支持的汉字拼音笔画js库</div> <div class="test"><div class="test-input el-input"><!----><input type="text" autocomplete="off" placeholder="输入一些汉字试试" class="el-input__inner"><!----><!----><!----><!----></div> <div class="show-area" style="display:none;"><div> <span class="split">|</span> 共笔</div> <div>繁体: <span class="split">|</span> 火星文: </div> <div>笔顺: </div> <div id="draw-area"></div></div></div> <div class="start-w"><button type="button" class="el-button el-button--primary"><!----><!----><span>开始 <i class="ei-location-arrow"></i></span></button></div> <div class="feature-w"><div class="f-i"><div class="f-t"><i class="ei-rocket"></i>功能全面</div> <div class="f-des">拼音、笔画数</div> <div class="f-des">多音字词</div> <div class="f-des">繁体字、火星文</div> <div class="f-des">汉字笔顺</div> <div class="f-des">多种模式绘制汉字</div> <div class="f-des">汉字推算</div> <div class="f-des">...</div></div> <div class="f-i"><div class="f-t"><i class="ei-tablet"></i>多端支持</div> <div class="f-des">浏览器</div> <div class="f-des">nodejs</div> <div class="f-des">小程序/小游戏</div> <div class="f-des">ReactNative/Weex/Uniapp/Electron</div> <div class="f-des">webpack</div> <div class="f-des">typescript支持</div> <div class="f-des">...</div></div> <div class="f-i"><div class="f-t"><i class="ei-cubes"></i>按需取用</div> <div class="f-des">功能分包</div> <div class="f-des">体积小巧</div> <div class="f-des">简单易用</div> <div class="f-des">npm</div> <div class="f-des">cdn</div></div></div> <div class="copy-right">MIT Licensed | Copyright © 2020 present <a href="https://www.github.com/theajack" target="view_window">theajack</a></div></div></p></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">4/13/2020, 4:46:50 PM</span></div></footer> <!----> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.936adb96.js" defer></script><script src="/cnchar/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/assets/js/8.716a2d5f.js" defer></script><script src="/cnchar/assets/js/4.6d3f1d6a.js" defer></script>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <!----> </aside> <main class="page"> <div class="theme-default-content content__default"><p><div class="home-wrapper"><div><img src="/cnchar/v2/assets/img/logo.6cd28633.png" alt srcset class="logo"></div> <div class="title">cnchar</div> <div class="desc">功能全面、多端支持的汉字拼音笔画js库</div> <div class="test"><div class="test-input el-input"><!----><input type="text" autocomplete="off" placeholder="输入一些汉字试试" class="el-input__inner"><!----><!----><!----><!----></div> <div class="show-area" style="display:none;"><div> <span class="split">|</span> 共笔</div> <div>繁体: <span class="split">|</span> 火星文: </div> <div>笔顺: </div> <div id="draw-area"></div></div></div> <div class="start-w"><button type="button" class="el-button el-button--primary"><!----><!----><span>开始 <i class="ei-location-arrow"></i></span></button></div> <div class="feature-w"><div class="f-i"><div class="f-t"><i class="ei-rocket"></i>功能全面</div> <div class="f-des">拼音、笔画数</div> <div class="f-des">多音字词</div> <div class="f-des">繁体字、火星文</div> <div class="f-des">汉字笔顺</div> <div class="f-des">多种模式绘制汉字</div> <div class="f-des">汉字推算</div> <div class="f-des">...</div></div> <div class="f-i"><div class="f-t"><i class="ei-tablet"></i>多端支持</div> <div class="f-des">浏览器</div> <div class="f-des">nodejs</div> <div class="f-des">小程序/小游戏</div> <div class="f-des">ReactNative/Weex/Uniapp/Electron</div> <div class="f-des">webpack</div> <div class="f-des">typescript支持</div> <div class="f-des">...</div></div> <div class="f-i"><div class="f-t"><i class="ei-cubes"></i>按需取用</div> <div class="f-des">功能分包</div> <div class="f-des">体积小巧</div> <div class="f-des">简单易用</div> <div class="f-des">npm</div> <div class="f-des">cdn</div></div></div> <div class="copy-right">MIT Licensed | Copyright © 2020 present <a href="https://www.github.com/theajack" target="view_window">theajack</a></div></div></p></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">4/13/2020, 4:46:50 PM</span></div></footer> <!----> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/v2/assets/js/app.cb8474c5.js" defer></script><script src="/cnchar/v2/assets/js/2.338d50e2.js" defer></script><script src="/cnchar/v2/assets/js/8.716a2d5f.js" defer></script><script src="/cnchar/v2/assets/js/4.6d3f1d6a.js" defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +1,16 @@
|
|||
const gulp = require('gulp');
|
||||
const fs = require('fs');
|
||||
// const fs = require('fs');
|
||||
const babel = require('gulp-babel');
|
||||
|
||||
function main () {
|
||||
gulp.src('public/config.js')
|
||||
.pipe(babel({presets: ['@babel/env']}))
|
||||
.pipe(gulp.dest('docs'));
|
||||
modPath();
|
||||
}
|
||||
|
||||
function modPath () {
|
||||
var html = fs.readFileSync('./docs/assets/v2/index.html', 'utf8');
|
||||
html = html.replace(/\/cnchar\/assets\//g, '/cnchar/assets/v2/assets/');
|
||||
fs.writeFileSync('./docs/index.html', html, 'utf8');
|
||||
}
|
||||
// function modPath () {
|
||||
// var html = fs.readFileSync('./docs/assets/v2/index.html', 'utf8');
|
||||
// html = html.replace(/\/cnchar\/assets\//g, '/cnchar/assets/v2/assets/');
|
||||
// fs.writeFileSync('./docs/index.html', html, 'utf8');
|
||||
// }
|
||||
main();
|
|
@ -74,4 +74,7 @@
|
|||
## 2.1.3
|
||||
1. draw库增加clear参数,表示绘制前是否清空容器
|
||||
2. draw库将backgroundColor参数默认值改为#fff
|
||||
3. draw库将el参数改为支持css选择器或dom
|
||||
3. draw库将el参数改为支持css选择器或dom
|
||||
|
||||
## 2.1.4 doing
|
||||
1. 修复cnchar-all及库在非浏览器换
|
Loading…
Reference in New Issue