Skip to content

Commit 02b5a88

Browse files
committed
初始化任务管理
1 parent a0fbc7b commit 02b5a88

6 files changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export default api => {
22
require('./plugins/blocks/index').default(api);
33
require('./plugins/configuration/index').default(api);
4+
require('./plugins/tasks/index').default(api);
45
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default {
2+
entry: 'ui.js',
3+
umd: {
4+
name: 'tasks',
5+
minFile: false,
6+
},
7+
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export default function(api) {
2+
api.addUIPlugin(require.resolve('./dist/ui.umd'));
3+
4+
api.onUISocket(({ action: { type, payload }, send, log }) => {
5+
switch (type) {
6+
default:
7+
break;
8+
}
9+
});
10+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react';
2+
3+
function Tasks() {
4+
return <div>任务管理内容</div>;
5+
}
6+
7+
export default api => {
8+
api.addPanel({
9+
title: '任务管理',
10+
path: '/tasks',
11+
icon: 'environment',
12+
component: Tasks,
13+
});
14+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.normal {
2+
overflow: hidden;
3+
}

scripts/ui.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function buildPlugins(roots, opts = {}) {
2727
[
2828
'packages/umi-plugin-ui/src/plugins/blocks',
2929
'packages/umi-plugin-ui/src/plugins/configuration',
30+
'packages/umi-plugin-ui/src/plugins/tasks',
3031
],
3132
{
3233
watch,

0 commit comments

Comments
 (0)