mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	fix: update
This commit is contained in:
		
							parent
							
								
									4f165b9391
								
							
						
					
					
						commit
						f4c419d44a
					
				@ -1,7 +1,7 @@
 | 
			
		||||
import { h, defineComponent } from "vue";
 | 
			
		||||
import { Icon as IconifyIcon } from "@iconify/vue";
 | 
			
		||||
 | 
			
		||||
// Iconify Icon在Vue里在线使用(用于外网环境) https://docs.iconify.design/icon-components/vue/offline.html
 | 
			
		||||
// Iconify Icon在Vue里在线使用(用于外网环境)
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
  name: "IconifyIcon",
 | 
			
		||||
  components: { IconifyIcon },
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,9 @@
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { computed } from "vue";
 | 
			
		||||
import { useI18n } from "vue-i18n";
 | 
			
		||||
import { transformI18n } from "/@/plugins/i18n";
 | 
			
		||||
import ElTreeLine from "/@/components/ReTreeLine";
 | 
			
		||||
import { extractPathList, deleteChildren } from "/@/utils/tree";
 | 
			
		||||
import { usePermissionStoreHook } from "/@/store/modules/permission";
 | 
			
		||||
const { t } = useI18n();
 | 
			
		||||
 | 
			
		||||
let menusData = computed(() => {
 | 
			
		||||
  return deleteChildren(usePermissionStoreHook().menusTree);
 | 
			
		||||
@ -45,7 +44,9 @@ let dataProps = {
 | 
			
		||||
              ><template v-slot:default="{ node }">
 | 
			
		||||
                <el-tree-line :node="node" :showLabelLine="true">
 | 
			
		||||
                  <template v-slot:node-label>
 | 
			
		||||
                    <span class="text-sm">{{ t(node.data.meta.title) }}</span>
 | 
			
		||||
                    <span class="text-sm">
 | 
			
		||||
                      {{ transformI18n(node.data.meta.title) }}
 | 
			
		||||
                    </span>
 | 
			
		||||
                  </template>
 | 
			
		||||
                </el-tree-line>
 | 
			
		||||
              </template>
 | 
			
		||||
@ -77,7 +78,9 @@ let dataProps = {
 | 
			
		||||
                  :indent="30"
 | 
			
		||||
                >
 | 
			
		||||
                  <template v-slot:node-label>
 | 
			
		||||
                    <span class="text-sm">{{ t(node.data.meta.title) }}</span>
 | 
			
		||||
                    <span class="text-sm">
 | 
			
		||||
                      {{ transformI18n(node.data.meta.title) }}
 | 
			
		||||
                    </span>
 | 
			
		||||
                  </template>
 | 
			
		||||
                </el-tree-line>
 | 
			
		||||
              </template>
 | 
			
		||||
 | 
			
		||||
@ -5,7 +5,6 @@ export default {
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { useI18n } from "vue-i18n";
 | 
			
		||||
import { ref, computed } from "vue";
 | 
			
		||||
import type { ElTreeV2 } from "element-plus";
 | 
			
		||||
import { transformI18n } from "/@/plugins/i18n";
 | 
			
		||||
@ -13,7 +12,6 @@ import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 | 
			
		||||
import { extractPathList, deleteChildren } from "/@/utils/tree";
 | 
			
		||||
import { usePermissionStoreHook } from "/@/store/modules/permission";
 | 
			
		||||
import type { TreeNode } from "element-plus/es/components/tree-v2/src/types";
 | 
			
		||||
const { t } = useI18n();
 | 
			
		||||
 | 
			
		||||
interface treeNode extends TreeNode {
 | 
			
		||||
  meta: {
 | 
			
		||||
@ -79,7 +77,7 @@ const filterMethod = (query: string, node: treeNode) => {
 | 
			
		||||
      :default-expanded-keys="expandedKeys"
 | 
			
		||||
    >
 | 
			
		||||
      <template #default="{ data }">
 | 
			
		||||
        <span>{{ t(data.meta.title) }}</span>
 | 
			
		||||
        <span>{{ transformI18n(data.meta.title) }}</span>
 | 
			
		||||
      </template>
 | 
			
		||||
    </el-tree-v2>
 | 
			
		||||
  </el-card>
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { useI18n } from "vue-i18n";
 | 
			
		||||
import { ref, computed } from "vue";
 | 
			
		||||
import { transformI18n } from "/@/plugins/i18n";
 | 
			
		||||
import { useRouter, useRoute } from "vue-router";
 | 
			
		||||
import { TreeSelect } from "@pureadmin/components";
 | 
			
		||||
import { useMultiTagsStoreHook } from "/@/store/modules/multiTags";
 | 
			
		||||
@ -20,7 +20,6 @@ let treeData = computed(() => {
 | 
			
		||||
  );
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n();
 | 
			
		||||
const route = useRoute();
 | 
			
		||||
const router = useRouter();
 | 
			
		||||
 | 
			
		||||
@ -78,12 +77,12 @@ function onCloseTags() {
 | 
			
		||||
    >
 | 
			
		||||
      <template #tagRender="{ closable, onClose, option }">
 | 
			
		||||
        <el-tag class="mr-3px" :closable="closable" @close="onClose">
 | 
			
		||||
          {{ t(option.meta.title) }}
 | 
			
		||||
          {{ transformI18n(option.meta.title) }}
 | 
			
		||||
        </el-tag>
 | 
			
		||||
      </template>
 | 
			
		||||
 | 
			
		||||
      <template #title="{ data }">
 | 
			
		||||
        <span>{{ t(data.meta.title) }}</span>
 | 
			
		||||
        <span>{{ transformI18n(data.meta.title) }}</span>
 | 
			
		||||
      </template>
 | 
			
		||||
    </TreeSelect>
 | 
			
		||||
    <el-button class="ml-2" @click="onCloseTags">关闭标签</el-button>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user