You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
2.0 KiB
44 lines
2.0 KiB
|
3 weeks ago
|
<view id="canvas-bill-body-mp" class="canvas-box" style="height: {{ height }}rpx; width: {{ width }}rpx;">
|
||
|
|
<view
|
||
|
|
data-type="{{bgImg ? 'background-image' : 'text'}}"
|
||
|
|
style="height: {{ height }}rpx; width: {{ width }}rpx;background-image: url({{bgImg}})"
|
||
|
|
class="canvas-body draw_canvas"
|
||
|
|
>
|
||
|
|
<view wx:for="{{elementsMp}}" wx:key="index" wx:for-item="item">
|
||
|
|
<image
|
||
|
|
class="draw_canvas"
|
||
|
|
data-type="{{item.shape === 'circle' ? 'radius-image' : 'image'}}"
|
||
|
|
data-url="{{item.src}}"
|
||
|
|
style="height: {{ item.height }}rpx; width: {{ item.width? item.width + 'rpx' : 'auto'}};left: {{item.left}}rpx;right: {{item.right}}rpx;top: {{item.top}}rpx;{{item.shape === 'circle'?'border-radius:50%;':''}}"
|
||
|
|
src="{{item.src}}"
|
||
|
|
wx:if="{{item.type === 0}}"
|
||
|
|
data-delay="{{item.delay}}"
|
||
|
|
></image>
|
||
|
|
<view
|
||
|
|
class="draw_canvas {{item['single-line'] ? 'lineOne' : ''}} {{item['halign'] === 'center' ? 'textCenter' : ''}} {{item['halign'] === 'right' ? 'textRight' : ''}}"
|
||
|
|
wx:if="{{item.type === 1}}"
|
||
|
|
data-background="{{item.bgcolor}}"
|
||
|
|
style="font-style: {{item['font-style']}};font-weight: {{item['font-weight']}};background-color: {{item.bgcolor}};color: {{item.color}};font-size: {{item['font-size']}}rpx;font-family: {{item.font}};height: {{ item.height }}rpx; width: {{ item.width? item.width + 'rpx' : 'auto'}};left: {{item.left}}rpx;right: {{item.right}}rpx;top: {{item.top}}rpx;line-height:{{item.lineHeight}}rpx;"
|
||
|
|
data-type="text"
|
||
|
|
data-text="{{item.text}}"
|
||
|
|
>
|
||
|
|
{{item.text}}
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<canvas
|
||
|
|
canvas-id="canvas1"
|
||
|
|
class="canvas-bill"
|
||
|
|
style="height: {{ height }}rpx; width: {{ width }}rpx;transform: scale({{scale}})"
|
||
|
|
></canvas>
|
||
|
|
|
||
|
|
<!-- <image -->
|
||
|
|
<!-- wx:if="{{imgUrl}}" -->
|
||
|
|
<!-- src="{{imgUrl}}" -->
|
||
|
|
<!-- mode="aspectFit" -->
|
||
|
|
<!-- style="height: {{ height }}rpx; width: {{ width }}rpx;" -->
|
||
|
|
<!-- show-menu-by-longpress -->
|
||
|
|
<!-- ></image> -->
|