|
@@ -99,9 +99,9 @@ const tree = computed(() => props.data)
|
|
|
const emits = defineEmits(['close', 'onLoad'])
|
|
|
// 搜索条的按钮
|
|
|
const buttons = ref([
|
|
|
- {
|
|
|
+ {
|
|
|
name: $i('resource.createGroup'),
|
|
|
- icon: 'group-add',
|
|
|
+ icon: 'group-add',
|
|
|
onClick:() => {
|
|
|
groupObj.value = {
|
|
|
type: props.type,
|
|
@@ -109,7 +109,7 @@ const buttons = ref([
|
|
|
}
|
|
|
mode.value = true
|
|
|
showGroupDialog.value = true
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
{ name: $i('resource.header.expand'), icon: 'expand-all', onClick: () => processTree(tree.value, it => it.opened = true) },
|
|
|
{ name: $i('resource.header.collapse'), icon: 'collapse-all', onClick: () => processTree(tree.value, it => it.opened = false) },
|
|
@@ -123,7 +123,7 @@ const buttons = ref([
|
|
|
}
|
|
|
} },
|
|
|
{ name: $i('message.hide'), icon: 'minimize', onClick:() => emits('close')},
|
|
|
-
|
|
|
+
|
|
|
])
|
|
|
const deepFind = (itemOrId, array, nameStack, pathStack, folderStack) => {
|
|
|
folderStack = folderStack || []
|
|
@@ -163,9 +163,9 @@ const onItemClick = item => {
|
|
|
let opened = cachedItems.find(it => it.item == item)
|
|
|
if(!opened){
|
|
|
opened = reactive({
|
|
|
- type: props.type,
|
|
|
+ type: props.type,
|
|
|
title: props.title,
|
|
|
- item: config.merge(item),
|
|
|
+ item: config.merge(item),
|
|
|
path: () => getFullPath(item),
|
|
|
requestPath: () => {
|
|
|
const pathStack = []
|
|
@@ -209,7 +209,7 @@ const saveGroup = () => {
|
|
|
bus.status('resource.saveGroupFailed', false, props.title, path)
|
|
|
proxy.$alert($i('resource.saveGroupFailed', props.title, path))
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
const onMove = (src, target) => new Promise(reslove => request.send('/resource/move', { src: src.id, groupId: target.groupId || target.id }).success(r => {
|
|
@@ -222,7 +222,7 @@ const onMove = (src, target) => new Promise(reslove => request.send('/resource/m
|
|
|
bus.status(msgId + 'Success', true, path)
|
|
|
}
|
|
|
src[src.folder ? 'parentId' : 'groupId'] = target.groupId || target.id
|
|
|
-
|
|
|
+
|
|
|
}else{
|
|
|
if(src.folder){
|
|
|
bus.status(msgId + 'Failed', false, props.title, path)
|
|
@@ -260,7 +260,7 @@ const updateNode = (node, data) => {
|
|
|
} else if(node.parentId === '0'){
|
|
|
data.push(node)
|
|
|
return true
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
if(data.some(it => updateNode(node, it.children || []))){
|
|
|
return true
|
|
|
}
|
|
@@ -545,7 +545,7 @@ onMounted(() => emits('onLoad'))
|
|
|
.magic-resource .magic-resource-header ul {
|
|
|
display: inline-flex;
|
|
|
align-items: center;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
.magic-resource .magic-resource-header ul li{
|
|
|
display: inline-block;
|
|
@@ -555,6 +555,9 @@ onMounted(() => emits('onLoad'))
|
|
|
line-height: 20px;
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
+.magic-resource .magic-resource-header svg{
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
.magic-resource .magic-resource-header ul li.separator{
|
|
|
background-color: var(--main-border-color);
|
|
|
width:1px;
|
|
@@ -591,4 +594,4 @@ onMounted(() => emits('onLoad'))
|
|
|
.magic-resource :deep(.magic-avatar-group){
|
|
|
margin-left: 5px;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|