feat: readme 改回gitee pages,docsjsbox host修改
This commit is contained in:
parent
4053856ea2
commit
65c1c6a9a2
|
@ -19,7 +19,7 @@
|
|||
|
||||
<h3>🚀 功能全面、多端支持的汉字拼音笔画 js 库</h3>
|
||||
|
||||
**[English](https://github.com/theajack/cnchar/blob/master/helper/README.en.md) | [在线试用/文档](https://cnchar.js.org) | [备用文档地址](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new) | [Gitee](https://gitee.com/theajack/cnchar)**
|
||||
**[English](https://github.com/theajack/cnchar/blob/master/helper/README.en.md) | [在线试用/文档](https://theajack.gitee.io/cnchar) | [备用文档地址](https://cnchar.js.org) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new) | [Gitee](https://gitee.com/theajack/cnchar)**
|
||||
|
||||
---
|
||||
|
||||
|
@ -375,7 +375,7 @@ draw 的参数比较繁多,首先需要理解的是,draw 分为四种绘制
|
|||
3. stroke: 按汉字笔顺单步绘制
|
||||
4. test: 测试模式,用户可以在容器内绘制汉字,cnchar-draw会检测是否绘制正确
|
||||
|
||||
以下是 options 的所有可选参数及描述,使用详情请参考[在线文档](https://cnchar.js.org):
|
||||
以下是 options 的所有可选参数及描述,使用详情请参考[在线文档](https://theajack.gitee.io/cnchar):
|
||||
|
||||
```ts
|
||||
declare interface DrawOption {
|
||||
|
|
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 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{635:function(t,e,a){"use strict";a.r(e);var i=a(21),c=Object(i.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;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",[t._v("cnchar在2.2.0加入了成语功能,启用该功能需要安装 "),a("code",[t._v("cnchar-idiom")]),t._v(" 功能库,该库可以独立于cnchar主库运行")]),t._v(" "),a("p",[t._v("使用方式如下:")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"typescript"}},[t._v("\ncnchar.idiom(text:string, ...idiomArgs: Array<idiomArg>):Array<string>;\n ")])],1),t._v(" "),a("p",[t._v("看一个具体例子")]),t._v(" "),a("div",[a("codebox",{attrs:{id:"idiom",fold:!0}})],1),t._v(" "),a("p",[t._v("使用cdn引用时,会在window对向上暴露 "),a("code",[t._v("CncharIdiom")]),t._v(" 对象")]),t._v(" "),a("h2",{attrs:{id:"_2-idiom-参数"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-idiom-参数"}},[t._v("#")]),t._v(" 2. idiom 参数")]),t._v(" "),a("p",[t._v("参数调用如下,value表示查询对象,可以试拼音汉字笔画数,所有 arg 参数都是可选的")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"typescript"}},[t._v("\ncnchar.idiom(value,arg1,arg2,...);\n ")])],1),t._v(" "),a("table",[a("thead",[a("tr",[a("th",{staticStyle:{"text-align":"center"}},[t._v("参数")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("作用")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("是否默认")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("依赖库")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("备注")])])]),t._v(" "),a("tbody",[a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("char")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("根据汉字查询成语")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("是")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("默认值无需调用")])]),t._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("stroke")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("根据笔画数查询成语")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("优先级高于char")])]),t._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("spell")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("根据拼音查询成语")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("优先级高于stroke")])]),t._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("tone")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("启用拼音音调查询")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("仅在spell模式下生效")])])])]),t._v(" "),a("p",[t._v("注:优先级 "),a("code",[t._v("spell")]),t._v(" > "),a("code",[t._v("stroke")]),t._v(" > "),a("code",[t._v("char")])]),t._v(" "),a("h2",{attrs:{id:"_3-实例"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-实例"}},[t._v("#")]),t._v(" 3. 实例")]),t._v(" "),a("p",[t._v("该库为cnchar扩展了成语功能")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[t._v("\ncnchar.idiom(['五', '', '十', '']) // ['五风十雨', '五光十色']\ncnchar.idiom([4, 6, 2, 6], 'stroke') // ['五光十色']\ncnchar.idiom('shang', 'spell') // ['伤风败化', '伤风败俗', ... ]\ncnchar.idiom('shang4', 'spell', 'tone') // ['伤风败化', '伤风败俗', ... ]\n ")])],1)])}),[],!1,null,null,null);e.default=c.exports}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{622:function(t,e,a){"use strict";a.r(e);var i=a(28),c=Object(i.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;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",[t._v("cnchar在2.2.0加入了成语功能,启用该功能需要安装 "),a("code",[t._v("cnchar-idiom")]),t._v(" 功能库,该库可以独立于cnchar主库运行")]),t._v(" "),a("p",[t._v("使用方式如下:")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"typescript"}},[t._v("\ncnchar.idiom(text:string, ...idiomArgs: Array<idiomArg>):Array<string>;\n ")])],1),t._v(" "),a("p",[t._v("看一个具体例子")]),t._v(" "),a("div",[a("codebox",{attrs:{id:"idiom",fold:!0}})],1),t._v(" "),a("p",[t._v("使用cdn引用时,会在window对向上暴露 "),a("code",[t._v("CncharIdiom")]),t._v(" 对象")]),t._v(" "),a("h2",{attrs:{id:"_2-idiom-参数"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-idiom-参数"}},[t._v("#")]),t._v(" 2. idiom 参数")]),t._v(" "),a("p",[t._v("参数调用如下,value表示查询对象,可以试拼音汉字笔画数,所有 arg 参数都是可选的")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"typescript"}},[t._v("\ncnchar.idiom(value,arg1,arg2,...);\n ")])],1),t._v(" "),a("table",[a("thead",[a("tr",[a("th",{staticStyle:{"text-align":"center"}},[t._v("参数")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("作用")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("是否默认")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("依赖库")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("备注")])])]),t._v(" "),a("tbody",[a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("char")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("根据汉字查询成语")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("是")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("默认值无需调用")])]),t._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("stroke")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("根据笔画数查询成语")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("优先级高于char")])]),t._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("spell")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("根据拼音查询成语")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("优先级高于stroke")])]),t._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("tone")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("启用拼音音调查询")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("仅在spell模式下生效")])])])]),t._v(" "),a("p",[t._v("注:优先级 "),a("code",[t._v("spell")]),t._v(" > "),a("code",[t._v("stroke")]),t._v(" > "),a("code",[t._v("char")])]),t._v(" "),a("h2",{attrs:{id:"_3-实例"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-实例"}},[t._v("#")]),t._v(" 3. 实例")]),t._v(" "),a("p",[t._v("该库为cnchar扩展了成语功能")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[t._v("\ncnchar.idiom(['五', '', '十', '']) // ['五风十雨', '五光十色']\ncnchar.idiom([4, 6, 2, 6], 'stroke') // ['五光十色']\ncnchar.idiom('shang', 'spell') // ['伤风败化', '伤风败俗', ... ]\ncnchar.idiom('shang4', 'spell', 'tone') // ['伤风败化', '伤风败俗', ... ]\n ")])],1)])}),[],!1,null,null,null);e.default=c.exports}}]);
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{633:function(t,r,n){"use strict";n.r(r);var a=n(21),c=Object(a.a)({},(function(){var t=this,r=t.$createElement,n=t._self._c||r;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h2",{attrs:{id:"_1-介绍"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-介绍"}},[t._v("#")]),t._v(" 1. 介绍")]),t._v(" "),n("p",[n("code",[t._v("cnchar-poly")]),t._v(" 库是用于支持多音词的库,该库本身并不提供新的api")]),t._v(" "),n("p",[t._v("引入该库之后,"),n("code",[t._v("cnchar.spell()")]),t._v(" 方法才会支持多音词,否则对于多音字会返回默认读音")]),t._v(" "),n("p",[t._v("npm安装")]),t._v(" "),n("div",[n("highlight-code",[t._v("\nnpm i cnchar-poly\n ")])],1),t._v(" "),n("p",[t._v("cdn使用")]),t._v(" "),n("div",[n("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(" "),n("p",[t._v("使用")]),t._v(" "),n("div",[n("highlight-code",{attrs:{lang:"javascript"}},[t._v("\nimport cnchar from 'cnchar';\nimport poly from 'cnchar-poly';\ncnchar.use(poly); // use 在浏览器环境中非必须\n ")])],1),t._v(" "),n("h2",{attrs:{id:"_2-实例"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_2-实例"}},[t._v("#")]),t._v(" 2. 实例")]),t._v(" "),n("p",[t._v("以下演示几个多音词的例子")]),t._v(" "),n("div",[n("codebox",{attrs:{id:"poly"}})],1),t._v(" "),n("p",[t._v("由于多音词依赖分词与词库,且cnchar是一个静态的js库,所以可能会有诸多不准确的读音")]),t._v(" "),n("p",[t._v("如果遇到不准缺的多音词,欢迎提"),n("a",{attrs:{href:"https://github.com/theajack/cnchar/issues/new",target:"_blank",rel:"noopener noreferrer"}},[t._v("issue或pr"),n("OutboundLink")],1)])])}),[],!1,null,null,null);r.default=c.exports}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{623:function(t,r,n){"use strict";n.r(r);var a=n(28),c=Object(a.a)({},(function(){var t=this,r=t.$createElement,n=t._self._c||r;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h2",{attrs:{id:"_1-介绍"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_1-介绍"}},[t._v("#")]),t._v(" 1. 介绍")]),t._v(" "),n("p",[n("code",[t._v("cnchar-poly")]),t._v(" 库是用于支持多音词的库,该库本身并不提供新的api")]),t._v(" "),n("p",[t._v("引入该库之后,"),n("code",[t._v("cnchar.spell()")]),t._v(" 方法才会支持多音词,否则对于多音字会返回默认读音")]),t._v(" "),n("p",[t._v("npm安装")]),t._v(" "),n("div",[n("highlight-code",[t._v("\nnpm i cnchar-poly\n ")])],1),t._v(" "),n("p",[t._v("cdn使用")]),t._v(" "),n("div",[n("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(" "),n("p",[t._v("使用")]),t._v(" "),n("div",[n("highlight-code",{attrs:{lang:"javascript"}},[t._v("\nimport cnchar from 'cnchar';\nimport poly from 'cnchar-poly';\ncnchar.use(poly); // use 在浏览器环境中非必须\n ")])],1),t._v(" "),n("h2",{attrs:{id:"_2-实例"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#_2-实例"}},[t._v("#")]),t._v(" 2. 实例")]),t._v(" "),n("p",[t._v("以下演示几个多音词的例子")]),t._v(" "),n("div",[n("codebox",{attrs:{id:"poly"}})],1),t._v(" "),n("p",[t._v("由于多音词依赖分词与词库,且cnchar是一个静态的js库,所以可能会有诸多不准确的读音")]),t._v(" "),n("p",[t._v("如果遇到不准缺的多音词,欢迎提"),n("a",{attrs:{href:"https://github.com/theajack/cnchar/issues/new",target:"_blank",rel:"noopener noreferrer"}},[t._v("issue或pr"),n("OutboundLink")],1)])])}),[],!1,null,null,null);r.default=c.exports}}]);
|
|
@ -1 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{634:function(t,a,r){"use strict";r.r(a);var e=r(21),c=Object(e.a)({},(function(){var t=this,a=t.$createElement,r=t._self._c||a;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h2",{attrs:{id:"_1-介绍"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_1-介绍"}},[t._v("#")]),t._v(" 1. 介绍")]),t._v(" "),r("p",[t._v("cnchar在2.2.5加入了偏旁部首功能,启用该功能需要安装 "),r("code",[t._v("cnchar-radical")]),t._v(" 功能库,该库可以独立于cnchar主库运行")]),t._v(" "),r("p",[t._v("感谢 "),r("code",[t._v("kewell-tsao")]),t._v(" 提供的 pr")]),t._v(" "),r("p",[t._v("使用方式如下:")]),t._v(" "),r("div",[r("highlight-code",{attrs:{lang:"typescript"}},[t._v("\ncnchar.radical(text:string | Array<string>, ...radicalArgs: Array<radicalArg>): string | Array<string>;\n ")])],1),t._v(" "),r("p",[t._v("看一个具体例子")]),t._v(" "),r("div",[r("codebox",{attrs:{id:"radical"}})],1),t._v(" "),r("p",[t._v("使用cdn引用时,会在window对向上暴露 "),r("code",[t._v("CncharRadical")]),t._v(" 对象")]),t._v(" "),r("h2",{attrs:{id:"_2-radical-参数"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-radical-参数"}},[t._v("#")]),t._v(" 2. radical 参数")]),t._v(" "),r("p",[t._v("参数调用如下,value表示需要查询偏旁的汉字,可以是字符串或数组")]),t._v(" "),r("div",[r("highlight-code",{attrs:{lang:"typescript"}},[t._v("\ncnchar.radical(value,arg1,arg2,...);\n ")])],1),t._v(" "),r("table",[r("thead",[r("tr",[r("th",{staticStyle:{"text-align":"center"}},[t._v("参数")]),t._v(" "),r("th",{staticStyle:{"text-align":"center"}},[t._v("作用")]),t._v(" "),r("th",{staticStyle:{"text-align":"center"}},[t._v("是否默认")]),t._v(" "),r("th",{staticStyle:{"text-align":"center"}},[t._v("依赖库")]),t._v(" "),r("th",{staticStyle:{"text-align":"center"}},[t._v("备注")])])]),t._v(" "),r("tbody",[r("tr",[r("td",{staticStyle:{"text-align":"center"}},[t._v("array")]),t._v(" "),r("td",{staticStyle:{"text-align":"center"}},[t._v("是否返回数组")]),t._v(" "),r("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),r("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),r("td",{staticStyle:{"text-align":"center"}},[t._v("当传入为数组时默认返回数组")])])])]),t._v(" "),r("h2",{attrs:{id:"_3-实例"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-实例"}},[t._v("#")]),t._v(" 3. 实例")]),t._v(" "),r("p",[t._v("该库为cnchar扩展了偏旁部首功能")]),t._v(" "),r("div",[r("highlight-code",{attrs:{lang:"javascript"}},[t._v('\ncnchar.radical(\'你\'); // "亻",\ncnchar.radical(\'你好呀\'); // "亻女口"\ncnchar.radical(\'你好呀\', \'array\'); // ["亻", "女", "口"]\ncnchar.radical(["你", "好", "呀"]); // ["亻", "女", "口"]\n ')])],1)])}),[],!1,null,null,null);a.default=c.exports}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{625:function(t,a,r){"use strict";r.r(a);var e=r(28),c=Object(e.a)({},(function(){var t=this,a=t.$createElement,r=t._self._c||a;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h2",{attrs:{id:"_1-介绍"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_1-介绍"}},[t._v("#")]),t._v(" 1. 介绍")]),t._v(" "),r("p",[t._v("cnchar在2.2.5加入了偏旁部首功能,启用该功能需要安装 "),r("code",[t._v("cnchar-radical")]),t._v(" 功能库,该库可以独立于cnchar主库运行")]),t._v(" "),r("p",[t._v("感谢 "),r("code",[t._v("kewell-tsao")]),t._v(" 提供的 pr")]),t._v(" "),r("p",[t._v("使用方式如下:")]),t._v(" "),r("div",[r("highlight-code",{attrs:{lang:"typescript"}},[t._v("\ncnchar.radical(text:string | Array<string>, ...radicalArgs: Array<radicalArg>): string | Array<string>;\n ")])],1),t._v(" "),r("p",[t._v("看一个具体例子")]),t._v(" "),r("div",[r("codebox",{attrs:{id:"radical"}})],1),t._v(" "),r("p",[t._v("使用cdn引用时,会在window对向上暴露 "),r("code",[t._v("CncharRadical")]),t._v(" 对象")]),t._v(" "),r("h2",{attrs:{id:"_2-radical-参数"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-radical-参数"}},[t._v("#")]),t._v(" 2. radical 参数")]),t._v(" "),r("p",[t._v("参数调用如下,value表示需要查询偏旁的汉字,可以是字符串或数组")]),t._v(" "),r("div",[r("highlight-code",{attrs:{lang:"typescript"}},[t._v("\ncnchar.radical(value,arg1,arg2,...);\n ")])],1),t._v(" "),r("table",[r("thead",[r("tr",[r("th",{staticStyle:{"text-align":"center"}},[t._v("参数")]),t._v(" "),r("th",{staticStyle:{"text-align":"center"}},[t._v("作用")]),t._v(" "),r("th",{staticStyle:{"text-align":"center"}},[t._v("是否默认")]),t._v(" "),r("th",{staticStyle:{"text-align":"center"}},[t._v("依赖库")]),t._v(" "),r("th",{staticStyle:{"text-align":"center"}},[t._v("备注")])])]),t._v(" "),r("tbody",[r("tr",[r("td",{staticStyle:{"text-align":"center"}},[t._v("array")]),t._v(" "),r("td",{staticStyle:{"text-align":"center"}},[t._v("是否返回数组")]),t._v(" "),r("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),r("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),r("td",{staticStyle:{"text-align":"center"}},[t._v("当传入为数组时默认返回数组")])])])]),t._v(" "),r("h2",{attrs:{id:"_3-实例"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-实例"}},[t._v("#")]),t._v(" 3. 实例")]),t._v(" "),r("p",[t._v("该库为cnchar扩展了偏旁部首功能")]),t._v(" "),r("div",[r("highlight-code",{attrs:{lang:"javascript"}},[t._v('\ncnchar.radical(\'你\'); // "亻",\ncnchar.radical(\'你好呀\'); // "亻女口"\ncnchar.radical(\'你好呀\', \'array\'); // ["亻", "女", "口"]\ncnchar.radical(["你", "好", "呀"]); // ["亻", "女", "口"]\n ')])],1)])}),[],!1,null,null,null);a.default=c.exports}}]);
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{637: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",[n("highlight-code",[r._v("\nnpm i cnchar-trad\n ")])],1),r._v(" "),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("div",[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("div",[n("codebox",{attrs:{id:"convert"}})],1)])}),[],!1,null,null,null);t.default=c.exports}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{627:function(r,t,n){"use strict";n.r(t);var a=n(28),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",[n("highlight-code",[r._v("\nnpm i cnchar-trad\n ")])],1),r._v(" "),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("div",[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("div",[n("codebox",{attrs:{id:"convert"}})],1)])}),[],!1,null,null,null);t.default=c.exports}}]);
|
|
@ -1 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{638:function(t,e,a){"use strict";a.r(e);var n=a(21),c=Object(n.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;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",[t._v("cnchar在2.2.0加入了歇后语功能,启用该功能需要安装 "),a("code",[t._v("cnchar-xhy")]),t._v(" 功能库,该库可以独立于cnchar主库运行")]),t._v(" "),a("p",[t._v("使用方式如下:")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"typescript"}},[t._v("\ncnchar.xhy(text:string, ...xhyArgs: Array<xhyArg>):Array<string>;\n ")])],1),t._v(" "),a("p",[t._v("看一个具体例子")]),t._v(" "),a("div",[a("codebox",{attrs:{id:"xhy",fold:!0}})],1),t._v(" "),a("p",[t._v("使用cdn引用时,会在window对向上暴露 "),a("code",[t._v("CncharXHY")]),t._v(" 对象")]),t._v(" "),a("h2",{attrs:{id:"_2-xhy-参数"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-xhy-参数"}},[t._v("#")]),t._v(" 2. xhy 参数")]),t._v(" "),a("p",[t._v("参数调用如下,value表示歇后语查询对象,可以是歇后语的第一句或第二句,所有 arg 参数都是可选的")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"typescript"}},[t._v("\ncnchar.xhy(value,arg1,arg2,...);\n ")])],1),t._v(" "),a("table",[a("thead",[a("tr",[a("th",{staticStyle:{"text-align":"center"}},[t._v("参数")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("作用")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("是否默认")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("依赖库")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("备注")])])]),t._v(" "),a("tbody",[a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("fuzzy")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("是否支持模糊查询")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("是否包含输入的字符串")])]),t._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("answer")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("是否只输出答案")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("默认是输出整句歇后语")])]),t._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("second")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("是否是根据歇后语后一句查询")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")])])])]),t._v(" "),a("h2",{attrs:{id:"_3-实例"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-实例"}},[t._v("#")]),t._v(" 3. 实例")]),t._v(" "),a("p",[t._v("该库为cnchar扩展了歇后语功能")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[t._v("\ncnchar.xhy('大水冲了龙王庙') // ['大水冲了龙王庙-自家人不识自家人', '大水冲了龙王庙-一家人不认一家人']\ncnchar.xhy('大水', 'fuzzy') // ['江河里长大水-泥沙俱下', '江河发大水-后浪推前浪', ... ]\ncnchar.xhy('大水', 'fuzzy', 'answer') // ['泥沙俱下', '后浪推前浪', ... ]\ncnchar.xhy('上晃下摇', 'fuzzy', 'answer', 'second') // ['醉汉过铁索桥', '扶着醉汉过破桥']\n ")])],1)])}),[],!1,null,null,null);e.default=c.exports}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{629:function(t,e,a){"use strict";a.r(e);var n=a(28),c=Object(n.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;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",[t._v("cnchar在2.2.0加入了歇后语功能,启用该功能需要安装 "),a("code",[t._v("cnchar-xhy")]),t._v(" 功能库,该库可以独立于cnchar主库运行")]),t._v(" "),a("p",[t._v("使用方式如下:")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"typescript"}},[t._v("\ncnchar.xhy(text:string, ...xhyArgs: Array<xhyArg>):Array<string>;\n ")])],1),t._v(" "),a("p",[t._v("看一个具体例子")]),t._v(" "),a("div",[a("codebox",{attrs:{id:"xhy",fold:!0}})],1),t._v(" "),a("p",[t._v("使用cdn引用时,会在window对向上暴露 "),a("code",[t._v("CncharXHY")]),t._v(" 对象")]),t._v(" "),a("h2",{attrs:{id:"_2-xhy-参数"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-xhy-参数"}},[t._v("#")]),t._v(" 2. xhy 参数")]),t._v(" "),a("p",[t._v("参数调用如下,value表示歇后语查询对象,可以是歇后语的第一句或第二句,所有 arg 参数都是可选的")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"typescript"}},[t._v("\ncnchar.xhy(value,arg1,arg2,...);\n ")])],1),t._v(" "),a("table",[a("thead",[a("tr",[a("th",{staticStyle:{"text-align":"center"}},[t._v("参数")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("作用")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("是否默认")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("依赖库")]),t._v(" "),a("th",{staticStyle:{"text-align":"center"}},[t._v("备注")])])]),t._v(" "),a("tbody",[a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("fuzzy")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("是否支持模糊查询")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("是否包含输入的字符串")])]),t._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("answer")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("是否只输出答案")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("默认是输出整句歇后语")])]),t._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"center"}},[t._v("second")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("是否是根据歇后语后一句查询")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("否")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")]),t._v(" "),a("td",{staticStyle:{"text-align":"center"}},[t._v("--")])])])]),t._v(" "),a("h2",{attrs:{id:"_3-实例"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-实例"}},[t._v("#")]),t._v(" 3. 实例")]),t._v(" "),a("p",[t._v("该库为cnchar扩展了歇后语功能")]),t._v(" "),a("div",[a("highlight-code",{attrs:{lang:"javascript"}},[t._v("\ncnchar.xhy('大水冲了龙王庙') // ['大水冲了龙王庙-自家人不识自家人', '大水冲了龙王庙-一家人不认一家人']\ncnchar.xhy('大水', 'fuzzy') // ['江河里长大水-泥沙俱下', '江河发大水-后浪推前浪', ... ]\ncnchar.xhy('大水', 'fuzzy', 'answer') // ['泥沙俱下', '后浪推前浪', ... ]\ncnchar.xhy('上晃下摇', 'fuzzy', 'answer', 'second') // ['醉汉过铁索桥', '扶着醉汉过破桥']\n ")])],1)])}),[],!1,null,null,null);e.default=c.exports}}]);
|
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
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{510:function(n,w,o){}}]);
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{517:function(n,w,o){}}]);
|
|
@ -1 +0,0 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{621:function(n,w,o){}}]);
|
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{536:function(t,e,n){},612:function(t,e,n){"use strict";var i=n(536);n.n(i).a},632:function(t,e,n){"use strict";n.r(e);var i={functional:!0,props:{type:{type:String,default:"tip"},text:String,vertical:{type:String,default:"top"}},render:function(t,e){var n=e.props,i=e.slots;return t("span",{class:["badge",n.type],style:{verticalAlign:n.vertical}},n.text||i().default)}},r=(n(612),n(28)),a=Object(r.a)(i,void 0,void 0,!1,null,"15b7b770",null);e.default=a.exports}}]);
|
|
@ -1 +0,0 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{543:function(t,e,n){},619:function(t,e,n){"use strict";var i=n(543);n.n(i).a},642:function(t,e,n){"use strict";n.r(e);var i={functional:!0,props:{type:{type:String,default:"tip"},text:String,vertical:{type:String,default:"top"}},render:function(t,e){var n=e.props,i=e.slots;return t("span",{class:["badge",n.type],style:{verticalAlign:n.vertical}},n.text||i().default)}},r=(n(619),n(21)),a=Object(r.a)(i,void 0,void 0,!1,null,"15b7b770",null);e.default=a.exports}}]);
|
|
@ -1 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{542:function(t,s,i){},618:function(t,s,i){"use strict";var n=i(542);i.n(n).a},627:function(t,s,i){"use strict";i.r(s);var n={methods:{starGithub:function(){window.open("https://github.com/theajack/cnchar")}}},a=(i(618),i(21)),c=Object(a.a)(n,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"bg",on:{click:this.starGithub}},[this._m(0)])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"word glitch"},[s("div",{staticClass:"flash is-off"},[s("span",{staticClass:"text"},[this._v("给个star!")])])])}],!1,null,null,null);s.default=c.exports}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{535:function(t,s,i){},611:function(t,s,i){"use strict";var n=i(535);i.n(n).a},617:function(t,s,i){"use strict";i.r(s);var n={methods:{starGithub:function(){window.open("https://github.com/theajack/cnchar")}}},a=(i(611),i(28)),c=Object(a.a)(n,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"bg",on:{click:this.starGithub}},[this._m(0)])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"word glitch"},[s("div",{staticClass:"flash is-off"},[s("span",{staticClass:"text"},[this._v("给个star!")])])])}],!1,null,null,null);s.default=c.exports}}]);
|
|
@ -1 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{625:function(t,e,s){"use strict";s.r(e);var n=["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],o={methods:{getMsg:function(){return n[Math.floor(Math.random()*n.length)]}}},i=s(21),h=Object(i.a)(o,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"theme-container"},[e("div",{staticClass:"theme-default-content"},[e("h1",[this._v("404")]),this._v(" "),e("blockquote",[this._v(this._s(this.getMsg()))]),this._v(" "),e("RouterLink",{attrs:{to:"/"}},[this._v("\n Take me home.\n ")])],1)])}),[],!1,null,null,null);e.default=h.exports}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{615:function(t,e,s){"use strict";s.r(e);var n=["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],o={methods:{getMsg:function(){return n[Math.floor(Math.random()*n.length)]}}},i=s(28),h=Object(i.a)(o,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"theme-container"},[e("div",{staticClass:"theme-default-content"},[e("h1",[this._v("404")]),this._v(" "),e("blockquote",[this._v(this._s(this.getMsg()))]),this._v(" "),e("RouterLink",{attrs:{to:"/"}},[this._v("\n Take me home.\n ")])],1)])}),[],!1,null,null,null);e.default=h.exports}}]);
|
|
@ -1 +1 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{628:function(t,e,n){"use strict";n.r(e);var s=n(21),o=Object(s.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[e("div",[e("home")],1)])}),[],!1,null,null,null);e.default=o.exports}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{619:function(t,e,n){"use strict";n.r(e);var s=n(28),o=Object(s.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[e("div",[e("home")],1)])}),[],!1,null,null,null);e.default=o.exports}}]);
|
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
|
@ -8,8 +8,8 @@
|
|||
<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.dcd81eba.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.3d5a33c2.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/cnchar/assets/js/9.b0989f22.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.79e54f24.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.eeab0d04.js"><link rel="prefetch" href="/cnchar/assets/js/11.7d5ff5df.js"><link rel="prefetch" href="/cnchar/assets/js/12.cb64600b.js"><link rel="prefetch" href="/cnchar/assets/js/13.b8427796.js"><link rel="prefetch" href="/cnchar/assets/js/14.8cb74a49.js"><link rel="prefetch" href="/cnchar/assets/js/15.6d40aa8a.js"><link rel="prefetch" href="/cnchar/assets/js/16.6843fc0d.js"><link rel="prefetch" href="/cnchar/assets/js/17.d8524e84.js"><link rel="prefetch" href="/cnchar/assets/js/18.35eb0643.js"><link rel="prefetch" href="/cnchar/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/cnchar/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/cnchar/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/cnchar/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/cnchar/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/cnchar/assets/js/24.45be5988.js"><link rel="prefetch" href="/cnchar/assets/js/25.54b888ce.js"><link rel="prefetch" href="/cnchar/assets/js/4.dec2fc6b.js"><link rel="prefetch" href="/cnchar/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/cnchar/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/cnchar/assets/js/7.67523f2c.js"><link rel="prefetch" href="/cnchar/assets/js/8.f01c3380.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.dcd81eba.css">
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.1aa8b5c2.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.479643a8.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.79099ae3.js" as="script"><link rel="preload" href="/cnchar/assets/js/9.79574551.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.94141914.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.a61514ca.js"><link rel="prefetch" href="/cnchar/assets/js/11.f0beebd0.js"><link rel="prefetch" href="/cnchar/assets/js/12.9fbed8f3.js"><link rel="prefetch" href="/cnchar/assets/js/13.d28b998f.js"><link rel="prefetch" href="/cnchar/assets/js/14.fcf3c48a.js"><link rel="prefetch" href="/cnchar/assets/js/15.44644ac9.js"><link rel="prefetch" href="/cnchar/assets/js/16.2379d48b.js"><link rel="prefetch" href="/cnchar/assets/js/17.cec8473d.js"><link rel="prefetch" href="/cnchar/assets/js/18.23d8fb28.js"><link rel="prefetch" href="/cnchar/assets/js/19.a197b25b.js"><link rel="prefetch" href="/cnchar/assets/js/20.5603fdd0.js"><link rel="prefetch" href="/cnchar/assets/js/21.b9849f84.js"><link rel="prefetch" href="/cnchar/assets/js/22.876a6289.js"><link rel="prefetch" href="/cnchar/assets/js/4.60b58529.js"><link rel="prefetch" href="/cnchar/assets/js/5.b99f65d5.js"><link rel="prefetch" href="/cnchar/assets/js/6.6a00c290.js"><link rel="prefetch" href="/cnchar/assets/js/7.39b7a2be.js"><link rel="prefetch" href="/cnchar/assets/js/8.4e18b7d9.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.1aa8b5c2.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">
|
||||
|
@ -95,11 +95,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="_6-2-type"><a href="#_6-2-type" class="header-anchor">#</a> 6.2 .type</h3> <p>type 对象用户获取当前可用的 <code>spell</code> 、 <code>stroke</code> 、 <code>orderToWord</code> 、<code>spellToWord</code>、<code>strokeToWord</code> 参数类型:</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>type</span> <span class="code-desc" data-v-96507b74></span> <i title="在线运行" class="ei-play code-btn" data-v-96507b74></i> <i title="复制代码" class="ei-copy code-btn" data-v-96507b74></i></div> <pre data-v-96507b74><code class="hljs"></code></pre> <div style="display:none;" data-v-96507b74><div class="output-title" data-v-96507b74>运行结果</div> <div class="output-area" data-v-96507b74><div class="show-toggle" data-v-96507b74><i class="ei-angle-up" data-v-96507b74></i> <span class="show-text" data-v-96507b74>隐藏结果</span></div> <div style="display:;" data-v-96507b74></div></div></div> <div class="powered-by" data-v-96507b74>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <h3 id="_6-3-check"><a href="#_6-3-check" class="header-anchor">#</a> 6.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="_6-4-version"><a href="#_6-4-version" class="header-anchor">#</a> 6.4 .version</h3> <p>获取当前版本:</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>version</span> <span class="code-desc" data-v-96507b74></span> <i title="在线运行" class="ei-play code-btn" data-v-96507b74></i> <i title="复制代码" class="ei-copy code-btn" data-v-96507b74></i></div> <pre data-v-96507b74><code class="hljs"></code></pre> <div style="display:none;" data-v-96507b74><div class="output-title" data-v-96507b74>运行结果</div> <div class="output-area" data-v-96507b74><div class="show-toggle" data-v-96507b74><i class="ei-angle-up" data-v-96507b74></i> <span class="show-text" data-v-96507b74>隐藏结果</span></div> <div style="display:;" data-v-96507b74></div></div></div> <div class="powered-by" data-v-96507b74>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <h3 id="_6-5-plugins"><a href="#_6-5-plugins" class="header-anchor">#</a> 6.5 .plugins</h3> <p>当前使用的功能库列表,最多的情况为 <code>["order", "trad", "poly", "draw"]</code></p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>plugins</span> <span class="code-desc" data-v-96507b74></span> <i title="在线运行" class="ei-play code-btn" data-v-96507b74></i> <i title="复制代码" class="ei-copy code-btn" data-v-96507b74></i></div> <pre data-v-96507b74><code class="hljs"></code></pre> <div style="display:none;" data-v-96507b74><div class="output-title" data-v-96507b74>运行结果</div> <div class="output-area" data-v-96507b74><div class="show-toggle" data-v-96507b74><i class="ei-angle-up" data-v-96507b74></i> <span class="show-text" data-v-96507b74>隐藏结果</span></div> <div style="display:;" data-v-96507b74></div></div></div> <div class="powered-by" data-v-96507b74>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div></div> <footer class="page-edit"><!----> <!----></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-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">12/9/2020, 3:40:54 PM</span></div></footer> <div class="page-nav"><p class="inner"><!----> <span class="next"><a href="/cnchar/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.3d5a33c2.js" defer></script><script src="/cnchar/assets/js/2.2bb98858.js" defer></script><script src="/cnchar/assets/js/9.b0989f22.js" defer></script><script src="/cnchar/assets/js/3.79e54f24.js" defer></script>
|
||||
</span></p></div> </main></div><div class="global-ui"><!----></div></div>
|
||||
<script src="/cnchar/assets/js/app.479643a8.js" defer></script><script src="/cnchar/assets/js/2.79099ae3.js" defer></script><script src="/cnchar/assets/js/9.79574551.js" defer></script><script src="/cnchar/assets/js/3.94141914.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<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.dcd81eba.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.3d5a33c2.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/cnchar/assets/js/10.eeab0d04.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/11.7d5ff5df.js"><link rel="prefetch" href="/cnchar/assets/js/12.cb64600b.js"><link rel="prefetch" href="/cnchar/assets/js/13.b8427796.js"><link rel="prefetch" href="/cnchar/assets/js/14.8cb74a49.js"><link rel="prefetch" href="/cnchar/assets/js/15.6d40aa8a.js"><link rel="prefetch" href="/cnchar/assets/js/16.6843fc0d.js"><link rel="prefetch" href="/cnchar/assets/js/17.d8524e84.js"><link rel="prefetch" href="/cnchar/assets/js/18.35eb0643.js"><link rel="prefetch" href="/cnchar/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/cnchar/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/cnchar/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/cnchar/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/cnchar/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/cnchar/assets/js/24.45be5988.js"><link rel="prefetch" href="/cnchar/assets/js/25.54b888ce.js"><link rel="prefetch" href="/cnchar/assets/js/3.79e54f24.js"><link rel="prefetch" href="/cnchar/assets/js/4.dec2fc6b.js"><link rel="prefetch" href="/cnchar/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/cnchar/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/cnchar/assets/js/7.67523f2c.js"><link rel="prefetch" href="/cnchar/assets/js/8.f01c3380.js"><link rel="prefetch" href="/cnchar/assets/js/9.b0989f22.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.dcd81eba.css">
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.1aa8b5c2.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.479643a8.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.79099ae3.js" as="script"><link rel="preload" href="/cnchar/assets/js/10.a61514ca.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/11.f0beebd0.js"><link rel="prefetch" href="/cnchar/assets/js/12.9fbed8f3.js"><link rel="prefetch" href="/cnchar/assets/js/13.d28b998f.js"><link rel="prefetch" href="/cnchar/assets/js/14.fcf3c48a.js"><link rel="prefetch" href="/cnchar/assets/js/15.44644ac9.js"><link rel="prefetch" href="/cnchar/assets/js/16.2379d48b.js"><link rel="prefetch" href="/cnchar/assets/js/17.cec8473d.js"><link rel="prefetch" href="/cnchar/assets/js/18.23d8fb28.js"><link rel="prefetch" href="/cnchar/assets/js/19.a197b25b.js"><link rel="prefetch" href="/cnchar/assets/js/20.5603fdd0.js"><link rel="prefetch" href="/cnchar/assets/js/21.b9849f84.js"><link rel="prefetch" href="/cnchar/assets/js/22.876a6289.js"><link rel="prefetch" href="/cnchar/assets/js/3.94141914.js"><link rel="prefetch" href="/cnchar/assets/js/4.60b58529.js"><link rel="prefetch" href="/cnchar/assets/js/5.b99f65d5.js"><link rel="prefetch" href="/cnchar/assets/js/6.6a00c290.js"><link rel="prefetch" href="/cnchar/assets/js/7.39b7a2be.js"><link rel="prefetch" href="/cnchar/assets/js/8.4e18b7d9.js"><link rel="prefetch" href="/cnchar/assets/js/9.79574551.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.1aa8b5c2.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">
|
||||
|
@ -132,11 +132,11 @@ cnchar<span class="token punctuation">.</span>xhy<span class="token punctuation"
|
|||
<span class="token punctuation">[</span><span class="token string">'歇后语第一句'</span><span class="token punctuation">,</span> <span class="token string">'歇后语第二句'</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
|
||||
<span class="token punctuation">[</span><span class="token string">'歇后语第一句2'</span><span class="token punctuation">,</span> <span class="token string">'歇后语第二句2'</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
|
||||
<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
</code></pre></div></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
</code></pre></div></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">12/9/2020, 3:40:54 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/tool.html" class="prev">
|
||||
工具方法
|
||||
</a></span> <!----></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.3d5a33c2.js" defer></script><script src="/cnchar/assets/js/2.2bb98858.js" defer></script><script src="/cnchar/assets/js/10.eeab0d04.js" defer></script>
|
||||
</a></span> <!----></p></div> </main></div><div class="global-ui"><!----></div></div>
|
||||
<script src="/cnchar/assets/js/app.479643a8.js" defer></script><script src="/cnchar/assets/js/2.79099ae3.js" defer></script><script src="/cnchar/assets/js/10.a61514ca.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<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.dcd81eba.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.3d5a33c2.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/cnchar/assets/js/11.7d5ff5df.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.79e54f24.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.eeab0d04.js"><link rel="prefetch" href="/cnchar/assets/js/12.cb64600b.js"><link rel="prefetch" href="/cnchar/assets/js/13.b8427796.js"><link rel="prefetch" href="/cnchar/assets/js/14.8cb74a49.js"><link rel="prefetch" href="/cnchar/assets/js/15.6d40aa8a.js"><link rel="prefetch" href="/cnchar/assets/js/16.6843fc0d.js"><link rel="prefetch" href="/cnchar/assets/js/17.d8524e84.js"><link rel="prefetch" href="/cnchar/assets/js/18.35eb0643.js"><link rel="prefetch" href="/cnchar/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/cnchar/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/cnchar/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/cnchar/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/cnchar/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/cnchar/assets/js/24.45be5988.js"><link rel="prefetch" href="/cnchar/assets/js/25.54b888ce.js"><link rel="prefetch" href="/cnchar/assets/js/4.dec2fc6b.js"><link rel="prefetch" href="/cnchar/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/cnchar/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/cnchar/assets/js/7.67523f2c.js"><link rel="prefetch" href="/cnchar/assets/js/8.f01c3380.js"><link rel="prefetch" href="/cnchar/assets/js/9.b0989f22.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.dcd81eba.css">
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.1aa8b5c2.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.479643a8.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.79099ae3.js" as="script"><link rel="preload" href="/cnchar/assets/js/11.f0beebd0.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.94141914.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.a61514ca.js"><link rel="prefetch" href="/cnchar/assets/js/12.9fbed8f3.js"><link rel="prefetch" href="/cnchar/assets/js/13.d28b998f.js"><link rel="prefetch" href="/cnchar/assets/js/14.fcf3c48a.js"><link rel="prefetch" href="/cnchar/assets/js/15.44644ac9.js"><link rel="prefetch" href="/cnchar/assets/js/16.2379d48b.js"><link rel="prefetch" href="/cnchar/assets/js/17.cec8473d.js"><link rel="prefetch" href="/cnchar/assets/js/18.23d8fb28.js"><link rel="prefetch" href="/cnchar/assets/js/19.a197b25b.js"><link rel="prefetch" href="/cnchar/assets/js/20.5603fdd0.js"><link rel="prefetch" href="/cnchar/assets/js/21.b9849f84.js"><link rel="prefetch" href="/cnchar/assets/js/22.876a6289.js"><link rel="prefetch" href="/cnchar/assets/js/4.60b58529.js"><link rel="prefetch" href="/cnchar/assets/js/5.b99f65d5.js"><link rel="prefetch" href="/cnchar/assets/js/6.6a00c290.js"><link rel="prefetch" href="/cnchar/assets/js/7.39b7a2be.js"><link rel="prefetch" href="/cnchar/assets/js/8.4e18b7d9.js"><link rel="prefetch" href="/cnchar/assets/js/9.79574551.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.1aa8b5c2.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">
|
||||
|
@ -127,7 +127,7 @@ 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-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <h2 id="_4-笔顺绘制实例"><a href="#_4-笔顺绘制实例" class="header-anchor">#</a> 4. 笔顺绘制实例</h2> <p>当<code>type=stroke</code>时,笔顺模式启用,该模式会单笔绘制汉字的每一个笔划,并且为每一个笔划生成一个绘制块</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>stroke-draw</span> <span class="code-desc" data-v-96507b74></span> <i title="在线运行" class="ei-play code-btn" data-v-96507b74></i> <i title="复制代码" class="ei-copy code-btn" data-v-96507b74></i></div> <pre data-v-96507b74><code class="hljs"></code></pre> <div style="display:none;" data-v-96507b74><div class="output-title" data-v-96507b74>运行结果</div> <div class="output-area" data-v-96507b74><div class="show-toggle" data-v-96507b74><i class="ei-angle-up" data-v-96507b74></i> <span class="show-text" data-v-96507b74>隐藏结果</span></div> <div style="display:;" data-v-96507b74></div></div></div> <div class="powered-by" data-v-96507b74>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <h2 id="_5-动画绘制模式"><a href="#_5-动画绘制模式" class="header-anchor">#</a> 5. 动画绘制模式</h2> <p>当<code>type=animation</code>时,动画模式启用,该模式会按笔顺用动画绘制每一个笔划</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>animation-draw</span> <span class="code-desc" data-v-96507b74></span> <i title="在线运行" class="ei-play code-btn" data-v-96507b74></i> <i title="复制代码" class="ei-copy code-btn" data-v-96507b74></i></div> <pre data-v-96507b74><code class="hljs"></code></pre> <div style="display:none;" data-v-96507b74><div class="output-title" data-v-96507b74>运行结果</div> <div class="output-area" data-v-96507b74><div class="show-toggle" data-v-96507b74><i class="ei-angle-up" data-v-96507b74></i> <span class="show-text" data-v-96507b74>隐藏结果</span></div> <div style="display:;" data-v-96507b74></div></div></div> <div class="powered-by" data-v-96507b74>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <h2 id="_6-测验模式"><a href="#_6-测验模式" class="header-anchor">#</a> 6. 测验模式</h2> <p>当<code>type=test</code>时,测验模式启用,该模式用户可以在容器内绘制汉字,cnchar-draw会检测是否绘制正确</p> <p>请用鼠标在绘制出的<strong>测验</strong>两个字上按顺序画上笔画</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>test-draw</span> <span class="code-desc" data-v-96507b74></span> <i title="在线运行" class="ei-play code-btn" data-v-96507b74></i> <i title="复制代码" class="ei-copy code-btn" data-v-96507b74></i></div> <pre data-v-96507b74><code class="hljs"></code></pre> <div style="display:none;" data-v-96507b74><div class="output-title" data-v-96507b74>运行结果</div> <div class="output-area" data-v-96507b74><div class="show-toggle" data-v-96507b74><i class="ei-angle-up" data-v-96507b74></i> <span class="show-text" data-v-96507b74>隐藏结果</span></div> <div style="display:;" data-v-96507b74></div></div></div> <div class="powered-by" data-v-96507b74>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <h2 id="_7-微信小程序中使用"><a href="#_7-微信小程序中使用" class="header-anchor">#</a> 7. 微信小程序中使用</h2> <p>该库由 HanziWriter 驱动,目前仅支持在web环境下使用,如需微信小程序使用请参考 <a href="https://hanziwriter.org/docs.html#wechat-miniprograms" target="_blank" rel="noopener noreferrer">HanziWriter API<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"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <h2 id="_7-微信小程序中使用"><a href="#_7-微信小程序中使用" class="header-anchor">#</a> 7. 微信小程序中使用</h2> <p>该库由 HanziWriter 驱动,目前仅支持在web环境下使用,如需微信小程序使用请参考 <a href="https://hanziwriter.org/docs.html#wechat-miniprograms" target="_blank" rel="noopener noreferrer">HanziWriter API<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">12/9/2020, 3:40:54 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/trad.html" class="prev">
|
||||
cnchar-trad
|
||||
|
@ -135,7 +135,7 @@ draw(<span class="hljs-string">'你好'</span>)</code></pre></div> <h2 id="_2-
|
|||
cnchar-idiom
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.3d5a33c2.js" defer></script><script src="/cnchar/assets/js/2.2bb98858.js" defer></script><script src="/cnchar/assets/js/11.7d5ff5df.js" defer></script><script src="/cnchar/assets/js/3.79e54f24.js" defer></script>
|
||||
</span></p></div> </main></div><div class="global-ui"><!----></div></div>
|
||||
<script src="/cnchar/assets/js/app.479643a8.js" defer></script><script src="/cnchar/assets/js/2.79099ae3.js" defer></script><script src="/cnchar/assets/js/11.f0beebd0.js" defer></script><script src="/cnchar/assets/js/3.94141914.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<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.dcd81eba.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.3d5a33c2.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/cnchar/assets/js/12.cb64600b.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.79e54f24.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.eeab0d04.js"><link rel="prefetch" href="/cnchar/assets/js/11.7d5ff5df.js"><link rel="prefetch" href="/cnchar/assets/js/13.b8427796.js"><link rel="prefetch" href="/cnchar/assets/js/14.8cb74a49.js"><link rel="prefetch" href="/cnchar/assets/js/15.6d40aa8a.js"><link rel="prefetch" href="/cnchar/assets/js/16.6843fc0d.js"><link rel="prefetch" href="/cnchar/assets/js/17.d8524e84.js"><link rel="prefetch" href="/cnchar/assets/js/18.35eb0643.js"><link rel="prefetch" href="/cnchar/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/cnchar/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/cnchar/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/cnchar/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/cnchar/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/cnchar/assets/js/24.45be5988.js"><link rel="prefetch" href="/cnchar/assets/js/25.54b888ce.js"><link rel="prefetch" href="/cnchar/assets/js/4.dec2fc6b.js"><link rel="prefetch" href="/cnchar/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/cnchar/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/cnchar/assets/js/7.67523f2c.js"><link rel="prefetch" href="/cnchar/assets/js/8.f01c3380.js"><link rel="prefetch" href="/cnchar/assets/js/9.b0989f22.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.dcd81eba.css">
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.1aa8b5c2.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.479643a8.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.79099ae3.js" as="script"><link rel="preload" href="/cnchar/assets/js/12.9fbed8f3.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.94141914.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.a61514ca.js"><link rel="prefetch" href="/cnchar/assets/js/11.f0beebd0.js"><link rel="prefetch" href="/cnchar/assets/js/13.d28b998f.js"><link rel="prefetch" href="/cnchar/assets/js/14.fcf3c48a.js"><link rel="prefetch" href="/cnchar/assets/js/15.44644ac9.js"><link rel="prefetch" href="/cnchar/assets/js/16.2379d48b.js"><link rel="prefetch" href="/cnchar/assets/js/17.cec8473d.js"><link rel="prefetch" href="/cnchar/assets/js/18.23d8fb28.js"><link rel="prefetch" href="/cnchar/assets/js/19.a197b25b.js"><link rel="prefetch" href="/cnchar/assets/js/20.5603fdd0.js"><link rel="prefetch" href="/cnchar/assets/js/21.b9849f84.js"><link rel="prefetch" href="/cnchar/assets/js/22.876a6289.js"><link rel="prefetch" href="/cnchar/assets/js/4.60b58529.js"><link rel="prefetch" href="/cnchar/assets/js/5.b99f65d5.js"><link rel="prefetch" href="/cnchar/assets/js/6.6a00c290.js"><link rel="prefetch" href="/cnchar/assets/js/7.39b7a2be.js"><link rel="prefetch" href="/cnchar/assets/js/8.4e18b7d9.js"><link rel="prefetch" href="/cnchar/assets/js/9.79574551.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.1aa8b5c2.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">
|
||||
|
@ -80,7 +80,7 @@
|
|||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <p>使用cdn引用时,会在window对向上暴露 <code>CncharIdiom</code> 对象</p> <h2 id="_2-idiom-参数"><a href="#_2-idiom-参数" class="header-anchor">#</a> 2. idiom 参数</h2> <p>参数调用如下,value表示查询对象,可以试拼音汉字笔画数,所有 arg 参数都是可选的</p> <div><pre><code class="hljs typescript">cnchar.idiom(value,arg1,arg2,...);</code></pre></div> <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;">char</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;">stroke</td> <td style="text-align:center;">根据笔画数查询成语</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">优先级高于char</td></tr> <tr><td style="text-align:center;">spell</td> <td style="text-align:center;">根据拼音查询成语</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">优先级高于stroke</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;">仅在spell模式下生效</td></tr></tbody></table> <p>注:优先级 <code>spell</code> > <code>stroke</code> > <code>char</code></p> <h2 id="_3-实例"><a href="#_3-实例" class="header-anchor">#</a> 3. 实例</h2> <p>该库为cnchar扩展了成语功能</p> <div><pre><code class="hljs javascript">cnchar.idiom([<span class="hljs-string">'五'</span>, <span class="hljs-string">''</span>, <span class="hljs-string">'十'</span>, <span class="hljs-string">''</span>]) <span class="hljs-comment">// ['五风十雨', '五光十色']</span>
|
||||
cnchar.idiom([<span class="hljs-number">4</span>, <span class="hljs-number">6</span>, <span class="hljs-number">2</span>, <span class="hljs-number">6</span>], <span class="hljs-string">'stroke'</span>) <span class="hljs-comment">// ['五光十色']</span>
|
||||
cnchar.idiom(<span class="hljs-string">'shang'</span>, <span class="hljs-string">'spell'</span>) <span class="hljs-comment">// ['伤风败化', '伤风败俗', ... ]</span>
|
||||
cnchar.idiom(<span class="hljs-string">'shang4'</span>, <span class="hljs-string">'spell'</span>, <span class="hljs-string">'tone'</span>) <span class="hljs-comment">// ['伤风败化', '伤风败俗', ... ]</span></code></pre></div></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
cnchar.idiom(<span class="hljs-string">'shang4'</span>, <span class="hljs-string">'spell'</span>, <span class="hljs-string">'tone'</span>) <span class="hljs-comment">// ['伤风败化', '伤风败俗', ... ]</span></code></pre></div></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">12/9/2020, 3:40:54 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/draw.html" class="prev">
|
||||
cnchar-draw
|
||||
|
@ -88,7 +88,7 @@ cnchar.idiom(<span class="hljs-string">'shang4'</span>, <span class="hljs-string
|
|||
cnchar-xhy
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.3d5a33c2.js" defer></script><script src="/cnchar/assets/js/2.2bb98858.js" defer></script><script src="/cnchar/assets/js/12.cb64600b.js" defer></script><script src="/cnchar/assets/js/3.79e54f24.js" defer></script>
|
||||
</span></p></div> </main></div><div class="global-ui"><!----></div></div>
|
||||
<script src="/cnchar/assets/js/app.479643a8.js" defer></script><script src="/cnchar/assets/js/2.79099ae3.js" defer></script><script src="/cnchar/assets/js/12.9fbed8f3.js" defer></script><script src="/cnchar/assets/js/3.94141914.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<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.dcd81eba.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.3d5a33c2.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/cnchar/assets/js/13.b8427796.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.79e54f24.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.eeab0d04.js"><link rel="prefetch" href="/cnchar/assets/js/11.7d5ff5df.js"><link rel="prefetch" href="/cnchar/assets/js/12.cb64600b.js"><link rel="prefetch" href="/cnchar/assets/js/14.8cb74a49.js"><link rel="prefetch" href="/cnchar/assets/js/15.6d40aa8a.js"><link rel="prefetch" href="/cnchar/assets/js/16.6843fc0d.js"><link rel="prefetch" href="/cnchar/assets/js/17.d8524e84.js"><link rel="prefetch" href="/cnchar/assets/js/18.35eb0643.js"><link rel="prefetch" href="/cnchar/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/cnchar/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/cnchar/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/cnchar/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/cnchar/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/cnchar/assets/js/24.45be5988.js"><link rel="prefetch" href="/cnchar/assets/js/25.54b888ce.js"><link rel="prefetch" href="/cnchar/assets/js/4.dec2fc6b.js"><link rel="prefetch" href="/cnchar/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/cnchar/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/cnchar/assets/js/7.67523f2c.js"><link rel="prefetch" href="/cnchar/assets/js/8.f01c3380.js"><link rel="prefetch" href="/cnchar/assets/js/9.b0989f22.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.dcd81eba.css">
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.1aa8b5c2.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.479643a8.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.79099ae3.js" as="script"><link rel="preload" href="/cnchar/assets/js/13.d28b998f.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.94141914.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.a61514ca.js"><link rel="prefetch" href="/cnchar/assets/js/11.f0beebd0.js"><link rel="prefetch" href="/cnchar/assets/js/12.9fbed8f3.js"><link rel="prefetch" href="/cnchar/assets/js/14.fcf3c48a.js"><link rel="prefetch" href="/cnchar/assets/js/15.44644ac9.js"><link rel="prefetch" href="/cnchar/assets/js/16.2379d48b.js"><link rel="prefetch" href="/cnchar/assets/js/17.cec8473d.js"><link rel="prefetch" href="/cnchar/assets/js/18.23d8fb28.js"><link rel="prefetch" href="/cnchar/assets/js/19.a197b25b.js"><link rel="prefetch" href="/cnchar/assets/js/20.5603fdd0.js"><link rel="prefetch" href="/cnchar/assets/js/21.b9849f84.js"><link rel="prefetch" href="/cnchar/assets/js/22.876a6289.js"><link rel="prefetch" href="/cnchar/assets/js/4.60b58529.js"><link rel="prefetch" href="/cnchar/assets/js/5.b99f65d5.js"><link rel="prefetch" href="/cnchar/assets/js/6.6a00c290.js"><link rel="prefetch" href="/cnchar/assets/js/7.39b7a2be.js"><link rel="prefetch" href="/cnchar/assets/js/8.4e18b7d9.js"><link rel="prefetch" href="/cnchar/assets/js/9.79574551.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.1aa8b5c2.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">
|
||||
|
@ -82,7 +82,7 @@ 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-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <p>笔划形状模式(shape)由于系统原因,某些形状字符在 ios和macos上无法显示</p> <h2 id="_4-笔画推出原汉字-ordertoword"><a href="#_4-笔画推出原汉字-ordertoword" class="header-anchor">#</a> 4. 笔画推出原汉字(orderToWord)</h2> <h3 id="_4-1-使用"><a href="#_4-1-使用" class="header-anchor">#</a> 4.1 使用</h3> <p>当引入 <code>cnchar-order</code> 功能库(版本 2.0.2 及以上)之后,cnchar 就支持了根据笔画名称序列推出原汉字的功能,使用方式如下:</p> <div><pre><code class="hljs javascript">cnchar.orderToWord(orderNames[,...args]);</code></pre></div> <p><code>orderNames</code> 是笔画名称序列, 可以是空格分隔的笔画名称字符串或笔画名称数组</p> <p><code>args</code> 是参数列表,可选值有 <code>['match','matchorder','contain','start','array','simple']</code>, 使用 <code>cnchar.type.orderToWord</code> 可以查看可选值, 详情请见 4.2</p> <p>以下是一个简单的使用实例:</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>orderToWord</span> <span class="code-desc" data-v-96507b74></span> <i title="在线运行" class="ei-play code-btn" data-v-96507b74></i> <i title="复制代码" class="ei-copy code-btn" data-v-96507b74></i></div> <pre data-v-96507b74><code class="hljs"></code></pre> <div style="display:none;" data-v-96507b74><div class="output-title" data-v-96507b74>运行结果</div> <div class="output-area" data-v-96507b74><div class="show-toggle" data-v-96507b74><i class="ei-angle-up" data-v-96507b74></i> <span class="show-text" data-v-96507b74>隐藏结果</span></div> <div style="display:;" data-v-96507b74></div></div></div> <div class="powered-by" data-v-96507b74>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <h3 id="_4-2-参数详情"><a href="#_4-2-参数详情" class="header-anchor">#</a> 4.2 参数详情</h3> <p>参数调用如下,所有 arg 参数都是可选的</p> <div><pre><code class="hljs javascript">cnchar.orderToWord(orders,arg1,arg2,...);</code></pre></div> <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;">match</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;">matchorder</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;">contain</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;">start</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;">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;">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;">该参数仅在引入了 <code>cnchar-trad</code> 后有效</td></tr> <tr><td style="text-align:center;">trad</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;">该参数仅在引入了 <code>cnchar-trad</code> 后有效</td></tr></tbody></table> <p>关于匹配参数,优先级为 <strong>match > matchorder > contain > start > 默认</strong></p> <p>不含有匹配参数时表示使用全匹配,即汉字笔画数与传入的 orders 完全一致</p> <h3 id="_4-3-汉字所有笔划-ordertoword-orders"><a href="#_4-3-汉字所有笔划-ordertoword-orders" class="header-anchor">#</a> 4.3 汉字所有笔划(orderToWord.orders)</h3> <p>可用的笔画名称可以通过以下 api 查看</p> <p>orderNames 只需要传入笔画名称即可,也就是下面 json 数据的 key 值</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>orders</span> <span class="code-desc" data-v-96507b74></span> <i title="在线运行" class="ei-play code-btn" data-v-96507b74></i> <i title="复制代码" class="ei-copy code-btn" data-v-96507b74></i></div> <pre data-v-96507b74><code class="hljs"></code></pre> <div style="display:none;" data-v-96507b74><div class="output-title" data-v-96507b74>运行结果</div> <div class="output-area" data-v-96507b74><div class="show-toggle" data-v-96507b74><i class="ei-angle-up" data-v-96507b74></i> <span class="show-text" data-v-96507b74>隐藏结果</span></div> <div style="display:;" data-v-96507b74></div></div></div> <div class="powered-by" data-v-96507b74>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <p>注:其中以下五对笔画没有进行区分,使用的是同样的字母表示:
|
||||
<strong>卧钩 = 斜钩</strong>、<strong>横折弯 = 横折折</strong>、<strong>横折折折钩 = 横撇弯钩</strong>、<strong>横撇 = 横钩</strong>、<strong>竖折折 = 竖折撇</strong></p></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
<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">12/9/2020, 3:40:54 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/poly.html" class="prev">
|
||||
cnchar-poly
|
||||
|
@ -90,7 +90,7 @@ cnchar.use(order); <span class="hljs-comment">// use 在浏览器环境中非必
|
|||
cnchar-trad
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.3d5a33c2.js" defer></script><script src="/cnchar/assets/js/2.2bb98858.js" defer></script><script src="/cnchar/assets/js/13.b8427796.js" defer></script><script src="/cnchar/assets/js/3.79e54f24.js" defer></script>
|
||||
</span></p></div> </main></div><div class="global-ui"><!----></div></div>
|
||||
<script src="/cnchar/assets/js/app.479643a8.js" defer></script><script src="/cnchar/assets/js/2.79099ae3.js" defer></script><script src="/cnchar/assets/js/13.d28b998f.js" defer></script><script src="/cnchar/assets/js/3.94141914.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<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.dcd81eba.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.3d5a33c2.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/cnchar/assets/js/14.8cb74a49.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.79e54f24.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.eeab0d04.js"><link rel="prefetch" href="/cnchar/assets/js/11.7d5ff5df.js"><link rel="prefetch" href="/cnchar/assets/js/12.cb64600b.js"><link rel="prefetch" href="/cnchar/assets/js/13.b8427796.js"><link rel="prefetch" href="/cnchar/assets/js/15.6d40aa8a.js"><link rel="prefetch" href="/cnchar/assets/js/16.6843fc0d.js"><link rel="prefetch" href="/cnchar/assets/js/17.d8524e84.js"><link rel="prefetch" href="/cnchar/assets/js/18.35eb0643.js"><link rel="prefetch" href="/cnchar/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/cnchar/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/cnchar/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/cnchar/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/cnchar/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/cnchar/assets/js/24.45be5988.js"><link rel="prefetch" href="/cnchar/assets/js/25.54b888ce.js"><link rel="prefetch" href="/cnchar/assets/js/4.dec2fc6b.js"><link rel="prefetch" href="/cnchar/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/cnchar/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/cnchar/assets/js/7.67523f2c.js"><link rel="prefetch" href="/cnchar/assets/js/8.f01c3380.js"><link rel="prefetch" href="/cnchar/assets/js/9.b0989f22.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.dcd81eba.css">
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.1aa8b5c2.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.479643a8.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.79099ae3.js" as="script"><link rel="preload" href="/cnchar/assets/js/14.fcf3c48a.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.94141914.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.a61514ca.js"><link rel="prefetch" href="/cnchar/assets/js/11.f0beebd0.js"><link rel="prefetch" href="/cnchar/assets/js/12.9fbed8f3.js"><link rel="prefetch" href="/cnchar/assets/js/13.d28b998f.js"><link rel="prefetch" href="/cnchar/assets/js/15.44644ac9.js"><link rel="prefetch" href="/cnchar/assets/js/16.2379d48b.js"><link rel="prefetch" href="/cnchar/assets/js/17.cec8473d.js"><link rel="prefetch" href="/cnchar/assets/js/18.23d8fb28.js"><link rel="prefetch" href="/cnchar/assets/js/19.a197b25b.js"><link rel="prefetch" href="/cnchar/assets/js/20.5603fdd0.js"><link rel="prefetch" href="/cnchar/assets/js/21.b9849f84.js"><link rel="prefetch" href="/cnchar/assets/js/22.876a6289.js"><link rel="prefetch" href="/cnchar/assets/js/4.60b58529.js"><link rel="prefetch" href="/cnchar/assets/js/5.b99f65d5.js"><link rel="prefetch" href="/cnchar/assets/js/6.6a00c290.js"><link rel="prefetch" href="/cnchar/assets/js/7.39b7a2be.js"><link rel="prefetch" href="/cnchar/assets/js/8.4e18b7d9.js"><link rel="prefetch" href="/cnchar/assets/js/9.79574551.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.1aa8b5c2.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">
|
||||
|
@ -79,7 +79,7 @@
|
|||
<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><li><a href="/cnchar/doc/idiom.html" class="sidebar-link">cnchar-idiom</a></li><li><a href="/cnchar/doc/xhy.html" class="sidebar-link">cnchar-xhy</a></li><li><a href="/cnchar/doc/radical.html" class="sidebar-link">cnchar-radical</a></li><li><a href="/cnchar/doc/tool.html" class="sidebar-link">工具方法</a></li><li><a href="/cnchar/doc/custom.html" class="sidebar-link">自定义数据</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><pre><code class="hljs">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> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>poly</span> <span class="code-desc" data-v-96507b74></span> <i title="在线运行" class="ei-play code-btn" data-v-96507b74></i> <i title="复制代码" class="ei-copy code-btn" data-v-96507b74></i></div> <pre data-v-96507b74><code class="hljs"></code></pre> <div style="display:none;" data-v-96507b74><div class="output-title" data-v-96507b74>运行结果</div> <div class="output-area" data-v-96507b74><div class="show-toggle" data-v-96507b74><i class="ei-angle-up" data-v-96507b74></i> <span class="show-text" data-v-96507b74>隐藏结果</span></div> <div style="display:;" data-v-96507b74></div></div></div> <div class="powered-by" data-v-96507b74>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <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"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <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">12/9/2020, 3:40:54 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/cnchar.html" class="prev">
|
||||
cnchar
|
||||
|
@ -87,7 +87,7 @@ cnchar.use(poly); <span class="hljs-comment">// use 在浏览器环境中非必
|
|||
cnchar-order
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.3d5a33c2.js" defer></script><script src="/cnchar/assets/js/2.2bb98858.js" defer></script><script src="/cnchar/assets/js/14.8cb74a49.js" defer></script><script src="/cnchar/assets/js/3.79e54f24.js" defer></script>
|
||||
</span></p></div> </main></div><div class="global-ui"><!----></div></div>
|
||||
<script src="/cnchar/assets/js/app.479643a8.js" defer></script><script src="/cnchar/assets/js/2.79099ae3.js" defer></script><script src="/cnchar/assets/js/14.fcf3c48a.js" defer></script><script src="/cnchar/assets/js/3.94141914.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<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.dcd81eba.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.3d5a33c2.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/cnchar/assets/js/15.6d40aa8a.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.79e54f24.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.eeab0d04.js"><link rel="prefetch" href="/cnchar/assets/js/11.7d5ff5df.js"><link rel="prefetch" href="/cnchar/assets/js/12.cb64600b.js"><link rel="prefetch" href="/cnchar/assets/js/13.b8427796.js"><link rel="prefetch" href="/cnchar/assets/js/14.8cb74a49.js"><link rel="prefetch" href="/cnchar/assets/js/16.6843fc0d.js"><link rel="prefetch" href="/cnchar/assets/js/17.d8524e84.js"><link rel="prefetch" href="/cnchar/assets/js/18.35eb0643.js"><link rel="prefetch" href="/cnchar/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/cnchar/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/cnchar/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/cnchar/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/cnchar/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/cnchar/assets/js/24.45be5988.js"><link rel="prefetch" href="/cnchar/assets/js/25.54b888ce.js"><link rel="prefetch" href="/cnchar/assets/js/4.dec2fc6b.js"><link rel="prefetch" href="/cnchar/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/cnchar/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/cnchar/assets/js/7.67523f2c.js"><link rel="prefetch" href="/cnchar/assets/js/8.f01c3380.js"><link rel="prefetch" href="/cnchar/assets/js/9.b0989f22.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.dcd81eba.css">
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.1aa8b5c2.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.479643a8.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.79099ae3.js" as="script"><link rel="preload" href="/cnchar/assets/js/15.44644ac9.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.94141914.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.a61514ca.js"><link rel="prefetch" href="/cnchar/assets/js/11.f0beebd0.js"><link rel="prefetch" href="/cnchar/assets/js/12.9fbed8f3.js"><link rel="prefetch" href="/cnchar/assets/js/13.d28b998f.js"><link rel="prefetch" href="/cnchar/assets/js/14.fcf3c48a.js"><link rel="prefetch" href="/cnchar/assets/js/16.2379d48b.js"><link rel="prefetch" href="/cnchar/assets/js/17.cec8473d.js"><link rel="prefetch" href="/cnchar/assets/js/18.23d8fb28.js"><link rel="prefetch" href="/cnchar/assets/js/19.a197b25b.js"><link rel="prefetch" href="/cnchar/assets/js/20.5603fdd0.js"><link rel="prefetch" href="/cnchar/assets/js/21.b9849f84.js"><link rel="prefetch" href="/cnchar/assets/js/22.876a6289.js"><link rel="prefetch" href="/cnchar/assets/js/4.60b58529.js"><link rel="prefetch" href="/cnchar/assets/js/5.b99f65d5.js"><link rel="prefetch" href="/cnchar/assets/js/6.6a00c290.js"><link rel="prefetch" href="/cnchar/assets/js/7.39b7a2be.js"><link rel="prefetch" href="/cnchar/assets/js/8.4e18b7d9.js"><link rel="prefetch" href="/cnchar/assets/js/9.79574551.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.1aa8b5c2.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">
|
||||
|
@ -80,7 +80,7 @@
|
|||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <p>使用cdn引用时,会在window对向上暴露 <code>CncharRadical</code> 对象</p> <h2 id="_2-radical-参数"><a href="#_2-radical-参数" class="header-anchor">#</a> 2. radical 参数</h2> <p>参数调用如下,value表示需要查询偏旁的汉字,可以是字符串或数组</p> <div><pre><code class="hljs typescript">cnchar.radical(value,arg1,arg2,...);</code></pre></div> <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></tbody></table> <h2 id="_3-实例"><a href="#_3-实例" class="header-anchor">#</a> 3. 实例</h2> <p>该库为cnchar扩展了偏旁部首功能</p> <div><pre><code class="hljs javascript">cnchar.radical(<span class="hljs-string">'你'</span>); <span class="hljs-comment">// "亻",</span>
|
||||
cnchar.radical(<span class="hljs-string">'你好呀'</span>); <span class="hljs-comment">// "亻女口"</span>
|
||||
cnchar.radical(<span class="hljs-string">'你好呀'</span>, <span class="hljs-string">'array'</span>); <span class="hljs-comment">// ["亻", "女", "口"]</span>
|
||||
cnchar.radical([<span class="hljs-string">"你"</span>, <span class="hljs-string">"好"</span>, <span class="hljs-string">"呀"</span>]); <span class="hljs-comment">// ["亻", "女", "口"]</span></code></pre></div></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
cnchar.radical([<span class="hljs-string">"你"</span>, <span class="hljs-string">"好"</span>, <span class="hljs-string">"呀"</span>]); <span class="hljs-comment">// ["亻", "女", "口"]</span></code></pre></div></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">12/9/2020, 3:40:54 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/xhy.html" class="prev">
|
||||
cnchar-xhy
|
||||
|
@ -88,7 +88,7 @@ cnchar.radical([<span class="hljs-string">"你"</span>, <span class="hljs-string
|
|||
工具方法
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.3d5a33c2.js" defer></script><script src="/cnchar/assets/js/2.2bb98858.js" defer></script><script src="/cnchar/assets/js/15.6d40aa8a.js" defer></script><script src="/cnchar/assets/js/3.79e54f24.js" defer></script>
|
||||
</span></p></div> </main></div><div class="global-ui"><!----></div></div>
|
||||
<script src="/cnchar/assets/js/app.479643a8.js" defer></script><script src="/cnchar/assets/js/2.79099ae3.js" defer></script><script src="/cnchar/assets/js/15.44644ac9.js" defer></script><script src="/cnchar/assets/js/3.94141914.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<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.dcd81eba.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.3d5a33c2.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/cnchar/assets/js/16.6843fc0d.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.79e54f24.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.eeab0d04.js"><link rel="prefetch" href="/cnchar/assets/js/11.7d5ff5df.js"><link rel="prefetch" href="/cnchar/assets/js/12.cb64600b.js"><link rel="prefetch" href="/cnchar/assets/js/13.b8427796.js"><link rel="prefetch" href="/cnchar/assets/js/14.8cb74a49.js"><link rel="prefetch" href="/cnchar/assets/js/15.6d40aa8a.js"><link rel="prefetch" href="/cnchar/assets/js/17.d8524e84.js"><link rel="prefetch" href="/cnchar/assets/js/18.35eb0643.js"><link rel="prefetch" href="/cnchar/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/cnchar/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/cnchar/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/cnchar/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/cnchar/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/cnchar/assets/js/24.45be5988.js"><link rel="prefetch" href="/cnchar/assets/js/25.54b888ce.js"><link rel="prefetch" href="/cnchar/assets/js/4.dec2fc6b.js"><link rel="prefetch" href="/cnchar/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/cnchar/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/cnchar/assets/js/7.67523f2c.js"><link rel="prefetch" href="/cnchar/assets/js/8.f01c3380.js"><link rel="prefetch" href="/cnchar/assets/js/9.b0989f22.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.dcd81eba.css">
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.1aa8b5c2.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.479643a8.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.79099ae3.js" as="script"><link rel="preload" href="/cnchar/assets/js/16.2379d48b.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.94141914.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.a61514ca.js"><link rel="prefetch" href="/cnchar/assets/js/11.f0beebd0.js"><link rel="prefetch" href="/cnchar/assets/js/12.9fbed8f3.js"><link rel="prefetch" href="/cnchar/assets/js/13.d28b998f.js"><link rel="prefetch" href="/cnchar/assets/js/14.fcf3c48a.js"><link rel="prefetch" href="/cnchar/assets/js/15.44644ac9.js"><link rel="prefetch" href="/cnchar/assets/js/17.cec8473d.js"><link rel="prefetch" href="/cnchar/assets/js/18.23d8fb28.js"><link rel="prefetch" href="/cnchar/assets/js/19.a197b25b.js"><link rel="prefetch" href="/cnchar/assets/js/20.5603fdd0.js"><link rel="prefetch" href="/cnchar/assets/js/21.b9849f84.js"><link rel="prefetch" href="/cnchar/assets/js/22.876a6289.js"><link rel="prefetch" href="/cnchar/assets/js/4.60b58529.js"><link rel="prefetch" href="/cnchar/assets/js/5.b99f65d5.js"><link rel="prefetch" href="/cnchar/assets/js/6.6a00c290.js"><link rel="prefetch" href="/cnchar/assets/js/7.39b7a2be.js"><link rel="prefetch" href="/cnchar/assets/js/8.4e18b7d9.js"><link rel="prefetch" href="/cnchar/assets/js/9.79574551.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.1aa8b5c2.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">
|
||||
|
@ -147,7 +147,7 @@ cnchar<span class="token punctuation">.</span><span class="token function">isPol
|
|||
</code></pre></div><h2 id="_10-转换拼音:shapespell"><a href="#_10-转换拼音:shapespell" class="header-anchor">#</a> 10. 转换拼音:shapeSpell</h2> <p><code>shapeSpell</code> 将数字表示的声调转为拼音声调</p> <p>如 <code>lv2</code> 会被转换成 <code>lǘ</code>,<code>ta1</code> 会被转换成 <code>tā</code>, 方便用户输入</p> <div class="language-ts extra-class"><pre class="language-ts"><code>cnchar<span class="token punctuation">.</span><span class="token function">shapeSpell</span><span class="token punctuation">(</span>spell<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span>
|
||||
</code></pre></div><p>使用实例</p> <div class="language-js extra-class"><pre class="language-js"><code>cnchar<span class="token punctuation">.</span><span class="token function">shapeSpell</span><span class="token punctuation">(</span><span class="token string">'lv2'</span><span class="token punctuation">)</span> <span class="token comment">// lǘ</span>
|
||||
cnchar<span class="token punctuation">.</span><span class="token function">shapeSpell</span><span class="token punctuation">(</span><span class="token string">'shang4'</span><span class="token punctuation">)</span> <span class="token comment">// shàng</span>
|
||||
</code></pre></div></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
</code></pre></div></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">12/9/2020, 3:40:54 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/radical.html" class="prev">
|
||||
cnchar-radical
|
||||
|
@ -155,7 +155,7 @@ cnchar<span class="token punctuation">.</span><span class="token function">shape
|
|||
自定义数据
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.3d5a33c2.js" defer></script><script src="/cnchar/assets/js/2.2bb98858.js" defer></script><script src="/cnchar/assets/js/16.6843fc0d.js" defer></script><script src="/cnchar/assets/js/3.79e54f24.js" defer></script>
|
||||
</span></p></div> </main></div><div class="global-ui"><!----></div></div>
|
||||
<script src="/cnchar/assets/js/app.479643a8.js" defer></script><script src="/cnchar/assets/js/2.79099ae3.js" defer></script><script src="/cnchar/assets/js/16.2379d48b.js" defer></script><script src="/cnchar/assets/js/3.94141914.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<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.dcd81eba.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.3d5a33c2.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/cnchar/assets/js/17.d8524e84.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.79e54f24.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.eeab0d04.js"><link rel="prefetch" href="/cnchar/assets/js/11.7d5ff5df.js"><link rel="prefetch" href="/cnchar/assets/js/12.cb64600b.js"><link rel="prefetch" href="/cnchar/assets/js/13.b8427796.js"><link rel="prefetch" href="/cnchar/assets/js/14.8cb74a49.js"><link rel="prefetch" href="/cnchar/assets/js/15.6d40aa8a.js"><link rel="prefetch" href="/cnchar/assets/js/16.6843fc0d.js"><link rel="prefetch" href="/cnchar/assets/js/18.35eb0643.js"><link rel="prefetch" href="/cnchar/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/cnchar/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/cnchar/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/cnchar/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/cnchar/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/cnchar/assets/js/24.45be5988.js"><link rel="prefetch" href="/cnchar/assets/js/25.54b888ce.js"><link rel="prefetch" href="/cnchar/assets/js/4.dec2fc6b.js"><link rel="prefetch" href="/cnchar/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/cnchar/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/cnchar/assets/js/7.67523f2c.js"><link rel="prefetch" href="/cnchar/assets/js/8.f01c3380.js"><link rel="prefetch" href="/cnchar/assets/js/9.b0989f22.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.dcd81eba.css">
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.1aa8b5c2.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.479643a8.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.79099ae3.js" as="script"><link rel="preload" href="/cnchar/assets/js/17.cec8473d.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.94141914.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.a61514ca.js"><link rel="prefetch" href="/cnchar/assets/js/11.f0beebd0.js"><link rel="prefetch" href="/cnchar/assets/js/12.9fbed8f3.js"><link rel="prefetch" href="/cnchar/assets/js/13.d28b998f.js"><link rel="prefetch" href="/cnchar/assets/js/14.fcf3c48a.js"><link rel="prefetch" href="/cnchar/assets/js/15.44644ac9.js"><link rel="prefetch" href="/cnchar/assets/js/16.2379d48b.js"><link rel="prefetch" href="/cnchar/assets/js/18.23d8fb28.js"><link rel="prefetch" href="/cnchar/assets/js/19.a197b25b.js"><link rel="prefetch" href="/cnchar/assets/js/20.5603fdd0.js"><link rel="prefetch" href="/cnchar/assets/js/21.b9849f84.js"><link rel="prefetch" href="/cnchar/assets/js/22.876a6289.js"><link rel="prefetch" href="/cnchar/assets/js/4.60b58529.js"><link rel="prefetch" href="/cnchar/assets/js/5.b99f65d5.js"><link rel="prefetch" href="/cnchar/assets/js/6.6a00c290.js"><link rel="prefetch" href="/cnchar/assets/js/7.39b7a2be.js"><link rel="prefetch" href="/cnchar/assets/js/8.4e18b7d9.js"><link rel="prefetch" href="/cnchar/assets/js/9.79574551.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.1aa8b5c2.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">
|
||||
|
@ -91,7 +91,7 @@ string.convertTradToSimple();
|
|||
string.convertTradToSpark();
|
||||
string.convertSparkToSimple();
|
||||
string.convertSparkToTrad();</code></pre></div> <p>以下是几个实例:</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>convert</span> <span class="code-desc" data-v-96507b74></span> <i title="在线运行" class="ei-play code-btn" data-v-96507b74></i> <i title="复制代码" class="ei-copy code-btn" data-v-96507b74></i></div> <pre data-v-96507b74><code class="hljs"></code></pre> <div style="display:none;" data-v-96507b74><div class="output-title" data-v-96507b74>运行结果</div> <div class="output-area" data-v-96507b74><div class="show-toggle" data-v-96507b74><i class="ei-angle-up" data-v-96507b74></i> <span class="show-text" data-v-96507b74>隐藏结果</span></div> <div style="display:;" data-v-96507b74></div></div></div> <div class="powered-by" data-v-96507b74>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">12/9/2020, 3:40:54 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/order.html" class="prev">
|
||||
cnchar-order
|
||||
|
@ -99,7 +99,7 @@ string.convertSparkToTrad();</code></pre></div> <p>以下是几个实例:</p>
|
|||
cnchar-draw
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.3d5a33c2.js" defer></script><script src="/cnchar/assets/js/2.2bb98858.js" defer></script><script src="/cnchar/assets/js/17.d8524e84.js" defer></script><script src="/cnchar/assets/js/3.79e54f24.js" defer></script>
|
||||
</span></p></div> </main></div><div class="global-ui"><!----></div></div>
|
||||
<script src="/cnchar/assets/js/app.479643a8.js" defer></script><script src="/cnchar/assets/js/2.79099ae3.js" defer></script><script src="/cnchar/assets/js/17.cec8473d.js" defer></script><script src="/cnchar/assets/js/3.94141914.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<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.dcd81eba.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.3d5a33c2.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/cnchar/assets/js/18.35eb0643.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.79e54f24.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.eeab0d04.js"><link rel="prefetch" href="/cnchar/assets/js/11.7d5ff5df.js"><link rel="prefetch" href="/cnchar/assets/js/12.cb64600b.js"><link rel="prefetch" href="/cnchar/assets/js/13.b8427796.js"><link rel="prefetch" href="/cnchar/assets/js/14.8cb74a49.js"><link rel="prefetch" href="/cnchar/assets/js/15.6d40aa8a.js"><link rel="prefetch" href="/cnchar/assets/js/16.6843fc0d.js"><link rel="prefetch" href="/cnchar/assets/js/17.d8524e84.js"><link rel="prefetch" href="/cnchar/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/cnchar/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/cnchar/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/cnchar/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/cnchar/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/cnchar/assets/js/24.45be5988.js"><link rel="prefetch" href="/cnchar/assets/js/25.54b888ce.js"><link rel="prefetch" href="/cnchar/assets/js/4.dec2fc6b.js"><link rel="prefetch" href="/cnchar/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/cnchar/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/cnchar/assets/js/7.67523f2c.js"><link rel="prefetch" href="/cnchar/assets/js/8.f01c3380.js"><link rel="prefetch" href="/cnchar/assets/js/9.b0989f22.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.dcd81eba.css">
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.1aa8b5c2.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.479643a8.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.79099ae3.js" as="script"><link rel="preload" href="/cnchar/assets/js/18.23d8fb28.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.94141914.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.a61514ca.js"><link rel="prefetch" href="/cnchar/assets/js/11.f0beebd0.js"><link rel="prefetch" href="/cnchar/assets/js/12.9fbed8f3.js"><link rel="prefetch" href="/cnchar/assets/js/13.d28b998f.js"><link rel="prefetch" href="/cnchar/assets/js/14.fcf3c48a.js"><link rel="prefetch" href="/cnchar/assets/js/15.44644ac9.js"><link rel="prefetch" href="/cnchar/assets/js/16.2379d48b.js"><link rel="prefetch" href="/cnchar/assets/js/17.cec8473d.js"><link rel="prefetch" href="/cnchar/assets/js/19.a197b25b.js"><link rel="prefetch" href="/cnchar/assets/js/20.5603fdd0.js"><link rel="prefetch" href="/cnchar/assets/js/21.b9849f84.js"><link rel="prefetch" href="/cnchar/assets/js/22.876a6289.js"><link rel="prefetch" href="/cnchar/assets/js/4.60b58529.js"><link rel="prefetch" href="/cnchar/assets/js/5.b99f65d5.js"><link rel="prefetch" href="/cnchar/assets/js/6.6a00c290.js"><link rel="prefetch" href="/cnchar/assets/js/7.39b7a2be.js"><link rel="prefetch" href="/cnchar/assets/js/8.4e18b7d9.js"><link rel="prefetch" href="/cnchar/assets/js/9.79574551.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.1aa8b5c2.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">
|
||||
|
@ -80,7 +80,7 @@
|
|||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <p>使用cdn引用时,会在window对向上暴露 <code>CncharXHY</code> 对象</p> <h2 id="_2-xhy-参数"><a href="#_2-xhy-参数" class="header-anchor">#</a> 2. xhy 参数</h2> <p>参数调用如下,value表示歇后语查询对象,可以是歇后语的第一句或第二句,所有 arg 参数都是可选的</p> <div><pre><code class="hljs typescript">cnchar.xhy(value,arg1,arg2,...);</code></pre></div> <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;">fuzzy</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;">answer</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;">second</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></tbody></table> <h2 id="_3-实例"><a href="#_3-实例" class="header-anchor">#</a> 3. 实例</h2> <p>该库为cnchar扩展了歇后语功能</p> <div><pre><code class="hljs javascript">cnchar.xhy(<span class="hljs-string">'大水冲了龙王庙'</span>) <span class="hljs-comment">// ['大水冲了龙王庙-自家人不识自家人', '大水冲了龙王庙-一家人不认一家人']</span>
|
||||
cnchar.xhy(<span class="hljs-string">'大水'</span>, <span class="hljs-string">'fuzzy'</span>) <span class="hljs-comment">// ['江河里长大水-泥沙俱下', '江河发大水-后浪推前浪', ... ]</span>
|
||||
cnchar.xhy(<span class="hljs-string">'大水'</span>, <span class="hljs-string">'fuzzy'</span>, <span class="hljs-string">'answer'</span>) <span class="hljs-comment">// ['泥沙俱下', '后浪推前浪', ... ]</span>
|
||||
cnchar.xhy(<span class="hljs-string">'上晃下摇'</span>, <span class="hljs-string">'fuzzy'</span>, <span class="hljs-string">'answer'</span>, <span class="hljs-string">'second'</span>) <span class="hljs-comment">// ['醉汉过铁索桥', '扶着醉汉过破桥']</span></code></pre></div></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
cnchar.xhy(<span class="hljs-string">'上晃下摇'</span>, <span class="hljs-string">'fuzzy'</span>, <span class="hljs-string">'answer'</span>, <span class="hljs-string">'second'</span>) <span class="hljs-comment">// ['醉汉过铁索桥', '扶着醉汉过破桥']</span></code></pre></div></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">12/9/2020, 3:40:54 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/doc/idiom.html" class="prev">
|
||||
cnchar-idiom
|
||||
|
@ -88,7 +88,7 @@ cnchar.xhy(<span class="hljs-string">'上晃下摇'</span>, <span class="hljs-st
|
|||
cnchar-radical
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.3d5a33c2.js" defer></script><script src="/cnchar/assets/js/2.2bb98858.js" defer></script><script src="/cnchar/assets/js/18.35eb0643.js" defer></script><script src="/cnchar/assets/js/3.79e54f24.js" defer></script>
|
||||
</span></p></div> </main></div><div class="global-ui"><!----></div></div>
|
||||
<script src="/cnchar/assets/js/app.479643a8.js" defer></script><script src="/cnchar/assets/js/2.79099ae3.js" defer></script><script src="/cnchar/assets/js/18.23d8fb28.js" defer></script><script src="/cnchar/assets/js/3.94141914.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8,8 +8,8 @@
|
|||
<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.dcd81eba.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.3d5a33c2.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/cnchar/assets/js/20.b8f6cf9e.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.79e54f24.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.eeab0d04.js"><link rel="prefetch" href="/cnchar/assets/js/11.7d5ff5df.js"><link rel="prefetch" href="/cnchar/assets/js/12.cb64600b.js"><link rel="prefetch" href="/cnchar/assets/js/13.b8427796.js"><link rel="prefetch" href="/cnchar/assets/js/14.8cb74a49.js"><link rel="prefetch" href="/cnchar/assets/js/15.6d40aa8a.js"><link rel="prefetch" href="/cnchar/assets/js/16.6843fc0d.js"><link rel="prefetch" href="/cnchar/assets/js/17.d8524e84.js"><link rel="prefetch" href="/cnchar/assets/js/18.35eb0643.js"><link rel="prefetch" href="/cnchar/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/cnchar/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/cnchar/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/cnchar/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/cnchar/assets/js/24.45be5988.js"><link rel="prefetch" href="/cnchar/assets/js/25.54b888ce.js"><link rel="prefetch" href="/cnchar/assets/js/4.dec2fc6b.js"><link rel="prefetch" href="/cnchar/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/cnchar/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/cnchar/assets/js/7.67523f2c.js"><link rel="prefetch" href="/cnchar/assets/js/8.f01c3380.js"><link rel="prefetch" href="/cnchar/assets/js/9.b0989f22.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.dcd81eba.css">
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.1aa8b5c2.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.479643a8.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.79099ae3.js" as="script"><link rel="preload" href="/cnchar/assets/js/20.5603fdd0.js" as="script"><link rel="preload" href="/cnchar/assets/js/3.94141914.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.a61514ca.js"><link rel="prefetch" href="/cnchar/assets/js/11.f0beebd0.js"><link rel="prefetch" href="/cnchar/assets/js/12.9fbed8f3.js"><link rel="prefetch" href="/cnchar/assets/js/13.d28b998f.js"><link rel="prefetch" href="/cnchar/assets/js/14.fcf3c48a.js"><link rel="prefetch" href="/cnchar/assets/js/15.44644ac9.js"><link rel="prefetch" href="/cnchar/assets/js/16.2379d48b.js"><link rel="prefetch" href="/cnchar/assets/js/17.cec8473d.js"><link rel="prefetch" href="/cnchar/assets/js/18.23d8fb28.js"><link rel="prefetch" href="/cnchar/assets/js/19.a197b25b.js"><link rel="prefetch" href="/cnchar/assets/js/21.b9849f84.js"><link rel="prefetch" href="/cnchar/assets/js/22.876a6289.js"><link rel="prefetch" href="/cnchar/assets/js/4.60b58529.js"><link rel="prefetch" href="/cnchar/assets/js/5.b99f65d5.js"><link rel="prefetch" href="/cnchar/assets/js/6.6a00c290.js"><link rel="prefetch" href="/cnchar/assets/js/7.39b7a2be.js"><link rel="prefetch" href="/cnchar/assets/js/8.4e18b7d9.js"><link rel="prefetch" href="/cnchar/assets/js/9.79574551.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.1aa8b5c2.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">
|
||||
|
@ -109,7 +109,7 @@ cnchar.use(poly, order, trad, idiom, xhy, radical);</code></pre></div> <h2 id="_
|
|||
<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-idiom/cnchar.idiom.min.js"</span>></span> <span class="hljs-tag"></<span class="hljs-name">script</span>></span>
|
||||
<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-radical/cnchar.radical.min.js"</span>></span> <span class="hljs-tag"></<span class="hljs-name">script</span>></span>
|
||||
<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-xhy/cnchar.xhy.min.js"</span>></span> <span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre></div> <h2 id="_3-cnchar-all"><a href="#_3-cnchar-all" class="header-anchor">#</a> 3. cnchar-all</h2> <p>如果您需要使用cnchar及其插件的所有功能,可以通过安装<code>cnchar-all</code>来使用完整功能,这个库引用了上面的七个库</p> <div><pre><code class="hljs">npm i cnchar-all</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> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>spell/stroke</span> <span class="code-desc" data-v-96507b74></span> <i title="在线运行" class="ei-play code-btn" data-v-96507b74></i> <i title="复制代码" class="ei-copy code-btn" data-v-96507b74></i></div> <pre data-v-96507b74><code class="hljs"></code></pre> <div style="display:none;" data-v-96507b74><div class="output-title" data-v-96507b74>运行结果</div> <div class="output-area" data-v-96507b74><div class="show-toggle" data-v-96507b74><i class="ei-angle-up" data-v-96507b74></i> <span class="show-text" data-v-96507b74>隐藏结果</span></div> <div style="display:;" data-v-96507b74></div></div></div> <div class="powered-by" data-v-96507b74>
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <p>这只是一个最简单的使用,这两个方法具有很多参数可选,具体请参阅 <a href="/cnchar/v2/doc/cnchar">cnchar</a> 部分</p></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
Powered by <a target="view_window" href="https://github.com/theajack/jsbox" class="jsbox-link" data-v-96507b74><i class="ei-cube-alt" data-v-96507b74></i> JSBox</a></div></div></div> <p>这只是一个最简单的使用,这两个方法具有很多参数可选,具体请参阅 <a href="/cnchar/v2/doc/cnchar">cnchar</a> 部分</p></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">12/9/2020, 3:40:54 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
|
||||
←
|
||||
<a href="/cnchar/guide/" class="prev router-link-active">
|
||||
简介
|
||||
|
@ -117,7 +117,7 @@ cnchar.use(poly, order, trad, idiom, xhy, radical);</code></pre></div> <h2 id="_
|
|||
文档
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.3d5a33c2.js" defer></script><script src="/cnchar/assets/js/2.2bb98858.js" defer></script><script src="/cnchar/assets/js/20.b8f6cf9e.js" defer></script><script src="/cnchar/assets/js/3.79e54f24.js" defer></script>
|
||||
</span></p></div> </main></div><div class="global-ui"><!----></div></div>
|
||||
<script src="/cnchar/assets/js/app.479643a8.js" defer></script><script src="/cnchar/assets/js/2.79099ae3.js" defer></script><script src="/cnchar/assets/js/20.5603fdd0.js" defer></script><script src="/cnchar/assets/js/3.94141914.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8,8 +8,8 @@
|
|||
<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.dcd81eba.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.3d5a33c2.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/cnchar/assets/js/8.f01c3380.js" as="script"><link rel="preload" href="/cnchar/assets/js/4.dec2fc6b.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.eeab0d04.js"><link rel="prefetch" href="/cnchar/assets/js/11.7d5ff5df.js"><link rel="prefetch" href="/cnchar/assets/js/12.cb64600b.js"><link rel="prefetch" href="/cnchar/assets/js/13.b8427796.js"><link rel="prefetch" href="/cnchar/assets/js/14.8cb74a49.js"><link rel="prefetch" href="/cnchar/assets/js/15.6d40aa8a.js"><link rel="prefetch" href="/cnchar/assets/js/16.6843fc0d.js"><link rel="prefetch" href="/cnchar/assets/js/17.d8524e84.js"><link rel="prefetch" href="/cnchar/assets/js/18.35eb0643.js"><link rel="prefetch" href="/cnchar/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/cnchar/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/cnchar/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/cnchar/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/cnchar/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/cnchar/assets/js/24.45be5988.js"><link rel="prefetch" href="/cnchar/assets/js/25.54b888ce.js"><link rel="prefetch" href="/cnchar/assets/js/3.79e54f24.js"><link rel="prefetch" href="/cnchar/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/cnchar/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/cnchar/assets/js/7.67523f2c.js"><link rel="prefetch" href="/cnchar/assets/js/9.b0989f22.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.dcd81eba.css">
|
||||
<link rel="preload" href="/cnchar/assets/css/0.styles.1aa8b5c2.css" as="style"><link rel="preload" href="/cnchar/assets/js/app.479643a8.js" as="script"><link rel="preload" href="/cnchar/assets/js/2.79099ae3.js" as="script"><link rel="preload" href="/cnchar/assets/js/8.4e18b7d9.js" as="script"><link rel="preload" href="/cnchar/assets/js/4.60b58529.js" as="script"><link rel="prefetch" href="/cnchar/assets/js/10.a61514ca.js"><link rel="prefetch" href="/cnchar/assets/js/11.f0beebd0.js"><link rel="prefetch" href="/cnchar/assets/js/12.9fbed8f3.js"><link rel="prefetch" href="/cnchar/assets/js/13.d28b998f.js"><link rel="prefetch" href="/cnchar/assets/js/14.fcf3c48a.js"><link rel="prefetch" href="/cnchar/assets/js/15.44644ac9.js"><link rel="prefetch" href="/cnchar/assets/js/16.2379d48b.js"><link rel="prefetch" href="/cnchar/assets/js/17.cec8473d.js"><link rel="prefetch" href="/cnchar/assets/js/18.23d8fb28.js"><link rel="prefetch" href="/cnchar/assets/js/19.a197b25b.js"><link rel="prefetch" href="/cnchar/assets/js/20.5603fdd0.js"><link rel="prefetch" href="/cnchar/assets/js/21.b9849f84.js"><link rel="prefetch" href="/cnchar/assets/js/22.876a6289.js"><link rel="prefetch" href="/cnchar/assets/js/3.94141914.js"><link rel="prefetch" href="/cnchar/assets/js/5.b99f65d5.js"><link rel="prefetch" href="/cnchar/assets/js/6.6a00c290.js"><link rel="prefetch" href="/cnchar/assets/js/7.39b7a2be.js"><link rel="prefetch" href="/cnchar/assets/js/9.79574551.js">
|
||||
<link rel="stylesheet" href="/cnchar/assets/css/0.styles.1aa8b5c2.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">
|
||||
|
@ -76,8 +76,8 @@
|
|||
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"><div><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> <button type="button" class="el-button el-button--primary"><!----><!----><span>运行 <i class="ei-play"></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">简单易用</div> <div class="f-des">npm</div> <div class="f-des">cdn</div> <div class="f-des">...</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></div></div> <footer class="page-edit"><!----> <!----></footer> <!----> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.3d5a33c2.js" defer></script><script src="/cnchar/assets/js/2.2bb98858.js" defer></script><script src="/cnchar/assets/js/8.f01c3380.js" defer></script><script src="/cnchar/assets/js/4.dec2fc6b.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"><div><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> <button type="button" class="el-button el-button--primary"><!----><!----><span>运行 <i class="ei-play"></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">简单易用</div> <div class="f-des">npm</div> <div class="f-des">cdn</div> <div class="f-des">...</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></div></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新于:</span> <span class="time">12/9/2020, 3:40:54 PM</span></div></footer> <!----> </main></div><div class="global-ui"><!----></div></div>
|
||||
<script src="/cnchar/assets/js/app.479643a8.js" defer></script><script src="/cnchar/assets/js/2.79099ae3.js" defer></script><script src="/cnchar/assets/js/8.4e18b7d9.js" defer></script><script src="/cnchar/assets/js/4.60b58529.js" defer></script>
|
||||
<script>
|
||||
var _mtac = {};
|
||||
(function () {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<h3>🚀 功能全面、多端支持的汉字拼音笔画 js 库</h3>
|
||||
|
||||
**[English](https://github.com/theajack/cnchar/blob/master/helper/README.en.md) | [在线试用/文档](https://cnchar.js.org/) | [备用文档地址](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new) | [Gitee](https://gitee.com/theajack/cnchar)**
|
||||
**[English](https://github.com/theajack/cnchar/blob/master/helper/README.en.md) | [在线试用/文档](https://theajack.gitee.io/cnchar) | [备用文档地址](https://cnchar.js.org) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new) | [Gitee](https://gitee.com/theajack/cnchar)**
|
||||
|
||||
---
|
||||
|
||||
|
@ -286,7 +286,7 @@ draw 的参数比较繁多,首先需要理解的是,draw 分为四种绘制
|
|||
3. stroke: 按汉字笔顺单步绘制
|
||||
4. test: 测试模式,用户可以在容器内绘制汉字,cnchar-draw会检测是否绘制正确
|
||||
|
||||
以下是 options 的所有可选参数及描述,使用详情请参考[在线文档](https://cnchar.js.org):
|
||||
以下是 options 的所有可选参数及描述,使用详情请参考[在线文档](https://theajack.gitee.io/cnchar):
|
||||
|
||||
```ts
|
||||
declare interface DrawOption {
|
||||
|
|
|
@ -8,8 +8,7 @@ module.exports = {
|
|||
['link', {rel: 'icon', href: 'https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/v1/images/i.ico'}], // 增加一个自定义的 favicon
|
||||
],
|
||||
// dest: './dist', //打包位置
|
||||
port: 6868, // 端口号 谐音流弊流弊
|
||||
|
||||
port: 6868, // 端口号
|
||||
// 主题配置
|
||||
themeConfig: {
|
||||
// 顶部导航栏配置
|
||||
|
|
|
@ -4,10 +4,11 @@ let jsbox = null;
|
|||
|
||||
function getUrl () {
|
||||
let url = '';
|
||||
if (window.location.host.indexOf('localhost') !== -1) {
|
||||
let host = window.location.host;
|
||||
if (host.indexOf('localhost') !== -1 || host === 'theajack.gitee.io') {
|
||||
url = 'https://theajack.gitee.io';
|
||||
} else {
|
||||
url = `${window.location.protocol}//${window.location.host}`;
|
||||
url = `${window.location.protocol}//www.theajack.com/jsbox`;
|
||||
}
|
||||
return url + '/jsbox?theme=dark&remind=false&mes=false';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue