货无忧
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.0 KiB

2 years ago
"use strict";
const common_vendor = require("../../common/vendor.js");
1 year ago
const _sfc_main = {
data() {
return {
arrs: [{
age: "13",
name: "小绿",
sex: "男"
}, {
age: "10",
name: "小王",
sex: "女"
}],
htmls: "<strong>Hello, {{name}}{{age}}{{sex}}!</strong>",
html: "",
// keys:[],
names: ["Alice", "Bob", "Charlie"]
// 后端返回的数组
2 years ago
};
1 year ago
},
mounted() {
this.arrs.map((item) => {
let strhtml = JSON.parse(JSON.stringify(this.htmls));
for (let key in item) {
strhtml = strhtml.replace(`{{${key}}}`, item[key]);
}
console.log(strhtml);
this.html += strhtml;
});
2 years ago
}
1 year ago
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $data.html
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/物流/logPm/pages/news/news.vue"]]);
2 years ago
wx.createPage(MiniProgramPage);