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

赣icp网站建设东莞网站建设方案外包

赣icp网站建设,东莞网站建设方案外包,建网站注意什么,深圳网站建设三把火所用插件&#xff1a;lime-signature 使用到 CSS 特性 绝对定位transform 旋转transform-origin transform 原点 复习一下定位元素&#xff08;相对定位、绝对定位、粘性定位&#xff09; 代码# <template><view class"signature-page"><view clas…

所用插件:lime-signature

在这里插入图片描述

使用到 CSS 特性

  1. 绝对定位
  2. transform 旋转
  3. transform-origin transform 原点

复习一下定位元素(相对定位、绝对定位、粘性定位)

在这里插入图片描述

代码#

<template><view class="signature-page"><view class="operate-box"><button @click="handleSignatureClick('back')">{{ $t("common.back") }}</button><button @click="handleSignatureClick('clear')">{{ $t("maintenance.signatureBtns[0]") }}</button><button @click="handleSignatureClick('undo')">{{ $t("maintenance.signatureBtns[1]") }}</button><button @click="handleSignatureClick('save')">{{ $t("maintenance.signatureBtns[2]") }}</button></view><view class="canvas-box"><l-signaturedisableScrollbackgroundColor="#fff"ref="signatureRef":penColor="penColor":penSize="penSize":openSmooth="openSmooth":landscape="IsLandscape"></l-signature></view></view>
</template><script>
/*** 签名-横屏* @author demon3443002624@outlook.com* @version 1.0.0*/
import { dataURLtoFile, changeUrl } from "@/common/utils.js";
const UPLOAD_FILE_URL_MAINTENANCE5 =changeUrl("/Lease/UploadLeaseMaintenanceNewV2File") + "?type=5";
export default {data() {return {type: null,penColor: "#000",penSize: 5,openSmooth: true,IsLandscape: false,};},onLoad(params) {const _this = this;const eventChannel = this.getOpenerEventChannel();// 监听acceptData事件,获取上一页通过eventChannel传送到当前页面的数据eventChannel.on("acceptData", function (data) {_this.type = data.type;});// 横屏签名this.IsLandscape = true;// #ifdef APP-PLUS// this.IsLandscape = true// plus.screen.lockOrientation('landscape-primary') // App 屏幕旋转// #endif},onUnload() {// #ifdef APP-PLUS// plus.screen.lockOrientation('portrait-primary') // App 屏幕旋转// #endif},methods: {handleSignatureClick(type) {if (type == "back") {uni.navigateBack();return;}if (type == "openSmooth") {this.openSmooth = !this.openSmooth;return;}const signatureRefStr = "signatureRef";if (type == "save") {this.$refs[signatureRefStr].canvasToTempFilePath({success: (res) => {// App 生成的图片路径, H5 生成的base64 处理方式不同const commonHandler = (resultInner) => {if (resultInner.statusCode === 200) {const responseDataJson = resultInner.data;if (responseDataJson) {const responseData = JSON.parse(responseDataJson);const eventChannel = this.getOpenerEventChannel();// 向上一页通过事件传递数据eventChannel.emit("editData", {type: this.type,url: responseData.Data,});uni.navigateBack();}}};// #ifdef H5uni.uploadFile({url: UPLOAD_FILE_URL_MAINTENANCE5,file: dataURLtoFile(res.tempFilePath, "file.png"), // ** 没有文件名,后台出错name: "file",success: (result) => {commonHandler(result);},fail: (err) => {},});// #endif// #ifdef APPuni.uploadFile({url: UPLOAD_FILE_URL_MAINTENANCE5,filePath: res.tempFilePath,name: "file",success: (result) => {commonHandler(result);},fail: (err) => {},});// #endif},});return;}if (this.$refs[signatureRefStr]) this.$refs[signatureRefStr][type]();},},
};
</script><style lang="scss">
$operate-btn-width: 100rpx;
.signature-page {margin-top: var(--status-bar-height);height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));width: 100%;position: relative;.canvas-box {height: 100%;margin-left: $operate-btn-width;}.operate-box {position: absolute;display: flex;transform: rotate(90deg);transform-origin: top left;height: $operate-btn-width;width: calc(100vh - var(--window-top) - var(--status-bar-height) -var(--window-bottom));top: 0;left: $operate-btn-width;z-index: 1;uni-button {flex: 1;margin: 5rpx 10rpx;}}
}
</style>

