43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const _sfc_main = {
|
|
__name: "index_step4",
|
|
setup(__props) {
|
|
const canvasWidth = common_vendor.ref(200);
|
|
const canvasHeight = common_vendor.ref(200);
|
|
const instance = common_vendor.getCurrentInstance();
|
|
function draw() {
|
|
const ctx = common_vendor.index.createCanvasContext("canvas", instance);
|
|
common_vendor.index.__f__("log", "at pages/index/index_step4.vue:20", ctx, "12");
|
|
ctx.beginPath();
|
|
ctx.arc(100, 100, 80, 0, Math.PI * 2);
|
|
ctx.setFillStyle("rgba(100, 220, 0, 1)");
|
|
ctx.fill();
|
|
ctx.beginPath();
|
|
ctx.arc(100, 100, 75, 0, Math.PI * 2);
|
|
ctx.setFillStyle("white");
|
|
ctx.fill();
|
|
ctx.draw();
|
|
}
|
|
const handleDraw = () => {
|
|
common_vendor.index.navigateTo({
|
|
url: "/pages/index/step2"
|
|
});
|
|
draw();
|
|
};
|
|
common_vendor.onMounted(() => {
|
|
draw();
|
|
});
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: canvasWidth.value,
|
|
b: canvasHeight.value,
|
|
c: common_vendor.o(handleDraw)
|
|
};
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7e4ca425"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index_step4.js.map
|