20 Star 103 Fork 50

smallwei / avue-plugin-ueditor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

avue 富文本编辑器

Avue官网

https://avuejs.com

介绍

三方编辑器wangEditor

  • 文档
  • 组件配置中customConfig属性为wangEditor编辑器的配置

使用

1.安装
vue2:npm install avue-plugin-ueditor --save
vue3:npm install avue-plugin-ueditor@next --save

2.导入
import AvueUeditor from 'avue-plugin-ueditor'
Vue.use(AvueUeditor);

3.Avue配置中使用
...
column:[
  ...
    {
      label:'test',
      prop:'test',
      component: "avueUeditor",
      //wangEditor编辑的配置
      customConfig: {
        lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3']
      },
      //是否启用oss(qiniu/ali)
      oss:'',
      headers:{},
      data:{},
      propsHttp: {
        home:'',
        url:'',
        res: ''
      },
      //普通图片上传
      action: "",
      //七牛云oss配置
      qiniu: {
        AK: "",
        SK: "",
        scope: "",
        url: "",
        deadline: 1
      },
      //阿里云oss配置
      ali: {
        region: "",
        endpoint: "",
        accessKeyId: "",
        accessKeySecret: "",
        bucket: ""
      }
    }
  ...
]
4.组件中使用
<avue-ueditor v-model="text" v-bind="options"></avue-ueditor>

options: {
  //wangEditor编辑的配置
  customConfig: {
    lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3']
  },
  propsHttp: {
    home:'',
    url:'',
    res: ''
  },
  //是否启用oss(qiniu/ali)
  oss:'',
  headers:{},
  data:{},
  //普通图片上传
  action: "",
  //七牛云oss配置
  qiniu: {
    AK: "",
    SK: "",
    scope: "",
    url: "",
    deadline: 1
  },
  //阿里云oss配置
  ali: {
    region: "",
    endpoint: "",
    accessKeyId: "",
    accessKeySecret: "",
    bucket: ""
  }
}
...

upload Attributes

参数 说明 类型 可选值 默认值
action 图片上传地址 String -
headers 上传附带请求头数据 Object -
data 上传附带数据 Object -
props 相关可配置参数,具体参考props配置 Object -
oss 是否使用oss不写则为普通上传 String ali/qiniu -
qiniu 七牛云oss配置,具体参考qiniu配置 Object -
ali 阿里云oss配置,具体参考ali配置 Object -

propsHttp Attributes

参数 说明 类型 可选值 默认值
res 返回的数据结构层次 String -
url 返回结构体图片地址字段 String -
home 图片的根路径地址 String -

qiniu Attributes

参数 说明 类型 可选值 默认值
AK 七牛云的密钥 String -
SK 七牛云的密钥 String -
scope 七牛云存储的空间名 String -
url 空间的自定义域名 String -
deadline token的过期时间 String -

ali Attributes

参数 说明 类型 可选值 默认值
region oss所在区域的名称,具体查看阿里云oss文档 String -
endpoint oss所在区域的域名,具体查看阿里云oss文档 String -
accessKeyId 阿里云的密钥 String -
accessKeySecret 阿里云的密钥 String -
bucket 阿里云存储的空间名 String -
MIT License Copyright (c) 2020 smallwei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

avue 富文本编辑器 展开 收起
JavaScript 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/smallweigit/avue-plugin-ueditor.git
git@gitee.com:smallweigit/avue-plugin-ueditor.git
smallweigit
avue-plugin-ueditor
avue-plugin-ueditor
master

搜索帮助

14c37bed 8189591 565d56ea 8189591