greenPro/unpackage/dist/dev/mp-weixin/pages/component/text/text.js

67 lines
2.2 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";
const common_vendor = require("../../../common/vendor.js");
const _sfc_main = {
data() {
return {
title: "text",
texts: [
"HBuilder400万开发者选择的IDE",
"MUI轻巧、漂亮的前端开源框架",
"wap2appM站快速转换原生体验的App",
"5+Runtime为HTML5插上原生的翅膀",
"HBuilderX轻巧、极速极客编辑器",
"uni-app终极跨平台方案",
"HBuilder400万开发者选择的IDE",
"MUI轻巧、漂亮的前端开源框架",
"wap2appM站快速转换原生体验的App",
"5+Runtime为HTML5插上原生的翅膀",
"HBuilderX轻巧、极速极客编辑器",
"uni-app终极跨平台方案",
"......"
],
text: "",
canAdd: true,
canRemove: false,
extraLine: []
};
},
methods: {
add: function(e) {
this.extraLine.push(this.texts[this.extraLine.length % 12]);
this.text = this.extraLine.join("\n");
this.canAdd = this.extraLine.length < 12;
this.canRemove = this.extraLine.length > 0;
},
remove: function(e) {
if (this.extraLine.length > 0) {
this.extraLine.pop();
this.text = this.extraLine.join("\n");
this.canAdd = this.extraLine.length < 12;
this.canRemove = this.extraLine.length > 0;
}
}
}
};
if (!Array) {
const _easycom_page_head2 = common_vendor.resolveComponent("page-head");
_easycom_page_head2();
}
const _easycom_page_head = () => "../../../components/page-head/page-head.js";
if (!Math) {
_easycom_page_head();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.p({
title: $data.title
}),
b: common_vendor.t($data.text),
c: !$data.canAdd,
d: common_vendor.o((...args) => $options.add && $options.add(...args)),
e: !$data.canRemove,
f: common_vendor.o((...args) => $options.remove && $options.remove(...args))
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/xianyu/app/greenPro/pages/component/text/text.vue"]]);
wx.createPage(MiniProgramPage);