结果

在这里插入图片描述
在这里插入图片描述


文章转载自:

http://nCAgGW0i.cpqwb.cn
http://DpqTF1Me.cpqwb.cn
http://6PSRu6FK.cpqwb.cn
http://ysMpqGtw.cpqwb.cn
http://A4NDL10G.cpqwb.cn
http://804S3Y7z.cpqwb.cn
http://ootj7vK6.cpqwb.cn
http://fSTTNOem.cpqwb.cn
http://eGOJsajN.cpqwb.cn
http://iDsydrUa.cpqwb.cn
http://FRqWlypF.cpqwb.cn
http://A3GW3KTw.cpqwb.cn
http://bKtCFADt.cpqwb.cn
http://zbiTZKW4.cpqwb.cn
http://Fexm6PF9.cpqwb.cn
http://KdvWbquR.cpqwb.cn
http://WYRjSAij.cpqwb.cn
http://K4mXT4QZ.cpqwb.cn
http://do3qoKXK.cpqwb.cn
http://7EBgogAc.cpqwb.cn
http://A5kiMJW9.cpqwb.cn
http://bEKG3C47.cpqwb.cn
http://yj2QHfhy.cpqwb.cn
http://owVJQRi7.cpqwb.cn
http://f8STf755.cpqwb.cn
http://2yHhPxNg.cpqwb.cn
http://WDqEkPOr.cpqwb.cn
http://sK2wdHqr.cpqwb.cn
http://ITf9CzJm.cpqwb.cn
http://A7va3amP.cpqwb.cn
http://www.dtcms.com/wzjs/778488.html

相关文章:

  • scratch编程网站上海网站备案核验单状态查询
  • 营销推广的目标通常是什么网络网站推广首荐乐云seo
  • asp企业网站源码wordpress网站插件下载
  • 郑州网站建设代理网络运营主要做什么工作
  • 网站域名永久辽宁省交通建设投资集团官方网站
  • 中小企业网站免费设计logo的app
  • 驾校视频网站模板手机电脑同步网站开发
  • 网站怎么去优化青岛房产交易中心官网
  • 公司网站优化方案一级a做爰片迅雷网站
  • 做网站困难嘛wordpress怎么设置语言
  • 厦门市住房和城乡建设局网站搜索引擎推广的优势
  • 如何填写网站建设计划表kangle搭建wordpress
  • 网站建设的费用入账做签到的网站
  • 网站用户体验分析怎么做企业 网站 客户留言怎么做
  • 深圳精美网站设计高端网站设计思路
  • 答题网站怎么做网站内部优化工具
  • 富民县住房和城乡规划建设局网站手机怎么自创网站
  • 旅游网站模板免费下载企业网站备案资料样本
  • 舟山网站建设优化青岛百度seo代理
  • 庄河网站建设公司国外的素材网站
  • wordpress站内优化贝壳找房网站做销售
  • 河北省住房和城身建设厅网站惠州建设银行网站
  • 昆明网站建设电话做全国家电维修网站到哪里做
  • 宜春网站开发公司电话wordpress单栏简洁
  • 法与家国建设征文网站网站模板怎么用法
  • 网站正在建设中模板 htmlwordpress下载主题footer
  • 福州交通建设投资集团网站wordpress漂亮主题
  • 莆田网站制作报价沈阳做人流哪个医院好安全
  • 宽带收费价格在线排名优化
  • 网站开发与设计岗位职责wordpress 瀑布流