PageJs

  • 页面 js 文件编译处理

使用示例

  1. PageJs (node,store) {
  2. // Process pagejs
  3. }

编译结果示例

  • 编译前
  1. Page({
  2. open: function(){
  3. wx.showActionSheet({
  4. itemList: ['A', 'B', 'C'],
  5. success: function(res) {
  6. if (!res.cancel) {
  7. console.log(res.tapIndex)
  8. }
  9. }
  10. });
  11. }
  12. })
  • 编译后
  1. const _Page = require("../../../../__antmove/component/componentClass.js")("Page");
  2. const _my = require("../../../../__antmove/api/index.js")(my);
  3. _Page({
  4. open: function () {
  5. _my.showActionSheet({
  6. itemList: ["A", "B", "C"],
  7. success: function (res) {
  8. if (!res.cancel) {
  9. console.log(res.tapIndex);
  10. }
  11. }
  12. });
  13. }
  14. })