提交 8934a4d8 编写于 作者: fxy060608's avatar fxy060608

build uni runtime

上级 685a97d9
...@@ -567,8 +567,14 @@ function initBehaviors (vueOptions, initBehavior) { ...@@ -567,8 +567,14 @@ function initBehaviors (vueOptions, initBehavior) {
vueProps.push('name'); vueProps.push('name');
vueProps.push('value'); vueProps.push('value');
} else { } else {
vueProps['name'] = String; vueProps['name'] = {
vueProps['value'] = null; type: String,
default: ''
};
vueProps['value'] = {
type: [String, Number, Boolean, Array, Object, Date],
default: ''
};
} }
} }
}); });
......
{ {
"name": "@dcloudio/uni-app-plus", "name": "@dcloudio/uni-app-plus",
"version": "0.0.243", "version": "0.0.244",
"description": "uni-app app-plus", "description": "uni-app app-plus",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
...@@ -727,11 +727,67 @@ function startGyroscope (params) { ...@@ -727,11 +727,67 @@ function startGyroscope (params) {
}); });
} }
function createExecCallback (execCallback) {
return function wrapperExecCallback (res) {
this.actions.forEach((action, index) => {
(action._$callbacks || []).forEach(callback => {
callback(res[index]);
});
});
execCallback(res);
}
}
function addCallback (callback) {
if (isFn(callback)) {
const action = this.actions[this.actions.length - 1];
if (action) {
(action._$callbacks || (action._$callbacks = [])).push(callback);
}
}
}
function createSelectorQuery () {
const query = my.createSelectorQuery();
const oldExec = query.exec;
const oldScrollOffset = query.scrollOffset;
const oldBoundingClientRect = query.boundingClientRect;
query.exec = function exec (callback) {
return oldExec.call(this, createExecCallback(callback).bind(this))
};
query.scrollOffset = function scrollOffset (callback) {
const ret = oldScrollOffset.call(this);
addCallback.call(this, callback);
return ret
};
query.boundingClientRect = function boundingClientRect (callback) {
const ret = oldBoundingClientRect.call(this);
addCallback.call(this, callback);
return ret
};
if (!query.fields) {
query.fields = function ({ rect, size, scrollOffset } = {}, callback) {
if (rect || size) {
this.boundingClientRect();
}
if (scrollOffset) {
this.scrollOffset();
}
addCallback.call(this, callback);
return this
};
}
return query
}
var api = /*#__PURE__*/Object.freeze({ var api = /*#__PURE__*/Object.freeze({
setStorageSync: setStorageSync, setStorageSync: setStorageSync,
getStorageSync: getStorageSync, getStorageSync: getStorageSync,
removeStorageSync: removeStorageSync, removeStorageSync: removeStorageSync,
startGyroscope: startGyroscope startGyroscope: startGyroscope,
createSelectorQuery: createSelectorQuery
}); });
const PAGE_EVENT_HOOKS = [ const PAGE_EVENT_HOOKS = [
...@@ -876,8 +932,14 @@ function initBehaviors (vueOptions, initBehavior) { ...@@ -876,8 +932,14 @@ function initBehaviors (vueOptions, initBehavior) {
vueProps.push('name'); vueProps.push('name');
vueProps.push('value'); vueProps.push('value');
} else { } else {
vueProps['name'] = String; vueProps['name'] = {
vueProps['value'] = null; type: String,
default: ''
};
vueProps['value'] = {
type: [String, Number, Boolean, Array, Object, Date],
default: ''
};
} }
} }
}); });
......
{ {
"name": "@dcloudio/uni-mp-alipay", "name": "@dcloudio/uni-mp-alipay",
"version": "0.0.817", "version": "0.0.818",
"description": "uni-app mp-alipay", "description": "uni-app mp-alipay",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
...@@ -667,8 +667,14 @@ function initBehaviors (vueOptions, initBehavior) { ...@@ -667,8 +667,14 @@ function initBehaviors (vueOptions, initBehavior) {
vueProps.push('name'); vueProps.push('name');
vueProps.push('value'); vueProps.push('value');
} else { } else {
vueProps['name'] = String; vueProps['name'] = {
vueProps['value'] = null; type: String,
default: ''
};
vueProps['value'] = {
type: [String, Number, Boolean, Array, Object, Date],
default: ''
};
} }
} }
}); });
......
{ {
"name": "@dcloudio/uni-mp-baidu", "name": "@dcloudio/uni-mp-baidu",
"version": "0.0.845", "version": "0.0.846",
"description": "uni-app mp-baidu", "description": "uni-app mp-baidu",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
...@@ -631,8 +631,14 @@ function initBehaviors (vueOptions, initBehavior) { ...@@ -631,8 +631,14 @@ function initBehaviors (vueOptions, initBehavior) {
vueProps.push('name'); vueProps.push('name');
vueProps.push('value'); vueProps.push('value');
} else { } else {
vueProps['name'] = String; vueProps['name'] = {
vueProps['value'] = null; type: String,
default: ''
};
vueProps['value'] = {
type: [String, Number, Boolean, Array, Object, Date],
default: ''
};
} }
} }
}); });
......
{ {
"name": "@dcloudio/uni-mp-qq", "name": "@dcloudio/uni-mp-qq",
"version": "0.0.101", "version": "0.0.102",
"description": "uni-app mp-qq", "description": "uni-app mp-qq",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
...@@ -712,8 +712,14 @@ function initBehaviors (vueOptions, initBehavior) { ...@@ -712,8 +712,14 @@ function initBehaviors (vueOptions, initBehavior) {
vueProps.push('name'); vueProps.push('name');
vueProps.push('value'); vueProps.push('value');
} else { } else {
vueProps['name'] = String; vueProps['name'] = {
vueProps['value'] = null; type: String,
default: ''
};
vueProps['value'] = {
type: [String, Number, Boolean, Array, Object, Date],
default: ''
};
} }
} }
}); });
......
{ {
"name": "@dcloudio/uni-mp-toutiao", "name": "@dcloudio/uni-mp-toutiao",
"version": "0.0.341", "version": "0.0.342",
"description": "uni-app mp-toutiao", "description": "uni-app mp-toutiao",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
...@@ -569,8 +569,14 @@ function initBehaviors (vueOptions, initBehavior) { ...@@ -569,8 +569,14 @@ function initBehaviors (vueOptions, initBehavior) {
vueProps.push('name'); vueProps.push('name');
vueProps.push('value'); vueProps.push('value');
} else { } else {
vueProps['name'] = String; vueProps['name'] = {
vueProps['value'] = null; type: String,
default: ''
};
vueProps['value'] = {
type: [String, Number, Boolean, Array, Object, Date],
default: ''
};
} }
} }
}); });
......
{ {
"name": "@dcloudio/uni-mp-weixin", "name": "@dcloudio/uni-mp-weixin",
"version": "0.0.962", "version": "0.0.963",
"description": "uni-app mp-weixin", "description": "uni-app mp-weixin",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册