yh-i18n 2.3.14 → 2.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/list.vue +0 -4
- package/package.json +1 -1
- package/newLanguage.vue +0 -75
package/list.vue
CHANGED
|
@@ -262,10 +262,6 @@ const formData = reactive<TranslateItem>({
|
|
|
262
262
|
content: '',
|
|
263
263
|
});
|
|
264
264
|
const formShow = ref(false);
|
|
265
|
-
<<<<<<< HEAD
|
|
266
|
-
|
|
267
|
-
=======
|
|
268
|
-
>>>>>>> report-fix
|
|
269
265
|
function cancelForm() {
|
|
270
266
|
formRef.value?.resetFields();
|
|
271
267
|
formRef.value?.clearValidate();
|
package/package.json
CHANGED
package/newLanguage.vue
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-popover
|
|
3
|
-
placement="bottom"
|
|
4
|
-
popper-class="yh-user-popover"
|
|
5
|
-
:width="150"
|
|
6
|
-
trigger="hover">
|
|
7
|
-
<template #reference>
|
|
8
|
-
<div class="header-bar-button">
|
|
9
|
-
{{ title }}
|
|
10
|
-
<YhIcon
|
|
11
|
-
class="user-name-icon"
|
|
12
|
-
fontFamily="yhicon"
|
|
13
|
-
prefix="yh-"
|
|
14
|
-
name="down"></YhIcon>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
<div class="user-actions">
|
|
18
|
-
<div
|
|
19
|
-
class="action-item"
|
|
20
|
-
v-for="lo in localList"
|
|
21
|
-
@click="setLang(lo.value)">
|
|
22
|
-
{{ lo.label }}
|
|
23
|
-
</div>
|
|
24
|
-
<el-divider content-position="left">翻译工具</el-divider>
|
|
25
|
-
<div
|
|
26
|
-
class="action-item"
|
|
27
|
-
@click="router.push({path: isAdmin?'/admin/translate':'/translate'})">
|
|
28
|
-
{{ ct('翻译') }}
|
|
29
|
-
</div>
|
|
30
|
-
<div class="action-item">
|
|
31
|
-
<el-switch
|
|
32
|
-
v-model="isCollect"
|
|
33
|
-
:active-text="ct('自动收集翻译')"
|
|
34
|
-
:inactive-text="ct('停止收集翻译')"
|
|
35
|
-
inline-prompt></el-switch>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</el-popover>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<script setup>
|
|
42
|
-
import {useI18nStore, ct} from 'yh-i18n';
|
|
43
|
-
import {ref, watch} from 'vue';
|
|
44
|
-
import {useRouter} from 'vue-router';
|
|
45
|
-
import {useClientStore} from 'yh-client';
|
|
46
|
-
import {storeToRefs} from 'pinia';
|
|
47
|
-
|
|
48
|
-
const router = useRouter();
|
|
49
|
-
const clientStore = useClientStore();
|
|
50
|
-
const {isAdmin} = storeToRefs(clientStore);
|
|
51
|
-
|
|
52
|
-
const isDev = ref(window.translateReady);
|
|
53
|
-
|
|
54
|
-
const i18nStore = useI18nStore();
|
|
55
|
-
const isCollect = ref(!!localStorage.translateCollect);
|
|
56
|
-
|
|
57
|
-
watch(
|
|
58
|
-
() => isCollect.value,
|
|
59
|
-
(val) => {
|
|
60
|
-
if (val) {
|
|
61
|
-
localStorage.translateCollect = '1';
|
|
62
|
-
} else {
|
|
63
|
-
localStorage.removeItem('translateCollect');
|
|
64
|
-
}
|
|
65
|
-
window.translateCollect = val;
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
immediate: true,
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
const {localList, title} = storeToRefs(i18nStore);
|
|
73
|
-
|
|
74
|
-
const {setLang} = i18nStore;
|
|
75
|
-
</script>
|