madeFont.wxml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <!--pages/customized/made/madeFont/madeFont.wxml-->
  2. <view class='made-content'>
  3. <!-- <canvas canvas-id='madeContent' class='made-content'></canvas> -->
  4. <view class='made-img-box'>
  5. <image src='{{obverseImgObject[isActive]}}'></image>
  6. <made-solid prop-position="{{dataPositionObj}}" prop-size="{{propSize}}">
  7. <view class='f-box f-align-items-center f-justify-content-center made-prompt' style='text-align:center' wx:if="{{!fontTouch.fontSize && !imgTouch.src}}">{{fontTouch.fontContent}}</view>
  8. <view class='made-box'>
  9. <!-- img -->
  10. <view wx:if="{{imgTouch.src}}" class='edit-content' style='top:{{imgTouch.y}}px;left:{{imgTouch.x}}px'>
  11. <!-- <view class='iconfont icon-guanbi1 c-white icon-close' bindtap='imgDelete'></view> -->
  12. <view animation="{{imgAnimationData}}">
  13. <image src="{{imgTouch.src}}" mode="aspectFit" style='width:{{imgTouch.width}}rpx;height:{{imgTouch.height}}rpx'></image>
  14. </view>
  15. </view>
  16. <!-- font -->
  17. <view wx:if="{{fontTouch.fontSize}}" class='made-prompt made-font' style='color:{{fontTouch.isColor}};font-size:{{fontTouch.fontSize}}px;font-weight:{{fontTouch.bold}};'>
  18. <view class='font-content' style='top:{{fontTouch.y}}px;left:{{fontTouch.x}}px;' bindtouchstart="fontTouchstart" animation="{{animationData}}" bindtouchmove="fontTouchmove" bindtouchend="fontTouchend">
  19. <!-- <view class='iconfont icon-guanbi1 c-white icon-close' bindtap='fontDelete'></view> -->
  20. <view id='touchFont' style='font-weight:{{fontTouch.bold ? "bold":""}}'>{{fontTouch.fontContent}}</view>
  21. </view>
  22. </view>
  23. </view>
  24. </made-solid>
  25. </view>
  26. </view>
  27. <view class='public-prompt'>该预览为仿真效果图,具体请以实物为准</view>
  28. <view class='footer'>
  29. <view class='footer-box f-box'>
  30. <navigator open-type="navigateBack" class="f-box f-align-items-center f-justify-content-center footer-icon">
  31. <block>
  32. <icon class='f-box' type="clear" />
  33. </block>
  34. </navigator>
  35. <view class='f-item footer-upload-btn bg-orange c-white' bindtap='fontDelete' style='text-align:center' hover-class="none">清除文字</view>
  36. <view class='f-item footer-add-btn bg-green c-white' bindtap='addFont'>添加文字</view>
  37. <view class="f-box f-align-items-center footer-icon f-justify-content-center" bindtap='madeConfirm'>
  38. <block>
  39. <icon class='f-box' color="#00af66" type="success" />
  40. </block>
  41. </view>
  42. </view>
  43. </view>
  44. <!-- slider -->
  45. <view class='slider-box' wx:if="{{fontTouch.fontSize}}">
  46. <!-- 大小 -->
  47. <view class='f-box f-align-items-center mar-l20 mar-r20'>
  48. <view class='f-s30'>放大</view>
  49. <view class="body-view f-item">
  50. <slider bindchanging="fontEnlarge" block-color="#00af66" block-size="16" min="20" max="80" value='{{fontTouch.fontSize}}' show-value/>
  51. </view>
  52. </view>
  53. <view class='f-box f-align-items-center mar-l20 mar-r20'>
  54. <!-- 度数 -->
  55. <view class='f-s30'>旋转</view>
  56. <view class="body-view f-item">
  57. <slider bindchanging="fontRotate" block-color="#00af66" block-size="16" min="0" max="360" value='{{fontTouch.angle}}' show-value/>
  58. </view>
  59. </view>
  60. <!-- <view class='f-box f-align-items-center mar-l20 mar-r20'> -->
  61. <!-- 加粗 -->
  62. <!-- <view class='f-s30'>加粗</view>
  63. <view class="body-view f-item">
  64. <slider bindchanging="fontWeight" block-color="#00af66" block-size="16" min="100" max="900" value='{{fontTouch.bold}}' show-value/>
  65. </view> -->
  66. <!-- </view> -->
  67. </view>
  68. <!-- 文字层 -->
  69. <view class='font-ceng' wx:if="{{addFontStatic}}">
  70. <view class="f-box f-justify-content-between">
  71. <view class='font-cancel f-s32 c-white mar-l20 mar-t20' bindtap='fontCancel'>取消</view>
  72. <view class='font-confirm f-s32 c-white mar-r20 mar-t20' bindtap='fontConfirm'>完成</view>
  73. </view>
  74. <view class='c-white f-box f-justify-content-center f-s26'>仅支持手机自带字体样式</view>
  75. <view class="input-box">
  76. <input placeholder-style="color:#fff" style='color:{{fontTouch.isColor}};font-weight:{{fontTouch.bold? 900:""}}' placeholder="可编辑文字" bindinput="bindinput" auto-focus />
  77. </view>
  78. <view class='font-color f-box f-justify-content-around'>
  79. <view class='select-weight' bindtap='weightBtn' style='color:{{fontTouch.bold ? "#333":""}};background:{{fontTouch.bold ? "#fff":""}}'>粗</view>
  80. <view wx:for="{{fontColorArray}}" class='{{fontTouch.isColor === item ? "isColor" : ""}}' data-color="{{item}}" bindtap='selectColor'>
  81. <view style='background:{{item}}' class='font-item'></view>
  82. </view>
  83. </view>
  84. </view>