Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
answer-card
Advanced tools
1.版本号修改;2.打包(npm run build);3.发包(npm publish) 凡是修改了.scss(sass)样式文件都需要运行npm run css 独立打包所有样式文件,交由后端,用于生成PDF ## 项目中引用 ```javascript import answerCard from answerCard let editor = new answerCard({ dom: '需要转化成editor的dom' dataJSON: '题目结构json,
Readme
1.版本号修改;2.打包(npm run build);3.发包(npm publish)
凡是修改了.scss(sass)样式文件都需要运行npm run css 独立打包所有样式文件,交由后端,用于生成PDF
import answerCard from answerCard
let editor = new answerCard({
dom: '需要转化成editor的dom'
dataJSON: '题目结构json,注意生成和新建两条使用路线json数据结构不一样,参照下面文档'
both: '单/双面生成'
config: { //'配置文件'
uploadUrl: '文件上传url'
queryData: {
Token: '接口token'
inType: 41
}
}
})
//动态修改学生考号位数
editor.reRenderHeader(考号位数)
//更新json中的所有数据
editor.getLayoutData()
//返回视图html->json
editor.htmlToJson()
//项目使用时一般调用顺序
1、editor.getLayoutData() 更新所有数据
2、let { dataJson } = editor;
3、dataJson.cardHtml = editor.htmlToJson();
4、dataJson.pageCnt...
注意不同线路对应不同方法,方法不可交叉使用
传递特定数据json; 如 ./src/data.json
基本可参考test.ts
传递特定数据json; 如 ./src/emptyDate.json
绑定考试json中会有一个字段newCard:ture 并且只始终位true
添加题目操作中,每执行一个添加操作回在生成一个operation对象;
此对象存放于dataJSON中的operations(Array类型)字段中;
对应的题目json结构中回存放此operation对象的operationId用于关联操作和题目结构;
且会为所添加的题目或小问生成随机proId和quId(唯一)用于方便题目操做如删除操作等。
//添加选择题(单选)
editor.addChoose(添加数量, 选择个数)
//添加选择题(多选)
editor.addChoose(添加数量, 选择个数, true)
//添加判断题
editor.addChoose(添加数量)
/**
* 添加填空题
* argArr为一个数组,argArr.length 为要添加的题目数量, 每项的值为该题的空格数;(如:[1,2]表示添加两题,第一题一个空格,第二题两个空格)
*/
editor.addBlankQues(true/false(同框/不同框), true/false(合并题号/不合并题号), argArr)
//添加解答题
editor.addFrame(true/false(选做题/非选座题), true/false(合并小问/不合并小文), true/false(同框/不同框), 添加数量)
//添加作文题
editor.addWrite()
//删除添加操作的小题
editor.delPro(题目id,小题id,操作id)
传递特定数据json; 如 ./src/bindPro.json
绑定考试json中会比新建答题卡json中多出一个字段bindExam:ture 并且只始终位true
FAQs
1.版本号修改;2.打包(npm run build);3.发包(npm publish) 凡是修改了.scss(sass)样式文件都需要运行npm run css 独立打包所有样式文件,交由后端,用于生成PDF ## 项目中引用 ```javascript import answerCard from answerCard let editor = new answerCard({ dom: '需要转化成editor的dom' dataJSON: '题目结构json,
The npm package answer-card receives a total of 1 weekly downloads. As such, answer-card popularity was classified as not popular.
We found that answer-card demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.