上传代码

This commit is contained in:
2025-08-18 14:20:34 +08:00
commit 527fd07910
2408 changed files with 427370 additions and 0 deletions

View File

@ -0,0 +1,2 @@
/* 添加你的样式 */

View File

@ -0,0 +1 @@
<view a:if="{{a}}" class="data-v-4c1535d3"><button class="data-v-4c1535d3" onTap="{{c}}">{{b}}</button></view>

View File

@ -0,0 +1,41 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
__name: "testsix",
setup(__props) {
const showButton = common_vendor.ref(true);
const countdownTime = common_vendor.ref(10);
const countdownText = common_vendor.computed(() => {
const minutes = Math.floor(countdownTime.value / 60).toString().padStart(2, "0");
const seconds = (countdownTime.value % 60).toString().padStart(2, "0");
return `点击我 (${minutes}:${seconds})`;
});
let intervalId;
common_vendor.onMounted(() => {
intervalId = setInterval(() => {
if (countdownTime.value > 0) {
countdownTime.value--;
} else {
clearInterval(intervalId);
showButton.value = false;
}
}, 1e3);
});
common_vendor.onUnmounted(() => {
clearInterval(intervalId);
});
const handleClick = () => {
alert("按钮被点击了!");
};
return (_ctx, _cache) => {
return common_vendor.e({
a: showButton.value
}, showButton.value ? {
b: common_vendor.t(countdownText.value),
c: common_vendor.o(handleClick)
} : {});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-4c1535d3"]]);
my.createPage(MiniProgramPage);

View File

@ -0,0 +1,4 @@
{
"defaultTitle": "测试页面6",
"usingComponents": {}
}