增加表格样式
This commit is contained in:
parent
a6f15f8687
commit
e1d385fa04
@ -35,7 +35,7 @@ class VolcEngine(TranslateBaseModel):
|
||||
thread_status_code.update({"code": 10502}) # 翻译结果不匹配
|
||||
return thread_status_code
|
||||
for item in range(len(rebuild_list)):
|
||||
goto_translate_map[rebuild_list[item]].update({"translate_model": "VolcEngine机器翻译",
|
||||
goto_translate_map[rebuild_list[item]].update({"translate_model": "火山引擎机器翻译",
|
||||
"translate":
|
||||
str(translate_list[item].translation).lower()})
|
||||
thread_status_code.update({"status": True})
|
||||
|
||||
Binary file not shown.
@ -77,8 +77,8 @@
|
||||
<div class="demo-split-pane no-padding" style="margin-top: 10px ; margin-left: 10px; margin-right: 10px">
|
||||
<Card style="height: 95vh;">
|
||||
<template #title>翻译数据</template>
|
||||
<Table :loading="is_network_loading" :height="table_height"
|
||||
size="small" border stripe :columns="table_column" :data="translate_data">
|
||||
<Table :loading="is_network_loading" :height="table_height" :row-class-name="set_row_class"
|
||||
disabled-hover size="small" border :columns="table_column" :data="translate_data">
|
||||
<template #name="{ row }">
|
||||
<strong>
|
||||
<Text :delete="!row.active">{{ row.source }}</Text>
|
||||
@ -311,9 +311,9 @@ export default {
|
||||
},
|
||||
],
|
||||
table_column: [
|
||||
{title: '翻译来自', slot: 'translate_from', key: 'translate_model', ellipsis: true},
|
||||
{title: '标签', tooltip: true, slot: 'name'},
|
||||
{title: '翻译', slot: "translate", key: 'translate', tooltip: true,},
|
||||
{title: '翻译来自', slot: 'translate_from', key: 'translate_model', ellipsis: true},
|
||||
{title: "操作列表", slot: 'action', width: 180, align: 'left'}
|
||||
],
|
||||
translate_data: [],
|
||||
@ -341,6 +341,17 @@ export default {
|
||||
window.removeEventListener('resize', this.update_page_height);
|
||||
},
|
||||
methods: {
|
||||
set_row_class(row) {
|
||||
if (!row.active) {
|
||||
return ""
|
||||
}
|
||||
if (row.is_rewrite) {
|
||||
return "demo-table-local-row";
|
||||
} else {
|
||||
return "demo-table-network-row";
|
||||
}
|
||||
|
||||
},
|
||||
on_click_close_to_english_dialog: function () {
|
||||
this.to_english_page = false;
|
||||
// this.dialog_translate_to_english_message = {
|
||||
@ -659,7 +670,17 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
<style>
|
||||
.ivu-table .demo-table-local-row td {
|
||||
background-color: #e9f4fb;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ivu-table .demo-table-network-row td {
|
||||
background-color: #f8ece1;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.demo-drawer-footer {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user