123456789101112131415161718192021222324252627282930313233343536373839404142 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const _sfc_main = {
- data() {
- return {
- searchText: "",
- results: []
- };
- },
- methods: {
- onSearch() {
- if (this.searchText) {
- this.results = [
- { id: 1, title: "示例课程A", desc: "课程描述A" },
- { id: 2, title: "示例课程B", desc: "课程描述B" }
- ];
- } else {
- this.results = [];
- }
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return common_vendor.e({
- a: common_vendor.o((...args) => $options.onSearch && $options.onSearch(...args)),
- b: $data.searchText,
- c: common_vendor.o(($event) => $data.searchText = $event.detail.value),
- d: common_vendor.o((...args) => $options.onSearch && $options.onSearch(...args)),
- e: $data.results.length
- }, $data.results.length ? {
- f: common_vendor.f($data.results, (item, k0, i0) => {
- return {
- a: common_vendor.t(item.title),
- b: common_vendor.t(item.desc),
- c: item.id
- };
- })
- } : {});
- }
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2dab939d"]]);
- wx.createPage(MiniProgramPage);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/search/index.js.map
|