mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2026-01-26 17:02:00 +08:00
refactor: i18n
* refactor: i18n
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { VxeTableEvents } from "vxe-table";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
|
||||
@@ -19,6 +20,8 @@ const emit = defineEmits<{
|
||||
(e: "handleClose"): void;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const xTable = templateRef<any>("xTable", null);
|
||||
|
||||
const configData = reactive({
|
||||
@@ -140,7 +143,7 @@ const checkboxChangeEvent: VxeTableEvents.CheckboxChange = ({ records }) => {
|
||||
<span class="select-count"
|
||||
>已选中{{ configData.selectRecords.length }}条</span
|
||||
>
|
||||
<vxe-button size="small">{{ $t("buttons.hsdelete") }}</vxe-button>
|
||||
<vxe-button size="small">{{ t("buttons.hsdelete") }}</vxe-button>
|
||||
</span>
|
||||
</template>
|
||||
</vxe-pager>
|
||||
|
||||
@@ -7,6 +7,7 @@ export default {
|
||||
<script setup lang="ts">
|
||||
import XEUtils from "xe-utils";
|
||||
import Config from "./config.vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { cloneDeep } from "lodash-unified";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
import { reactive, ref, unref, nextTick } from "vue";
|
||||
@@ -22,6 +23,8 @@ type onEditNRow = {
|
||||
model: string;
|
||||
};
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const dictData = reactive({
|
||||
submitLoading: false,
|
||||
showEdit: false,
|
||||
@@ -209,7 +212,7 @@ function handleClose() {
|
||||
<template #buttons>
|
||||
<vxe-input
|
||||
v-model="dictData.filterName"
|
||||
:placeholder="$t('buttons.hssearch')"
|
||||
:placeholder="t('buttons.hssearch')"
|
||||
@keyup="searchEvent"
|
||||
></vxe-input>
|
||||
</template>
|
||||
@@ -218,19 +221,19 @@ function handleClose() {
|
||||
icon="fa fa-plus-square-o"
|
||||
status="primary"
|
||||
@click="onAdd"
|
||||
>{{ $t("buttons.hsadd") }}</vxe-button
|
||||
>{{ t("buttons.hsadd") }}</vxe-button
|
||||
>
|
||||
<vxe-button
|
||||
icon="fa fa-folder-open-o"
|
||||
status="primary"
|
||||
@click="$refs.xTree.setAllTreeExpand(true)"
|
||||
>{{ $t("buttons.hsexpendAll") }}</vxe-button
|
||||
>{{ t("buttons.hsexpendAll") }}</vxe-button
|
||||
>
|
||||
<vxe-button
|
||||
icon="fa fa-folder-o"
|
||||
status="primary"
|
||||
@click="$refs.xTree.clearTreeExpand()"
|
||||
>{{ $t("buttons.hscollapseAll") }}</vxe-button
|
||||
>{{ t("buttons.hscollapseAll") }}</vxe-button
|
||||
>
|
||||
</template>
|
||||
</vxe-toolbar>
|
||||
|
||||
Reference in New Issue
Block a user