1.0.0 • Published 6 years ago
uni-app-diy v1.0.0
uni-app-diy
Project setup
yarn installCompiles and hot-reloads for development
yarn run serveCompiles and minifies for production
yarn run buildRun your tests
yarn run testLints and fixes files
yarn run lintCustomize configuration
条件编译是用特殊的注释作为标记,在编译时根据这些特殊的注释,将注释里面的代码编译到不同平台。
写法:以 #ifdef 或 #ifndef 加 %PLATFORM% 开头,以 #endif 结尾。
#ifdef:if defined 仅在某平台存在 #ifndef:if not defined 除了某平台均存在 %PLATFORM%:平台名称(APP-PLUS || H5)
样式的条件编译 / #ifdef %PLATFORM% / 平台特有样式 / #endif /
API 的条件编译 // #ifdef %PLATFORM% 平台特有的API实现 // #endif
1.0.0
6 years ago