1.1.7 • Published 4 years ago

protocol-frame v1.1.7

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

协议框

作用

内部电子协议签署插件之一,另一个插件是签名板

下载

npm i -S protocol-frame

全局引入

import protocol-frame from 'protocol-frame';

Vue.use(protocol-frame);

更新

@1.1.7 尝试解决滚动几次后不能滚动的问题 @1.1.6 忘了有shadow-dom导致聚焦方法写错,现在改正 @1.1.5 显示时聚焦 @1.1.4 添加转义后css样式 @1.1.3 开始使用转义的HTML @1.1.2 去掉一层scroll某些ios就滑不了了,加上 @1.1.1 解决隐藏时遮挡住按钮导致无法点击问题,去掉一层scroll @1.1.0 尝试解决某些iphone iframe无法滚动问题

局部引入

import protocol-frame from 'protocol-frame';

components: {

​ ProtocolFrame,

}

如何使用

<protocol-frame @ok="handleOk" keyCode="xxx" @cancel="handleCancel" ref="pf" :url="url"></protocol-frame>
<button @click="show">显示</button>
<button @click="changeUrl">更改图片</button>
export default {
    components:{ProtocolFrame},
    data(){
        return {
            value: null,
            url: 'http://10.43.200.81:9010/fts/1158855a-0d78-4e46-8bf6-93ca89f244b5.pdf',
        }
    },
    methods:{
        show() {
            this.$refs.pf.show();
        },
        changeUrl() {
          this.url='https://gkb-prd.oss-cn-hangzhou.aliyuncs.com/202138_5a05250fe4cd48f88557456ebf5c6dc3.jpg';
        },
        handleOk() {
            console.log('他同意了');
        },
        handleCancel() {
            console.log('他拒绝了')
        }
    },
}

API

参数说明类型默认值版本
keyCode密码(内部用的),不传相当于iframe的src为你传入的urlString''
title标题String'应用系统使用协议'
headerShow控制要不要显示标题Booleanfalse1.0.9
okText@ok回调的名称String'签署'
cancelText@cancel回调名称String'拒签'
enterText@enter回调名称String'进入页面'
url文件地址String''
@ok签署回调Function
@cancel拒签回调Function
@enter在签署成功后使用this.$refs.toFinish()进入最后状态,按钮显示。暴露的函数Function1.0.8

加入ref后可调用api

函数说明用法版本
show显示或隐藏此协议this.$refs.pf.show()
toFinish进入最后状态,暴露一个按钮,前两个隐藏this.$refs.pf.toFinish()1.0.8
1.1.1

4 years ago

1.1.0

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago