迁移到新版本
1.5.13 -> 1.6.0
菜单的 CSS 类名做了如下变更:
.menu -> .wx-menu
.item -> .wx-item
.icon -> .wx-icon
.value -> .wx-value
1.5.12 -> 1.5.13
编辑器使用的 CSS 类名进行了更新:
.modal -> .wx-modal
.window -> .wx-window
.modal .window .buttons -> .wx-modal .wx-window .wx-buttons
.combo -> .wx-combo
.combo -> .wx-multicombo
.item -> .wx-item
.color-picker -> .wx-colorselect
.colors -> .wx-colors
.slider -> .wx-slider
.datepicker -> .wx-datepicker
.calendar -> .wx-calendar
.calendar .days .day.out -> .wx-calendar .wx-days .wx-day.wx-out
.combo .tag -> .multicombo .wx-tag
.dropdown -> .wx-dropdown
.dropdown .item -> .wx-dropdown .wx-item
.clear -> .wx-clear
1.5.6 -> 1.5.7
Api
方法
- Kanban 工具栏的
setLocale
方法应用 locale 的方式有了变化:
v1.5.7 之前
// 创建 Kanban
const board = new kanban.Kanban("#root", {...});
// 创建 Toolbar
const toolbar = new kanban.Toolbar("#toolbar", { api: board.api });
// 应用 "de" 语言到 Toolbar
toolbar.setLocale(de); // 或传 null 重置为默认语言(en)
自 v1.5.7 起
// 创建 Kanban
const board = new kanban.Kanban("#root", {...});
// 创建 Toolbar
const toolbar = new kanban.Toolbar("#toolbar", { api: board.api });
// 应用 "de" 语言到 Toolbar
toolbar.setLocale(de, board.api);
1.4 -> 1.5
Api
属性
- Kanban 的
columnShape
属性有如下调整:
v1.5 之前
{
menu: {
show: true,
items: [
{
label: "Update", ...
}
]
// 其他参数
}
}
自 v1.5 起
{
menu: {
show: true,
items: [
{
text: "Update", ...
}
]
// 其他参数
},
fixedHeaders: true
}
1.3 -> 1.4
Api
属性
- Kanban 的
editorShape
属性现在如下工作:
v1.4 之前
{
type: "date",
key: "start_date",
label: "Start date"
},
// 其他参数
自 v1.4 起
{
type: "date", // 也可以用 "dateRange" 类型
key: "start_date",
label: "Date Range"
format: "%d/%m/%y"
},
{
type: "comments",
key: "comments",
label: "Comments",
config: {
format: "%M %d",
placement: "page", // 或 "editor"
html: true,
},
},
{
type: "links",
key: "links",
label: "Links",
},
// 其他参数
cardShape
属性变更:
v1.4 之前
{
label: true,
description: true,
menu: {
items: [
{
label: "Delete", ...
}
]
}
// 其他参数
}
自 v1.4 起
{
label: true,
description: true,
menu: {
items: [
{
text: "Delete", ...
}
]
},
votes: true,
comments: true,
css: (card) => card.type == "feature" ? "green" : "red",
// 其他参数
}
columnShape
属性变更:
v1.4 之前
{
menu: {
show: true,
items: [
{
label: "Delete", ...
}
]
// 其他参数
}
}
自 v1.4 起
{
menu: {
show: true,
items: [
{
text: "Delete", ...
}
]
// 其他参数
},
css: (column, cards) => column.id == "feature" && cards.length < 5 ? "green" : "red"
}
rowShape
属性变更:
v1.4 之前
{
menu: {
show: true,
items: [
{
label: "Delete", ...
}
]
// 其他参数
}
}
自 v1.4 起
{
menu: {
show: true,
items: [
{
text: "Delete", ...
}
]
// 其他参数
},
css: (row, cards) => row.id == "task" && cards.length < 5 ? "green" : "red",
}
cards
属性现在如下:
v1.4 之前
[
{
id: 1,
label: "Integration with React",
description: "Some description",
// 其他参数
}, ...
]
自 v1.4 起
[
{
id: 1,
label: "Integration with React",
description: "Some description",
css: "red",
votes: [4,6,9],
comments: [
{
id: 1,
userId: 9,
cardId: 6,
text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays.",
date: new Date(),
},{...}
]
// 其他参数
}, ...
]
columns
属性新增了一些选项:
v1.4 之前
[
{
id: "inprogress",
label: "In progress",
// 其他参数
}, ...
]
自 v1.4 起
[
{
id: "inprogress",
label: "In progress",
css: "red",
overlay: template(`
<div className="blockOverlay disable-drop">
<span className="disable-drop-header">Drop is not allowed</span>
<span className="disable-drop-description">Only testers can move cards to this
column</span>
</div>`)
// 其他参数
}, ...
]
rows
属性现在可设置 css:
v1.4 之前
[
{
id: "features",
label: "Features",
// 其他参数
}, ...
]
自 v1.4 起
[
{
id: "features",
label: "Features",
css: "green"
// 其他参数
}, ...
]