Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
6aaf8783
U
uni-app
项目概览
DCloud
/
uni-app
3 个月 前同步成功
通知
725
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6aaf8783
编写于
9月 19, 2020
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(mp): remove @dcloudio/uni-shared
上级
5a913d36
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
139 addition
and
30 deletion
+139
-30
packages/uni-api/src/helpers/api.ts
packages/uni-api/src/helpers/api.ts
+5
-2
packages/uni-h5/dist/uni-h5.esm.js
packages/uni-h5/dist/uni-h5.esm.js
+2
-3
packages/uni-mp-alipay/dist/uni.api.esm.js
packages/uni-mp-alipay/dist/uni.api.esm.js
+2
-3
packages/uni-mp-alipay/dist/uni.mp.esm.js
packages/uni-mp-alipay/dist/uni.mp.esm.js
+20
-1
packages/uni-mp-baidu/dist/uni.api.esm.js
packages/uni-mp-baidu/dist/uni.api.esm.js
+2
-3
packages/uni-mp-baidu/dist/uni.mp.esm.js
packages/uni-mp-baidu/dist/uni.mp.esm.js
+20
-1
packages/uni-mp-qq/dist/uni.api.esm.js
packages/uni-mp-qq/dist/uni.api.esm.js
+2
-3
packages/uni-mp-qq/dist/uni.mp.esm.js
packages/uni-mp-qq/dist/uni.mp.esm.js
+20
-1
packages/uni-mp-toutiao/dist/uni.api.esm.js
packages/uni-mp-toutiao/dist/uni.api.esm.js
+2
-3
packages/uni-mp-toutiao/dist/uni.mp.esm.js
packages/uni-mp-toutiao/dist/uni.mp.esm.js
+20
-1
packages/uni-mp-weixin/dist/uni.api.esm.js
packages/uni-mp-weixin/dist/uni.api.esm.js
+2
-3
packages/uni-mp-weixin/dist/uni.mp.esm.js
packages/uni-mp-weixin/dist/uni.mp.esm.js
+20
-1
packages/uni-quickapp-webview/dist/uni.api.esm.js
packages/uni-quickapp-webview/dist/uni.api.esm.js
+2
-3
packages/uni-quickapp-webview/dist/uni.mp.esm.js
packages/uni-quickapp-webview/dist/uni.mp.esm.js
+20
-1
rollup.config.js
rollup.config.js
+0
-1
未找到文件。
packages/uni-api/src/helpers/api.ts
浏览文件 @
6aaf8783
...
...
@@ -19,8 +19,11 @@ type API_TYPES =
|
typeof
API_TYPE_ASYNC
|
typeof
API_TYPE_RETURN
function
validateProtocol
(
name
:
string
,
args
:
any
[],
protocol
:
ApiProtocols
)
{
console
.
log
(
name
,
args
,
protocol
)
function
validateProtocol
(
_name
:
string
,
_args
:
any
[],
_protocol
:
ApiProtocols
)
{
return
true
}
...
...
packages/uni-h5/dist/uni-h5.esm.js
浏览文件 @
6aaf8783
...
...
@@ -1250,8 +1250,7 @@ var decode = function(base64) {
const
API_TYPE_SYNC
=
1
;
const
API_TYPE_ASYNC
=
2
;
const
API_TYPE_RETURN
=
3
;
function
validateProtocol
(
name
,
args
,
protocol
)
{
console
.
log
(
name
,
args
,
protocol
);
function
validateProtocol
(
_name
,
_args
,
_protocol
)
{
return
true
;
}
function
formatApiArgs
(
args
,
options
)
{
...
...
@@ -1262,7 +1261,7 @@ function formatApiArgs(args, options) {
function
createApi
({
type
:
type2
,
name
,
options
},
fn
,
protocol
)
{
return
function
(...
args
)
{
if
(
type2
===
API_TYPE_SYNC
)
{
if
(
!
(
process
.
env
.
NODE_ENV
!==
"
production
"
&&
protocol
&&
!
validateProtocol
(
name
,
args
,
protocol
)))
{
if
(
!
(
process
.
env
.
NODE_ENV
!==
"
production
"
&&
protocol
&&
!
validateProtocol
()))
{
return
fn
.
apply
(
null
,
formatApiArgs
(
args
,
options
));
}
}
...
...
packages/uni-mp-alipay/dist/uni.api.esm.js
浏览文件 @
6aaf8783
import
{
isArray
,
isPromise
,
isFunction
,
isPlainObject
,
hasOwn
,
isString
}
from
'
@vue/shared
'
;
const
API_TYPE_SYNC
=
1
;
function
validateProtocol
(
name
,
args
,
protocol
)
{
console
.
log
(
name
,
args
,
protocol
);
function
validateProtocol
(
_name
,
_args
,
_protocol
)
{
return
true
;
}
function
formatApiArgs
(
args
,
options
)
{
...
...
@@ -13,7 +12,7 @@ function formatApiArgs(args, options) {
function
createApi
({
type
,
name
,
options
},
fn
,
protocol
)
{
return
function
(...
args
)
{
if
(
type
===
API_TYPE_SYNC
)
{
if
(
!
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
protocol
&&
!
validateProtocol
(
name
,
args
,
protocol
)))
{
if
(
!
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
protocol
&&
!
validateProtocol
()))
{
return
fn
.
apply
(
null
,
formatApiArgs
(
args
,
options
));
}
}
...
...
packages/uni-mp-alipay/dist/uni.mp.esm.js
浏览文件 @
6aaf8783
import
{
capitalize
,
hasOwn
,
isArray
,
toNumber
,
isPlainObject
,
isObject
,
isFunction
,
extend
,
NOOP
,
EMPTY_OBJ
,
camelize
}
from
'
@vue/shared
'
;
import
{
stringifyQuery
}
from
'
@dcloudio/uni-shared
'
;
function
setModel
(
target
,
key
,
value
,
modifiers
)
{
if
(
isArray
(
modifiers
))
{
...
...
@@ -218,6 +217,26 @@ function initCreateApp(parseAppOptions) {
};
}
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
const
res
=
obj
?
Object
.
keys
(
obj
)
.
map
(
key
=>
{
let
val
=
obj
[
key
];
if
(
typeof
val
===
undefined
||
val
===
null
)
{
val
=
''
;
}
else
if
(
isPlainObject
(
val
))
{
val
=
JSON
.
stringify
(
val
);
}
return
encodeStr
(
key
)
+
'
=
'
+
encodeStr
(
val
);
})
.
filter
(
x
=>
x
.
length
>
0
)
.
join
(
'
&
'
)
:
null
;
return
res
?
`?
${
res
}
`
:
''
;
}
function
initVueIds
(
vueIds
,
mpInstance
)
{
if
(
!
vueIds
)
{
return
;
...
...
packages/uni-mp-baidu/dist/uni.api.esm.js
浏览文件 @
6aaf8783
import
{
isArray
,
isPromise
,
isFunction
,
isPlainObject
,
hasOwn
,
isString
}
from
'
@vue/shared
'
;
const
API_TYPE_SYNC
=
1
;
function
validateProtocol
(
name
,
args
,
protocol
)
{
console
.
log
(
name
,
args
,
protocol
);
function
validateProtocol
(
_name
,
_args
,
_protocol
)
{
return
true
;
}
function
formatApiArgs
(
args
,
options
)
{
...
...
@@ -13,7 +12,7 @@ function formatApiArgs(args, options) {
function
createApi
({
type
,
name
,
options
},
fn
,
protocol
)
{
return
function
(...
args
)
{
if
(
type
===
API_TYPE_SYNC
)
{
if
(
!
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
protocol
&&
!
validateProtocol
(
name
,
args
,
protocol
)))
{
if
(
!
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
protocol
&&
!
validateProtocol
()))
{
return
fn
.
apply
(
null
,
formatApiArgs
(
args
,
options
));
}
}
...
...
packages/uni-mp-baidu/dist/uni.mp.esm.js
浏览文件 @
6aaf8783
import
{
isArray
,
hasOwn
,
toNumber
,
isPlainObject
,
isObject
,
isFunction
,
extend
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
stringifyQuery
}
from
'
@dcloudio/uni-shared
'
;
function
setModel
(
target
,
key
,
value
,
modifiers
)
{
if
(
isArray
(
modifiers
))
{
...
...
@@ -209,6 +208,26 @@ function initCreateApp(parseAppOptions) {
};
}
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
const
res
=
obj
?
Object
.
keys
(
obj
)
.
map
(
key
=>
{
let
val
=
obj
[
key
];
if
(
typeof
val
===
undefined
||
val
===
null
)
{
val
=
''
;
}
else
if
(
isPlainObject
(
val
))
{
val
=
JSON
.
stringify
(
val
);
}
return
encodeStr
(
key
)
+
'
=
'
+
encodeStr
(
val
);
})
.
filter
(
x
=>
x
.
length
>
0
)
.
join
(
'
&
'
)
:
null
;
return
res
?
`?
${
res
}
`
:
''
;
}
function
initBehavior
(
options
)
{
return
Behavior
(
options
);
}
...
...
packages/uni-mp-qq/dist/uni.api.esm.js
浏览文件 @
6aaf8783
import
{
isArray
,
isPromise
,
isFunction
,
isPlainObject
,
hasOwn
,
isString
}
from
'
@vue/shared
'
;
const
API_TYPE_SYNC
=
1
;
function
validateProtocol
(
name
,
args
,
protocol
)
{
console
.
log
(
name
,
args
,
protocol
);
function
validateProtocol
(
_name
,
_args
,
_protocol
)
{
return
true
;
}
function
formatApiArgs
(
args
,
options
)
{
...
...
@@ -13,7 +12,7 @@ function formatApiArgs(args, options) {
function
createApi
({
type
,
name
,
options
},
fn
,
protocol
)
{
return
function
(...
args
)
{
if
(
type
===
API_TYPE_SYNC
)
{
if
(
!
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
protocol
&&
!
validateProtocol
(
name
,
args
,
protocol
)))
{
if
(
!
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
protocol
&&
!
validateProtocol
()))
{
return
fn
.
apply
(
null
,
formatApiArgs
(
args
,
options
));
}
}
...
...
packages/uni-mp-qq/dist/uni.mp.esm.js
浏览文件 @
6aaf8783
import
{
isArray
,
hasOwn
,
toNumber
,
isPlainObject
,
isObject
,
isFunction
,
extend
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
stringifyQuery
}
from
'
@dcloudio/uni-shared
'
;
function
setModel
(
target
,
key
,
value
,
modifiers
)
{
if
(
isArray
(
modifiers
))
{
...
...
@@ -209,6 +208,26 @@ function initCreateApp(parseAppOptions) {
};
}
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
const
res
=
obj
?
Object
.
keys
(
obj
)
.
map
(
key
=>
{
let
val
=
obj
[
key
];
if
(
typeof
val
===
undefined
||
val
===
null
)
{
val
=
''
;
}
else
if
(
isPlainObject
(
val
))
{
val
=
JSON
.
stringify
(
val
);
}
return
encodeStr
(
key
)
+
'
=
'
+
encodeStr
(
val
);
})
.
filter
(
x
=>
x
.
length
>
0
)
.
join
(
'
&
'
)
:
null
;
return
res
?
`?
${
res
}
`
:
''
;
}
function
initBehavior
(
options
)
{
return
Behavior
(
options
);
}
...
...
packages/uni-mp-toutiao/dist/uni.api.esm.js
浏览文件 @
6aaf8783
import
{
isArray
,
isPromise
,
isFunction
,
isPlainObject
,
hasOwn
,
isString
}
from
'
@vue/shared
'
;
const
API_TYPE_SYNC
=
1
;
function
validateProtocol
(
name
,
args
,
protocol
)
{
console
.
log
(
name
,
args
,
protocol
);
function
validateProtocol
(
_name
,
_args
,
_protocol
)
{
return
true
;
}
function
formatApiArgs
(
args
,
options
)
{
...
...
@@ -13,7 +12,7 @@ function formatApiArgs(args, options) {
function
createApi
({
type
,
name
,
options
},
fn
,
protocol
)
{
return
function
(...
args
)
{
if
(
type
===
API_TYPE_SYNC
)
{
if
(
!
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
protocol
&&
!
validateProtocol
(
name
,
args
,
protocol
)))
{
if
(
!
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
protocol
&&
!
validateProtocol
()))
{
return
fn
.
apply
(
null
,
formatApiArgs
(
args
,
options
));
}
}
...
...
packages/uni-mp-toutiao/dist/uni.mp.esm.js
浏览文件 @
6aaf8783
import
{
isArray
,
hasOwn
,
toNumber
,
isPlainObject
,
isObject
,
isFunction
,
extend
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
stringifyQuery
}
from
'
@dcloudio/uni-shared
'
;
function
setModel
(
target
,
key
,
value
,
modifiers
)
{
if
(
isArray
(
modifiers
))
{
...
...
@@ -212,6 +211,26 @@ function initCreateApp(parseAppOptions) {
};
}
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
const
res
=
obj
?
Object
.
keys
(
obj
)
.
map
(
key
=>
{
let
val
=
obj
[
key
];
if
(
typeof
val
===
undefined
||
val
===
null
)
{
val
=
''
;
}
else
if
(
isPlainObject
(
val
))
{
val
=
JSON
.
stringify
(
val
);
}
return
encodeStr
(
key
)
+
'
=
'
+
encodeStr
(
val
);
})
.
filter
(
x
=>
x
.
length
>
0
)
.
join
(
'
&
'
)
:
null
;
return
res
?
`?
${
res
}
`
:
''
;
}
function
initBehavior
(
options
)
{
return
Behavior
(
options
);
}
...
...
packages/uni-mp-weixin/dist/uni.api.esm.js
浏览文件 @
6aaf8783
import
{
isArray
,
isPromise
,
isFunction
,
isPlainObject
,
hasOwn
,
isString
}
from
'
@vue/shared
'
;
const
API_TYPE_SYNC
=
1
;
function
validateProtocol
(
name
,
args
,
protocol
)
{
console
.
log
(
name
,
args
,
protocol
);
function
validateProtocol
(
_name
,
_args
,
_protocol
)
{
return
true
;
}
function
formatApiArgs
(
args
,
options
)
{
...
...
@@ -13,7 +12,7 @@ function formatApiArgs(args, options) {
function
createApi
({
type
,
name
,
options
},
fn
,
protocol
)
{
return
function
(...
args
)
{
if
(
type
===
API_TYPE_SYNC
)
{
if
(
!
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
protocol
&&
!
validateProtocol
(
name
,
args
,
protocol
)))
{
if
(
!
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
protocol
&&
!
validateProtocol
()))
{
return
fn
.
apply
(
null
,
formatApiArgs
(
args
,
options
));
}
}
...
...
packages/uni-mp-weixin/dist/uni.mp.esm.js
浏览文件 @
6aaf8783
import
{
isArray
,
hasOwn
,
toNumber
,
isPlainObject
,
isObject
,
isFunction
,
extend
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
stringifyQuery
}
from
'
@dcloudio/uni-shared
'
;
function
setModel
(
target
,
key
,
value
,
modifiers
)
{
if
(
isArray
(
modifiers
))
{
...
...
@@ -209,6 +208,26 @@ function initCreateApp(parseAppOptions) {
};
}
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
const
res
=
obj
?
Object
.
keys
(
obj
)
.
map
(
key
=>
{
let
val
=
obj
[
key
];
if
(
typeof
val
===
undefined
||
val
===
null
)
{
val
=
''
;
}
else
if
(
isPlainObject
(
val
))
{
val
=
JSON
.
stringify
(
val
);
}
return
encodeStr
(
key
)
+
'
=
'
+
encodeStr
(
val
);
})
.
filter
(
x
=>
x
.
length
>
0
)
.
join
(
'
&
'
)
:
null
;
return
res
?
`?
${
res
}
`
:
''
;
}
function
initBehavior
(
options
)
{
return
Behavior
(
options
);
}
...
...
packages/uni-quickapp-webview/dist/uni.api.esm.js
浏览文件 @
6aaf8783
import
{
isArray
,
isPromise
,
isFunction
,
isPlainObject
,
hasOwn
,
isString
}
from
'
@vue/shared
'
;
const
API_TYPE_SYNC
=
1
;
function
validateProtocol
(
name
,
args
,
protocol
)
{
console
.
log
(
name
,
args
,
protocol
);
function
validateProtocol
(
_name
,
_args
,
_protocol
)
{
return
true
;
}
function
formatApiArgs
(
args
,
options
)
{
...
...
@@ -13,7 +12,7 @@ function formatApiArgs(args, options) {
function
createApi
({
type
,
name
,
options
},
fn
,
protocol
)
{
return
function
(...
args
)
{
if
(
type
===
API_TYPE_SYNC
)
{
if
(
!
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
protocol
&&
!
validateProtocol
(
name
,
args
,
protocol
)))
{
if
(
!
((
process
.
env
.
NODE_ENV
!==
'
production
'
)
&&
protocol
&&
!
validateProtocol
()))
{
return
fn
.
apply
(
null
,
formatApiArgs
(
args
,
options
));
}
}
...
...
packages/uni-quickapp-webview/dist/uni.mp.esm.js
浏览文件 @
6aaf8783
import
{
isArray
,
hasOwn
,
toNumber
,
isPlainObject
,
isObject
,
isFunction
,
extend
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
stringifyQuery
}
from
'
@dcloudio/uni-shared
'
;
function
setModel
(
target
,
key
,
value
,
modifiers
)
{
if
(
isArray
(
modifiers
))
{
...
...
@@ -209,6 +208,26 @@ function initCreateApp(parseAppOptions) {
};
}
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
const
res
=
obj
?
Object
.
keys
(
obj
)
.
map
(
key
=>
{
let
val
=
obj
[
key
];
if
(
typeof
val
===
undefined
||
val
===
null
)
{
val
=
''
;
}
else
if
(
isPlainObject
(
val
))
{
val
=
JSON
.
stringify
(
val
);
}
return
encodeStr
(
key
)
+
'
=
'
+
encodeStr
(
val
);
})
.
filter
(
x
=>
x
.
length
>
0
)
.
join
(
'
&
'
)
:
null
;
return
res
?
`?
${
res
}
`
:
''
;
}
function
initBehavior
(
options
)
{
return
Behavior
(
options
);
}
...
...
rollup.config.js
浏览文件 @
6aaf8783
...
...
@@ -46,7 +46,6 @@ function createConfig(entryFile, output, plugins = []) {
const
external
=
[
'
@vue/shared
'
,
'
@dcloudio/uni-shared
'
,
...
Object
.
keys
(
pkg
.
dependencies
||
{}),
...
Object
.
keys
(
pkg
.
peerDependencies
||
{})
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录