Tag:Wechat applet replacement method

  • How to replace indexof (recommended)


    Method: define indexof method through WXS, reference and use in page Chestnut: WXS: named str.wxs , the defineindexof method of the export definition, named indexof function defineIndexOf(str, val) { return str.indexOf(val); } module.exports = { indexOf: defineIndexOf } wxml: quote str.wxs , and name the module toolstr. In the following loop, you need to use […]