index.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <view class="h100">
  3. <!-- #ifdef VUE2 -->
  4. <jp-signature-popup v-model="image" required />
  5. <view>{{image}}</view>
  6. <view class="but" @click="toPop1">自定义样式,弹框调用</view>
  7. <jp-signature-popup ref="signature1" popup v-model="image2" />
  8. <image :src="image2" style="width: 200px;" mode="widthFix"></image>
  9. <!-- #endif -->
  10. <!-- #ifdef VUE3 -->
  11. <jp-signature-popup v-model:value="image" required />
  12. <view>{{image}}</view>
  13. <view class="but" @click="toPop1">自定义样式,弹框调用</view>
  14. <jp-signature-popup ref="signature1" popup v-model:value="image2" />
  15. <image :src="image2" style="width: 200px;" mode="widthFix"></image>
  16. <!-- #endif -->
  17. {{image2}}
  18. <view>下面是使用 jp-signature-popup 结合 jp-merge 在文档上签字</view>
  19. <view style="text-align: center;padding-bottom: 150px;">
  20. <image :src="image4" v-if="image4" style="width: 350px;height: 350px;border: 1px solid #ccc;"></image>
  21. <image src="../../static/sqs.jpg" v-else style="width: 350px;height: 350px;border: 1px solid #ccc;"></image>
  22. <view class="but" style="margin: 0 25px;" @click="toPop2">我要在上面签字</view>
  23. <jp-signature-popup ref="signature2" @change="setImg" popup v-model:value="image3" />
  24. <jp-merge bgImage="../../static/sqs.jpg" ref="jpMerge"></jp-merge>
  25. </view>
  26. </view>
  27. </template>
  28. <!-- 有项目需要开发的请联系 扣 - 371524845 -->
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. image:'',
  34. image2:'',
  35. image3:'',
  36. image4:''
  37. }
  38. },
  39. methods: {
  40. setImg(val){
  41. if(val){
  42. this.$refs.jpMerge.exportPost(val).then(res => {
  43. this.image4 = res
  44. })
  45. }
  46. },
  47. toPop1(){
  48. this.$refs.signature1.toPop()
  49. },
  50. toPop2(){
  51. this.$refs.signature2.toPop()
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="scss">
  57. .but{
  58. margin: 25px;
  59. line-height: 40px;
  60. text-align: center;
  61. background-color: #55aaff;
  62. color: #fff;
  63. }
  64. .sssv{
  65. height: 1150px;
  66. }
  67. </style>