war408705279 / vulcan Goto Github PK
View Code? Open in Web Editor NEWminiprogram based on remaxjs, live long and prosper
License: MIT License
miniprogram based on remaxjs, live long and prosper
License: MIT License
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
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.