@srcker/editor-vue-next 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +32 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -23,17 +23,44 @@
23
23
  安装依赖:
24
24
 
25
25
  ```bash
26
- npm install
26
+ npm i @srcker/editor-vue-next
27
27
  ```
28
28
 
29
- 构建版本:
29
+ 使用方法:
30
30
 
31
31
  ```bash
32
- npm login
33
- npm run build
34
- npm publish --access public
32
+
33
+ # 引入组件
34
+ import { RichEditor } from '@srcker/editor-vue-next'
35
+ # 引入样式
36
+ import '@srcker/editor-vue-next/style/toolbar'
37
+ import '@srcker/editor-vue-next/style/content'
38
+
39
+ # 使用组件
40
+ <RichEditor v-model="form.content" theme="dark" format="html" />
41
+
35
42
  ```
36
43
 
44
+ 参数说明
45
+ ## 配置项
46
+ | 参数 | 说明 | 类型 | 默认值 |
47
+ | --- | --- | --- | --- |
48
+ | theme | 主题,可选值:`light`、`dark` | string | `light` |
49
+ | format | 输出格式,可选值:`html`、`json` | string | `html` |
50
+ | uploadImage | 图片上传配置 | File | - |
51
+
52
+ ## 图片上传配置
53
+ ```
54
+ const uploadImage = async (file: File) => {
55
+ console.log(file)
56
+ return {
57
+ url: '图片地址',
58
+ name: '图片名称'
59
+ }
60
+ }
61
+ ```
62
+
63
+
37
64
  ## 技术栈
38
65
 
39
66
  - Vue 3
@@ -41,5 +68,4 @@ npm publish --access public
41
68
  - SCSS
42
69
 
43
70
  ## 图片上传
44
-
45
71
  编辑器支持通过工具栏按钮上传图片,支持常见的图片格式(JPG、PNG、GIF、WebP),最大支持5MB的文件。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srcker/editor-vue-next",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "main": "dist/rich-editor.es.js",
6
6
  "module": "dist/rich-editor.es.js",