<>WXS modular

var foo = "'hello world' from comm.wxs"; var bar = function(d) { return d; }
module.exports = { foo: foo, bar: bar }; module.exports.msg = "some msg";
var tools = require("./tools.wxs"); console.log(tools.FOO); console.log(tools.
bar("logic.wxs")); console.log(tools.msg);
//<wxs src="./../logic.wxs" module="tools" /> <wxs src="./../tools.wxs" module=
"tools" /> <view> {{tools.msg}} </view> <view> {{tools.bar(tools.FOO)}} </view>
Use on a single page
<wxs module="foo"> var some_msg = "hello world"; module.exports = { msg :
some_msg, } </wxs> <view> {{foo.msg}} </view>

©2019-2020 Toolsou All rights reserved,
The 11th Blue Bridge Cup python The real topic of the University Group National Games JavaSwing To achieve a simple Lianliankan games 【Spring Source code analysis 】42-@Conditional Detailed explanation element-ui Step on pit record 2019PHP Interview questions ( Continuously updated )PHPJava Misunderstanding —— Method overloading is a manifestation of polymorphism ? First issue 500 100 million , Set up a new Department , What is Tencent going to do ? Google chrome The browser can't open the web page , But what if other browsers can open it ? Regression of dependent variable order categories (R language )【Golang Basic series 10 】Go language On conditional sentences if