npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

qzl-editor

v1.0.1

Published

UMeditor(ueditor的mini版)的Vue版本-趣智联版

Downloads

13

Readme

v-umeditor

UMeditor(ueditor的mini版) 1.2.3 的Vue版本。 加入自定义UI,适应现代风格

完整DEMO

代码DEMO

安装

npm i v-umeditor -S

yarn add v-umeditor

全局引用

import vUeditor from 'v-umeditor'

Vue.use(vUeditor)

在组件内引用

import { vUeditor } from 'v-umeditor'

components: {
  vUeditor
}

使用

<v-ueditor
  :config="config"
  @ready="ueditorReady"
></v-ueditor>

注: 开启vue keep-alive时,当使用ready参数保存返回的编辑器实例,当第二次进入页面时,通过返回实例获取内容报错。建议使用window.UM.getEditor(id)方式获取实例

props

| 字段 | 必填 | 类型 | 默认值 | 描述 | |:-------- |:---- |:------- |:------ |:------------------------------------------------------------------------------------------------ | | id | 是 | String | 无 | 当前编辑器 id | | content | 否 | String | 无 | 初始化数据内容 | | config | 否 | Object | {} | 配置参数,详细参考 https://github.com/JakeLaoyu/v-umeditor/blob/master/static/umeditor.config.js | | newstyle | 否 | Boolean | true | 是否使用新样式 | | useCustomUpload | 否 | Boolean | false | 是否使用 自定义文件上传 |

Events

| 字段 | 描述 | return | |:------ |:---------------------------------------------------------------------------------------------------------- |:------ | | ready | UEditor初始化后返回UEditor实例对象,可以调用实例方法,文档: http://ueditor.baidu.com/doc/#UE.Editor | UE实例 | | change | 监听UEditor内容改变,返回UEditor实例对象,可以调用实例方法,文档: http://ueditor.baidu.com/doc/#UE.Editor | UE实例 |

注: 目前发现contentchange事件在选中删除时不触发,建议同时监听contentchangeselectionchange事件,使用window.UM.getEditor(id).getContent()获取内容

或者

// 获取实例
window.UM.getEditor(id)

图片上传

官方配置

请参考官方DEMO文档,需要后端配合 https://ueditor.baidu.com/website/download.html#mini

ajax异步上传

需要开启useCustomUpload配置

使用formDate格式上传,服务端返回格式:

{
  message: 'SUCCESS',
  url: 'xxx'
}