|
@@ -11,6 +11,7 @@ import { getModel as createFillTable } from "../card/elements/fill-table/model";
|
|
|
import { getModel as createFillPane } from "../card/elements/fill-pane/model";
|
|
|
import { getModel as createPaneBox } from "./elements/pane-box/model";
|
|
|
import { getModel as createFieldText } from "./elements/field-text/model";
|
|
|
+import { getModel as createPaperStruct } from "./elements/paper-struct/model";
|
|
|
|
|
|
// available infos
|
|
|
const EDITABLE_ELEMENT = [
|
|
@@ -27,6 +28,7 @@ const EDITABLE_ELEMENT = [
|
|
|
"FILL_TABLE",
|
|
|
"FILL_PANE",
|
|
|
];
|
|
|
+const EDITABLE_TOPIC = ["PANE_BOX", "PAPER_STRUCT"];
|
|
|
|
|
|
const ELEMENT_INFOS = {
|
|
|
LINES: {
|
|
@@ -81,6 +83,10 @@ const ELEMENT_INFOS = {
|
|
|
name: "字段文本",
|
|
|
getModel: createFieldText,
|
|
|
},
|
|
|
+ PAPER_STRUCT: {
|
|
|
+ name: "试卷结构",
|
|
|
+ getModel: createPaperStruct,
|
|
|
+ },
|
|
|
};
|
|
|
|
|
|
const ELEMENT_LIST = EDITABLE_ELEMENT.map((type) => {
|
|
@@ -89,6 +95,12 @@ const ELEMENT_LIST = EDITABLE_ELEMENT.map((type) => {
|
|
|
type,
|
|
|
};
|
|
|
});
|
|
|
+const TOPIC_LIST = EDITABLE_TOPIC.map((type) => {
|
|
|
+ return {
|
|
|
+ ...ELEMENT_INFOS[type],
|
|
|
+ type,
|
|
|
+ };
|
|
|
+});
|
|
|
|
|
|
// 获取元件默认数据结构
|
|
|
const getElementModel = (type, optionData = {}) => {
|
|
@@ -108,4 +120,10 @@ const PAGE_CONFIG = {
|
|
|
showCover: false,
|
|
|
};
|
|
|
|
|
|
-export { getElementModel, getElementName, PAGE_CONFIG, ELEMENT_LIST };
|
|
|
+export {
|
|
|
+ getElementModel,
|
|
|
+ getElementName,
|
|
|
+ PAGE_CONFIG,
|
|
|
+ ELEMENT_LIST,
|
|
|
+ TOPIC_LIST,
|
|
|
+};
|