1234567891011121314151617181920212223242526272829303132 |
- import {
- getElementId,
- randomCode,
- deepCopy,
- objAssign,
- } from "../../../card/plugins/utils";
- const MODEL = {
- type: "PAPER_STRUCT",
- x: 0,
- y: 0,
- w: 200,
- h: 50,
- textAlign: "left",
- paddingLeft: 0,
- structs: [
- {
- detailName: "选择题",
- questionCount: 10,
- totalScore: 20,
- },
- ],
- };
- const getModel = (presetData) => {
- const model = objAssign(deepCopy(MODEL), presetData);
- model.id = getElementId();
- model.key = randomCode();
- return model;
- };
- export { MODEL, getModel };
|