Skip to content

Commit

Permalink
Merge commit '76bf1f05dd6ae4d88db0427a2d958e78c4cc78cd'
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/api/ui/tabbar.md
#	docs/collocation/pages.md
  • Loading branch information
zhetengbiji committed Oct 24, 2019
2 parents 85a9643 + 76bf1f0 commit 8cbd3eb
Show file tree
Hide file tree
Showing 97 changed files with 2,951 additions and 1,779 deletions.
4 changes: 2 additions & 2 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ service.run('build', {
formats: process.env.UNI_WATCH === 'true' ? 'umd' : 'umd-min',
entry
}).then(function () {
if (process.env.UNI_UI !== 'true') {
if (process.env.UNI_WATCH !== 'true' && process.env.UNI_UI !== 'true') {
generateApiManifest(
JSON.parse(JSON.stringify(process.UNI_SERVICE_API_MANIFEST)),
JSON.parse(JSON.stringify(process.UNI_SERVICE_API_PROTOCOL))
Expand Down Expand Up @@ -70,4 +70,4 @@ if (process.env.UNI_WATCH === 'false') {
.catch(err => {
throw err
})
}
}
3 changes: 2 additions & 1 deletion build/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
transpileDependencies: [],
productionSourceMap: false,
configureWebpack: webpackConfig,
parallel: process.env.UNI_PLATFORM !== 'h5' || process.env.UNI_WATCH !== 'false' || process.env.UNI_UI === 'true',
chainWebpack: config => {
config.devtool('source-map')

Expand All @@ -40,4 +41,4 @@ module.exports = {
css: {
extract: true
}
}
}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"message": "chore(release): publish %s"
}
},
"version": "2.0.0-23320190923002"
"version": "2.0.0-alpha-23620191020004"
}
5 changes: 3 additions & 2 deletions lib/apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const device = [
]

const keyboard = [
'hideKeyboard',
'hideKeyboard',
'onKeyboardHeightChange'
]

Expand All @@ -138,6 +138,7 @@ const ui = [
'removeTabBarBadge',
'showTabBarRedDot',
'hideTabBarRedDot',
'onTabBarMidButtonTap',
'setBackgroundColor',
'setBackgroundTextStyle',
'createAnimation',
Expand Down Expand Up @@ -209,4 +210,4 @@ const apis = [
...third
]

module.exports = apis
module.exports = apis
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = function genRequireCode (baseDirname, modules) {

const moduleAbsolutePath = Path.resolve(baseDirname, file).replace(/\\/g, '/')
importCode += genImportCode(moduleName, moduleAbsolutePath)
moduleProps += genPropsCode(file, moduleName)
moduleProps += genPropsCode(file.replace(/\\/g, '/'), moduleName)
})
const requireFnCode = (`
(function() {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"wx": true,
"my": true,
"swan": true,
"tt": true,
"weex": true,
"__id__": true,
"__uniConfig": true,
Expand Down
7 changes: 5 additions & 2 deletions packages/uni-app-plus-nvue/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5984,7 +5984,8 @@ var serviceContext = (function () {
data,
header,
method = 'GET',
responseType
responseType,
sslVerify = true
} = {}) {
const stream = requireNativePlugin('stream');
const headers = {};
Expand Down Expand Up @@ -6024,7 +6025,9 @@ var serviceContext = (function () {
headers,
type: responseType === 'arraybuffer' ? 'base64' : 'text',
// weex 官方文档未说明实际支持 timeout,单位:ms
timeout: timeout || 6e5
timeout: timeout || 6e5,
// 配置和weex模块内相反
sslVerify: !sslVerify
};
if (method !== 'GET') {
options.body = data;
Expand Down
4 changes: 2 additions & 2 deletions packages/uni-app-plus-nvue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dcloudio/uni-app-plus-nvue",
"version": "2.0.0-23320190923002",
"version": "2.0.0-alpha-23620191020004",
"description": "uni-app app-plus-nvue",
"main": "dist/index.js",
"repository": {
Expand All @@ -13,5 +13,5 @@
},
"author": "fxy060608",
"license": "Apache-2.0",
"gitHead": "10184426b19cb76e01c93fb25c982c72887557e8"
"gitHead": "5064652ab5aa907aedf637f163815660ecb8cfd9"
}
34 changes: 22 additions & 12 deletions packages/uni-app-plus/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ function wrapper (methodName, method) {
const todoApis = Object.create(null);

const TODOS = [
'onTabBarMidButtonTap',
'subscribePush',
'unsubscribePush',
'onPush',
Expand Down Expand Up @@ -498,6 +499,15 @@ var eventApi = /*#__PURE__*/Object.freeze({
$emit: $emit
});

function requireNativePlugin (pluginName) {
/* eslint-disable no-undef */
if (typeof weex !== 'undefined') {
return weex.requireModule(pluginName)
}
/* eslint-disable no-undef */
return __requireNativePlugin__(pluginName)
}

function wrapper$1 (webview) {
webview.$processed = true;

Expand All @@ -519,8 +529,15 @@ function wrapper$1 (webview) {
return
}
const maskColor = webview.__uniapp_mask;
let maskWebview = plus.webview.getWebviewById(webview.__uniapp_mask_id);
maskWebview = maskWebview.parent() || maskWebview;// 再次检测父
let maskWebview = webview.__uniapp_mask_id === '0' ? {
setStyle ({
mask
}) {
requireNativePlugin('uni-tabview').setMask({
color: mask
});
}
} : plus.webview.getWebviewById(webview.__uniapp_mask_id);
const oldShow = webview.show;
const oldHide = webview.hide;
const oldClose = webview.close;
Expand Down Expand Up @@ -558,18 +575,11 @@ function getSubNVueById (id) {
return webview
}

function requireNativePlugin (pluginName) {
/* eslint-disable no-undef */
if (typeof weex !== 'undefined') {
return weex.requireModule(pluginName)
}
/* eslint-disable no-undef */
return __requireNativePlugin__(pluginName)
}


var api = /*#__PURE__*/Object.freeze({
requireNativePlugin: requireNativePlugin,
getSubNVueById: getSubNVueById
getSubNVueById: getSubNVueById,
requireNativePlugin: requireNativePlugin
});

const MPPage = Page;
Expand Down
4 changes: 2 additions & 2 deletions packages/uni-app-plus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dcloudio/uni-app-plus",
"version": "2.0.0-23320190923002",
"version": "2.0.0-alpha-23620191020004",
"description": "uni-app app-plus",
"main": "dist/index.js",
"repository": {
Expand All @@ -13,5 +13,5 @@
},
"author": "fxy060608",
"license": "Apache-2.0",
"gitHead": "10184426b19cb76e01c93fb25c982c72887557e8"
"gitHead": "5064652ab5aa907aedf637f163815660ecb8cfd9"
}
23 changes: 18 additions & 5 deletions packages/uni-cli-shared/lib/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,38 @@ function getChangedJsonFileMap (clear = true) {
}

function updateAppJson (name, jsonObj) {
updateComponentJson(name, jsonObj)
updateComponentJson(name, jsonObj, true, 'App')
}

function updatePageJson (name, jsonObj) {
pageSet.add(name)
updateComponentJson(name, jsonObj)
updateComponentJson(name, jsonObj, true, 'Page')
}

function updateProjectJson (name, jsonObj) {
updateComponentJson(name, jsonObj, false)
updateComponentJson(name, jsonObj, false, 'Project')
}

const supportGlobalUsingComponents = process.env.UNI_PLATFORM === 'mp-weixin' || process.env.UNI_PLATFORM === 'mp-qq'

function updateComponentJson (name, jsonObj, usingComponents = true) {
function updateComponentJson (name, jsonObj, usingComponents = true, type = 'Component') {
if (type === 'Component') {
jsonObj.component = true
}
if (type === 'Page') {
if (process.env.UNI_PLATFORM === 'mp-baidu') {
jsonObj.component = true
}
}

const oldJsonStr = getJsonFile(name)
if (oldJsonStr) { // update
if (usingComponents) { // merge usingComponents
jsonObj.usingComponents = JSON.parse(oldJsonStr).usingComponents || {}
const oldJsonObj = JSON.parse(oldJsonStr)
jsonObj.usingComponents = oldJsonObj.usingComponents || {}
if (oldJsonObj.usingGlobalComponents) { // 复制 global components(针对不支持全局 usingComponents 的平台)
jsonObj.usingGlobalComponents = oldJsonObj.usingGlobalComponents
}
}
const newJsonStr = JSON.stringify(jsonObj, null, 2)
if (newJsonStr !== oldJsonStr) {
Expand Down
5 changes: 4 additions & 1 deletion packages/uni-cli-shared/lib/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,10 @@ module.exports = {
getPlatformFilterTag () {
return platform.filterTag
},
getPlatformVue () {
getPlatformVue (vueOptions) {
if (process.env.UNI_PLATFORM === 'h5' && vueOptions && vueOptions.runtimeCompiler) {
return '@dcloudio/vue-cli-plugin-uni/packages/h5-vue/dist/vue.esm.js'
}
if (process.env.UNI_USING_COMPONENTS) {
return uniRuntime
}
Expand Down
4 changes: 2 additions & 2 deletions packages/uni-cli-shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dcloudio/uni-cli-shared",
"version": "2.0.0-23320190923002",
"version": "2.0.0-alpha-23620191020004",
"description": "uni-cli-shared",
"main": "lib/index.js",
"repository": {
Expand All @@ -20,5 +20,5 @@
"hash-sum": "^1.0.2",
"strip-json-comments": "^2.0.1"
},
"gitHead": "10184426b19cb76e01c93fb25c982c72887557e8"
"gitHead": "5064652ab5aa907aedf637f163815660ecb8cfd9"
}
4 changes: 2 additions & 2 deletions packages/uni-h5-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dcloudio/uni-h5-ui",
"version": "2.0.0-23320190923002",
"version": "2.0.0-alpha-23620191020004",
"description": "uni-app h5 ui",
"main": "dist/index.umd.min.js",
"repository": {
Expand All @@ -13,5 +13,5 @@
},
"author": "fxy060608",
"license": "Apache-2.0",
"gitHead": "10184426b19cb76e01c93fb25c982c72887557e8"
"gitHead": "5064652ab5aa907aedf637f163815660ecb8cfd9"
}
2 changes: 1 addition & 1 deletion packages/uni-h5/dist/index.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/uni-h5/dist/index.umd.min.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions packages/uni-h5/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,15 @@
]
]
],
"onTabBarMidButtonTap": [
"/core/service/api/ui/tab-bar.js",
[
[
"/platforms/h5/service/api/ui/tab-bar.js",
"setTabBarBadge"
]
]
],
"createAnimation": [
"/core/service/api/ui/create-animation.js",
[]
Expand Down
4 changes: 2 additions & 2 deletions packages/uni-h5/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dcloudio/uni-h5",
"version": "2.0.0-23320190923002",
"version": "2.0.0-alpha-23620191020004",
"description": "uni-app h5",
"main": "dist/index.umd.min.js",
"repository": {
Expand All @@ -18,5 +18,5 @@
"intersection-observer": "^0.7.0",
"safe-area-insets": "^1.4.1"
},
"gitHead": "10184426b19cb76e01c93fb25c982c72887557e8"
"gitHead": "5064652ab5aa907aedf637f163815660ecb8cfd9"
}
1 change: 1 addition & 0 deletions packages/uni-mp-alipay/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,7 @@ function wrapper (methodName, method) {
const todoApis = Object.create(null);

const TODOS = [
'onTabBarMidButtonTap',
'subscribePush',
'unsubscribePush',
'onPush',
Expand Down
4 changes: 2 additions & 2 deletions packages/uni-mp-alipay/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dcloudio/uni-mp-alipay",
"version": "2.0.0-23320190923002",
"version": "2.0.0-alpha-23620191020004",
"description": "uni-app mp-alipay",
"main": "dist/index.js",
"repository": {
Expand All @@ -13,5 +13,5 @@
},
"author": "fxy060608",
"license": "Apache-2.0",
"gitHead": "10184426b19cb76e01c93fb25c982c72887557e8"
"gitHead": "5064652ab5aa907aedf637f163815660ecb8cfd9"
}
1 change: 1 addition & 0 deletions packages/uni-mp-baidu/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ function wrapper (methodName, method) {
const todoApis = Object.create(null);

const TODOS = [
'onTabBarMidButtonTap',
'subscribePush',
'unsubscribePush',
'onPush',
Expand Down
4 changes: 2 additions & 2 deletions packages/uni-mp-baidu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dcloudio/uni-mp-baidu",
"version": "2.0.0-23320190923002",
"version": "2.0.0-alpha-23620191020004",
"description": "uni-app mp-baidu",
"main": "dist/index.js",
"repository": {
Expand All @@ -13,5 +13,5 @@
},
"author": "fxy060608",
"license": "Apache-2.0",
"gitHead": "10184426b19cb76e01c93fb25c982c72887557e8"
"gitHead": "5064652ab5aa907aedf637f163815660ecb8cfd9"
}
1 change: 1 addition & 0 deletions packages/uni-mp-qq/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ function wrapper (methodName, method) {
const todoApis = Object.create(null);

const TODOS = [
'onTabBarMidButtonTap',
'subscribePush',
'unsubscribePush',
'onPush',
Expand Down
4 changes: 2 additions & 2 deletions packages/uni-mp-qq/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dcloudio/uni-mp-qq",
"version": "2.0.0-23320190923002",
"version": "2.0.0-alpha-23620191020004",
"description": "uni-app mp-qq",
"main": "dist/index.js",
"repository": {
Expand All @@ -13,5 +13,5 @@
},
"author": "fxy060608",
"license": "Apache-2.0",
"gitHead": "10184426b19cb76e01c93fb25c982c72887557e8"
"gitHead": "5064652ab5aa907aedf637f163815660ecb8cfd9"
}
6 changes: 4 additions & 2 deletions packages/uni-mp-toutiao/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,10 @@ const protocols = {
timeout: false
}
},
requestPayment: {
requestPayment: {
name: tt.canIUse && tt.canIUse('pay') ? 'pay' : 'requestPayment',
args: {
orderInfo: 'data'
orderInfo: tt.canIUse && tt.canIUse('pay') ? 'orderInfo' : 'data'
}
},
getFileInfo: {
Expand Down Expand Up @@ -630,6 +631,7 @@ function wrapper (methodName, method) {
const todoApis = Object.create(null);

const TODOS = [
'onTabBarMidButtonTap',
'subscribePush',
'unsubscribePush',
'onPush',
Expand Down
Loading

0 comments on commit 8cbd3eb

Please sign in to comment.