Code Monkey home page Code Monkey logo

vulcan's Introduction

芸芸众生.

无数.

渺小平凡的.

存在啊.

Github Status.

Zhazha_JiaYiZhen's Github Status

Top Languages.

Zhazha_JiaYiZhen's Top Languages

Profile Views.

Zhazha_JiaYiZhen's Profile Views

vulcan's People

Contributors

dependabot[bot] avatar war408705279 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vulcan's Issues

remax 版本升级可能带来的 my is not defined 抛错问题

remax 版本升级可能带来的 my is not defined 抛错问题

参考 官方 commit

官方把支付宝 API 从微信端移除了

例如代码的编译目标平台为 wechat,那么编译过后的代码将不会包含支付宝 API 相关定义

如果代码中类似下面的实现

// some-folder/index.ts
import * as ali from 'remax/ali'
import * as wechat from 'remax/wechat'

function someFunc() {
  if (isAli) {
    // 支付宝相关的实现
    ali.xxx
  }

  // 微信相关的实现
  wechat.xxx
}

那么在编译完成后就会出现 my is not defined 的抛错

建议改成

// 其他地方引用方式不变

// some-folder/index.ts
import * as wechat from 'remax/wechat'

function someFunc() {
  // 微信相关的实现
  wechat.xxx
}

// some-folder/index.ali.ts
import * as ali from 'remax/ali'

function someFunc() {
  // 支付宝相关的实现
  ali.xxx
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.