feat: reset path
This commit is contained in:
parent
46e2c7932b
commit
7964ae01a9
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
|
@ -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],{632: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}}]);
|
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],{634: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}}]);
|
|
@ -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],{636: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}}]);
|
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
|
@ -8,35 +8,35 @@
|
|||
<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="/assets/css/0.styles.b36a32f7.css" as="style"><link rel="preload" href="/assets/js/app.cfb76f2a.js" as="script"><link rel="preload" href="/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/assets/js/9.cad83506.js" as="script"><link rel="preload" href="/assets/js/3.78228900.js" as="script"><link rel="prefetch" href="/assets/js/10.70b04062.js"><link rel="prefetch" href="/assets/js/11.78652d04.js"><link rel="prefetch" href="/assets/js/12.b80cc33e.js"><link rel="prefetch" href="/assets/js/13.d4f7bb58.js"><link rel="prefetch" href="/assets/js/14.269f05ae.js"><link rel="prefetch" href="/assets/js/15.7fadafaf.js"><link rel="prefetch" href="/assets/js/16.d1e8d47d.js"><link rel="prefetch" href="/assets/js/17.d8524e84.js"><link rel="prefetch" href="/assets/js/18.35eb0643.js"><link rel="prefetch" href="/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/assets/js/24.45be5988.js"><link rel="prefetch" href="/assets/js/25.54b888ce.js"><link rel="prefetch" href="/assets/js/4.8112a995.js"><link rel="prefetch" href="/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/assets/js/7.67523f2c.js"><link rel="prefetch" href="/assets/js/8.f01c3380.js">
|
||||
<link rel="stylesheet" href="/assets/css/0.styles.b36a32f7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" 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="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link router-link-exact-active router-link-active">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -44,31 +44,31 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link router-link-exact-active router-link-active">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -76,7 +76,7 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="active sidebar-link">cnchar</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_2-spell-方法" class="sidebar-link">2. spell 方法</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_3-stroke-方法" class="sidebar-link">3. stroke 方法</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_4-通过拼音查询原汉字" class="sidebar-link">4. 通过拼音查询原汉字</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_5-通过笔画数查询原汉字" class="sidebar-link">5. 通过笔画数查询原汉字</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/cnchar.html#_6-其他api" class="sidebar-link">6. 其他api</a></li></ul></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><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>cnchar 库是基本库,主要包含汉字 <code>拼音</code> 和 <code>笔画数</code> 的获取</p> <p>除此之外,还支持 <code>通过拼音查询原汉字</code>, <code>通过笔画数查询原汉字</code>, <code>查询拼音详细信息</code> 等功能</p> <p>ts类型声明:<a href="https://github.com/theajack/cnchar/blob/master/src/main/index.d.ts" target="_blank" rel="noopener noreferrer">cnchar.d.ts<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p> <h2 id="_2-spell-方法"><a href="#_2-spell-方法" class="header-anchor">#</a> 2. spell 方法</h2> <p>spell 方法用户获取汉字拼音,支持 数组分割、首字母,大小写、候选多音字、音调、繁简体功能</p> <h3 id="_2-1-api使用"><a href="#_2-1-api使用" class="header-anchor">#</a> 2.1. api使用</h3> <p>api调用方式如下,所有 arg 参数都是可选的</p> <div><pre><code class="hljs javascript">cnchar.spell(string,arg1,arg2,...);
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/doc/cnchar.html" class="active sidebar-link">cnchar</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/doc/cnchar.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/doc/cnchar.html#_2-spell-方法" class="sidebar-link">2. spell 方法</a></li><li class="sidebar-sub-header"><a href="/doc/cnchar.html#_3-stroke-方法" class="sidebar-link">3. stroke 方法</a></li><li class="sidebar-sub-header"><a href="/doc/cnchar.html#_4-通过拼音查询原汉字" class="sidebar-link">4. 通过拼音查询原汉字</a></li><li class="sidebar-sub-header"><a href="/doc/cnchar.html#_5-通过笔画数查询原汉字" class="sidebar-link">5. 通过笔画数查询原汉字</a></li><li class="sidebar-sub-header"><a href="/doc/cnchar.html#_6-其他api" class="sidebar-link">6. 其他api</a></li></ul></li><li><a href="/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><li><a href="/doc/idiom.html" class="sidebar-link">cnchar-idiom</a></li><li><a href="/doc/xhy.html" class="sidebar-link">cnchar-xhy</a></li><li><a href="/doc/radical.html" class="sidebar-link">cnchar-radical</a></li><li><a href="/doc/tool.html" class="sidebar-link">工具方法</a></li><li><a href="/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>cnchar 库是基本库,主要包含汉字 <code>拼音</code> 和 <code>笔画数</code> 的获取</p> <p>除此之外,还支持 <code>通过拼音查询原汉字</code>, <code>通过笔画数查询原汉字</code>, <code>查询拼音详细信息</code> 等功能</p> <p>ts类型声明:<a href="https://github.com/theajack/cnchar/blob/master/src/main/index.d.ts" target="_blank" rel="noopener noreferrer">cnchar.d.ts<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p> <h2 id="_2-spell-方法"><a href="#_2-spell-方法" class="header-anchor">#</a> 2. spell 方法</h2> <p>spell 方法用户获取汉字拼音,支持 数组分割、首字母,大小写、候选多音字、音调、繁简体功能</p> <h3 id="_2-1-api使用"><a href="#_2-1-api使用" class="header-anchor">#</a> 2.1. api使用</h3> <p>api调用方式如下,所有 arg 参数都是可选的</p> <div><pre><code class="hljs javascript">cnchar.spell(string,arg1,arg2,...);
|
||||
string.spell(arg1,arg2,...); <span class="hljs-comment">// string prototype 调用</span></code></pre></div> <p>以下是几个简单的例子:</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>spell</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="_2-2-参数说明"><a href="#_2-2-参数说明" class="header-anchor">#</a> 2.2. 参数说明</h3> <p>arg 参数信息如下:</p> <table><thead><tr><th style="text-align:center;">参数</th> <th style="text-align:center;">作用</th> <th style="text-align:center;">是否默认</th> <th style="text-align:center;">依赖库</th> <th style="text-align:center;">备注</th></tr></thead> <tbody><tr><td style="text-align:center;">array</td> <td style="text-align:center;">返回数组</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">--</td></tr> <tr><td style="text-align:center;">first</td> <td style="text-align:center;">返回拼音首字母</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">--</td></tr> <tr><td style="text-align:center;">up</td> <td style="text-align:center;">将结果全部大写</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">--</td></tr> <tr><td style="text-align:center;">low</td> <td style="text-align:center;">将结果全部小写</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">会被 up 参数覆盖</td></tr> <tr><td style="text-align:center;">poly</td> <td style="text-align:center;">使用候选多音字</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">--</td></tr> <tr><td style="text-align:center;">tone</td> <td style="text-align:center;">启用音调</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">--</td></tr> <tr><td style="text-align:center;">simple</td> <td style="text-align:center;">是否禁用繁体字的拼音功能</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-trad</td> <td style="text-align:center;">使用 cnchar-trad 之后,默认对繁体字拼音进行转换,该参数用于禁用繁体字拼音</td></tr></tbody></table> <h2 id="_3-stroke-方法"><a href="#_3-stroke-方法" class="header-anchor">#</a> 3. stroke 方法</h2> <h3 id="_2-1-api使用-2"><a href="#_2-1-api使用-2" class="header-anchor">#</a> 2.1. api使用</h3> <p>api调用方式如下,所有 arg 参数都是可选的</p> <div><pre><code class="hljs javascript">cnchar.stroke(string,arg1,arg2,...);
|
||||
string.stroke(arg1,arg2,...); <span class="hljs-comment">// string prototype 调用</span></code></pre></div> <p>以下是几个简单的例子:</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>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>
|
||||
|
@ -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="/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>
|
||||
<script src="/assets/js/app.cfb76f2a.js" defer></script><script src="/assets/js/2.2bb98858.js" defer></script><script src="/assets/js/9.cad83506.js" defer></script><script src="/assets/js/3.78228900.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,35 +8,35 @@
|
|||
<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="/assets/css/0.styles.b36a32f7.css" as="style"><link rel="preload" href="/assets/js/app.cfb76f2a.js" as="script"><link rel="preload" href="/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/assets/js/10.70b04062.js" as="script"><link rel="prefetch" href="/assets/js/11.78652d04.js"><link rel="prefetch" href="/assets/js/12.b80cc33e.js"><link rel="prefetch" href="/assets/js/13.d4f7bb58.js"><link rel="prefetch" href="/assets/js/14.269f05ae.js"><link rel="prefetch" href="/assets/js/15.7fadafaf.js"><link rel="prefetch" href="/assets/js/16.d1e8d47d.js"><link rel="prefetch" href="/assets/js/17.d8524e84.js"><link rel="prefetch" href="/assets/js/18.35eb0643.js"><link rel="prefetch" href="/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/assets/js/24.45be5988.js"><link rel="prefetch" href="/assets/js/25.54b888ce.js"><link rel="prefetch" href="/assets/js/3.78228900.js"><link rel="prefetch" href="/assets/js/4.8112a995.js"><link rel="prefetch" href="/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/assets/js/7.67523f2c.js"><link rel="prefetch" href="/assets/js/8.f01c3380.js"><link rel="prefetch" href="/assets/js/9.cad83506.js">
|
||||
<link rel="stylesheet" href="/assets/css/0.styles.b36a32f7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" 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="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link router-link-exact-active router-link-active">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -44,31 +44,31 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link router-link-exact-active router-link-active">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -76,7 +76,7 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><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="active sidebar-link">自定义数据</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/custom.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/custom.html#_2-设置拼音数据-setspell" class="sidebar-link">2. 设置拼音数据: setSpell</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/custom.html#_3-设置多音字的默认读音-setspelldefault" class="sidebar-link">3. 设置多音字的默认读音: setSpellDefault</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/custom.html#_4-设置笔画数-setstrokecount" class="sidebar-link">4. 设置笔画数: setStrokeCount</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/custom.html#_5-设置笔顺-setorder" class="sidebar-link">5. 设置笔顺: setOrder</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/custom.html#_6-设置多音词的读音:setpolyphrase" class="sidebar-link">6. 设置多音词的读音:setPolyPhrase</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/custom.html#_7-设置汉字偏旁部首-setradical" class="sidebar-link">7. 设置汉字偏旁部首: setRadical</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/custom.html#_8-添加歇后语-addxhy" class="sidebar-link">8. 添加歇后语: addXhy</a></li></ul></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-介绍"><a href="#_1-介绍" class="header-anchor">#</a> 1. 介绍</h2> <p>由于 cnchar 数据来源于网络,虽然经过了大量修改,但是还是难免会有错漏</p> <p>所以 cnchar 提供了修改默认数据的api,方便开发者修改与添加数据</p> <h2 id="_2-设置拼音数据-setspell"><a href="#_2-设置拼音数据-setspell" class="header-anchor">#</a> 2. 设置拼音数据: setSpell</h2> <p><code>setSpell</code> 方法用于设置拼音数据,用法如下:</p> <div class="language-ts extra-class"><pre class="language-ts"><code>cnchar<span class="token punctuation">.</span><span class="token function">setSpell</span><span class="token punctuation">(</span>word<span class="token operator">:</span> <span class="token builtin">string</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 keyword">void</span><span class="token punctuation">;</span>
|
||||
<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="/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><li><a href="/doc/idiom.html" class="sidebar-link">cnchar-idiom</a></li><li><a href="/doc/xhy.html" class="sidebar-link">cnchar-xhy</a></li><li><a href="/doc/radical.html" class="sidebar-link">cnchar-radical</a></li><li><a href="/doc/tool.html" class="sidebar-link">工具方法</a></li><li><a href="/doc/custom.html" class="active sidebar-link">自定义数据</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/doc/custom.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/doc/custom.html#_2-设置拼音数据-setspell" class="sidebar-link">2. 设置拼音数据: setSpell</a></li><li class="sidebar-sub-header"><a href="/doc/custom.html#_3-设置多音字的默认读音-setspelldefault" class="sidebar-link">3. 设置多音字的默认读音: setSpellDefault</a></li><li class="sidebar-sub-header"><a href="/doc/custom.html#_4-设置笔画数-setstrokecount" class="sidebar-link">4. 设置笔画数: setStrokeCount</a></li><li class="sidebar-sub-header"><a href="/doc/custom.html#_5-设置笔顺-setorder" class="sidebar-link">5. 设置笔顺: setOrder</a></li><li class="sidebar-sub-header"><a href="/doc/custom.html#_6-设置多音词的读音:setpolyphrase" class="sidebar-link">6. 设置多音词的读音:setPolyPhrase</a></li><li class="sidebar-sub-header"><a href="/doc/custom.html#_7-设置汉字偏旁部首-setradical" class="sidebar-link">7. 设置汉字偏旁部首: setRadical</a></li><li class="sidebar-sub-header"><a href="/doc/custom.html#_8-添加歇后语-addxhy" class="sidebar-link">8. 添加歇后语: addXhy</a></li></ul></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-介绍"><a href="#_1-介绍" class="header-anchor">#</a> 1. 介绍</h2> <p>由于 cnchar 数据来源于网络,虽然经过了大量修改,但是还是难免会有错漏</p> <p>所以 cnchar 提供了修改默认数据的api,方便开发者修改与添加数据</p> <h2 id="_2-设置拼音数据-setspell"><a href="#_2-设置拼音数据-setspell" class="header-anchor">#</a> 2. 设置拼音数据: setSpell</h2> <p><code>setSpell</code> 方法用于设置拼音数据,用法如下:</p> <div class="language-ts extra-class"><pre class="language-ts"><code>cnchar<span class="token punctuation">.</span><span class="token function">setSpell</span><span class="token punctuation">(</span>word<span class="token operator">:</span> <span class="token builtin">string</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 keyword">void</span><span class="token punctuation">;</span>
|
||||
cnchar<span class="token punctuation">.</span><span class="token function">setSpell</span><span class="token punctuation">(</span>json<span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">[</span>key<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><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword">void</span><span class="token punctuation">;</span>
|
||||
</code></pre></div><p>以下是一个简单的例子:</p> <p>拼音支持声调数字模式(lv2=>lǘ)</p> <div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">// 用于添加cnchar中不包含的汉字 或修改 cnchar中有误的汉字</span>
|
||||
cnchar<span class="token punctuation">.</span><span class="token function">setSpell</span><span class="token punctuation">(</span><span class="token string">'x'</span><span class="token punctuation">,</span> <span class="token string">'x'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
@ -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 href="/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>
|
||||
<script src="/assets/js/app.cfb76f2a.js" defer></script><script src="/assets/js/2.2bb98858.js" defer></script><script src="/assets/js/10.70b04062.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8,35 +8,35 @@
|
|||
<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="/assets/css/0.styles.b36a32f7.css" as="style"><link rel="preload" href="/assets/js/app.cfb76f2a.js" as="script"><link rel="preload" href="/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/assets/js/12.b80cc33e.js" as="script"><link rel="preload" href="/assets/js/3.78228900.js" as="script"><link rel="prefetch" href="/assets/js/10.70b04062.js"><link rel="prefetch" href="/assets/js/11.78652d04.js"><link rel="prefetch" href="/assets/js/13.d4f7bb58.js"><link rel="prefetch" href="/assets/js/14.269f05ae.js"><link rel="prefetch" href="/assets/js/15.7fadafaf.js"><link rel="prefetch" href="/assets/js/16.d1e8d47d.js"><link rel="prefetch" href="/assets/js/17.d8524e84.js"><link rel="prefetch" href="/assets/js/18.35eb0643.js"><link rel="prefetch" href="/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/assets/js/24.45be5988.js"><link rel="prefetch" href="/assets/js/25.54b888ce.js"><link rel="prefetch" href="/assets/js/4.8112a995.js"><link rel="prefetch" href="/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/assets/js/7.67523f2c.js"><link rel="prefetch" href="/assets/js/8.f01c3380.js"><link rel="prefetch" href="/assets/js/9.cad83506.js">
|
||||
<link rel="stylesheet" href="/assets/css/0.styles.b36a32f7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" 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="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -44,31 +44,31 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -76,19 +76,19 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><li><a href="/cnchar/doc/idiom.html" class="active sidebar-link">cnchar-idiom</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/idiom.html#_1-介绍" class="sidebar-link">1 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/idiom.html#_2-idiom-参数" class="sidebar-link">2. idiom 参数</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/idiom.html#_3-实例" class="sidebar-link">3. 实例</a></li></ul></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>cnchar在2.2.0加入了成语功能,启用该功能需要安装 <code>cnchar-idiom</code> 功能库,该库可以独立于cnchar主库运行</p> <p>使用方式如下:</p> <div><pre><code class="hljs typescript">cnchar.idiom(text:<span class="hljs-built_in">string</span>, ...idiomArgs: <span class="hljs-built_in">Array</span><idiomArg>):<span class="hljs-built_in">Array</span><<span class="hljs-built_in">string</span>>;</code></pre></div> <p>看一个具体例子</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>idiom</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>
|
||||
<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="/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><li><a href="/doc/idiom.html" class="active sidebar-link">cnchar-idiom</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/doc/idiom.html#_1-介绍" class="sidebar-link">1 介绍</a></li><li class="sidebar-sub-header"><a href="/doc/idiom.html#_2-idiom-参数" class="sidebar-link">2. idiom 参数</a></li><li class="sidebar-sub-header"><a href="/doc/idiom.html#_3-实例" class="sidebar-link">3. 实例</a></li></ul></li><li><a href="/doc/xhy.html" class="sidebar-link">cnchar-xhy</a></li><li><a href="/doc/radical.html" class="sidebar-link">cnchar-radical</a></li><li><a href="/doc/tool.html" class="sidebar-link">工具方法</a></li><li><a href="/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>cnchar在2.2.0加入了成语功能,启用该功能需要安装 <code>cnchar-idiom</code> 功能库,该库可以独立于cnchar主库运行</p> <p>使用方式如下:</p> <div><pre><code class="hljs typescript">cnchar.idiom(text:<span class="hljs-built_in">string</span>, ...idiomArgs: <span class="hljs-built_in">Array</span><idiomArg>):<span class="hljs-built_in">Array</span><<span class="hljs-built_in">string</span>>;</code></pre></div> <p>看一个具体例子</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>idiom</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>使用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">
|
||||
<a href="/doc/draw.html" class="prev">
|
||||
cnchar-draw
|
||||
</a></span> <span class="next"><a href="/cnchar/doc/xhy.html">
|
||||
</a></span> <span class="next"><a href="/doc/xhy.html">
|
||||
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>
|
||||
<script src="/assets/js/app.cfb76f2a.js" defer></script><script src="/assets/js/2.2bb98858.js" defer></script><script src="/assets/js/12.b80cc33e.js" defer></script><script src="/assets/js/3.78228900.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,35 +8,35 @@
|
|||
<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="/assets/css/0.styles.b36a32f7.css" as="style"><link rel="preload" href="/assets/js/app.cfb76f2a.js" as="script"><link rel="preload" href="/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/assets/js/13.d4f7bb58.js" as="script"><link rel="preload" href="/assets/js/3.78228900.js" as="script"><link rel="prefetch" href="/assets/js/10.70b04062.js"><link rel="prefetch" href="/assets/js/11.78652d04.js"><link rel="prefetch" href="/assets/js/12.b80cc33e.js"><link rel="prefetch" href="/assets/js/14.269f05ae.js"><link rel="prefetch" href="/assets/js/15.7fadafaf.js"><link rel="prefetch" href="/assets/js/16.d1e8d47d.js"><link rel="prefetch" href="/assets/js/17.d8524e84.js"><link rel="prefetch" href="/assets/js/18.35eb0643.js"><link rel="prefetch" href="/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/assets/js/24.45be5988.js"><link rel="prefetch" href="/assets/js/25.54b888ce.js"><link rel="prefetch" href="/assets/js/4.8112a995.js"><link rel="prefetch" href="/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/assets/js/7.67523f2c.js"><link rel="prefetch" href="/assets/js/8.f01c3380.js"><link rel="prefetch" href="/assets/js/9.cad83506.js">
|
||||
<link rel="stylesheet" href="/assets/css/0.styles.b36a32f7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" 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="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -44,31 +44,31 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -76,21 +76,21 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="active sidebar-link">cnchar-order</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/order.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/order.html#_2-stroke参数" class="sidebar-link">2. stroke参数</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/order.html#_3-实例" class="sidebar-link">3. 实例</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/order.html#_4-笔画推出原汉字-ordertoword" class="sidebar-link">4. 笔画推出原汉字(orderToWord)</a></li></ul></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><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-order</code> 库是用于支持获取汉字笔顺及其名称、形状,除此之外,该库还提供一个<code>orderToWord</code>方法,可以根据笔画序列推出原汉字,以及提供一个汉字所有笔划的json属性</p> <p>引入该库之后,<code>cnchar.stroke()</code> 方法才会支持 <code>order</code> 等参数</p> <p>npm安装</p> <div><pre><code class="hljs">npm i cnchar-order</code></pre></div> <p>cdn使用</p> <div><pre><code class="hljs html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/cnchar-order/cnchar.order.min.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre></div> <p>使用</p> <div><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> cnchar <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar'</span>;
|
||||
<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="/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/doc/order.html" class="active sidebar-link">cnchar-order</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/doc/order.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/doc/order.html#_2-stroke参数" class="sidebar-link">2. stroke参数</a></li><li class="sidebar-sub-header"><a href="/doc/order.html#_3-实例" class="sidebar-link">3. 实例</a></li><li class="sidebar-sub-header"><a href="/doc/order.html#_4-笔画推出原汉字-ordertoword" class="sidebar-link">4. 笔画推出原汉字(orderToWord)</a></li></ul></li><li><a href="/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><li><a href="/doc/idiom.html" class="sidebar-link">cnchar-idiom</a></li><li><a href="/doc/xhy.html" class="sidebar-link">cnchar-xhy</a></li><li><a href="/doc/radical.html" class="sidebar-link">cnchar-radical</a></li><li><a href="/doc/tool.html" class="sidebar-link">工具方法</a></li><li><a href="/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-order</code> 库是用于支持获取汉字笔顺及其名称、形状,除此之外,该库还提供一个<code>orderToWord</code>方法,可以根据笔画序列推出原汉字,以及提供一个汉字所有笔划的json属性</p> <p>引入该库之后,<code>cnchar.stroke()</code> 方法才会支持 <code>order</code> 等参数</p> <p>npm安装</p> <div><pre><code class="hljs">npm i cnchar-order</code></pre></div> <p>cdn使用</p> <div><pre><code class="hljs html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/cnchar-order/cnchar.order.min.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre></div> <p>使用</p> <div><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> cnchar <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar'</span>;
|
||||
<span class="hljs-keyword">import</span> order <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar-order'</span>;
|
||||
cnchar.use(order); <span class="hljs-comment">// use 在浏览器环境中非必须</span></code></pre></div> <h2 id="_2-stroke参数"><a href="#_2-stroke参数" class="header-anchor">#</a> 2. stroke参数</h2> <table><thead><tr><th style="text-align:center;">参数</th> <th style="text-align:center;">作用</th> <th style="text-align:center;">是否默认</th> <th style="text-align:center;">依赖库</th> <th style="text-align:center;">备注</th></tr></thead> <tbody><tr><td style="text-align:center;">array</td> <td style="text-align:center;">返回数组</td> <td style="text-align:center;">否</td> <td style="text-align:center;">--</td> <td style="text-align:center;">使用 cnchar-order 且启用 order 参数后该参数被忽略</td></tr> <tr><td style="text-align:center;">order</td> <td style="text-align:center;">启用笔画顺序</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-order</td> <td style="text-align:center;">--</td></tr> <tr><td style="text-align:center;">letter</td> <td style="text-align:center;">使用笔画顺序字母序列</td> <td style="text-align:center;">是</td> <td style="text-align:center;">cnchar-order</td> <td style="text-align:center;">当启用 order 后,该值是默认值</td></tr> <tr><td style="text-align:center;">detail</td> <td style="text-align:center;">使用笔画顺序详情作为返回值,每个汉字对应一个 json</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-order</td> <td style="text-align:center;">优先级小于 letter</td></tr> <tr><td style="text-align:center;">shape</td> <td style="text-align:center;">使用笔画形状作为返回值</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-order</td> <td style="text-align:center;">优先级小于 detail</td></tr> <tr><td style="text-align:center;">name</td> <td style="text-align:center;">使用笔画名称作为返回值</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-order</td> <td style="text-align:center;">优先级小于 shape</td></tr> <tr><td style="text-align:center;">count</td> <td style="text-align:center;">使用笔画数作为返回值</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-poly</td> <td style="text-align:center;">优先级小于 name</td></tr> <tr><td style="text-align:center;">simple</td> <td style="text-align:center;">是否禁用繁体字的笔画功能</td> <td style="text-align:center;">否</td> <td style="text-align:center;">cnchar-trad</td> <td style="text-align:center;">使用 cnchar-trad 之后,默认对繁体字启用笔画功能,该参数用于禁用繁体字笔画功能</td></tr></tbody></table> <p>以上五种模式优先级为 <strong>letter < detail < shape < name < count</strong></p> <h2 id="_3-实例"><a href="#_3-实例" class="header-anchor">#</a> 3. 实例</h2> <p>以下演示几个多音词的例子</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>order</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>笔划形状模式(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">
|
||||
<a href="/doc/poly.html" class="prev">
|
||||
cnchar-poly
|
||||
</a></span> <span class="next"><a href="/cnchar/doc/trad.html">
|
||||
</a></span> <span class="next"><a href="/doc/trad.html">
|
||||
cnchar-trad
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.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>
|
||||
<script src="/assets/js/app.cfb76f2a.js" defer></script><script src="/assets/js/2.2bb98858.js" defer></script><script src="/assets/js/13.d4f7bb58.js" defer></script><script src="/assets/js/3.78228900.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,35 +8,35 @@
|
|||
<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="/assets/css/0.styles.b36a32f7.css" as="style"><link rel="preload" href="/assets/js/app.cfb76f2a.js" as="script"><link rel="preload" href="/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/assets/js/14.269f05ae.js" as="script"><link rel="preload" href="/assets/js/3.78228900.js" as="script"><link rel="prefetch" href="/assets/js/10.70b04062.js"><link rel="prefetch" href="/assets/js/11.78652d04.js"><link rel="prefetch" href="/assets/js/12.b80cc33e.js"><link rel="prefetch" href="/assets/js/13.d4f7bb58.js"><link rel="prefetch" href="/assets/js/15.7fadafaf.js"><link rel="prefetch" href="/assets/js/16.d1e8d47d.js"><link rel="prefetch" href="/assets/js/17.d8524e84.js"><link rel="prefetch" href="/assets/js/18.35eb0643.js"><link rel="prefetch" href="/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/assets/js/24.45be5988.js"><link rel="prefetch" href="/assets/js/25.54b888ce.js"><link rel="prefetch" href="/assets/js/4.8112a995.js"><link rel="prefetch" href="/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/assets/js/7.67523f2c.js"><link rel="prefetch" href="/assets/js/8.f01c3380.js"><link rel="prefetch" href="/assets/js/9.cad83506.js">
|
||||
<link rel="stylesheet" href="/assets/css/0.styles.b36a32f7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" 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="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -44,31 +44,31 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -76,18 +76,18 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="active sidebar-link">cnchar-poly</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/poly.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/poly.html#_2-实例" class="sidebar-link">2. 实例</a></li></ul></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><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>;
|
||||
<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="/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/doc/poly.html" class="active sidebar-link">cnchar-poly</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/doc/poly.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/doc/poly.html#_2-实例" class="sidebar-link">2. 实例</a></li></ul></li><li><a href="/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><li><a href="/doc/idiom.html" class="sidebar-link">cnchar-idiom</a></li><li><a href="/doc/xhy.html" class="sidebar-link">cnchar-xhy</a></li><li><a href="/doc/radical.html" class="sidebar-link">cnchar-radical</a></li><li><a href="/doc/tool.html" class="sidebar-link">工具方法</a></li><li><a href="/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">
|
||||
<a href="/doc/cnchar.html" class="prev">
|
||||
cnchar
|
||||
</a></span> <span class="next"><a href="/cnchar/doc/order.html">
|
||||
</a></span> <span class="next"><a href="/doc/order.html">
|
||||
cnchar-order
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.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>
|
||||
<script src="/assets/js/app.cfb76f2a.js" defer></script><script src="/assets/js/2.2bb98858.js" defer></script><script src="/assets/js/14.269f05ae.js" defer></script><script src="/assets/js/3.78228900.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,35 +8,35 @@
|
|||
<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="/assets/css/0.styles.b36a32f7.css" as="style"><link rel="preload" href="/assets/js/app.cfb76f2a.js" as="script"><link rel="preload" href="/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/assets/js/15.7fadafaf.js" as="script"><link rel="preload" href="/assets/js/3.78228900.js" as="script"><link rel="prefetch" href="/assets/js/10.70b04062.js"><link rel="prefetch" href="/assets/js/11.78652d04.js"><link rel="prefetch" href="/assets/js/12.b80cc33e.js"><link rel="prefetch" href="/assets/js/13.d4f7bb58.js"><link rel="prefetch" href="/assets/js/14.269f05ae.js"><link rel="prefetch" href="/assets/js/16.d1e8d47d.js"><link rel="prefetch" href="/assets/js/17.d8524e84.js"><link rel="prefetch" href="/assets/js/18.35eb0643.js"><link rel="prefetch" href="/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/assets/js/24.45be5988.js"><link rel="prefetch" href="/assets/js/25.54b888ce.js"><link rel="prefetch" href="/assets/js/4.8112a995.js"><link rel="prefetch" href="/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/assets/js/7.67523f2c.js"><link rel="prefetch" href="/assets/js/8.f01c3380.js"><link rel="prefetch" href="/assets/js/9.cad83506.js">
|
||||
<link rel="stylesheet" href="/assets/css/0.styles.b36a32f7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" 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="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -44,31 +44,31 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -76,19 +76,19 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><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="active sidebar-link">cnchar-radical</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/radical.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/radical.html#_2-radical-参数" class="sidebar-link">2. radical 参数</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/radical.html#_3-实例" class="sidebar-link">3. 实例</a></li></ul></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>cnchar在2.2.5加入了偏旁部首功能,启用该功能需要安装 <code>cnchar-radical</code> 功能库,该库可以独立于cnchar主库运行</p> <p>感谢 <code>kewell-tsao</code> 提供的 pr</p> <p>使用方式如下:</p> <div><pre><code class="hljs typescript">cnchar.radical(text:<span class="hljs-built_in">string</span> | <span class="hljs-built_in">Array</span><<span class="hljs-built_in">string</span>>, ...radicalArgs: <span class="hljs-built_in">Array</span><radicalArg>): <span class="hljs-built_in">string</span> | <span class="hljs-built_in">Array</span><<span class="hljs-built_in">string</span>>;</code></pre></div> <p>看一个具体例子</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>radical</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>
|
||||
<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="/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><li><a href="/doc/idiom.html" class="sidebar-link">cnchar-idiom</a></li><li><a href="/doc/xhy.html" class="sidebar-link">cnchar-xhy</a></li><li><a href="/doc/radical.html" class="active sidebar-link">cnchar-radical</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/doc/radical.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/doc/radical.html#_2-radical-参数" class="sidebar-link">2. radical 参数</a></li><li class="sidebar-sub-header"><a href="/doc/radical.html#_3-实例" class="sidebar-link">3. 实例</a></li></ul></li><li><a href="/doc/tool.html" class="sidebar-link">工具方法</a></li><li><a href="/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>cnchar在2.2.5加入了偏旁部首功能,启用该功能需要安装 <code>cnchar-radical</code> 功能库,该库可以独立于cnchar主库运行</p> <p>感谢 <code>kewell-tsao</code> 提供的 pr</p> <p>使用方式如下:</p> <div><pre><code class="hljs typescript">cnchar.radical(text:<span class="hljs-built_in">string</span> | <span class="hljs-built_in">Array</span><<span class="hljs-built_in">string</span>>, ...radicalArgs: <span class="hljs-built_in">Array</span><radicalArg>): <span class="hljs-built_in">string</span> | <span class="hljs-built_in">Array</span><<span class="hljs-built_in">string</span>>;</code></pre></div> <p>看一个具体例子</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>radical</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>使用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">
|
||||
<a href="/doc/xhy.html" class="prev">
|
||||
cnchar-xhy
|
||||
</a></span> <span class="next"><a href="/cnchar/doc/tool.html">
|
||||
</a></span> <span class="next"><a href="/doc/tool.html">
|
||||
工具方法
|
||||
</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>
|
||||
<script src="/assets/js/app.cfb76f2a.js" defer></script><script src="/assets/js/2.2bb98858.js" defer></script><script src="/assets/js/15.7fadafaf.js" defer></script><script src="/assets/js/3.78228900.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,35 +8,35 @@
|
|||
<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="/assets/css/0.styles.b36a32f7.css" as="style"><link rel="preload" href="/assets/js/app.cfb76f2a.js" as="script"><link rel="preload" href="/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/assets/js/16.d1e8d47d.js" as="script"><link rel="preload" href="/assets/js/3.78228900.js" as="script"><link rel="prefetch" href="/assets/js/10.70b04062.js"><link rel="prefetch" href="/assets/js/11.78652d04.js"><link rel="prefetch" href="/assets/js/12.b80cc33e.js"><link rel="prefetch" href="/assets/js/13.d4f7bb58.js"><link rel="prefetch" href="/assets/js/14.269f05ae.js"><link rel="prefetch" href="/assets/js/15.7fadafaf.js"><link rel="prefetch" href="/assets/js/17.d8524e84.js"><link rel="prefetch" href="/assets/js/18.35eb0643.js"><link rel="prefetch" href="/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/assets/js/24.45be5988.js"><link rel="prefetch" href="/assets/js/25.54b888ce.js"><link rel="prefetch" href="/assets/js/4.8112a995.js"><link rel="prefetch" href="/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/assets/js/7.67523f2c.js"><link rel="prefetch" href="/assets/js/8.f01c3380.js"><link rel="prefetch" href="/assets/js/9.cad83506.js">
|
||||
<link rel="stylesheet" href="/assets/css/0.styles.b36a32f7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" 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="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link router-link-exact-active router-link-active">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -44,31 +44,31 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link router-link-exact-active router-link-active">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -76,7 +76,7 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><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="active sidebar-link">工具方法</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/tool.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/tool.html#_2-查询拼音详细信息-spellinfo" class="sidebar-link">2 查询拼音详细信息: spellInfo</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/tool.html#_3-拼音音调操作-transformtone" class="sidebar-link">3. 拼音音调操作: transformTone</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/tool.html#_4-是否是汉字-iscnchar" class="sidebar-link">4. 是否是汉字: isCnChar</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/tool.html#_5-比较拼音(汉字)大小-comparespell" class="sidebar-link">5. 比较拼音(汉字)大小: compareSpell</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/tool.html#_6-比较汉字笔画数大小-comparestroke" class="sidebar-link">6. 比较汉字笔画数大小: compareStroke</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/tool.html#_7-根据拼音排序-sortspell" class="sidebar-link">7. 根据拼音排序: sortSpell</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/tool.html#_8-根据笔画数排序-sortstroke" class="sidebar-link">8. 根据笔画数排序: sortStroke</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/tool.html#_9-是否是多音字:ispolyword" class="sidebar-link">9. 是否是多音字:isPolyWord</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/tool.html#_10-转换拼音:shapespell" class="sidebar-link">10. 转换拼音:shapeSpell</a></li></ul></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>cnchar 将库内部使用的一些操作拼音和汉字的方法整理暴露出来,方便开发者便捷高效的操作拼音和汉字</p> <h2 id="_2-查询拼音详细信息-spellinfo"><a href="#_2-查询拼音详细信息-spellinfo" class="header-anchor">#</a> 2 查询拼音详细信息: spellInfo</h2> <h3 id="_2-1-api使用"><a href="#_2-1-api使用" class="header-anchor">#</a> 2.1 api使用</h3> <p><code>spellInfo</code> 方法用于查询拼音的详细信息,用法如下:</p> <div><pre><code class="hljs javascript">cnchar.spellInfo(spell);</code></pre></div> <p>该方法返回一个json:</p> <div><pre><code class="hljs json">{
|
||||
<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="/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><li><a href="/doc/idiom.html" class="sidebar-link">cnchar-idiom</a></li><li><a href="/doc/xhy.html" class="sidebar-link">cnchar-xhy</a></li><li><a href="/doc/radical.html" class="sidebar-link">cnchar-radical</a></li><li><a href="/doc/tool.html" class="active sidebar-link">工具方法</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/doc/tool.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/doc/tool.html#_2-查询拼音详细信息-spellinfo" class="sidebar-link">2 查询拼音详细信息: spellInfo</a></li><li class="sidebar-sub-header"><a href="/doc/tool.html#_3-拼音音调操作-transformtone" class="sidebar-link">3. 拼音音调操作: transformTone</a></li><li class="sidebar-sub-header"><a href="/doc/tool.html#_4-是否是汉字-iscnchar" class="sidebar-link">4. 是否是汉字: isCnChar</a></li><li class="sidebar-sub-header"><a href="/doc/tool.html#_5-比较拼音(汉字)大小-comparespell" class="sidebar-link">5. 比较拼音(汉字)大小: compareSpell</a></li><li class="sidebar-sub-header"><a href="/doc/tool.html#_6-比较汉字笔画数大小-comparestroke" class="sidebar-link">6. 比较汉字笔画数大小: compareStroke</a></li><li class="sidebar-sub-header"><a href="/doc/tool.html#_7-根据拼音排序-sortspell" class="sidebar-link">7. 根据拼音排序: sortSpell</a></li><li class="sidebar-sub-header"><a href="/doc/tool.html#_8-根据笔画数排序-sortstroke" class="sidebar-link">8. 根据笔画数排序: sortStroke</a></li><li class="sidebar-sub-header"><a href="/doc/tool.html#_9-是否是多音字:ispolyword" class="sidebar-link">9. 是否是多音字:isPolyWord</a></li><li class="sidebar-sub-header"><a href="/doc/tool.html#_10-转换拼音:shapespell" class="sidebar-link">10. 转换拼音:shapeSpell</a></li></ul></li><li><a href="/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>cnchar 将库内部使用的一些操作拼音和汉字的方法整理暴露出来,方便开发者便捷高效的操作拼音和汉字</p> <h2 id="_2-查询拼音详细信息-spellinfo"><a href="#_2-查询拼音详细信息-spellinfo" class="header-anchor">#</a> 2 查询拼音详细信息: spellInfo</h2> <h3 id="_2-1-api使用"><a href="#_2-1-api使用" class="header-anchor">#</a> 2.1 api使用</h3> <p><code>spellInfo</code> 方法用于查询拼音的详细信息,用法如下:</p> <div><pre><code class="hljs javascript">cnchar.spellInfo(spell);</code></pre></div> <p>该方法返回一个json:</p> <div><pre><code class="hljs json">{
|
||||
<span class="hljs-attr">"spell"</span>: string, <span class="hljs-comment">// 去音调的拼音小写</span>
|
||||
<span class="hljs-attr">"tone"</span>: number, <span class="hljs-comment">// 音调 0-5</span>
|
||||
<span class="hljs-attr">"index"</span>: number, <span class="hljs-comment">// 音调位置</span>
|
||||
|
@ -147,15 +147,15 @@ 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">
|
||||
<a href="/doc/radical.html" class="prev">
|
||||
cnchar-radical
|
||||
</a></span> <span class="next"><a href="/cnchar/doc/custom.html">
|
||||
</a></span> <span class="next"><a href="/doc/custom.html">
|
||||
自定义数据
|
||||
</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>
|
||||
<script src="/assets/js/app.cfb76f2a.js" defer></script><script src="/assets/js/2.2bb98858.js" defer></script><script src="/assets/js/16.d1e8d47d.js" defer></script><script src="/assets/js/3.78228900.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,35 +8,35 @@
|
|||
<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="/assets/css/0.styles.b36a32f7.css" as="style"><link rel="preload" href="/assets/js/app.cfb76f2a.js" as="script"><link rel="preload" href="/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/assets/js/17.d8524e84.js" as="script"><link rel="preload" href="/assets/js/3.78228900.js" as="script"><link rel="prefetch" href="/assets/js/10.70b04062.js"><link rel="prefetch" href="/assets/js/11.78652d04.js"><link rel="prefetch" href="/assets/js/12.b80cc33e.js"><link rel="prefetch" href="/assets/js/13.d4f7bb58.js"><link rel="prefetch" href="/assets/js/14.269f05ae.js"><link rel="prefetch" href="/assets/js/15.7fadafaf.js"><link rel="prefetch" href="/assets/js/16.d1e8d47d.js"><link rel="prefetch" href="/assets/js/18.35eb0643.js"><link rel="prefetch" href="/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/assets/js/24.45be5988.js"><link rel="prefetch" href="/assets/js/25.54b888ce.js"><link rel="prefetch" href="/assets/js/4.8112a995.js"><link rel="prefetch" href="/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/assets/js/7.67523f2c.js"><link rel="prefetch" href="/assets/js/8.f01c3380.js"><link rel="prefetch" href="/assets/js/9.cad83506.js">
|
||||
<link rel="stylesheet" href="/assets/css/0.styles.b36a32f7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" 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="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -44,31 +44,31 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -76,7 +76,7 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="active sidebar-link">cnchar-trad</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/trad.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/trad.html#_2-繁体字支持" class="sidebar-link">2. 繁体字支持</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/trad.html#_3-字体转换-convert" class="sidebar-link">3. 字体转换(convert)</a></li></ul></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><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-trad</code> 库是用于繁体字,除此之外,该库还提供繁体、简体、火星文之间的相互转换</p> <p>引入该库之后,cnchar的所有api都支持 <code>simple</code>和<code>trad</code>参数,用于只使用简体或繁体,默认两种字体都使用</p> <p>npm安装</p> <div><pre><code class="hljs">npm i cnchar-trad</code></pre></div> <p>cdn使用</p> <div><pre><code class="hljs html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/cnchar-trad/cnchar.trad.min.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre></div> <p>使用</p> <div><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> cnchar <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar'</span>;
|
||||
<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="/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/doc/trad.html" class="active sidebar-link">cnchar-trad</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/doc/trad.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/doc/trad.html#_2-繁体字支持" class="sidebar-link">2. 繁体字支持</a></li><li class="sidebar-sub-header"><a href="/doc/trad.html#_3-字体转换-convert" class="sidebar-link">3. 字体转换(convert)</a></li></ul></li><li><a href="/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><li><a href="/doc/idiom.html" class="sidebar-link">cnchar-idiom</a></li><li><a href="/doc/xhy.html" class="sidebar-link">cnchar-xhy</a></li><li><a href="/doc/radical.html" class="sidebar-link">cnchar-radical</a></li><li><a href="/doc/tool.html" class="sidebar-link">工具方法</a></li><li><a href="/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-trad</code> 库是用于繁体字,除此之外,该库还提供繁体、简体、火星文之间的相互转换</p> <p>引入该库之后,cnchar的所有api都支持 <code>simple</code>和<code>trad</code>参数,用于只使用简体或繁体,默认两种字体都使用</p> <p>npm安装</p> <div><pre><code class="hljs">npm i cnchar-trad</code></pre></div> <p>cdn使用</p> <div><pre><code class="hljs html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/cnchar-trad/cnchar.trad.min.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre></div> <p>使用</p> <div><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> cnchar <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar'</span>;
|
||||
<span class="hljs-keyword">import</span> trad <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar-trad'</span>;
|
||||
cnchar.use(trad); <span class="hljs-comment">// use 在浏览器环境中非必须</span></code></pre></div> <h2 id="_2-繁体字支持"><a href="#_2-繁体字支持" class="header-anchor">#</a> 2. 繁体字支持</h2> <p>以下演示几个繁体字支持的例子</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>trad</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="_3-字体转换-convert"><a href="#_3-字体转换-convert" class="header-anchor">#</a> 3. 字体转换(convert)</h2> <p>引入 cnchar-trad 库之后,在cnchar上会生成一个 <code>convert</code> 对象,功能是支持字体转换,另外在string.prototype 上也会附加上对应的方法,用法如下:</p> <div><pre><code class="hljs javascript">cnchar.convert.simpleToTrad(string); <span class="hljs-comment">// 简体 => 繁体</span>
|
||||
|
@ -91,15 +91,15 @@ 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">
|
||||
<a href="/doc/order.html" class="prev">
|
||||
cnchar-order
|
||||
</a></span> <span class="next"><a href="/cnchar/doc/draw.html">
|
||||
</a></span> <span class="next"><a href="/doc/draw.html">
|
||||
cnchar-draw
|
||||
</a>
|
||||
→
|
||||
</span></p></div> </main></div><div class="global-ui"><!----><div></div></div></div>
|
||||
<script src="/cnchar/assets/js/app.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>
|
||||
<script src="/assets/js/app.cfb76f2a.js" defer></script><script src="/assets/js/2.2bb98858.js" defer></script><script src="/assets/js/17.d8524e84.js" defer></script><script src="/assets/js/3.78228900.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,35 +8,35 @@
|
|||
<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="/assets/css/0.styles.b36a32f7.css" as="style"><link rel="preload" href="/assets/js/app.cfb76f2a.js" as="script"><link rel="preload" href="/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/assets/js/18.35eb0643.js" as="script"><link rel="preload" href="/assets/js/3.78228900.js" as="script"><link rel="prefetch" href="/assets/js/10.70b04062.js"><link rel="prefetch" href="/assets/js/11.78652d04.js"><link rel="prefetch" href="/assets/js/12.b80cc33e.js"><link rel="prefetch" href="/assets/js/13.d4f7bb58.js"><link rel="prefetch" href="/assets/js/14.269f05ae.js"><link rel="prefetch" href="/assets/js/15.7fadafaf.js"><link rel="prefetch" href="/assets/js/16.d1e8d47d.js"><link rel="prefetch" href="/assets/js/17.d8524e84.js"><link rel="prefetch" href="/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/assets/js/24.45be5988.js"><link rel="prefetch" href="/assets/js/25.54b888ce.js"><link rel="prefetch" href="/assets/js/4.8112a995.js"><link rel="prefetch" href="/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/assets/js/7.67523f2c.js"><link rel="prefetch" href="/assets/js/8.f01c3380.js"><link rel="prefetch" href="/assets/js/9.cad83506.js">
|
||||
<link rel="stylesheet" href="/assets/css/0.styles.b36a32f7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" 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="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -44,31 +44,31 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link router-link-exact-active router-link-active">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link router-link-exact-active router-link-active">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -76,19 +76,19 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>cnchar文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/cnchar/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/cnchar/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/cnchar/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/cnchar/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><li><a href="/cnchar/doc/idiom.html" class="sidebar-link">cnchar-idiom</a></li><li><a href="/cnchar/doc/xhy.html" class="active sidebar-link">cnchar-xhy</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/doc/xhy.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/xhy.html#_2-xhy-参数" class="sidebar-link">2. xhy 参数</a></li><li class="sidebar-sub-header"><a href="/cnchar/doc/xhy.html#_3-实例" class="sidebar-link">3. 实例</a></li></ul></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>cnchar在2.2.0加入了歇后语功能,启用该功能需要安装 <code>cnchar-xhy</code> 功能库,该库可以独立于cnchar主库运行</p> <p>使用方式如下:</p> <div><pre><code class="hljs typescript">cnchar.xhy(text:<span class="hljs-built_in">string</span>, ...xhyArgs: <span class="hljs-built_in">Array</span><xhyArg>):<span class="hljs-built_in">Array</span><<span class="hljs-built_in">string</span>>;</code></pre></div> <p>看一个具体例子</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>xhy</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>
|
||||
<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="/doc/cnchar.html" class="sidebar-link">cnchar</a></li><li><a href="/doc/poly.html" class="sidebar-link">cnchar-poly</a></li><li><a href="/doc/order.html" class="sidebar-link">cnchar-order</a></li><li><a href="/doc/trad.html" class="sidebar-link">cnchar-trad</a></li><li><a href="/doc/draw.html" class="sidebar-link">cnchar-draw</a></li><li><a href="/doc/idiom.html" class="sidebar-link">cnchar-idiom</a></li><li><a href="/doc/xhy.html" class="active sidebar-link">cnchar-xhy</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/doc/xhy.html#_1-介绍" class="sidebar-link">1. 介绍</a></li><li class="sidebar-sub-header"><a href="/doc/xhy.html#_2-xhy-参数" class="sidebar-link">2. xhy 参数</a></li><li class="sidebar-sub-header"><a href="/doc/xhy.html#_3-实例" class="sidebar-link">3. 实例</a></li></ul></li><li><a href="/doc/radical.html" class="sidebar-link">cnchar-radical</a></li><li><a href="/doc/tool.html" class="sidebar-link">工具方法</a></li><li><a href="/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>cnchar在2.2.0加入了歇后语功能,启用该功能需要安装 <code>cnchar-xhy</code> 功能库,该库可以独立于cnchar主库运行</p> <p>使用方式如下:</p> <div><pre><code class="hljs typescript">cnchar.xhy(text:<span class="hljs-built_in">string</span>, ...xhyArgs: <span class="hljs-built_in">Array</span><xhyArg>):<span class="hljs-built_in">Array</span><<span class="hljs-built_in">string</span>>;</code></pre></div> <p>看一个具体例子</p> <div><div class="code-box" data-v-96507b74><div data-v-96507b74><span class="code-title" data-v-96507b74>xhy</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>使用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">
|
||||
<a href="/doc/idiom.html" class="prev">
|
||||
cnchar-idiom
|
||||
</a></span> <span class="next"><a href="/cnchar/doc/radical.html">
|
||||
</a></span> <span class="next"><a href="/doc/radical.html">
|
||||
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>
|
||||
<script src="/assets/js/app.cfb76f2a.js" defer></script><script src="/assets/js/2.2bb98858.js" defer></script><script src="/assets/js/18.35eb0643.js" defer></script><script src="/assets/js/3.78228900.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8,35 +8,35 @@
|
|||
<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="/assets/css/0.styles.b36a32f7.css" as="style"><link rel="preload" href="/assets/js/app.cfb76f2a.js" as="script"><link rel="preload" href="/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/assets/js/20.b8f6cf9e.js" as="script"><link rel="preload" href="/assets/js/3.78228900.js" as="script"><link rel="prefetch" href="/assets/js/10.70b04062.js"><link rel="prefetch" href="/assets/js/11.78652d04.js"><link rel="prefetch" href="/assets/js/12.b80cc33e.js"><link rel="prefetch" href="/assets/js/13.d4f7bb58.js"><link rel="prefetch" href="/assets/js/14.269f05ae.js"><link rel="prefetch" href="/assets/js/15.7fadafaf.js"><link rel="prefetch" href="/assets/js/16.d1e8d47d.js"><link rel="prefetch" href="/assets/js/17.d8524e84.js"><link rel="prefetch" href="/assets/js/18.35eb0643.js"><link rel="prefetch" href="/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/assets/js/24.45be5988.js"><link rel="prefetch" href="/assets/js/25.54b888ce.js"><link rel="prefetch" href="/assets/js/4.8112a995.js"><link rel="prefetch" href="/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/assets/js/7.67523f2c.js"><link rel="prefetch" href="/assets/js/8.f01c3380.js"><link rel="prefetch" href="/assets/js/9.cad83506.js">
|
||||
<link rel="stylesheet" href="/assets/css/0.styles.b36a32f7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" 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="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link router-link-active">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link router-link-active">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -44,31 +44,31 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link router-link-active">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link router-link-active">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -76,7 +76,7 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>使用说明</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/cnchar/guide/" class="sidebar-link">简介</a></li><li><a href="/cnchar/guide/start.html" class="active sidebar-link">快速上手</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/cnchar/guide/start.html#_1-npm安装" class="sidebar-link">1. npm安装</a></li><li class="sidebar-sub-header"><a href="/cnchar/guide/start.html#_2-cdn引用" class="sidebar-link">2. CDN引用</a></li><li class="sidebar-sub-header"><a href="/cnchar/guide/start.html#_3-cnchar-all" class="sidebar-link">3. cnchar-all</a></li><li class="sidebar-sub-header"><a href="/cnchar/guide/start.html#_4-简单使用" class="sidebar-link">4. 简单使用</a></li></ul></li><li><a href="/cnchar/doc/cnchar.html" class="sidebar-link">文档</a></li><li><a href="/cnchar/guide/version.html" class="sidebar-link">更新日志</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-npm安装"><a href="#_1-npm安装" class="header-anchor">#</a> 1. npm安装</h2> <p>cnchar包含了一个基本库和六个功能库,用于实现不同的功能,您可以按需安装其中的功能库,但是 <code>cnchar</code> 这个基础库是必须安装的(draw、idiom、xhy、radical四个库可以独立使用)</p> <p>安装<a href="https://npmjs.com/package/cnchar" target="_blank" rel="noopener noreferrer">主库<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>:</p> <div><pre><code class="hljs">npm i cnchar</code></pre></div> <p>按需安装功能库:</p> <div><pre><code class="hljs">npm i cnchar-poly cnchar-order cnchar-trad cnchar-draw cnchar-idiom cnchar-xhy cnchar-radical</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>;
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>使用说明</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/guide/" class="sidebar-link">简介</a></li><li><a href="/guide/start.html" class="active sidebar-link">快速上手</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/guide/start.html#_1-npm安装" class="sidebar-link">1. npm安装</a></li><li class="sidebar-sub-header"><a href="/guide/start.html#_2-cdn引用" class="sidebar-link">2. CDN引用</a></li><li class="sidebar-sub-header"><a href="/guide/start.html#_3-cnchar-all" class="sidebar-link">3. cnchar-all</a></li><li class="sidebar-sub-header"><a href="/guide/start.html#_4-简单使用" class="sidebar-link">4. 简单使用</a></li></ul></li><li><a href="/doc/cnchar.html" class="sidebar-link">文档</a></li><li><a href="/guide/version.html" class="sidebar-link">更新日志</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="_1-npm安装"><a href="#_1-npm安装" class="header-anchor">#</a> 1. npm安装</h2> <p>cnchar包含了一个基本库和六个功能库,用于实现不同的功能,您可以按需安装其中的功能库,但是 <code>cnchar</code> 这个基础库是必须安装的(draw、idiom、xhy、radical四个库可以独立使用)</p> <p>安装<a href="https://npmjs.com/package/cnchar" target="_blank" rel="noopener noreferrer">主库<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>:</p> <div><pre><code class="hljs">npm i cnchar</code></pre></div> <p>按需安装功能库:</p> <div><pre><code class="hljs">npm i cnchar-poly cnchar-order cnchar-trad cnchar-draw cnchar-idiom cnchar-xhy cnchar-radical</code></pre></div> <p>浏览器环境中功能库可以直接使用:</p> <div><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> cnchar <span class="hljs-keyword">from</span> <span class="hljs-string">'cnchar'</span>;
|
||||
<span class="hljs-comment">// 以下功能库请按需使用</span>
|
||||
<span class="hljs-keyword">import</span> <span class="hljs-string">'cnchar-poly'</span>;
|
||||
<span class="hljs-keyword">import</span> <span class="hljs-string">'cnchar-order'</span>;
|
||||
|
@ -109,15 +109,15 @@ 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">
|
||||
<a href="/guide/" class="prev router-link-active">
|
||||
简介
|
||||
</a></span> <span class="next"><a href="/cnchar/doc/cnchar.html">
|
||||
</a></span> <span class="next"><a href="/doc/cnchar.html">
|
||||
文档
|
||||
</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>
|
||||
<script src="/assets/js/app.cfb76f2a.js" defer></script><script src="/assets/js/2.2bb98858.js" defer></script><script src="/assets/js/20.b8f6cf9e.js" defer></script><script src="/assets/js/3.78228900.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8,35 +8,35 @@
|
|||
<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="/assets/css/0.styles.b36a32f7.css" as="style"><link rel="preload" href="/assets/js/app.cfb76f2a.js" as="script"><link rel="preload" href="/assets/js/2.2bb98858.js" as="script"><link rel="preload" href="/assets/js/8.f01c3380.js" as="script"><link rel="preload" href="/assets/js/4.8112a995.js" as="script"><link rel="prefetch" href="/assets/js/10.70b04062.js"><link rel="prefetch" href="/assets/js/11.78652d04.js"><link rel="prefetch" href="/assets/js/12.b80cc33e.js"><link rel="prefetch" href="/assets/js/13.d4f7bb58.js"><link rel="prefetch" href="/assets/js/14.269f05ae.js"><link rel="prefetch" href="/assets/js/15.7fadafaf.js"><link rel="prefetch" href="/assets/js/16.d1e8d47d.js"><link rel="prefetch" href="/assets/js/17.d8524e84.js"><link rel="prefetch" href="/assets/js/18.35eb0643.js"><link rel="prefetch" href="/assets/js/19.9ae02a37.js"><link rel="prefetch" href="/assets/js/20.b8f6cf9e.js"><link rel="prefetch" href="/assets/js/21.b802ee0e.js"><link rel="prefetch" href="/assets/js/22.8c6ee530.js"><link rel="prefetch" href="/assets/js/23.225aa3b8.js"><link rel="prefetch" href="/assets/js/24.45be5988.js"><link rel="prefetch" href="/assets/js/25.54b888ce.js"><link rel="prefetch" href="/assets/js/3.78228900.js"><link rel="prefetch" href="/assets/js/5.deec3d8c.js"><link rel="prefetch" href="/assets/js/6.e1333a1f.js"><link rel="prefetch" href="/assets/js/7.67523f2c.js"><link rel="prefetch" href="/assets/js/9.cad83506.js">
|
||||
<link rel="stylesheet" href="/assets/css/0.styles.b36a32f7.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container no-sidebar"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/cnchar/" class="home-link router-link-exact-active router-link-active"><!----> <span class="site-name">cnchar</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/cnchar/" class="nav-link router-link-exact-active router-link-active">
|
||||
<div id="app" data-server-rendered="true"><div class="theme-container no-sidebar"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" 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="/" class="nav-link router-link-exact-active router-link-active">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -44,31 +44,31 @@
|
|||
Gitee地址
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/yanxiaomu" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
CSDN账号
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/cnchar/" class="nav-link router-link-exact-active router-link-active">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link router-link-exact-active router-link-active">
|
||||
主页
|
||||
</a></div><div class="nav-item"><a href="/cnchar/guide/" class="nav-link">
|
||||
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
|
||||
使用说明
|
||||
</a></div><div class="nav-item"><a href="https://www.github.com/theajack/cnchar" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/cnchar/doc/cnchar.html" class="nav-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="文档" class="dropdown-title"><span class="title">文档</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/doc/cnchar.html" class="nav-link">
|
||||
cnchar: 拼音+笔画
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/poly.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/poly.html" class="nav-link">
|
||||
cnchar-poly: 多音词
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/order.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/order.html" class="nav-link">
|
||||
cnchar-order: 笔顺
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/trad.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/trad.html" class="nav-link">
|
||||
cnchar-trad: 繁体字
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/draw.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/draw.html" class="nav-link">
|
||||
cnchar-draw: 汉字可视化
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/idiom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/idiom.html" class="nav-link">
|
||||
cnchar-idiom: 成语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/xhy.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/xhy.html" class="nav-link">
|
||||
cnchar-xhy: 歇后语
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/radical.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/radical.html" class="nav-link">
|
||||
cnchar-radical: 偏旁部首
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/tool.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/tool.html" class="nav-link">
|
||||
工具方法
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/cnchar/doc/custom.html" class="nav-link">
|
||||
</a></li><li class="dropdown-item"><!----> <a href="/doc/custom.html" class="nav-link">
|
||||
自定义数据
|
||||
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="关于作者" class="dropdown-title"><span class="title">关于作者</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.github.com/theajack" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
||||
GitHub地址
|
||||
|
@ -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="/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></div></div>
|
||||
<script src="/assets/js/app.cfb76f2a.js" defer></script><script src="/assets/js/2.2bb98858.js" defer></script><script src="/assets/js/8.f01c3380.js" defer></script><script src="/assets/js/4.8112a995.js" defer></script>
|
||||
<script>
|
||||
var _mtac = {};
|
||||
(function () {
|
||||
|
|
|
@ -2,7 +2,8 @@ module.exports = {
|
|||
title: 'cnchar', // 标题
|
||||
description: '功能全面、多端支持的汉字拼音笔画js库', // 描述
|
||||
dest: './docs/', // 基本url
|
||||
base: '/cnchar/',
|
||||
// base: '/cnchar/',
|
||||
base: '/',
|
||||
// 注入到当前页面的 HTML <head> 中的标签
|
||||
head: [
|
||||
['link', {rel: 'icon', href: 'https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/v1/images/i.ico'}], // 增加一个自定义的 favicon
|
||||
|
|
Loading…
Reference in New Issue