左边底部新增添加任务选项
This commit is contained in:
parent
4e8cc36d3a
commit
8ec1578f50
@ -90,7 +90,17 @@
|
|||||||
:class="{loading:projectKeyLoading > 0}">
|
:class="{loading:projectKeyLoading > 0}">
|
||||||
<Input prefix="ios-search" v-model="projectKeyValue" :placeholder="$L('共' + projectTotal + '个项目,搜索...')" clearable />
|
<Input prefix="ios-search" v-model="projectKeyValue" :placeholder="$L('共' + projectTotal + '个项目,搜索...')" clearable />
|
||||||
</div>
|
</div>
|
||||||
<Button class="manage-box-new" type="primary" icon="md-add" @click="onAddShow">{{$L('新建项目')}}</Button>
|
<ButtonGroup class="manage-box-new-group">
|
||||||
|
<Button class="manage-box-new" type="primary" icon="md-add" @click="onAddShow">{{$L('新建项目')}}</Button>
|
||||||
|
<Dropdown @on-click="onAddTask(0)">
|
||||||
|
<Button type="primary">
|
||||||
|
<Icon type="ios-arrow-down"></Icon>
|
||||||
|
</Button>
|
||||||
|
<DropdownMenu slot="list">
|
||||||
|
<DropdownItem>{{$L('新建任务')}} ({{mateName}}+K)</DropdownItem>
|
||||||
|
</DropdownMenu>
|
||||||
|
</Dropdown>
|
||||||
|
</ButtonGroup>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="manage-box-main">
|
<div class="manage-box-main">
|
||||||
@ -207,6 +217,7 @@ export default {
|
|||||||
loadIng: 0,
|
loadIng: 0,
|
||||||
|
|
||||||
curPath: this.$route.path,
|
curPath: this.$route.path,
|
||||||
|
mateName: /macintosh|mac os x/i.test(navigator.userAgent) ? '⌘' : 'Ctrl',
|
||||||
|
|
||||||
addShow: false,
|
addShow: false,
|
||||||
addData: {
|
addData: {
|
||||||
@ -252,12 +263,7 @@ export default {
|
|||||||
this.onVisibilityChange();
|
this.onVisibilityChange();
|
||||||
//
|
//
|
||||||
this.addTaskSubscribe = Store.subscribe('addTask', (data) => {
|
this.addTaskSubscribe = Store.subscribe('addTask', (data) => {
|
||||||
this.$refs.addTask.defaultPriority();
|
this.onAddTask(data)
|
||||||
this.$refs.addTask.setData($A.isJson(data) ? data : {
|
|
||||||
'owner': this.userId,
|
|
||||||
'column_id': data,
|
|
||||||
});
|
|
||||||
this.addTaskShow = true;
|
|
||||||
});
|
});
|
||||||
//
|
//
|
||||||
document.addEventListener('keydown', this.shortcutEvent);
|
document.addEventListener('keydown', this.shortcutEvent);
|
||||||
@ -585,11 +591,20 @@ export default {
|
|||||||
if (e.keyCode === 75 || e.keyCode === 78) {
|
if (e.keyCode === 75 || e.keyCode === 78) {
|
||||||
if (e.metaKey || e.ctrlKey) {
|
if (e.metaKey || e.ctrlKey) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
Store.set('addTask', 0);
|
this.onAddTask(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onAddTask(data) {
|
||||||
|
this.$refs.addTask.defaultPriority();
|
||||||
|
this.$refs.addTask.setData($A.isJson(data) ? data : {
|
||||||
|
'owner': this.userId,
|
||||||
|
'column_id': data,
|
||||||
|
});
|
||||||
|
this.addTaskShow = true;
|
||||||
|
},
|
||||||
|
|
||||||
taskVisibleChange(visible) {
|
taskVisibleChange(visible) {
|
||||||
if (!visible) {
|
if (!visible) {
|
||||||
this.$store.dispatch('openTask', 0)
|
this.$store.dispatch('openTask', 0)
|
||||||
|
18
resources/assets/sass/pages/page-manage.scss
vendored
18
resources/assets/sass/pages/page-manage.scss
vendored
@ -247,11 +247,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.manage-box-new {
|
.manage-box-new-group {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 38px;
|
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.manage-box-new {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.ivu-btn {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
.ivu-dropdown {
|
||||||
|
.ivu-btn {
|
||||||
|
min-width: auto !important;
|
||||||
|
padding: 0 4px;
|
||||||
|
border-radius: 0 4px 4px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.manage-box-main {
|
.manage-box-main {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user