index.wxml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <view class="page">
  2. <view class="page__hd">
  3. <view class="page__title">Qrcode</view>
  4. <view class="page__desc">二维码</view>
  5. </view>
  6. <view class="page__bd">
  7. <view class="sub-title">请输入文字,即时输入即时生成</view>
  8. <wux-cell-group>
  9. <wux-cell hover-class="none">
  10. <wux-textarea hasCount rows="3" placeholder="支持文本、网址和电子邮箱" maxlength="300" value="{{ value }}" controlled bind:change="onChange" />
  11. </wux-cell>
  12. </wux-cell-group>
  13. <wux-cell-group title="留白">
  14. <wux-cell hover-class="none">
  15. <wux-slider value="{{ [whiteSpace] }}" controlled showValue showMark step="10" min="0" max="20" bind:change="onSliderChange" />
  16. </wux-cell>
  17. </wux-cell-group>
  18. <view class="sub-title">提示:支持在微信中长按识别;同时,也支持点击图片进入保存页面长按图片可以保存</view>
  19. <view class="qrcode">
  20. <wux-qrcode
  21. id="qrcode"
  22. data="{{ value }}"
  23. fg-color="{{ fgColor }}"
  24. width="200"
  25. height="200"
  26. whiteSpace="{{ whiteSpace }}"
  27. showMenuByLongpress
  28. qrcodeStatus="{{ qrcodeStatus }}"
  29. bind:load="QRCodeLoad"
  30. bind:error="QRCodeError"
  31. bind:click="previewImage"
  32. bind:refresh="onRefresh"
  33. />
  34. <wux-button block type="light" bind:click="downloadQRCode">保存图片到系统相册</wux-button>
  35. </view>
  36. </view>
  37. </view>