webto

1.0.3 • Public • Published

webto 简介

  webto对象包含两个方法,一个是页面转为pdf方法webto.pdf,另一个是页面转为photo方法webto.photo。针对vue封装的方法,挂载在vue的实例上,按钮直接调用getpdf()方法,方法内传递需要导出的元素id名称@getpdf('#pdfDom'),并且在data数据上定义导出的文件名称,字段为htmlTitle

webto 使用流程

安装 / Installation

npm install webto -S

导入 / Use

import webto from 'webto'
Vue.use(webto.pdf)

绑定事件 / Element

    <button @getpdf('#pdfDom')></button>

data绑定数据

    data(){
        return {
            htmlitle:'导出文件名称'
        }
    }

Package Sidebar

Install

npm i webto

Weekly Downloads

4

Version

1.0.3

License

ISC

Unpacked Size

4.74 kB

Total Files

3

Last publish

Collaborators

  • lnden