📅  最后修改于: 2023-12-03 15:32:18.304000             🧑  作者: Mango
The source
property in jQWidgets jqxKanban is used to set the data source for the Kanban board. It defines the data to be displayed in the Kanban board, which includes columns and cards.
$("#jqxKanban").jqxKanban({
source: data
});
The source
property takes a JSON object or an array that contains data for the Kanban board. The data should be in the following format:
var data = [
{
text: "Task 1",
status: "new",
tags: "task",
color: "#FEB692"
},
{
text: "Task 2",
status: "new",
tags: "task",
color: "#FEB692"
},
{
text: "Task 3",
status: "done",
tags: "task",
color: "#BB8082"
}
];
The above data
object contains three cards with text, status, tags, and color properties. The text
property represents the card text, the status
property represents the column status (new, in progress, done, etc.), the tags
property represents the tags associated with the card, and the color
property represents the color of the card.
var data = [
{
text: "Task 1",
status: "new",
tags: "task",
color: "#FEB692"
},
{
text: "Task 2",
status: "new",
tags: "task",
color: "#FEB692"
},
{
text: "Task 3",
status: "done",
tags: "task",
color: "#BB8082"
}
];
$("#jqxKanban").jqxKanban({
source: data
});
In the above example, we have defined a data object with three cards and set it as the source for the Kanban board using the source
property.
In conclusion, the source
property is an important property of the jQWidgets jqxKanban plugin that defines the data source for the Kanban board. It takes a JSON object or an array that contains data for the Kanban board, which includes columns and cards.