修改:文件界面顶部加上排序下拉框
This commit is contained in:
parent
6ce4437911
commit
eb2eb04fe8
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jmal-cloud-view",
|
"name": "jmal-cloud-view",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"description": "jmal cloud",
|
"description": "jmal cloud",
|
||||||
"author": "Jmal <zhushilun084@163.com>",
|
"author": "Jmal <zhushilun084@163.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { Icon } from 'ant-design-vue'
|
import { Icon } from 'ant-design-vue'
|
||||||
const IconFont = Icon.createFromIconfontCN({
|
const IconFont = Icon.createFromIconfontCN({
|
||||||
scriptUrl: '//at.alicdn.com/t/font_2024484_3jr9049cc2f.js'
|
scriptUrl: '//at.alicdn.com/t/font_2024484_enjqo8y5nla.js'
|
||||||
})
|
})
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@ -43,7 +43,7 @@
|
|||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
<div class="search-content">
|
<div class="search-content">
|
||||||
<div class="searchClass">
|
<div class="search-class">
|
||||||
<el-popover
|
<el-popover
|
||||||
v-show="showUploadButton"
|
v-show="showUploadButton"
|
||||||
v-model="isShowNewFolder"
|
v-model="isShowNewFolder"
|
||||||
@ -69,7 +69,7 @@
|
|||||||
<li v-if="singleFileType === ''" @click.prevent="newDocument">
|
<li v-if="singleFileType === ''" @click.prevent="newDocument">
|
||||||
<a href="#" class="menuitem">
|
<a href="#" class="menuitem">
|
||||||
<svg-icon icon-class="md"/>
|
<svg-icon icon-class="md"/>
|
||||||
<span class="menuitem text">新建文档</span>
|
<span class="menuitem text">写文章</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="singleFileType === ''" @click.prevent="newFolder">
|
<li v-if="singleFileType === ''" @click.prevent="newFolder">
|
||||||
@ -105,8 +105,33 @@
|
|||||||
<svg-icon icon-class="search" style="font-size: 22px"/>
|
<svg-icon icon-class="search" style="font-size: 22px"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-button class="vmode" @click="changeVmode">
|
<el-dropdown size="medium" style="height: 40px;" @command="contextmenuClick">
|
||||||
<svg-icon :icon-class="grid ? 'menu-list' : 'menu-grid'"/>
|
<el-button type="text" class="sort">
|
||||||
|
<svg-icon icon-class="sort"/>
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item command="orderName">
|
||||||
|
<span :class="{'al-file-sort-item': true, 'active': sortable.prop === 'name'}">
|
||||||
|
<i :class="{'al-file-sort-item-icon': true, 'el-icon-top': sortable.order === 'ascending', 'el-icon-bottom': sortable.order === 'descending'}"></i>
|
||||||
|
<span>名称</span>
|
||||||
|
</span>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="orderSize">
|
||||||
|
<span :class="{'al-file-sort-item': true, 'active': sortable.prop === 'size'}">
|
||||||
|
<i :class="{'al-file-sort-item-icon': true, 'el-icon-top': sortable.order === 'ascending', 'el-icon-bottom': sortable.order === 'descending'}"></i>
|
||||||
|
<span>大小</span>
|
||||||
|
</span>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="orderUpdateDate">
|
||||||
|
<span :class="{'al-file-sort-item': true, 'active': sortable.prop === 'updateDate'}">
|
||||||
|
<i :class="{'al-file-sort-item-icon': true, 'el-icon-top': sortable.order === 'ascending', 'el-icon-bottom': sortable.order === 'descending'}"></i>
|
||||||
|
<span>日期</span>
|
||||||
|
</span>
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
<el-button type="text" class="vmode" @click="changeVmode">
|
||||||
|
<svg-icon :icon-class="grid ? 'list' : 'grid'"/>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1670,7 +1695,7 @@ export default {
|
|||||||
that.newTextFileDialog = false
|
that.newTextFileDialog = false
|
||||||
}, 200)
|
}, 200)
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
this.createTextFileLoading = false
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1736,6 +1761,8 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 加载顶部的排序下拉框
|
||||||
|
|
||||||
},
|
},
|
||||||
// 请求之前的准备
|
// 请求之前的准备
|
||||||
beforeLoadData(onLoad) {
|
beforeLoadData(onLoad) {
|
||||||
@ -1948,8 +1975,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
addClass(el, className) {
|
addClass(el, className) {
|
||||||
const str = el.className
|
if(el){
|
||||||
el.className = el.className + " " + className
|
const str = el.className
|
||||||
|
el.className = el.className + " " + className
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getSummaries(param) {
|
getSummaries(param) {
|
||||||
// 合计
|
// 合计
|
||||||
@ -2358,7 +2387,7 @@ export default {
|
|||||||
this.sortChangeOfMenu('size', 5)
|
this.sortChangeOfMenu('size', 5)
|
||||||
break
|
break
|
||||||
case 'orderUpdateDate':
|
case 'orderUpdateDate':
|
||||||
this.sortChangeOfMenu('update', 6)
|
this.sortChangeOfMenu('updateDate', 6)
|
||||||
break
|
break
|
||||||
case 'refresh':
|
case 'refresh':
|
||||||
this.getFileList()
|
this.getFileList()
|
||||||
|
|||||||
@ -104,6 +104,13 @@ new Vue({
|
|||||||
store,
|
store,
|
||||||
render: h => h(App),
|
render: h => h(App),
|
||||||
})
|
})
|
||||||
|
import config from '../package.json'
|
||||||
|
console.log(
|
||||||
|
`%c jmal-cloud-view %c v${config.version} %c`,
|
||||||
|
'background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff',
|
||||||
|
'background:#409eff ; padding: 1px; border-radius: 0 3px 3px 0; color: #fff',
|
||||||
|
'background:transparent'
|
||||||
|
)
|
||||||
|
|
||||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
|
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
|
||||||
Vue.prototype.$pc = false
|
Vue.prototype.$pc = false
|
||||||
|
|||||||
@ -191,7 +191,7 @@
|
|||||||
color: "#19ACF9"
|
color: "#19ACF9"
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchClass{
|
.search-class{
|
||||||
float: right;
|
float: right;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -199,10 +199,14 @@
|
|||||||
.el-input {
|
.el-input {
|
||||||
width: 235px;
|
width: 235px;
|
||||||
}
|
}
|
||||||
.vmode{
|
.sort{
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
.vmode{
|
||||||
|
padding: 5px 10px;
|
||||||
|
margin-left: -5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//.grid {
|
//.grid {
|
||||||
|
|||||||
@ -159,3 +159,16 @@ div:focus {
|
|||||||
width: 6px!important;
|
width: 6px!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.al-file-sort-item {
|
||||||
|
.al-file-sort-item-icon {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.al-file-sort-item.active {
|
||||||
|
color: #40a9ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.al-file-sort-item:not(.active) .al-file-sort-item-icon {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,8 @@ export default {
|
|||||||
},
|
},
|
||||||
{ label: '刷新', operation: 'refresh'},
|
{ label: '刷新', operation: 'refresh'},
|
||||||
{ divider: true, operation: 'divider' },
|
{ divider: true, operation: 'divider' },
|
||||||
|
{ label: '写文章', operation: 'createMarkdownFile'},
|
||||||
{ label: '新建文件', operation: 'createTextFile'},
|
{ label: '新建文件', operation: 'createTextFile'},
|
||||||
{ label: '新建文档', operation: 'createMarkdownFile'},
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -39,7 +39,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
title: '网盘管理',
|
title: '网盘管理',
|
||||||
syncLoading: false,
|
syncLoading: false,
|
||||||
webpEnabled: false
|
webpEnabled: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@ -245,7 +245,6 @@ export default {
|
|||||||
// 分配权限
|
// 分配权限
|
||||||
authorization(roleId) {
|
authorization(roleId) {
|
||||||
const req = require.context('@/icons/svg', false, /\.svg$/)
|
const req = require.context('@/icons/svg', false, /\.svg$/)
|
||||||
console.log(req)
|
|
||||||
this.dialogAuthVisible = true
|
this.dialogAuthVisible = true
|
||||||
const findIndex = this.dataList.findIndex(data => data.id === roleId)
|
const findIndex = this.dataList.findIndex(data => data.id === roleId)
|
||||||
const role = this.dataList[findIndex]
|
const role = this.dataList[findIndex]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user