提交 e3853192 编写于 作者: Q qiang

Merge branch 'dev' of github.com:dcloudio/uni-app into dev

module.exports = {
input: 'packages/uni-stat/src/index.js',
output: {
file: 'packages/uni-stat/dist/index.js',
format: 'es'
},
external: ['vue', '@dcloudio/uni-stat/package.json'],
plugins: []
}
......@@ -16,6 +16,7 @@
"build:mp-alipay": "cross-env UNI_PLATFORM=mp-alipay rollup -c build/rollup.config.mp.js",
"build:mp-toutiao": "cross-env UNI_PLATFORM=mp-toutiao rollup -c build/rollup.config.mp.js",
"build:runtime": "npm run lint && npm run build:mp-weixin && npm run build:mp-qq && npm run build:mp-alipay && npm run build:mp-baidu && npm run build:mp-toutiao && npm run build:app-plus",
"build:stat": "npm run lint && rollup -c build/rollup.config.stat.js",
"test:unit": "cross-env NODE_ENV=test UNI_PLATFORM=h5 mocha-webpack --require tests/unit/setup.js --webpack-config build/webpack.config.test.js tests/unit/**/*.spec.js",
"release": "npm run lint:cli && lerna publish --force-publish=*",
"release:alpha": "npm run lint:cli && lerna publish --force-publish=* --npm-tag=alpha"
......
......@@ -356,8 +356,6 @@ const todos = [
'getRecorderManager',
'getBackgroundAudioManager',
'createInnerAudioContext',
'chooseVideo',
'saveVideoToPhotosAlbum',
'createVideoContext',
'createCameraContext',
'createLivePlayerContext',
......@@ -366,12 +364,7 @@ const todos = [
'startAccelerometer',
'startCompass',
'addPhoneContact',
'setBackgroundColor',
'setBackgroundTextStyle',
'createIntersectionObserver',
'authorize',
'openSetting',
'getSetting',
'chooseAddress',
'chooseInvoiceTitle',
'addTemplate',
......@@ -380,12 +373,12 @@ const todos = [
'getTemplateLibraryList',
'getTemplateList',
'sendTemplateMessage',
'getUpdateManager',
'setEnableDebug',
'getExtConfig',
'getExtConfigSync',
'onWindowResize',
'offWindowResize'
'offWindowResize',
'saveVideoToPhotosAlbum'
];
// 存在兼容性的 API 列表
......@@ -398,7 +391,13 @@ const canIUses = [
'setTabBarBadge',
'removeTabBarBadge',
'showTabBarRedDot',
'hideTabBarRedDot'
'hideTabBarRedDot',
'openSetting',
'getSetting',
'createIntersectionObserver',
'getUpdateManager',
'setBackgroundColor',
'setBackgroundTextStyle'
];
function _handleNetworkInfo (result) {
......@@ -551,6 +550,12 @@ const protocols = { // 需要做转换的 API 列表
returnValue: {
apFilePath: 'tempFilePath'
}
},
chooseVideo: {
// 支付宝小程序文档中未找到(仅在getSetting处提及),但实际可用
returnValue: {
apFilePath: 'tempFilePath'
}
},
connectSocket: {
args: {
......@@ -686,6 +691,18 @@ const protocols = { // 需要做转换的 API 列表
item.uuid = item.serviceId;
});
}
},
createBLEConnection: {
name: 'connectBLEDevice',
args: {
timeout: false
}
},
closeBLEConnection: {
name: 'disconnectBLEDevice'
},
onBLEConnectionStateChange: {
name: 'onBLEConnectionStateChanged'
},
makePhoneCall: {
args: {
......@@ -717,6 +734,9 @@ const protocols = { // 需要做转换的 API 列表
returnValue: {
brightness: 'value'
}
},
showShareMenu: {
name: 'showSharePanel'
}
};
......@@ -936,7 +956,9 @@ function createExecCallback (execCallback) {
callback(res[index]);
});
});
execCallback(res);
if (isFn(execCallback)) {
execCallback(res);
}
}
}
......
{
"name": "@dcloudio/uni-mp-alipay",
"version": "1.0.0-alpha-22120190814002",
"version": "0.0.827",
"description": "uni-app mp-alipay",
"main": "dist/index.js",
"scripts": {
......
......@@ -388,18 +388,9 @@ const protocols = {
previewImage
};
const todos = [
'connectSocket',
'onSocketOpen',
'onSocketError',
'sendSocketMessage',
'onSocketMessage',
'closeSocket',
'onSocketClose',
'createLivePlayerContext',
'createLivePusherContext',
'loadFontFace',
'openDocument',
'canIUse',
'onMemoryWarning',
'onNetworkStatusChange',
'startBeaconDiscovery',
......@@ -426,8 +417,6 @@ const todos = [
'getExtConfig',
'getExtConfigSync',
'getPhoneNumber',
'updateShareMenu',
'getShareInfo',
'chooseAddress',
'addCard',
'openCard',
......@@ -454,7 +443,17 @@ const canIUses = [
'onUserCaptureScreen',
'vibrateLong',
'vibrateShort',
'createWorker'
'createWorker',
'connectSocket',
'onSocketOpen',
'onSocketError',
'sendSocketMessage',
'onSocketMessage',
'closeSocket',
'onSocketClose',
'openDocument',
'updateShareMenu',
'getShareInfo'
];
const CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
......
{
"name": "@dcloudio/uni-mp-qq",
"version": "1.0.0-alpha-22120190814002",
"version": "0.0.111",
"description": "uni-app mp-qq",
"main": "dist/index.js",
"scripts": {
......
......@@ -386,22 +386,10 @@ var previewImage = {
// 不支持的 API 列表
const todos = [
'hideKeyboard',
'onSocketOpen',
'onSocketError',
'sendSocketMessage',
'onSocketMessage',
'closeSocket',
'onSocketClose',
'getImageInfo',
'getBackgroundAudioManager',
'createVideoContext',
'createCameraContext',
'createLivePlayerContext',
'getSavedFileList',
'getSavedFileInfo',
'removeSavedFile',
'getFileInfo',
'openDocument',
'chooseLocation',
'createMapContext',
......@@ -450,7 +438,6 @@ const todos = [
'hideTabBarRedDot',
'setBackgroundColor',
'setBackgroundTextStyle',
'createIntersectionObserver',
'chooseInvoiceTitle',
'navigateToMiniProgram',
'navigateBackMiniProgram',
......@@ -461,14 +448,30 @@ const todos = [
'getTemplateList',
'sendTemplateMessage',
'setEnableDebug',
'getExtConfig',
'getExtConfigSync',
'onWindowResize',
'offWindowResize'
'offWindowResize',
'compressImage',
'createOffscreenCanvas'
];
// 存在兼容性的 API 列表
const canIUses = [];
// 头条小程序不支持canIUses
const canIUses = [
// 'createIntersectionObserver',
// 'getSavedFileList',
// 'removeSavedFile',
// 'hideKeyboard',
// 'getImageInfo',
// 'createVideoContext',
// 'onSocketOpen',
// 'onSocketError',
// 'sendSocketMessage',
// 'onSocketMessage',
// 'closeSocket',
// 'onSocketClose',
// 'getExtConfig',
// 'getExtConfigSync',
];
// 需要做转换的 API 列表
const protocols = {
......@@ -485,7 +488,7 @@ const protocols = {
},
chooseVideo: {
args: {
maxDuration: false
camera: false
}
},
scanCode: {
......@@ -534,7 +537,14 @@ const protocols = {
}
},
requestPayment: {
orderInfo: 'data'
args: {
orderInfo: 'data'
}
},
getFileInfo: {
args: {
digestAlgorithm: false
}
}
};
......
{
"name": "@dcloudio/uni-mp-toutiao",
"version": "1.0.0-alpha-22120190814002",
"version": "0.0.351",
"description": "uni-app mp-toutiao",
"main": "dist/index.js",
"scripts": {
......
此差异已折叠。
import {
version
} from '../package.json'
} from '@dcloudio/uni-stat/package.json'
export const STAT_VERSION = version
export const STAT_URL = 'https://tongji.dcloud.net.cn/uni/stat'
export const STAT_H5_URL = 'https://tongji.dcloud.net.cn/uni/stat.gif'
......
......@@ -210,7 +210,8 @@ module.exports = function (entry) {
extensions: ['.js', '.nvue', '.vue', '.json'],
alias: {
'@': process.env.UNI_INPUT_DIR,
'uni-pages': path.resolve(process.env.UNI_INPUT_DIR, 'pages.json'),
'uni-pages': path.resolve(process.env.UNI_INPUT_DIR, 'pages.json'),
'@dcloudio/uni-stat': require.resolve('@dcloudio/uni-stat'),
'uni-stat-config': path.resolve(process.env.UNI_INPUT_DIR, 'pages.json') +
'?' +
JSON.stringify({
......
{
"name": "@dcloudio/vue-cli-plugin-hbuilderx",
"version": "1.0.0-alpha-22120190814002",
"version": "1.0.135",
"description": "HBuilderX plugin for vue-cli 3",
"main": "index.js",
"scripts": {
......
module.exports = (api, options, rootOptions) => {
let version = '^1.0.0-22220190816001'
let version = '*'
if (require('./package.json').version.indexOf('alpha') !== -1) {
version = '^1.0.0-alpha-22120190814001'
}
......
......@@ -261,6 +261,7 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
'@': path.resolve(process.env.UNI_INPUT_DIR),
'vue$': getPlatformVue(),
'uni-pages': path.resolve(process.env.UNI_INPUT_DIR, 'pages.json'),
'@dcloudio/uni-stat': require.resolve('@dcloudio/uni-stat'),
'uni-stat-config': path.resolve(process.env.UNI_INPUT_DIR, 'pages.json') +
'?' +
JSON.stringify({
......
......@@ -70,13 +70,13 @@ const uniStatistics = Object.assign(
platformOptions.uniStatistics || {}
)
if (uniStatistics.enable === true) {
if (uniStatistics.enable !== false) {
if (process.UNI_STAT_CONFIG.appid) {
process.env.UNI_USING_STAT = true
} else {
// console.log()
// console.warn(``)
// console.log()
console.log()
console.warn(`当前应用未配置Appid,无法使用uni统计,详情参考:https://ask.dcloud.net.cn/article/36303`)
console.log()
}
}
......@@ -154,13 +154,15 @@ if (platformOptions.usingComponents === true) {
}
}
if (process.env.UNI_USING_COMPONENTS && isSupportSubPackages()) { // 是否启用分包优化
if (
platformOptions.optimization &&
platformOptions.optimization.subPackages &&
Object.keys(process.UNI_SUBPACKAGES).length
) {
process.env.UNI_OPT_SUBPACKAGES = true
if (process.env.UNI_USING_COMPONENTS) { // 是否启用分包优化
if (platformOptions.optimization) {
if (
isSupportSubPackages() &&
platformOptions.optimization.subPackages &&
Object.keys(process.UNI_SUBPACKAGES).length
) {
process.env.UNI_OPT_SUBPACKAGES = true
}
}
}
......
{
"name": "@dcloudio/vue-cli-plugin-uni",
"version": "1.0.0-alpha-22120190814002",
"version": "0.9.524",
"description": "uni-app plugin for vue-cli 3",
"main": "index.js",
"scripts": {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册