feat: 2.1.4
This commit is contained in:
parent
2ade0159c5
commit
6a7a0dc4a6
86
README.md
86
README.md
|
@ -16,7 +16,7 @@
|
|||
|
||||
<h3>🚀 功能全面、多端支持的汉字拼音笔画 js 库</h3>
|
||||
|
||||
**[English](https://github.com/theajack/cnchar/blob/master/helper/README.en.md) | [在线试用/文档](https://theajack.gitee.io/cnchar) | [更新日志](https://theajack.gitee.io/cnchar/v2/guide/version.html) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new)**
|
||||
**[English](https://github.com/theajack/cnchar/blob/master/helper/README.en.md) | [在线试用/文档](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new)**
|
||||
|
||||
cnchar 由于重建过一次仓库,所以之前的 star 都清零了,如果该仓库对您有帮助,希望能给个star,谢谢!
|
||||
|
||||
|
@ -24,48 +24,48 @@ cnchar 由于重建过一次仓库,所以之前的 star 都清零了,如果
|
|||
|
||||
<!-- toc -->
|
||||
|
||||
- [前言](#%e5%89%8d%e8%a8%80)
|
||||
- [0.快速使用](#0%e5%bf%ab%e9%80%9f%e4%bd%bf%e7%94%a8)
|
||||
- [1.功能](#1%e5%8a%9f%e8%83%bd)
|
||||
- [2.概览](#2%e6%a6%82%e8%a7%88)
|
||||
- [3 安装](#3-%e5%ae%89%e8%a3%85)
|
||||
- [3.1 使用 npm 安装](#31-%e4%bd%bf%e7%94%a8-npm-%e5%ae%89%e8%a3%85)
|
||||
- [3.2 使用 script 引入](#32-%e4%bd%bf%e7%94%a8-script-%e5%bc%95%e5%85%a5)
|
||||
- [4 使用](#4-%e4%bd%bf%e7%94%a8)
|
||||
- [4.1 webpack浏览器环境(有window对象)](#41-webpack%e6%b5%8f%e8%a7%88%e5%99%a8%e7%8e%af%e5%a2%83%e6%9c%89window%e5%af%b9%e8%b1%a1)
|
||||
- [4.2 nodejs 等非浏览器环境](#42-nodejs-%e7%ad%89%e9%9d%9e%e6%b5%8f%e8%a7%88%e5%99%a8%e7%8e%af%e5%a2%83)
|
||||
- [4.3 原生浏览器环境](#43-%e5%8e%9f%e7%94%9f%e6%b5%8f%e8%a7%88%e5%99%a8%e7%8e%af%e5%a2%83)
|
||||
- [前言](#%E5%89%8D%E8%A8%80)
|
||||
- [0.快速使用](#0%E5%BF%AB%E9%80%9F%E4%BD%BF%E7%94%A8)
|
||||
- [1.功能](#1%E5%8A%9F%E8%83%BD)
|
||||
- [2.概览](#2%E6%A6%82%E8%A7%88)
|
||||
- [3 安装](#3-%E5%AE%89%E8%A3%85)
|
||||
* [3.1 使用 npm 安装](#31-%E4%BD%BF%E7%94%A8-npm-%E5%AE%89%E8%A3%85)
|
||||
* [3.2 使用 script 引入](#32-%E4%BD%BF%E7%94%A8-script-%E5%BC%95%E5%85%A5)
|
||||
- [4 使用](#4-%E4%BD%BF%E7%94%A8)
|
||||
* [4.1 webpack浏览器环境(有window对象)](#41-webpack%E6%B5%8F%E8%A7%88%E5%99%A8%E7%8E%AF%E5%A2%83%E6%9C%89window%E5%AF%B9%E8%B1%A1)
|
||||
* [4.2 nodejs 等非浏览器环境](#42-nodejs-%E7%AD%89%E9%9D%9E%E6%B5%8F%E8%A7%88%E5%99%A8%E7%8E%AF%E5%A2%83)
|
||||
* [4.3 原生浏览器环境](#43-%E5%8E%9F%E7%94%9F%E6%B5%8F%E8%A7%88%E5%99%A8%E7%8E%AF%E5%A2%83)
|
||||
- [5 API](#5-api)
|
||||
- [5.1 拼音笔画基础 API: spell & stroke](#51-%e6%8b%bc%e9%9f%b3%e7%ac%94%e7%94%bb%e5%9f%ba%e7%a1%80-api-spell--stroke)
|
||||
- [5.2 可视化绘制汉字: draw](#52-%e5%8f%af%e8%a7%86%e5%8c%96%e7%bb%98%e5%88%b6%e6%b1%89%e5%ad%97-draw)
|
||||
- [5.2.1 使用](#521-%e4%bd%bf%e7%94%a8)
|
||||
- [5.2.2 参数](#522-%e5%8f%82%e6%95%b0)
|
||||
- [5.3 繁体、简体、火星文互转: convert](#53-%e7%b9%81%e4%bd%93%e7%ae%80%e4%bd%93%e7%81%ab%e6%98%9f%e6%96%87%e4%ba%92%e8%bd%ac-convert)
|
||||
- [5.4 笔画序列推出原汉字: orderToWord](#54-%e7%ac%94%e7%94%bb%e5%ba%8f%e5%88%97%e6%8e%a8%e5%87%ba%e5%8e%9f%e6%b1%89%e5%ad%97-ordertoword)
|
||||
- [5.5 通过拼音查询原汉字: spellToWord](#55-%e9%80%9a%e8%bf%87%e6%8b%bc%e9%9f%b3%e6%9f%a5%e8%af%a2%e5%8e%9f%e6%b1%89%e5%ad%97-spelltoword)
|
||||
- [5.6 通过笔画数查询原汉字: strokeToWord](#56-%e9%80%9a%e8%bf%87%e7%ac%94%e7%94%bb%e6%95%b0%e6%9f%a5%e8%af%a2%e5%8e%9f%e6%b1%89%e5%ad%97-stroketoword)
|
||||
- [5.7 查询拼音详细信息: spellInfo](#57-%e6%9f%a5%e8%af%a2%e6%8b%bc%e9%9f%b3%e8%af%a6%e7%bb%86%e4%bf%a1%e6%81%af-spellinfo)
|
||||
- [5.8 其他 api](#58-%e5%85%b6%e4%bb%96-api)
|
||||
- [5.8.1 .use()](#581-use)
|
||||
- [5.8.2 .type](#582-type)
|
||||
- [5.8.3 .check](#583-check)
|
||||
- [5.8.4 .version](#584-version)
|
||||
- [5.8.5 .plugins](#585-plugins)
|
||||
- [6 spell stroke 参数](#6-spell-stroke-%e5%8f%82%e6%95%b0)
|
||||
- [6.1 spell 参数](#61-spell-%e5%8f%82%e6%95%b0)
|
||||
- [6.2 stroke 参数](#62-stroke-%e5%8f%82%e6%95%b0)
|
||||
- [6.3 orderToWord 参数](#63-ordertoword-%e5%8f%82%e6%95%b0)
|
||||
- [6.4 spellToWord 参数](#64-spelltoword-%e5%8f%82%e6%95%b0)
|
||||
- [6.5 strokeToWord 参数](#65-stroketoword-%e5%8f%82%e6%95%b0)
|
||||
- [6.6 使用实例大全:](#66-%e4%bd%bf%e7%94%a8%e5%ae%9e%e4%be%8b%e5%a4%a7%e5%85%a8)
|
||||
- [6.6.0 安装使用](#660-%e5%ae%89%e8%a3%85%e4%bd%bf%e7%94%a8)
|
||||
- [6.6.1 cnchar 基础库功能](#661-cnchar-%e5%9f%ba%e7%a1%80%e5%ba%93%e5%8a%9f%e8%83%bd)
|
||||
- [6.6.2 cnchar-poly 库功能](#662-cnchar-poly-%e5%ba%93%e5%8a%9f%e8%83%bd)
|
||||
- [6.6.3 cnchar-order 库功能](#663-cnchar-order-%e5%ba%93%e5%8a%9f%e8%83%bd)
|
||||
- [6.6.4 cnchar-trad 库功能](#664-cnchar-trad-%e5%ba%93%e5%8a%9f%e8%83%bd)
|
||||
- [6.6.4.1 convert 字体转换](#6641-convert-%e5%ad%97%e4%bd%93%e8%bd%ac%e6%8d%a2)
|
||||
- [6.6.4.2 spell 和 stroke 方法](#6642-spell-%e5%92%8c-stroke-%e6%96%b9%e6%b3%95)
|
||||
- [7 应用例子](#7-%e5%ba%94%e7%94%a8%e4%be%8b%e5%ad%90)
|
||||
* [5.1 拼音笔画基础 API: spell & stroke](#51-%E6%8B%BC%E9%9F%B3%E7%AC%94%E7%94%BB%E5%9F%BA%E7%A1%80-api-spell--stroke)
|
||||
* [5.2 可视化绘制汉字: draw](#52-%E5%8F%AF%E8%A7%86%E5%8C%96%E7%BB%98%E5%88%B6%E6%B1%89%E5%AD%97-draw)
|
||||
+ [5.2.1 使用](#521-%E4%BD%BF%E7%94%A8)
|
||||
+ [5.2.2 参数](#522-%E5%8F%82%E6%95%B0)
|
||||
* [5.3 繁体、简体、火星文互转: convert](#53-%E7%B9%81%E4%BD%93%E7%AE%80%E4%BD%93%E7%81%AB%E6%98%9F%E6%96%87%E4%BA%92%E8%BD%AC-convert)
|
||||
* [5.4 笔画序列推出原汉字: orderToWord](#54-%E7%AC%94%E7%94%BB%E5%BA%8F%E5%88%97%E6%8E%A8%E5%87%BA%E5%8E%9F%E6%B1%89%E5%AD%97-ordertoword)
|
||||
* [5.5 通过拼音查询原汉字: spellToWord](#55-%E9%80%9A%E8%BF%87%E6%8B%BC%E9%9F%B3%E6%9F%A5%E8%AF%A2%E5%8E%9F%E6%B1%89%E5%AD%97-spelltoword)
|
||||
* [5.6 通过笔画数查询原汉字: strokeToWord](#56-%E9%80%9A%E8%BF%87%E7%AC%94%E7%94%BB%E6%95%B0%E6%9F%A5%E8%AF%A2%E5%8E%9F%E6%B1%89%E5%AD%97-stroketoword)
|
||||
* [5.7 查询拼音详细信息: spellInfo](#57-%E6%9F%A5%E8%AF%A2%E6%8B%BC%E9%9F%B3%E8%AF%A6%E7%BB%86%E4%BF%A1%E6%81%AF-spellinfo)
|
||||
* [5.8 其他 api](#58-%E5%85%B6%E4%BB%96-api)
|
||||
+ [5.8.1 .use()](#581-use)
|
||||
+ [5.8.2 .type](#582-type)
|
||||
+ [5.8.3 .check](#583-check)
|
||||
+ [5.8.4 .version](#584-version)
|
||||
+ [5.8.5 .plugins](#585-plugins)
|
||||
- [6 spell stroke 参数](#6-spell-stroke-%E5%8F%82%E6%95%B0)
|
||||
* [6.1 spell 参数](#61-spell-%E5%8F%82%E6%95%B0)
|
||||
* [6.2 stroke 参数](#62-stroke-%E5%8F%82%E6%95%B0)
|
||||
* [6.3 orderToWord 参数](#63-ordertoword-%E5%8F%82%E6%95%B0)
|
||||
* [6.4 spellToWord 参数](#64-spelltoword-%E5%8F%82%E6%95%B0)
|
||||
* [6.5 strokeToWord 参数](#65-stroketoword-%E5%8F%82%E6%95%B0)
|
||||
* [6.6 使用实例大全:](#66-%E4%BD%BF%E7%94%A8%E5%AE%9E%E4%BE%8B%E5%A4%A7%E5%85%A8)
|
||||
+ [6.6.0 安装使用](#660-%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8)
|
||||
+ [6.6.1 cnchar 基础库功能](#661-cnchar-%E5%9F%BA%E7%A1%80%E5%BA%93%E5%8A%9F%E8%83%BD)
|
||||
+ [6.6.2 cnchar-poly 库功能](#662-cnchar-poly-%E5%BA%93%E5%8A%9F%E8%83%BD)
|
||||
+ [6.6.3 cnchar-order 库功能](#663-cnchar-order-%E5%BA%93%E5%8A%9F%E8%83%BD)
|
||||
+ [6.6.4 cnchar-trad 库功能](#664-cnchar-trad-%E5%BA%93%E5%8A%9F%E8%83%BD)
|
||||
- [6.6.4.1 convert 字体转换](#6641-convert-%E5%AD%97%E4%BD%93%E8%BD%AC%E6%8D%A2)
|
||||
- [6.6.4.2 spell 和 stroke 方法](#6642-spell-%E5%92%8C-stroke-%E6%96%B9%E6%B3%95)
|
||||
- [7 应用例子](#7-%E5%BA%94%E7%94%A8%E4%BE%8B%E5%AD%90)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
|
@ -754,7 +754,7 @@ cnchar.spellToWord('shàng'); // 返回 "上尚绱"
|
|||
cnchar.spellToWord('lv2'); // 返回 "驴闾榈"
|
||||
|
||||
//strokeToWord 功能
|
||||
cnchar.strokeToWord(2); // 返回 "丁七乃乜九了二人亻儿入八冂几凵刀刁力勹
|
||||
cnchar.strokeToWord(2); // 返回 "丁七乃乜九了二人亻儿入八冂几凵刀刁力勹"
|
||||
|
||||
//spellInfo 功能
|
||||
cnchar.spellInfo('shàng');
|
||||
|
|
|
@ -76,5 +76,6 @@
|
|||
2. draw库将backgroundColor参数默认值改为#fff
|
||||
3. draw库将el参数改为支持css选择器或dom
|
||||
|
||||
## 2.1.4 doing
|
||||
1. 修复cnchar-all及cnchar-draw库在非浏览器环境会报错的bug
|
||||
## 2.1.4
|
||||
1. 修复cnchar-all及cnchar-draw库在非浏览器环境会报错的bug
|
||||
2. 修复 draw库和main库在ts环境中引用的异常
|
File diff suppressed because one or more lines are too long
|
@ -20,7 +20,7 @@ declare interface spellInfoReturnStatic {
|
|||
declare interface CnCharStatic {
|
||||
spell(sentence: string, ...args: Array<spellArg>): string | Array<any>;
|
||||
stroke(sentence: string, ...args: Array<strokeArg>): number | Array<any>;
|
||||
draw?: Draw;
|
||||
draw: Draw;
|
||||
use(...plugins: Array<Function>): void;
|
||||
orderToWord: {
|
||||
(orders: string | Array<orderName>, ...args: Array<orderToWordArg>): string | Array<string>;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cnchar-all",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"description": "功能全面、多端支持的汉字拼音笔画js库,支持多音字、繁体字、火星文",
|
||||
"main": "index.js",
|
||||
"unpkg": "cnchar.all.min.js",
|
||||
|
@ -27,10 +27,10 @@
|
|||
},
|
||||
"homepage": "https://www.theajack.com/cnchar/",
|
||||
"dependencies": {
|
||||
"cnchar": "^2.1.3",
|
||||
"cnchar-order": "^2.1.3",
|
||||
"cnchar-poly": "^2.1.3",
|
||||
"cnchar-trad": "^2.1.3",
|
||||
"cnchar-draw": "^2.1.3"
|
||||
"cnchar": "^2.1.4",
|
||||
"cnchar-order": "^2.1.4",
|
||||
"cnchar-poly": "^2.1.4",
|
||||
"cnchar-trad": "^2.1.4",
|
||||
"cnchar-draw": "^2.1.4"
|
||||
}
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
# [cnchar](https://github.com/theajack/cnchar) <a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/github/stars/theajack/cnchar.svg?style=social" alt="star"></a> <a href="https://theajack.gitee.io"><img src="https://img.shields.io/badge/author-theajack-blue.svg?style=social" alt="Author"></a>
|
||||
|
||||
<h1>
|
||||
<a href="https://github.com/theajack/cnchar">cnchar</a>
|
||||
<a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/github/stars/theajack/cnchar.svg?style=social" alt="star"></a>
|
||||
<a href="https://theajack.gitee.io"><img src="https://img.shields.io/badge/author-theajack-blue.svg?style=social" alt="Author"></a>
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
<a href="https://www.npmjs.com/package/cnchar"><img src="https://img.shields.io/npm/v/cnchar.svg" alt="Version"></a>
|
||||
|
@ -8,12 +11,14 @@
|
|||
<a href="https://github.com/theajack/cnchar/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/cnchar.svg" alt="License"></a>
|
||||
<a href="https://github.com/theajack/cnchar/search?l=javascript"><img src="https://img.shields.io/github/languages/top/theajack/cnchar.svg" alt="TopLang"></a>
|
||||
<a href="https://github.com/theajack/cnchar/issues"><img src="https://img.shields.io/github/issues-closed/theajack/cnchar.svg" alt="issue"></a>
|
||||
<!-- <a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/librariesio/dependent-repos/npm/cnchar.svg" alt="Dependent"></a> -->
|
||||
<a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/librariesio/dependent-repos/npm/cnchar.svg" alt="Dependent"></a>
|
||||
</p>
|
||||
|
||||
### 🚀 功能全面、多端支持的汉字拼音笔画 js 库
|
||||
<h3>🚀 功能全面、多端支持的汉字拼音笔画 js 库</h3>
|
||||
|
||||
**<a href="#66-使用实例大全">快速上手</a> | [在线试用/文档](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new)**
|
||||
**[English](https://github.com/theajack/cnchar/blob/master/helper/README.en.md) | [在线试用/文档](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new)**
|
||||
|
||||
cnchar 由于重建过一次仓库,所以之前的 star 都清零了,如果该仓库对您有帮助,希望能给个star,谢谢!
|
||||
|
||||
---
|
||||
|
||||
|
@ -267,7 +272,7 @@ cnchar.draw('你好', options); // options 为可选参数, 在5.2.2 种会详
|
|||
|
||||
运行结果如下:
|
||||
|
||||
![draw.jpg](https://cdn.jsdelivr.net/gh/theajack/cnchar/assets/readme/draw.jpg)
|
||||
![draw.jpg](https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/readme/draw.jpg)
|
||||
|
||||
该库支持脱离cnchar 独立使用
|
||||
|
||||
|
@ -749,7 +754,7 @@ cnchar.spellToWord('shàng'); // 返回 "上尚绱"
|
|||
cnchar.spellToWord('lv2'); // 返回 "驴闾榈"
|
||||
|
||||
//strokeToWord 功能
|
||||
cnchar.strokeToWord(2); // 返回 "丁七乃乜九了二人亻儿入八冂几凵刀刁力勹
|
||||
cnchar.strokeToWord(2); // 返回 "丁七乃乜九了二人亻儿入八冂几凵刀刁力勹"
|
||||
|
||||
//spellInfo 功能
|
||||
cnchar.spellInfo('shàng');
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20,7 +20,7 @@ declare interface spellInfoReturnStatic {
|
|||
declare interface CnCharStatic {
|
||||
spell(sentence: string, ...args: Array<spellArg>): string | Array<any>;
|
||||
stroke(sentence: string, ...args: Array<strokeArg>): number | Array<any>;
|
||||
draw?: Draw;
|
||||
draw: Draw;
|
||||
use(...plugins: Array<Function>): void;
|
||||
orderToWord: {
|
||||
(orders: string | Array<orderName>, ...args: Array<orderToWordArg>): string | Array<string>;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cnchar",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"description": "功能全面、多端支持的汉字拼音笔画js库,支持多音字、繁体字、火星文",
|
||||
"main": "index.js",
|
||||
"scripts": {},
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = '2.1.3';
|
||||
module.exports = '2.1.4';
|
|
@ -1,5 +1,8 @@
|
|||
# [cnchar](https://github.com/theajack/cnchar) <a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/github/stars/theajack/cnchar.svg?style=social" alt="star"></a> <a href="https://theajack.gitee.io"><img src="https://img.shields.io/badge/author-theajack-blue.svg?style=social" alt="Author"></a>
|
||||
|
||||
<h1>
|
||||
<a href="https://github.com/theajack/cnchar">cnchar</a>
|
||||
<a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/github/stars/theajack/cnchar.svg?style=social" alt="star"></a>
|
||||
<a href="https://theajack.gitee.io"><img src="https://img.shields.io/badge/author-theajack-blue.svg?style=social" alt="Author"></a>
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
<a href="https://www.npmjs.com/package/cnchar"><img src="https://img.shields.io/npm/v/cnchar.svg" alt="Version"></a>
|
||||
|
@ -8,12 +11,14 @@
|
|||
<a href="https://github.com/theajack/cnchar/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/cnchar.svg" alt="License"></a>
|
||||
<a href="https://github.com/theajack/cnchar/search?l=javascript"><img src="https://img.shields.io/github/languages/top/theajack/cnchar.svg" alt="TopLang"></a>
|
||||
<a href="https://github.com/theajack/cnchar/issues"><img src="https://img.shields.io/github/issues-closed/theajack/cnchar.svg" alt="issue"></a>
|
||||
<!-- <a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/librariesio/dependent-repos/npm/cnchar.svg" alt="Dependent"></a> -->
|
||||
<a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/librariesio/dependent-repos/npm/cnchar.svg" alt="Dependent"></a>
|
||||
</p>
|
||||
|
||||
### 🚀 功能全面、多端支持的汉字拼音笔画 js 库
|
||||
<h3>🚀 功能全面、多端支持的汉字拼音笔画 js 库</h3>
|
||||
|
||||
**<a href="#66-使用实例大全">快速上手</a> | [在线试用/文档](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new)**
|
||||
**[English](https://github.com/theajack/cnchar/blob/master/helper/README.en.md) | [在线试用/文档](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new)**
|
||||
|
||||
cnchar 由于重建过一次仓库,所以之前的 star 都清零了,如果该仓库对您有帮助,希望能给个star,谢谢!
|
||||
|
||||
---
|
||||
|
||||
|
@ -267,7 +272,7 @@ cnchar.draw('你好', options); // options 为可选参数, 在5.2.2 种会详
|
|||
|
||||
运行结果如下:
|
||||
|
||||
![draw.jpg](https://cdn.jsdelivr.net/gh/theajack/cnchar/assets/readme/draw.jpg)
|
||||
![draw.jpg](https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/readme/draw.jpg)
|
||||
|
||||
该库支持脱离cnchar 独立使用
|
||||
|
||||
|
@ -749,7 +754,7 @@ cnchar.spellToWord('shàng'); // 返回 "上尚绱"
|
|||
cnchar.spellToWord('lv2'); // 返回 "驴闾榈"
|
||||
|
||||
//strokeToWord 功能
|
||||
cnchar.strokeToWord(2); // 返回 "丁七乃乜九了二人亻儿入八冂几凵刀刁力勹
|
||||
cnchar.strokeToWord(2); // 返回 "丁七乃乜九了二人亻儿入八冂几凵刀刁力勹"
|
||||
|
||||
//spellInfo 功能
|
||||
cnchar.spellInfo('shàng');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
declare type DrawType = 'normal' | 'animation' | 'stroke' | 'test';
|
||||
declare type TestStatusType = 'mistake' | 'correct' | 'complete';
|
||||
declare class Writer {
|
||||
constructor() {};
|
||||
constructor();
|
||||
option: object;
|
||||
el: HTMLElement;
|
||||
type: DrawType;
|
||||
|
@ -25,6 +25,7 @@ declare interface TestStatus {
|
|||
};// 对象包含用户绘制的 pathString ,用于评分的分数。
|
||||
}
|
||||
}
|
||||
|
||||
declare interface DrawOption {
|
||||
el?: string | HTMLElement; // 绘制的容器,支持选择器或dom,若是不填,会在body后append一个dom作为容器
|
||||
type?: DrawType; // 绘制模式,默认为normal
|
||||
|
@ -71,7 +72,8 @@ declare interface DrawOption {
|
|||
highlightCompleteColor?: number;// : null, // 十六进制字符, 默认 null。 在测验中突出显示字符时使用的颜色。 如果未设置,则将使用highlightColor。 仅当highlightOnComplete为true时才相关。
|
||||
onTestStatus?(args: TestStatus):void;// : null, // ({index, status, data})=>{}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export declare interface Draw {
|
||||
(text:string, option?:DrawOption):Writer;
|
||||
TYPE: {
|
||||
|
@ -85,7 +87,7 @@ export declare interface Draw {
|
|||
CORRECT: 'correct',
|
||||
COMPLETE: 'complete'
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
declare const draw: Draw;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cnchar-draw",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"description": "功能全面、多端支持的汉字拼音笔画js库,支持多音字、繁体字、火星文",
|
||||
"main": "index.js",
|
||||
"unpkg": "cnchar.draw.min.js",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20,7 +20,7 @@ declare interface spellInfoReturnStatic {
|
|||
declare interface CnCharStatic {
|
||||
spell(sentence: string, ...args: Array<spellArg>): string | Array<any>;
|
||||
stroke(sentence: string, ...args: Array<strokeArg>): number | Array<any>;
|
||||
draw?: Draw;
|
||||
draw: Draw;
|
||||
use(...plugins: Array<Function>): void;
|
||||
orderToWord: {
|
||||
(orders: string | Array<orderName>, ...args: Array<orderToWordArg>): string | Array<string>;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hanzi-util-base",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"description": "功能全面、多端支持的汉字拼音笔画js库,支持多音字、繁体字、火星文",
|
||||
"main": "index.js",
|
||||
"unpkg": "hanzi.base.min.js",
|
||||
|
@ -27,6 +27,6 @@
|
|||
},
|
||||
"homepage": "https://www.theajack.com/cnchar/",
|
||||
"dependencies": {
|
||||
"cnchar": "^2.1.3"
|
||||
"cnchar": "^2.1.4"
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -20,7 +20,7 @@ declare interface spellInfoReturnStatic {
|
|||
declare interface CnCharStatic {
|
||||
spell(sentence: string, ...args: Array<spellArg>): string | Array<any>;
|
||||
stroke(sentence: string, ...args: Array<strokeArg>): number | Array<any>;
|
||||
draw?: Draw;
|
||||
draw: Draw;
|
||||
use(...plugins: Array<Function>): void;
|
||||
orderToWord: {
|
||||
(orders: string | Array<orderName>, ...args: Array<orderToWordArg>): string | Array<string>;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hanzi-util",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"description": "功能全面、多端支持的汉字拼音笔画js库,支持多音字、繁体字、火星文",
|
||||
"main": "index.js",
|
||||
"unpkg": "hanzi.util.min.js",
|
||||
|
@ -27,6 +27,6 @@
|
|||
},
|
||||
"homepage": "https://www.theajack.com/cnchar/",
|
||||
"dependencies": {
|
||||
"cnchar-all": "^2.1.3"
|
||||
"cnchar-all": "^2.1.4"
|
||||
}
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
# [cnchar](https://github.com/theajack/cnchar) <a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/github/stars/theajack/cnchar.svg?style=social" alt="star"></a> <a href="https://theajack.gitee.io"><img src="https://img.shields.io/badge/author-theajack-blue.svg?style=social" alt="Author"></a>
|
||||
|
||||
<h1>
|
||||
<a href="https://github.com/theajack/cnchar">cnchar</a>
|
||||
<a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/github/stars/theajack/cnchar.svg?style=social" alt="star"></a>
|
||||
<a href="https://theajack.gitee.io"><img src="https://img.shields.io/badge/author-theajack-blue.svg?style=social" alt="Author"></a>
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
<a href="https://www.npmjs.com/package/cnchar"><img src="https://img.shields.io/npm/v/cnchar.svg" alt="Version"></a>
|
||||
|
@ -8,12 +11,14 @@
|
|||
<a href="https://github.com/theajack/cnchar/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/cnchar.svg" alt="License"></a>
|
||||
<a href="https://github.com/theajack/cnchar/search?l=javascript"><img src="https://img.shields.io/github/languages/top/theajack/cnchar.svg" alt="TopLang"></a>
|
||||
<a href="https://github.com/theajack/cnchar/issues"><img src="https://img.shields.io/github/issues-closed/theajack/cnchar.svg" alt="issue"></a>
|
||||
<!-- <a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/librariesio/dependent-repos/npm/cnchar.svg" alt="Dependent"></a> -->
|
||||
<a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/librariesio/dependent-repos/npm/cnchar.svg" alt="Dependent"></a>
|
||||
</p>
|
||||
|
||||
### 🚀 功能全面、多端支持的汉字拼音笔画 js 库
|
||||
<h3>🚀 功能全面、多端支持的汉字拼音笔画 js 库</h3>
|
||||
|
||||
**<a href="#66-使用实例大全">快速上手</a> | [在线试用/文档](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new)**
|
||||
**[English](https://github.com/theajack/cnchar/blob/master/helper/README.en.md) | [在线试用/文档](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new)**
|
||||
|
||||
cnchar 由于重建过一次仓库,所以之前的 star 都清零了,如果该仓库对您有帮助,希望能给个star,谢谢!
|
||||
|
||||
---
|
||||
|
||||
|
@ -267,7 +272,7 @@ cnchar.draw('你好', options); // options 为可选参数, 在5.2.2 种会详
|
|||
|
||||
运行结果如下:
|
||||
|
||||
![draw.jpg](https://cdn.jsdelivr.net/gh/theajack/cnchar/assets/readme/draw.jpg)
|
||||
![draw.jpg](https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/readme/draw.jpg)
|
||||
|
||||
该库支持脱离cnchar 独立使用
|
||||
|
||||
|
@ -749,7 +754,7 @@ cnchar.spellToWord('shàng'); // 返回 "上尚绱"
|
|||
cnchar.spellToWord('lv2'); // 返回 "驴闾榈"
|
||||
|
||||
//strokeToWord 功能
|
||||
cnchar.strokeToWord(2); // 返回 "丁七乃乜九了二人亻儿入八冂几凵刀刁力勹
|
||||
cnchar.strokeToWord(2); // 返回 "丁七乃乜九了二人亻儿入八冂几凵刀刁力勹"
|
||||
|
||||
//spellInfo 功能
|
||||
cnchar.spellInfo('shàng');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cnchar-order",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"description": "功能全面、多端支持的汉字拼音笔画js库,支持多音字、繁体字、火星文",
|
||||
"main": "index.js",
|
||||
"unpkg": "cnchar.order.min.js",
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
# [cnchar](https://github.com/theajack/cnchar) <a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/github/stars/theajack/cnchar.svg?style=social" alt="star"></a> <a href="https://theajack.gitee.io"><img src="https://img.shields.io/badge/author-theajack-blue.svg?style=social" alt="Author"></a>
|
||||
|
||||
<h1>
|
||||
<a href="https://github.com/theajack/cnchar">cnchar</a>
|
||||
<a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/github/stars/theajack/cnchar.svg?style=social" alt="star"></a>
|
||||
<a href="https://theajack.gitee.io"><img src="https://img.shields.io/badge/author-theajack-blue.svg?style=social" alt="Author"></a>
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
<a href="https://www.npmjs.com/package/cnchar"><img src="https://img.shields.io/npm/v/cnchar.svg" alt="Version"></a>
|
||||
|
@ -8,12 +11,14 @@
|
|||
<a href="https://github.com/theajack/cnchar/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/cnchar.svg" alt="License"></a>
|
||||
<a href="https://github.com/theajack/cnchar/search?l=javascript"><img src="https://img.shields.io/github/languages/top/theajack/cnchar.svg" alt="TopLang"></a>
|
||||
<a href="https://github.com/theajack/cnchar/issues"><img src="https://img.shields.io/github/issues-closed/theajack/cnchar.svg" alt="issue"></a>
|
||||
<!-- <a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/librariesio/dependent-repos/npm/cnchar.svg" alt="Dependent"></a> -->
|
||||
<a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/librariesio/dependent-repos/npm/cnchar.svg" alt="Dependent"></a>
|
||||
</p>
|
||||
|
||||
### 🚀 功能全面、多端支持的汉字拼音笔画 js 库
|
||||
<h3>🚀 功能全面、多端支持的汉字拼音笔画 js 库</h3>
|
||||
|
||||
**<a href="#66-使用实例大全">快速上手</a> | [在线试用/文档](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new)**
|
||||
**[English](https://github.com/theajack/cnchar/blob/master/helper/README.en.md) | [在线试用/文档](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new)**
|
||||
|
||||
cnchar 由于重建过一次仓库,所以之前的 star 都清零了,如果该仓库对您有帮助,希望能给个star,谢谢!
|
||||
|
||||
---
|
||||
|
||||
|
@ -267,7 +272,7 @@ cnchar.draw('你好', options); // options 为可选参数, 在5.2.2 种会详
|
|||
|
||||
运行结果如下:
|
||||
|
||||
![draw.jpg](https://cdn.jsdelivr.net/gh/theajack/cnchar/assets/readme/draw.jpg)
|
||||
![draw.jpg](https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/readme/draw.jpg)
|
||||
|
||||
该库支持脱离cnchar 独立使用
|
||||
|
||||
|
@ -749,7 +754,7 @@ cnchar.spellToWord('shàng'); // 返回 "上尚绱"
|
|||
cnchar.spellToWord('lv2'); // 返回 "驴闾榈"
|
||||
|
||||
//strokeToWord 功能
|
||||
cnchar.strokeToWord(2); // 返回 "丁七乃乜九了二人亻儿入八冂几凵刀刁力勹
|
||||
cnchar.strokeToWord(2); // 返回 "丁七乃乜九了二人亻儿入八冂几凵刀刁力勹"
|
||||
|
||||
//spellInfo 功能
|
||||
cnchar.spellInfo('shàng');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cnchar-poly",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"description": "功能全面、多端支持的汉字拼音笔画js库,支持多音字、繁体字、火星文",
|
||||
"main": "index.js",
|
||||
"unpkg": "cnchar.poly.min.js",
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
# [cnchar](https://github.com/theajack/cnchar) <a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/github/stars/theajack/cnchar.svg?style=social" alt="star"></a> <a href="https://theajack.gitee.io"><img src="https://img.shields.io/badge/author-theajack-blue.svg?style=social" alt="Author"></a>
|
||||
|
||||
<h1>
|
||||
<a href="https://github.com/theajack/cnchar">cnchar</a>
|
||||
<a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/github/stars/theajack/cnchar.svg?style=social" alt="star"></a>
|
||||
<a href="https://theajack.gitee.io"><img src="https://img.shields.io/badge/author-theajack-blue.svg?style=social" alt="Author"></a>
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
<a href="https://www.npmjs.com/package/cnchar"><img src="https://img.shields.io/npm/v/cnchar.svg" alt="Version"></a>
|
||||
|
@ -8,12 +11,14 @@
|
|||
<a href="https://github.com/theajack/cnchar/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/cnchar.svg" alt="License"></a>
|
||||
<a href="https://github.com/theajack/cnchar/search?l=javascript"><img src="https://img.shields.io/github/languages/top/theajack/cnchar.svg" alt="TopLang"></a>
|
||||
<a href="https://github.com/theajack/cnchar/issues"><img src="https://img.shields.io/github/issues-closed/theajack/cnchar.svg" alt="issue"></a>
|
||||
<!-- <a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/librariesio/dependent-repos/npm/cnchar.svg" alt="Dependent"></a> -->
|
||||
<a href="https://www.github.com/theajack/cnchar"><img src="https://img.shields.io/librariesio/dependent-repos/npm/cnchar.svg" alt="Dependent"></a>
|
||||
</p>
|
||||
|
||||
### 🚀 功能全面、多端支持的汉字拼音笔画 js 库
|
||||
<h3>🚀 功能全面、多端支持的汉字拼音笔画 js 库</h3>
|
||||
|
||||
**<a href="#66-使用实例大全">快速上手</a> | [在线试用/文档](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new)**
|
||||
**[English](https://github.com/theajack/cnchar/blob/master/helper/README.en.md) | [在线试用/文档](https://theajack.gitee.io/cnchar) | [更新日志](https://github.com/theajack/cnchar/blob/master/helper/version.md) | [应用:打字游戏](https://theajack.gitee.io/type/) | [反馈错误/缺漏](https://github.com/theajack/cnchar/issues/new)**
|
||||
|
||||
cnchar 由于重建过一次仓库,所以之前的 star 都清零了,如果该仓库对您有帮助,希望能给个star,谢谢!
|
||||
|
||||
---
|
||||
|
||||
|
@ -267,7 +272,7 @@ cnchar.draw('你好', options); // options 为可选参数, 在5.2.2 种会详
|
|||
|
||||
运行结果如下:
|
||||
|
||||
![draw.jpg](https://cdn.jsdelivr.net/gh/theajack/cnchar/assets/readme/draw.jpg)
|
||||
![draw.jpg](https://cdn.jsdelivr.net/gh/theajack/cnchar/docs/assets/readme/draw.jpg)
|
||||
|
||||
该库支持脱离cnchar 独立使用
|
||||
|
||||
|
@ -749,7 +754,7 @@ cnchar.spellToWord('shàng'); // 返回 "上尚绱"
|
|||
cnchar.spellToWord('lv2'); // 返回 "驴闾榈"
|
||||
|
||||
//strokeToWord 功能
|
||||
cnchar.strokeToWord(2); // 返回 "丁七乃乜九了二人亻儿入八冂几凵刀刁力勹
|
||||
cnchar.strokeToWord(2); // 返回 "丁七乃乜九了二人亻儿入八冂几凵刀刁力勹"
|
||||
|
||||
//spellInfo 功能
|
||||
cnchar.spellInfo('shàng');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cnchar-trad",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"description": "功能全面、多端支持的汉字拼音笔画js库,支持多音字、繁体字、火星文",
|
||||
"main": "index.js",
|
||||
"unpkg": "cnchar.trad.min.js",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cnchar",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"description": "功能全面、多端支持的汉字拼音笔画js库,支持多音字、繁体字、火星文",
|
||||
"main": "index.html",
|
||||
"author": "theajack <contact@theajack.com>",
|
||||
|
|
|
@ -20,7 +20,7 @@ declare interface spellInfoReturnStatic {
|
|||
declare interface CnCharStatic {
|
||||
spell(sentence: string, ...args: Array<spellArg>): string | Array<any>;
|
||||
stroke(sentence: string, ...args: Array<strokeArg>): number | Array<any>;
|
||||
draw?: Draw;
|
||||
draw: Draw;
|
||||
use(...plugins: Array<Function>): void;
|
||||
orderToWord: {
|
||||
(orders: string | Array<orderName>, ...args: Array<orderToWordArg>): string | Array<string>;
|
||||
|
|
|
@ -1 +1 @@
|
|||
module.exports = '2.1.3';
|
||||
module.exports = '2.1.4';
|
|
@ -1,7 +1,7 @@
|
|||
declare type DrawType = 'normal' | 'animation' | 'stroke' | 'test';
|
||||
declare type TestStatusType = 'mistake' | 'correct' | 'complete';
|
||||
declare class Writer {
|
||||
constructor() {};
|
||||
constructor();
|
||||
option: object;
|
||||
el: HTMLElement;
|
||||
type: DrawType;
|
||||
|
@ -25,6 +25,7 @@ declare interface TestStatus {
|
|||
};// 对象包含用户绘制的 pathString ,用于评分的分数。
|
||||
}
|
||||
}
|
||||
|
||||
declare interface DrawOption {
|
||||
el?: string | HTMLElement; // 绘制的容器,支持选择器或dom,若是不填,会在body后append一个dom作为容器
|
||||
type?: DrawType; // 绘制模式,默认为normal
|
||||
|
@ -71,7 +72,8 @@ declare interface DrawOption {
|
|||
highlightCompleteColor?: number;// : null, // 十六进制字符, 默认 null。 在测验中突出显示字符时使用的颜色。 如果未设置,则将使用highlightColor。 仅当highlightOnComplete为true时才相关。
|
||||
onTestStatus?(args: TestStatus):void;// : null, // ({index, status, data})=>{}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export declare interface Draw {
|
||||
(text:string, option?:DrawOption):Writer;
|
||||
TYPE: {
|
||||
|
@ -85,7 +87,7 @@ export declare interface Draw {
|
|||
CORRECT: 'correct',
|
||||
COMPLETE: 'complete'
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
declare const draw: Draw;
|
||||
|
||||
|
|
Loading…
Reference in New Issue