mirror of
https://gitee.com/onvia/ccc-tnt-psd2ui
synced 2025-10-13 10:38:33 +00:00
增加中文转拼音
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<ui-button id="btn-cache" @click="onClickCache()"> 缓存资源 </ui-button>
|
||||
<ui-checkbox id="is-force-img" style="bottom: 8px;">强制导出图片</ui-checkbox>
|
||||
<ui-checkbox id="is-img-only" style="bottom: 8px;">只导出图片</ui-checkbox>
|
||||
<ui-checkbox id="is-pinyin" style="bottom: 8px;" :value="isPinyin" >中文转拼音</ui-checkbox>
|
||||
|
||||
<hr />
|
||||
<div style="display: flex;">
|
||||
|
@@ -25,6 +25,7 @@ Editor.Panel.extend({
|
||||
isImgOnly: false,
|
||||
isForceImg: false,
|
||||
isProcessing: false,
|
||||
isPinyin: true,
|
||||
},
|
||||
|
||||
|
||||
@@ -45,6 +46,13 @@ Editor.Panel.extend({
|
||||
this.isImgOnly = !this.isImgOnly;
|
||||
});
|
||||
|
||||
|
||||
let pinyin = root.getElementById("is-pinyin")
|
||||
pinyin.addEventListener('change', () => {
|
||||
this.isPinyin = !this.isPinyin;
|
||||
});
|
||||
|
||||
|
||||
let str = localStorage.getItem(`${Editor.Project.name}_psd2ui_output`);
|
||||
if (str) {
|
||||
let outputInput = root.getElementById("output");
|
||||
@@ -90,7 +98,7 @@ Editor.Panel.extend({
|
||||
// Editor.
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let result = Editor.Dialog.openFile({
|
||||
'multi': true,
|
||||
'type': "file",
|
||||
@@ -113,7 +121,7 @@ Editor.Panel.extend({
|
||||
let output = outputInput.value;
|
||||
//
|
||||
this.isProcessing = true;
|
||||
Editor.Ipc.sendToMain('ccc-tnt-psd2ui:on-drop-file', { output, files, isForceImg: this.isForceImg, isImgOnly: this.isImgOnly }, (err) => {
|
||||
Editor.Ipc.sendToMain('ccc-tnt-psd2ui:on-drop-file', { output, files, isForceImg: this.isForceImg, isImgOnly: this.isImgOnly, isPinyin: this.isPinyin }, (err) => {
|
||||
this.isProcessing = false;
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user