当前位置: 首页 > news >正文

淮南网云置业有限公司seo权重查询

淮南网云置业有限公司,seo权重查询,公司注册在哪里合适,动漫设计与制作有什么学校目录 第一章 效果展示 第二章 准备工作 2.1 使用的工具vue-sign 2.1.1 安装 2.1.2 了解 2.1.3 参数说明 第三章 源代码 第一章 效果展示 第二章 准备工作 2.1 使用的工具vue-esign 2.1.1 安装 npm install vue-esign --save 2.1.2 了解 兼容pc端和移动端有对应的参…

目录

第一章 效果展示

第二章 准备工作

2.1 使用的工具vue-sign

2.1.1 安装

2.1.2 了解

2.1.3 参数说明

第三章 源代码

第一章 效果展示

第二章 准备工作

2.1 使用的工具vue-esign

2.1.1 安装

npm install vue-esign --save

2.1.2 了解

  • 兼容pc端和移动端
  • 有对应的参数让我们自定义画布尺寸(导出图尺寸),画笔粗细、颜色,画布背景色
  • 能支持裁剪,在画布设定尺寸基础上裁掉四周空白部分

2.1.3 参数说明

属性类型默认值说明
widthNumber800画布宽度,即导出图片的宽度
heightNumber300画布高度,即导出图片的高度
lineWidthNumber4画笔粗细
lineColorString#000000画笔颜色
bgColorString画布背景色,为空时画布背景透明,
支持多种格式 '#ccc','#E5A1A1','rgb(229, 161, 161)','rgba(0,0,0,.6)','red'
isCropBooleanfalse是否裁剪,在画布设定尺寸基础上裁掉四周空白部分

第三章 源代码

  • 父组件
<el-col :span="13"><el-form-item label="被调查者签名" prop="respondentSign" :rules="[{type: 'string',required: true,message: '被调查者请签名',trigger: ['change']}]"><div @click="signreVisible=true" style="width: 400px;height: 150px;background-color: #d9d9d9;"><el-image :src="inputForm.respondentSign"style="width: 400px;height: 150px;display: flex;align-items: center;justify-content: center;color: #999;"><div slot="error" >点击签名</div></el-image></div></el-form-item>
</el-col>
<!--引用封装好的组件--->
<el-dialog title="被调查者签字" :visible.sync="signreVisible" width="700px"><sign @setsignin="setsignre"></sign>
</el-dialog>
<!---封装好的组件可以复用了-->
<el-dialog title="调查者签字" :visible.sync="signinVisible" width="700px"><sign @setsignin="setsignin"></sign>
</el-dialog>// 引入自定义封装的组件
import sign from './component/sign.vue'signreVisible: false,
inputForm:{respondentSign = ''
}// 被调查者签字图片,获取子组件传的值
setsignre (img) {this.inputForm.respondentSign = imgthis.signreVisible = false
},
  • 子组件
<template><div><el-card class="qianming-container" body-style="padding:0px"><!---vue-esign组件--><vue-esignref="esign":isCrop="isCrop":width="600":height="300":lineWidth="lineWidth":lineColor="lineColor":format="'image/png'":bgColor.sync="bgColor"></vue-esign><div class="contro-container"><el-button type="danger" @click="handleReset">清空画板</el-button><el-button type="primary" @click="handleGenerate">确认签名</el-button></div></el-card></div>
</template><script>
// 引入组件
import vueEsign from 'vue-esign'
// 这个是请求文件路径的接口
import fileService from '@/api/file/fileService.js'
export default {components: { vueEsign },name: 'sign',data () {return {lineWidth: 6,lineColor: '#000000',bgColor: '',resultImg: '',isCrop: false}},methods: {// 清空画板..handleReset () {this.$refs.esign.reset()this.resultImg = ''},// 生成签名图片..handleGenerate () {this.$refs['esign'].generate().then((res) => {this.resultImg = res // 得到了签字生成的base64图片// console.log('resultImg', this.resultImg)// 这里直接传base64到父组件,然后在父组件处理数据调用接口// this.$emit('setsignin', res)// 也可以转换成在线地址const bl = this.dataURLtoFile(res)let formData = new FormData()formData.append('file', bl, Date.now() + '.png')// console.log('file', formData.get('file'))// 接口请求fileService.upload(formData).then((result) => {// 向父组件传已经转好的地址this.$emit('setsignin', result.data)})}).catch((err) => {// 没有签名,点击生成图片时调用alert(err + ' 未签名!')})},// 将base64转成blob流dataURLtoFile (urlData) {const type = 'image/png'let bytes = nullif (urlData.split(',').length > 1) {bytes = window.atob(urlData.split(',')[1])} else {bytes = window.atob(urlData)}let ab = new ArrayBuffer(bytes.length)let ia = new Uint8Array(ab)for (let i = 0; i < bytes.length; i++) {ia[i] = bytes.charCodeAt(i)}return new Blob([ab], { type })}}
}
</script><style scoped>
button {height: 40px;
}
.contro-container {width: 600px;height: 50px;display: flex;flex-direction: row;align-items: center;justify-content: space-around;background-color: #d3d3d3;position: absolute;bottom: 0px;
}
.qianming-container {width: 600px;height: 350px;margin: 10px auto;position: relative;
}
.text {font-size: 14px;
}
.item {margin-bottom: 18px;
}
.clearfix:before,
.clearfix:after {display: table;content: '';
}
.clearfix:after {clear: both;
}
.box-card {width: 95%;margin-left: 2.5%;margin-top: 20px;
}
</style>

http://www.zhongyajixie.com/news/23530.html

相关文章:

  • 自己买域名可以做网站吗营销型企业网站的功能
  • 技术支持:洛阳网站建设seo营销策划
  • 什么做网站站群企业网站模板免费下载
  • 网站建设中端口号的作用是什么搜索引擎优化的主要策略
  • 男女做啊免费视频网站seo网络搜索引擎优化
  • 做网站怎么赚钱滑县电百度知道登录
  • 家政网站怎么做百度数据研究中心
  • 建立网站编码 优帮云百度q3财报2022
  • 网站换模板对seo北京网站建设优化
  • 二次元网站模板301313龙虎榜
  • 服装营销型网站建设杭州seo博客有哪些
  • 手机端网站怎么做网站模板购买
  • 深圳网站制作建设公司推荐精准营销及推广
  • asp网站首页网店交易平台
  • 做网站用java好还是c百度搜索引擎关键词
  • 给一个装修公司怎么做网站网络策划与营销
  • 网站优化套餐百度网址提交入口
  • 装配式建筑信息平台向日葵seo
  • 南昌网站建设志博精准营销的概念
  • 网线制作规范seo自媒体运营技巧
  • 网站专栏建设情况360公司官网首页
  • 小程序介绍内容怎么写优化外包服务公司
  • 外贸流程的基本流程图怎么进行网站关键词优化
  • 长春做高端网站公司网页制作三大软件
  • 如何建立自己公司的官方网站邵阳网站seo
  • 自己做的网站如何百度能搜索b站推广网站2022
  • 柳州网站建设网络推广优化招聘
  • 简述网站的建设方案网易游戏推广代理加盟
  • 公司名字大全3个字seo工具大全
  • 佛山做网站的哪个好网络营销产品的特点