|
@@ -77,7 +77,8 @@ import Strockplayredline from "@/components/corpus/Strockplayredline";
|
|
|
import "@/utils/pinyin_dict_withtone";
|
|
|
import "@/utils/pinyinUtil";
|
|
|
import seekWord from "@/utils/lang.js";
|
|
|
-
|
|
|
+const OpenCC = require("opencc-js");
|
|
|
+const converter = OpenCC.Converter({ from: "cn", to: "tw" });
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
|
components: {
|
|
@@ -117,7 +118,9 @@ export default {
|
|
|
} else {
|
|
|
//繁体
|
|
|
this.hzData.forEach((item) => {
|
|
|
- let a = seekWord(item.con);
|
|
|
+ // let a = seekWord(item.con);
|
|
|
+ // item.fanti = a;
|
|
|
+ let a = converter(item.con);
|
|
|
item.fanti = a;
|
|
|
});
|
|
|
this.gethzJSON();
|
|
@@ -127,7 +130,7 @@ export default {
|
|
|
gethzJSON() {
|
|
|
this.loading = true;
|
|
|
let MethodName = "hz_resource_manager-GetHZStrokesContent";
|
|
|
- this.hzData.forEach((item) => {
|
|
|
+ this.hzData.forEach((item, i) => {
|
|
|
let data = {
|
|
|
hz: this.JFIndex == 0 ? item.con : item.fanti,
|
|
|
};
|
|
@@ -138,7 +141,9 @@ export default {
|
|
|
.then((res) => {
|
|
|
this.$set(item.hzDetail, "hz_json", res);
|
|
|
this.ShowHzData = JSON.parse(JSON.stringify(this.hzData));
|
|
|
- this.loading = false;
|
|
|
+ if (i == this.hzData.length - 1) {
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.loading = false;
|