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 🙏

© 2025 – Pkg Stats / Ryan Hefner

qz-park-editor

v0.2.13

Published

## Project setup ``` npm install qz-park-editor ```

Readme

qz-park-editor

Project setup

npm install qz-park-editor

使用案例:

// 引入main.js
import editor from 'qz-park-editor'
Vue.use(editor)

// demo.vue
<qz-park-editor
  ref="editor"
  v-model="content"
  :isClear="isClear"
  :uploadImgShowBase64Flg="uploadImgShowBase64Flg"
  :readOnly="readOnly"
  :showFullScreen="showFullScreen"
  :placeholder="placeholder"
  :showMenuTooltips="showMenuTooltips"
  :menuTooltipPositionTop="menuTooltipPositionTop"
  :maxHeight="maxHeight"
  :autoFocus="autoFocus"
  :uploadImgMaxSize="uploadImgMaxSize"
  :uploadImgAccept="uploadImgAccept"
  :uploadImgMaxLength="uploadImgMaxLength"
  :showLinkImg="showLinkImg"
  :elMessage="elMessage"
  :uploadImgCustomConfig="uploadImgCustomConfig"
  :colors="colors"
  :menus="menus"
  @urlHandel="urlHandel"></qz-park-editor>

// 配置项及说明
data(){
    return{
      content: '',// v-model绑定的内容
      // 配置项
      isClear: true,//清除上一操作留下的缓存
      uploadImgShowBase64Flg: false,//是否启用base64图片上传(不可和自定义上传冲突)
      showFullScreen: true,//是否展示全屏按钮
      readOnly: false,//是否只读模式
      placeholder: '请输入内容',//空内容提示文字
      showMenuTooltips:true, // 是否展示工具栏提示
      menuTooltipPositionTop:true,// 工具栏提示上方/下方显示
      maxHeight:400,//最大高度
      autoFocus:false,//自动聚焦
      uploadImgMaxSize:5,// 图片大小限制 5M
      uploadImgAccept:['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp'], // 图片类型限制
      uploadImgMaxLength: 1, // 同时最大上传图片数量限制
      showLinkImg:true, // 是否打开网络图片上传
      elMessage:true,//开启element样式提示  false则使用window.alert
      uploadImgCustomConfig:{
        uploadImgServer:'http://*******:****/xdl/addMobileAttach.do',
        uploadImgParams:{
          token:'123'
        },//自定义上传formData参数 参数会被添加到formData中
        uploadImgParamsWithUrl:true,// 是否formData参数拼接到 url 中
        withCredentials:true,//跨域上传中如果需要传递 cookie 需设置 withCredentials 为  true
        uploadImgHeaders:{
          token:'456'
        }, // 自定义上传header
        uploadImgTimeout:10*1000,// 自定义上传超时时间
        uploadFileName:'file',// 附件上传的key值
      },
      colors:[ // 编辑器的字体颜色和背景色
        '#000000',
        '#eeece0',
        '#1c487f',
        '#4d80bf'
      ],
      menus:[
        'head',  // 标题
        'bold',  // 粗体
        'fontSize',  // 字号
        'fontName',  // 字体
        'italic',  // 斜体
        'underline',  // 下划线
        'strikeThrough',  // 删除线
        'indent', // 缩进
        'lineHeight', // 行高
        'foreColor',  // 文字颜色
        'backColor',  // 背景颜色
        // 'link',  // 插入链接
        'list',  // 列表
        'justify',  // 对齐方式
        // 'quote',  // 引用
        'emoticon',  // 表情
        'image',  // 插入图片
        'table',  // 表格
        // 'code',  // 插入代码
        'undo',  // 撤销
        'redo',  // 恢复
        'clean',  // 清除样式
        'splitLine' // 分割线
      ]
    }
  },
  
   methods:{
   	// 当使用自定义上传的时候需要指定接口返回后的逻辑 result:接口返回的数据  
    // 处理获得上传图片url后,调用callback(url)将url返回给组件,已便插入富文本
    urlHandel(result, callback){
      callback(result.result[0].Fileurl);
    },
    // 提供一些可以调用的方法  以便于更好的操控富文本的状态、行为
    test(){
        // 清空文本
        this.$refs.editor.clearTxt()
        // 全屏
        this.$refs.editor.fullscreenFun()
        // 退出全屏
        this.$refs.editor.unFullscreenFun()
        // 禁用
        this.$refs.editor.disableEditor()
        // 启用
        this.$refs.editor.enableEditor()
      }
   }