WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2024-03-13 d3150a80d35603d2d493be0df543930eb06d249a
forms/userSignature/CSignatureLayer.vue
@@ -8,7 +8,7 @@
        class="c-signature-layer"
        title="手写板 / 请书写签名"
        :isOpened="layerOpened"
        :onClose="evt => null"
        :onClose="evt => handleClose()"
    >
        <view class="c-signature-layer-draw">
            <view class="size-box-top"></view>
@@ -85,14 +85,21 @@
            this._initDraw();
            this.layerOpened = true;
            this._callback = callback;
            this.handleRestDraw();
            setTimeout(() => {
                this.handleRestDraw();
            }, 10);
        },
        handleRestDraw() {
            this.firstTouch = true;
            this.curLine = [];
            this.chirography = [];
            this.canvasContext.clearRect(0, 0, this.cavWidth, this.cavHeight);
            this.canvasContext.setFillStyle('#ffffff');
            this.canvasContext.fillRect(0, 0, this.cavWidth, this.cavHeight);
            this.canvasContext.draw();
        },
        handleClose() {
            this.layerOpened = false;
        },
        handleWriteStart(evt) {
            if (evt.type != 'touchstart') {
@@ -291,7 +298,7 @@
                        point[1].r,
                        point[2].x,
                        point[2].y,
                        point[2].r
                        point[2].r,
                    );
                    this._bethelDraw(a, true);
                    point = [{ x: x, y: y, r: r }];
@@ -388,7 +395,7 @@
                    point[i].c2x,
                    point[i].c2y,
                    point[i].ex,
                    point[i].ey
                    point[i].ey,
                );
            }
            ctx.stroke();