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

@aidiruanjian/doc-helper

v0.0.5

Published

UOS环境下使用的wps的web插件

Downloads

7

Readme

文档预览插件(统信UOS专业版环境下使用)

该插件主要针对国产化系统UOS环境下,浏览器中集成的WPS的API的插件集,该插件不包含业务处理。只封装基础功能。

当前版本功能:

  • 支持新建word文档
  • 支持远程打开服务器端word文档(包含编辑和只读模式)
  • 支持将word文档保存至远程服务器(后端逻辑自行编写)
  • 支持浏览器直接打开预览PDF(浏览器自带PDF插件实现方式,未使用第三方库)
  • ...后续根据业务需求逐步扩展

开发文档

一、安装

npm install @aidiruanjian/doc-helper

二、引入组件

<template>
    <doc-helper ref="docHelper" @beforeSave="beforeSave" />
</template>

<script>
import DocHelper from 'doc-helper'
export default {
    components:{
        DocHelper
    },
    ...
    ,
    mounted(){
        this.docHelper = this.$refs.docHelper
    }
}
</script>

三、API说明

@Methods 方法

createDocument 新建文档

  • 参数
    • { String } 文档类型(可选:'word')
  • 示例
  this.docHelper.createDocument('word')

openRemote 打开远程文件

  • 参数
    • { String } 文件格式(可选:'word','pdf')
    • { String } 文件URL
    • { Boolean } 是否只读 (默认:false)
  • 示例
  this.docHelper.openRemote('word', 'http://192.168.2.38:5500/test.docx', true)

saveRemote 保存至服务器

  • 参数
    • { String } 服务器接口地址
    • { String } 文件名称
  • 示例
  this.docHelper.saveRemote('http://192.168.2.38:5500', "new.docx")

@Events 事件

beforeSave 保存后的回调

  • 示例
  <doc-helper ref="docHelper" @beforeSave="beforeSave" />