This commit is contained in:
parent
53bafd40b5
commit
1ae0a0a106
|
|
@ -0,0 +1,9 @@
|
|||
type IconProps = {
|
||||
size?: number;
|
||||
color?: string;
|
||||
}
|
||||
export const IconTranslate = ({size = 24, color = '#333333'}: IconProps) => {
|
||||
return (
|
||||
<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5032" width={size} height={size}><path d="M640 416h256c35.36 0 64 28.48 64 64v416c0 35.36-28.48 64-64 64H480c-35.36 0-64-28.48-64-64V640h128c53.312 0 96-42.976 96-96V416zM64 128c0-35.36 28.48-64 64-64h416c35.36 0 64 28.48 64 64v416c0 35.36-28.48 64-64 64H128c-35.36 0-64-28.48-64-64V128z m128 276.256h46.72v-24.768h67.392V497.76h49.504V379.488h68.768v20.64h50.88V243.36H355.616v-34.368c0-10.08 1.376-18.784 4.16-26.112a10.56 10.56 0 0 0 1.344-4.16c0-0.896-3.2-1.792-9.6-2.72h-46.816v67.36H192v160.896z m46.72-122.368h67.392v60.48h-67.36V281.92z m185.664 60.48h-68.768V281.92h68.768v60.48z m203.84 488l19.264-53.632h100.384l19.264 53.632h54.976L732.736 576h-64.64L576 830.4h52.256z m33.024-96.256l37.12-108.608h1.376l34.368 108.608h-72.864zM896 320h-64a128 128 0 0 0-128-128v-64a192 192 0 0 1 192 192zM128 704h64a128 128 0 0 0 128 128v64a192 192 0 0 1-192-192z" fill={color} p-id="5033"></path></svg>
|
||||
)
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
:loading="translatingFieldKey === item.key" @click="handleTranslateField(item.key)"
|
||||
title="翻译该字段">
|
||||
<el-icon color="#409eff">
|
||||
<Promotion />
|
||||
<IconTranslate size={20} color="#409eff" />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
@ -142,7 +142,7 @@
|
|||
:loading="translatingFieldKey === item.key" @click="handleTranslateField(item.key)"
|
||||
title="翻译该字段">
|
||||
<el-icon color="#409eff">
|
||||
<Promotion />
|
||||
<IconTranslate size={20} color="#409eff" />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
@ -173,9 +173,10 @@
|
|||
import { reactive, computed, watch, ref, nextTick } from 'vue'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Close, Promotion, FullScreen, CopyDocument } from '@element-plus/icons-vue'
|
||||
import { Close, FullScreen, CopyDocument } from '@element-plus/icons-vue'
|
||||
import UploadInput from "./UploadInput.vue";
|
||||
import WangEditor from "lib/components/WangEditor.vue";
|
||||
import { IconTranslate } from './Icons'
|
||||
type FormItemType =
|
||||
| 'input'
|
||||
| 'select'
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch, defineComponent, h, type PropType, type VNode, type Component } from 'vue'
|
||||
import { Close, FullScreen, CopyDocument, Plus, Delete, Promotion, UploadFilled } from '@element-plus/icons-vue'
|
||||
import { Close, FullScreen, CopyDocument, Plus, Delete, UploadFilled } from '@element-plus/icons-vue'
|
||||
import {
|
||||
ElFormItem, ElInput, ElInputNumber, ElSwitch, ElButton,
|
||||
ElCollapse, ElCollapseItem, ElIcon, ElMessage
|
||||
|
|
@ -78,6 +78,7 @@ import { translateApi } from 'src/api/common'
|
|||
import { translateRichText } from 'src/tools'
|
||||
import UploadInput from './UploadInput.vue'
|
||||
import WangEditor from 'lib/components/WangEditor.vue'
|
||||
import { IconTranslate } from './Icons'
|
||||
const props = withDefaults(defineProps<{
|
||||
show: boolean
|
||||
title?: string
|
||||
|
|
@ -432,7 +433,7 @@ const NodeEditor: Component = defineComponent({
|
|||
link: true, size: 'small', class: 'jfd-translate-icon',
|
||||
loading: translatingPath.value === `${key}`,
|
||||
onClick: () => handleTranslateField(p.parent, key, p.zhParent),
|
||||
}, () => h(ElIcon, { color: '#409eff' }, () => h(Promotion)))
|
||||
}, () => h(IconTranslate, {size: 20, color: '#409eff'}))
|
||||
])
|
||||
)
|
||||
}
|
||||
|
|
@ -497,7 +498,7 @@ const NodeEditor: Component = defineComponent({
|
|||
translatingPath.value = ''
|
||||
}
|
||||
},
|
||||
}, () => h(ElIcon, { color: '#409eff' }, () => h(Promotion))) : null,
|
||||
}, () => h(IconTranslate, {size: 20, color: '#409eff'})) : null,
|
||||
h(ElButton, {
|
||||
size: 'small', type: 'danger', link: true,
|
||||
onClick: () => value.splice(i, 1),
|
||||
|
|
|
|||
Loading…
Reference in New Issue