首页国际化

This commit is contained in:
2026-01-15 19:46:14 +08:00
parent 5284202b5a
commit a7ea68c6b5
12 changed files with 328 additions and 374 deletions

View File

@@ -1,23 +1,14 @@
<template>
<div class="head-container">
<el-input v-model="deptName" class="mb-20px" clearable placeholder="请输入部门名称">
<el-input v-model="deptName" class="mb-20px" clearable :placeholder="t('common.inputText') + t('system.user.dept')">
<template #prefix>
<Icon icon="ep:search" />
</template>
</el-input>
</div>
<div class="head-container">
<el-tree
ref="treeRef"
:data="deptList"
:expand-on-click-node="false"
:filter-node-method="filterNode"
:props="defaultProps"
default-expand-all
highlight-current
node-key="id"
@node-click="handleNodeClick"
/>
<el-tree ref="treeRef" :data="deptList" :expand-on-click-node="false" :filter-node-method="filterNode"
:props="defaultProps" default-expand-all highlight-current node-key="id" @node-click="handleNodeClick" />
</div>
</template>
@@ -28,6 +19,8 @@ import { defaultProps, handleTree } from '@/utils/tree'
defineOptions({ name: 'SystemUserDeptTree' })
const { t } = useI18n() // 国际化
const deptName = ref('')
const deptList = ref<Tree[]>([]) // 树形结构
const treeRef = ref<InstanceType<typeof ElTree>>()