diff --git a/src/backyard/matter/List.vue b/src/backyard/matter/List.vue
index 21a8771..f4d357a 100644
--- a/src/backyard/matter/List.vue
+++ b/src/backyard/matter/List.vue
@@ -5,7 +5,12 @@
-
+
+
+
@@ -110,6 +115,7 @@
that.breadcrumbs.splice(0, that.breadcrumbs.length);
let query = that.pager.getParams()
query["puuid"] = "root"
+ //添加一个随机数,防止watch $route失败
query["_t"] = new Date().getTime()
that.breadcrumbs.push({
title: '全部文件',
@@ -135,8 +141,16 @@
})
})
}
+ },
+ createDirectory() {
+ let newMatter = new Matter()
+ newMatter.name = '新建文件夹'
+ newMatter.dir = true
+ newMatter.editMode = true
+ this.pager.data.unshift(newMatter)
+ setTimeout(function () {
-
+ }, 100)
}
},
watch: {
diff --git a/src/backyard/matter/widget/MatterPanel.vue b/src/backyard/matter/widget/MatterPanel.vue
index fbff666..a7d3d28 100644
--- a/src/backyard/matter/widget/MatterPanel.vue
+++ b/src/backyard/matter/widget/MatterPanel.vue
@@ -7,15 +7,27 @@
-
+
+
+
+
+
+
{{matter.name}}
+
-
-
+
+
@@ -38,6 +50,7 @@
import Matter from '../../../common/model/matter/Matter'
import NbCheckbox from "../../../common/widget/NbCheckbox"
import Vue from "vue"
+ import $ from "jquery"
export default {
data() {
@@ -66,6 +79,17 @@
},
download() {
window.open(Vue.http.options.root + '/alien/download/' + this.matter.uuid + '/' + this.matter.name)
+ },
+ prepareRename() {
+ let that = this
+ this.matter.editMode = true
+ setTimeout(function () {
+ $(that.$refs.editInput).select()
+ }, 100)
+
+ },
+ finishRename() {
+
}
},
created() {
@@ -88,6 +112,14 @@
.matter-icon {
width: 24px;
}
+ .matter-name-edit {
+ margin-left: 5px;
+ input {
+ width: 200px;
+ height: 26px;
+ display: inline-block;
+ }
+ }
.matter-name {
margin-left: 5px;
}