|
@@ -120,20 +120,31 @@ export default {
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- _this.writer = HanziWriter.default.create(_this.targetDiv, _this.Book_text, {
|
|
|
|
|
- charDataLoader(char, onComplete) {
|
|
|
|
|
- let MethodName = 'hz_resource_manager-GetHZStrokesContent';
|
|
|
|
|
- let data = {
|
|
|
|
|
- hz: char,
|
|
|
|
|
- };
|
|
|
|
|
- GetStaticResources(MethodName, data).then((res) => {
|
|
|
|
|
- onComplete(res);
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- padding: 5,
|
|
|
|
|
- showOutline: true,
|
|
|
|
|
- strokeColor: _this.strokeColor ? _this.strokeColor : '#333',
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (_this.hz_json) {
|
|
|
|
|
+ _this.writer = HanziWriter.default.create(_this.targetDiv, _this.Book_text, {
|
|
|
|
|
+ charDataLoader(char, onComplete) {
|
|
|
|
|
+ onComplete(_this.hz_json);
|
|
|
|
|
+ },
|
|
|
|
|
+ padding: 5,
|
|
|
|
|
+ showOutline: true,
|
|
|
|
|
+ strokeColor: _this.strokeColor ? _this.strokeColor : '#333',
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ _this.writer = HanziWriter.default.create(_this.targetDiv, _this.Book_text, {
|
|
|
|
|
+ charDataLoader(char, onComplete) {
|
|
|
|
|
+ let MethodName = 'hz_resource_manager-GetHZStrokesContent';
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ hz: char,
|
|
|
|
|
+ };
|
|
|
|
|
+ GetStaticResources(MethodName, data).then((res) => {
|
|
|
|
|
+ onComplete(res);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ padding: 5,
|
|
|
|
|
+ showOutline: true,
|
|
|
|
|
+ strokeColor: _this.strokeColor ? _this.strokeColor : '#333',
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
handleData(stroke_num) {
|
|
handleData(stroke_num) {
|