Gathering detailed insights and metrics for web-reseditor
Gathering detailed insights and metrics for web-reseditor
Gathering detailed insights and metrics for web-reseditor
Gathering detailed insights and metrics for web-reseditor
npm install web-reseditor
Typescript
Module System
Node Version
NPM Version
45
Supply Chain
62.4
Quality
63.3
Maintenance
25
Vulnerability
90
License
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
33,665
Last Day
1
Last Week
2
Last Month
190
Last Year
2,555
Latest Version
1.4.3
Package Id
web-reseditor@1.4.3
Unpacked Size
13.58 MB
Size
3.17 MB
File Count
119
NPM Version
6.14.9
Node Version
14.15.3
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
100%
2
Compared to previous week
Last Month
-18.1%
190
Compared to previous month
Last Year
-42.7%
2,555
Compared to previous year
29
git clone http://svn.radonline.cn:3888/PACS/web-RSTEditor.git
安装依赖
npm install
启动
npm run dev
npm i web-reseditor
1.0版本稳定版本推荐 1.2.0版本
1import { TableDesigner } from 'web-reseditor/index.js'
1<TableDesigner ref="tableDesigner" 2 :tableTplList="tpls" 3 :extent="extent" 4 @saveContent="saveTable" 5 @saveEdit="saveEditTable" 6 @deleteTableTpl="deleteTableTpl"></TableDesigner>
[
key: {
name: ''// label
options: [] // length>0时呈现为下拉框,否则呈现为输入框
option: '' // 绑定值
}
]
1{ 2 id - 模版id 3 name - 模版名称 4 // rels - 关联属性 Object 5 tpl - 表格模版字符串 6 extend - 业务扩展字段 [] 7}
1this.$refs.tableDesigner.getContent()
{
id - 模版id
name - 模版名称
rels - 关联属性 Object
tpl - 表格模版字符串
index - 坐标
}
deleteTableTpl 事件 删除表格模版 Number 返回坐标
saveEdit 事件 编辑表格模版保存数据 Object {}
{
id - 模版id
name - 模版名称
<!-- rels - 关联属性 Object -->
tpl - 表格模版字符串,
extent - 扩展字段
}
1import { Designer } from 'web-reseditor/index.js'
1<Designer ref="designer" 2 @saveDesignerData="saveDesignerData" 3 @saveCustomNotDisplayComps="saveCustomNotDisplayComps" 4 :customCompEditable="false" 5 :studyData="studyData" 6 compId="designer" 7 :customComps="customComp"></Designer>
1function saveDesignerData(e) { 2 // e 3 /** 4 elements: [], 5 fixedHeader: { 6 openFixed: false, 7 height: 50, 8 pageNum: false, 9 page: '1' 10 }, 11 fixedFooter: { 12 openFixed: false, 13 height: 50, 14 pageNum: false, 15 page: '1' 16 }, 17 name: '', 18 pageType: 'a4', 19 spCharacters: [], 20 script: '', 21 customHeight: 297, 22 customWidth: 210, 23 totalPages: 1, 24 backgroundSize: 20, 25 width: $config.canvasH5Width > 700 ? $config.canvasH5Width : 700, 26 height: $config.canvasH5Height, 27 backgroundImage: 28 */ 29}
1{ 2 title - 标题 3 elName - 对应组件的elname 4 type - 分类 5 threshold - 阈值 6}
1import { Editor } from 'web-reseditor/index.js'
1<Editor ref="editor" 2 @updateSpChars="updateSpChars" 3 :tpls="tpls" 4 @saveEditor="saveEditedPage"></Editor>
1// 追加内容 2window['modelId'].reditor['阈值'].edit.appendHtml(str) 3// 追加到光标 4window['modelId'].reditor['阈值'].edit.insertHtml(str); 5// 替换全部内容 可以是字符串或序列化的dom节点 6window['modelId'].reditor['阈值'].edit.html(str) 7// 获取内容 8window['modelId'].reditor['阈值'].edit.html() 9// 获取当前焦点所在的富文本框(有阈值才有)对应阈值 10window['modelId'].focusedEditor
1// 重置图片列表 2window['modelId'].imagePicker['阈值'].resetPics(pics = []) // 传入图片列表 3// 删除某几个图片 4window['modelId'].imagePicker['阈值'].deletePics(index = []) // 传入要删除的图片下标 5// 插入图片到指定位置 6window['modelId'].imagePicker['阈值'].insertPics(pics = [], index) 7 8// 在编辑器上拖拽图片或者删除上传 9@updateImages="updateImages" // 监听事件 {返回 10 11updateImages(e) { 12 e.threshold // 阈值 13 e.fileList // 图片列表 14}
this.$refs.editor.updateElement(域值, value, img) // 如果是操作人相关的传入img,签名同步更新
适用于和普通编辑模式切换,提出所有富文本部分
1<QuickEditor @reditorChangeed="timingStorage" 2 @updateSpChars="updateSpChars" 3 :modalId="modalId"></QuickEditor>
1import { Preview } from 'web-reseditor/index.js'
1<Preview :tplStr="pageTpl" 2 ref="preview"></Preview>
No vulnerabilities found.
No security vulnerabilities found.