2020-04-06 01:51:13 +08:00
|
|
|
import cnchar from '../src/main/index';
|
|
|
|
import '../src/plugin/order';
|
|
|
|
import '../src/plugin/trad';
|
|
|
|
import '../src/plugin/poly';
|
2020-06-03 18:11:37 +08:00
|
|
|
import '../src/plugin/draw';
|
2020-05-22 19:12:26 +08:00
|
|
|
import '../src/plugin/idiom';
|
2020-06-03 18:11:37 +08:00
|
|
|
import '../src/plugin/xhy';
|
2020-09-08 18:05:55 +08:00
|
|
|
import '../src/plugin/radical';
|
2020-05-29 21:21:13 +08:00
|
|
|
|
2020-06-03 18:11:37 +08:00
|
|
|
// import spell from '../src/main/spell-dict-jian.json';
|
|
|
|
// // import cncharDraw from '../src/plugin/draw';
|
2020-04-13 16:46:50 +08:00
|
|
|
|
2020-07-07 19:08:30 +08:00
|
|
|
// import cnchar from '../npm/cnchar';
|
|
|
|
// import '../npm/order';
|
|
|
|
// import '../npm/trad';
|
|
|
|
// import '../npm/poly';
|
|
|
|
// import '../npm/draw';
|
|
|
|
// import '../npm/idiom';
|
|
|
|
// import '../npm/xhy';
|
2020-04-13 16:46:50 +08:00
|
|
|
|
2020-06-03 18:11:37 +08:00
|
|
|
// // import './plugin/draw'
|
|
|
|
// // console.log('1',cnchar)
|
|
|
|
// console.log(cnchar.stroke('一个', 'order'));
|
|
|
|
// console.log(cnchar.stroke('長城', 'count', 'order', 'name'));
|
|
|
|
// // console.log(cnchar.orderToWord(['横', '撇', '捺']));
|
|
|
|
// // console.log(cnchar.orderToWord(['横', '撇', '捺'], 'start'));
|
|
|
|
// console.log(cnchar.spellToWord('lv2'));
|
|
|
|
// console.log(cnchar.spellInfo('lǘ'));
|
|
|
|
// console.log(cnchar.strokeToWord(1));
|
|
|
|
// console.log('美好的地方'.spell('tone'));
|
2020-04-08 08:13:55 +08:00
|
|
|
|
2020-06-03 18:11:37 +08:00
|
|
|
// window.keys = Object.keys(spell);
|
2020-05-29 21:21:13 +08:00
|
|
|
|
|
|
|
// cncharDraw('你好', {
|
|
|
|
// type: cncharDraw.TYPE.NORMAL,
|
|
|
|
// el: '#drawArea',
|
|
|
|
// style: {
|
|
|
|
// radicalColor: '#44f',
|
|
|
|
// backgroundColor: '#ccc'
|
|
|
|
// },
|
|
|
|
// animation: {
|
|
|
|
// animateComplete () {
|
|
|
|
// console.log('animateComplete');
|
|
|
|
// },
|
|
|
|
// loopAnimate: true,
|
|
|
|
// autoAnimate: false, // false 时点击出发animate 只能触发一次
|
|
|
|
// // stepByStep: false
|
|
|
|
// },
|
|
|
|
// test: {
|
|
|
|
// onTestStatus (d) {
|
|
|
|
// console.log(d);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// });
|
2020-07-07 19:08:30 +08:00
|
|
|
cnchar.draw('中国', {
|
|
|
|
type: cnchar.draw.TYPE.NORMAL,
|
|
|
|
style: {
|
|
|
|
radicalColor: '#44f',
|
|
|
|
backgroundColor: '#eee',
|
|
|
|
length: 100,
|
|
|
|
|
|
|
|
},
|
|
|
|
});
|
|
|
|
cnchar.draw('你好', {
|
|
|
|
type: cnchar.draw.TYPE.STROKE,
|
|
|
|
style: {
|
|
|
|
radicalColor: '#44f',
|
|
|
|
backgroundColor: '#eee',
|
|
|
|
length: 60,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
cnchar.draw('中国', {
|
|
|
|
type: cnchar.draw.TYPE.TEST,
|
|
|
|
style: {
|
|
|
|
radicalColor: '#44f',
|
|
|
|
backgroundColor: '#eee',
|
|
|
|
length: 100,
|
|
|
|
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
cnchar.draw('你好', {
|
|
|
|
type: cnchar.draw.TYPE.ANIMATION,
|
|
|
|
style: {
|
|
|
|
radicalColor: '#44f',
|
|
|
|
backgroundColor: '#eee',
|
|
|
|
length: 120,
|
|
|
|
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
window.cnchar = cnchar;
|
2020-04-08 08:13:55 +08:00
|
|
|
|
2020-04-06 01:51:13 +08:00
|
|
|
export default cnchar;
|
|
|
|
|
|
|
|
// var cnchar = require('./main/index')
|
|
|
|
// var order = require('./plugin/order')
|
|
|
|
// var trad = require('./plugin/trad')
|
|
|
|
// var poly = require('./plugin/poly')
|
|
|
|
// cnchar.use(order,trad,poly)
|
|
|
|
// console.log(cnchar.stroke("一个",'order'))
|
|
|
|
// console.log(cnchar.stroke('長城','count','order','name'))
|
|
|
|
// module.exports = cnchar
|
|
|
|
|
|
|
|
// import b from './b'
|
|
|
|
// // var b = require('./b')
|
|
|
|
// console.log(b);
|