Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wzj-java
uni-app
提交
e3cd58ad
U
uni-app
项目概览
wzj-java
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e3cd58ad
编写于
10月 12, 2021
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' into alpha
上级
cf36ed57
40d3070d
变更
25
展开全部
隐藏空白更改
内联
并排
Showing
25 changed file
with
223 addition
and
52 deletion
+223
-52
packages/uni-mp-alipay/dist/uni.api.esm.js
packages/uni-mp-alipay/dist/uni.api.esm.js
+1
-1
packages/uni-mp-alipay/dist/uni.mp.esm.js
packages/uni-mp-alipay/dist/uni.mp.esm.js
+1
-1
packages/uni-mp-baidu/dist/uni.api.esm.js
packages/uni-mp-baidu/dist/uni.api.esm.js
+1
-1
packages/uni-mp-baidu/dist/uni.mp.esm.js
packages/uni-mp-baidu/dist/uni.mp.esm.js
+1
-1
packages/uni-mp-kuaishou/dist/uni.api.esm.js
packages/uni-mp-kuaishou/dist/uni.api.esm.js
+1
-1
packages/uni-mp-kuaishou/dist/uni.mp.esm.js
packages/uni-mp-kuaishou/dist/uni.mp.esm.js
+1
-1
packages/uni-mp-qq/dist/uni.api.esm.js
packages/uni-mp-qq/dist/uni.api.esm.js
+1
-1
packages/uni-mp-qq/dist/uni.mp.esm.js
packages/uni-mp-qq/dist/uni.mp.esm.js
+1
-1
packages/uni-mp-toutiao/dist/uni.api.esm.js
packages/uni-mp-toutiao/dist/uni.api.esm.js
+1
-1
packages/uni-mp-toutiao/dist/uni.mp.esm.js
packages/uni-mp-toutiao/dist/uni.mp.esm.js
+1
-1
packages/uni-mp-vue/dist/vue.runtime.esm.js
packages/uni-mp-vue/dist/vue.runtime.esm.js
+110
-14
packages/uni-mp-weixin/dist/uni.api.esm.js
packages/uni-mp-weixin/dist/uni.api.esm.js
+1
-1
packages/uni-mp-weixin/dist/uni.mp.esm.js
packages/uni-mp-weixin/dist/uni.mp.esm.js
+1
-1
packages/uni-quickapp-webview/dist/uni.api.esm.js
packages/uni-quickapp-webview/dist/uni.api.esm.js
+1
-1
packages/uni-quickapp-webview/dist/uni.mp.esm.js
packages/uni-quickapp-webview/dist/uni.mp.esm.js
+1
-1
packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/style.js
...n-hbuilderx/packages/webpack-uni-nvue-loader/lib/style.js
+14
-1
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
+1
-1
src/core/service/api/context/create-map-context.js
src/core/service/api/context/create-map-context.js
+8
-1
src/core/view/components/rich-text/index.vue
src/core/view/components/rich-text/index.vue
+1
-1
src/core/view/components/rich-text/nodes-parser.js
src/core/view/components/rich-text/nodes-parser.js
+9
-2
src/platforms/app-plus-nvue/service/api/context/operate-map-player.js
...s/app-plus-nvue/service/api/context/operate-map-player.js
+3
-0
src/platforms/app-plus/service/api/ui/popup.js
src/platforms/app-plus/service/api/ui/popup.js
+19
-8
src/platforms/h5/components/app/popup/mixins/modal.js
src/platforms/h5/components/app/popup/mixins/modal.js
+3
-3
src/platforms/h5/components/app/popup/modal.vue
src/platforms/h5/components/app/popup/modal.vue
+38
-2
src/platforms/h5/service/api/ui/popup.js
src/platforms/h5/service/api/ui/popup.js
+3
-5
未找到文件。
packages/uni-mp-alipay/dist/uni.api.esm.js
浏览文件 @
e3cd58ad
...
@@ -734,7 +734,7 @@ const getLocale = () => {
...
@@ -734,7 +734,7 @@ const getLocale = () => {
if
(
app
&&
app
.
$vm
)
{
if
(
app
&&
app
.
$vm
)
{
return
app
.
$vm
.
$locale
;
return
app
.
$vm
.
$locale
;
}
}
return
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
return
my
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
};
};
const
setLocale
=
(
locale
)
=>
{
const
setLocale
=
(
locale
)
=>
{
const
app
=
getApp
();
const
app
=
getApp
();
...
...
packages/uni-mp-alipay/dist/uni.mp.esm.js
浏览文件 @
e3cd58ad
...
@@ -601,7 +601,7 @@ function initCreateApp(parseAppOptions) {
...
@@ -601,7 +601,7 @@ function initCreateApp(parseAppOptions) {
};
};
}
}
function
initLocale
(
appVm
)
{
function
initLocale
(
appVm
)
{
const
locale
=
ref
(
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
const
locale
=
ref
(
my
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
get
()
{
get
()
{
return
locale
.
value
;
return
locale
.
value
;
...
...
packages/uni-mp-baidu/dist/uni.api.esm.js
浏览文件 @
e3cd58ad
...
@@ -734,7 +734,7 @@ const getLocale = () => {
...
@@ -734,7 +734,7 @@ const getLocale = () => {
if
(
app
&&
app
.
$vm
)
{
if
(
app
&&
app
.
$vm
)
{
return
app
.
$vm
.
$locale
;
return
app
.
$vm
.
$locale
;
}
}
return
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
return
swan
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
};
};
const
setLocale
=
(
locale
)
=>
{
const
setLocale
=
(
locale
)
=>
{
const
app
=
getApp
();
const
app
=
getApp
();
...
...
packages/uni-mp-baidu/dist/uni.mp.esm.js
浏览文件 @
e3cd58ad
...
@@ -622,7 +622,7 @@ function initCreateApp(parseAppOptions) {
...
@@ -622,7 +622,7 @@ function initCreateApp(parseAppOptions) {
};
};
}
}
function
initLocale
(
appVm
)
{
function
initLocale
(
appVm
)
{
const
locale
=
ref
(
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
const
locale
=
ref
(
swan
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
get
()
{
get
()
{
return
locale
.
value
;
return
locale
.
value
;
...
...
packages/uni-mp-kuaishou/dist/uni.api.esm.js
浏览文件 @
e3cd58ad
...
@@ -734,7 +734,7 @@ const getLocale = () => {
...
@@ -734,7 +734,7 @@ const getLocale = () => {
if
(
app
&&
app
.
$vm
)
{
if
(
app
&&
app
.
$vm
)
{
return
app
.
$vm
.
$locale
;
return
app
.
$vm
.
$locale
;
}
}
return
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
return
ks
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
};
};
const
setLocale
=
(
locale
)
=>
{
const
setLocale
=
(
locale
)
=>
{
const
app
=
getApp
();
const
app
=
getApp
();
...
...
packages/uni-mp-kuaishou/dist/uni.mp.esm.js
浏览文件 @
e3cd58ad
...
@@ -622,7 +622,7 @@ function initCreateApp(parseAppOptions) {
...
@@ -622,7 +622,7 @@ function initCreateApp(parseAppOptions) {
};
};
}
}
function
initLocale
(
appVm
)
{
function
initLocale
(
appVm
)
{
const
locale
=
ref
(
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
const
locale
=
ref
(
ks
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
get
()
{
get
()
{
return
locale
.
value
;
return
locale
.
value
;
...
...
packages/uni-mp-qq/dist/uni.api.esm.js
浏览文件 @
e3cd58ad
...
@@ -734,7 +734,7 @@ const getLocale = () => {
...
@@ -734,7 +734,7 @@ const getLocale = () => {
if
(
app
&&
app
.
$vm
)
{
if
(
app
&&
app
.
$vm
)
{
return
app
.
$vm
.
$locale
;
return
app
.
$vm
.
$locale
;
}
}
return
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
return
qq
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
};
};
const
setLocale
=
(
locale
)
=>
{
const
setLocale
=
(
locale
)
=>
{
const
app
=
getApp
();
const
app
=
getApp
();
...
...
packages/uni-mp-qq/dist/uni.mp.esm.js
浏览文件 @
e3cd58ad
...
@@ -622,7 +622,7 @@ function initCreateApp(parseAppOptions) {
...
@@ -622,7 +622,7 @@ function initCreateApp(parseAppOptions) {
};
};
}
}
function
initLocale
(
appVm
)
{
function
initLocale
(
appVm
)
{
const
locale
=
ref
(
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
const
locale
=
ref
(
qq
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
get
()
{
get
()
{
return
locale
.
value
;
return
locale
.
value
;
...
...
packages/uni-mp-toutiao/dist/uni.api.esm.js
浏览文件 @
e3cd58ad
...
@@ -734,7 +734,7 @@ const getLocale = () => {
...
@@ -734,7 +734,7 @@ const getLocale = () => {
if
(
app
&&
app
.
$vm
)
{
if
(
app
&&
app
.
$vm
)
{
return
app
.
$vm
.
$locale
;
return
app
.
$vm
.
$locale
;
}
}
return
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
return
tt
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
};
};
const
setLocale
=
(
locale
)
=>
{
const
setLocale
=
(
locale
)
=>
{
const
app
=
getApp
();
const
app
=
getApp
();
...
...
packages/uni-mp-toutiao/dist/uni.mp.esm.js
浏览文件 @
e3cd58ad
...
@@ -625,7 +625,7 @@ function initCreateApp(parseAppOptions) {
...
@@ -625,7 +625,7 @@ function initCreateApp(parseAppOptions) {
};
};
}
}
function
initLocale
(
appVm
)
{
function
initLocale
(
appVm
)
{
const
locale
=
ref
(
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
const
locale
=
ref
(
tt
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
get
()
{
get
()
{
return
locale
.
value
;
return
locale
.
value
;
...
...
packages/uni-mp-vue/dist/vue.runtime.esm.js
浏览文件 @
e3cd58ad
...
@@ -2561,7 +2561,7 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
...
@@ -2561,7 +2561,7 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
// local registration
// local registration
// check instance[type] first which is resolved for options API
// check instance[type] first which is resolved for options API
resolve
(
instance
[
type
]
||
Component
[
type
],
name
)
||
resolve
(
instance
[
type
]
||
Component
[
type
],
name
)
||
//
window
registration
//
global
registration
resolve
(
instance
.
appContext
[
type
],
name
);
resolve
(
instance
.
appContext
[
type
],
name
);
if
(
!
res
&&
maybeSelfReference
)
{
if
(
!
res
&&
maybeSelfReference
)
{
// fallback to implicit self-reference
// fallback to implicit self-reference
...
@@ -3048,7 +3048,7 @@ const PublicInstanceProxyHandlers = {
...
@@ -3048,7 +3048,7 @@ const PublicInstanceProxyHandlers = {
return
ctx
[
key
];
return
ctx
[
key
];
}
}
else
if
(
else
if
(
//
window
properties
//
global
properties
((
globalProperties
=
appContext
.
config
.
globalProperties
),
((
globalProperties
=
appContext
.
config
.
globalProperties
),
hasOwn
(
globalProperties
,
key
)))
{
hasOwn
(
globalProperties
,
key
)))
{
{
{
...
@@ -3392,6 +3392,11 @@ let compile;
...
@@ -3392,6 +3392,11 @@ let compile;
const
isRuntimeOnly
=
()
=>
!
compile
;
const
isRuntimeOnly
=
()
=>
!
compile
;
function
finishComponentSetup
(
instance
,
isSSR
,
skipOptions
)
{
function
finishComponentSetup
(
instance
,
isSSR
,
skipOptions
)
{
const
Component
=
instance
.
type
;
const
Component
=
instance
.
type
;
// template / render function normalization
// could be already set when returned from setup()
if
(
!
instance
.
render
)
{
instance
.
render
=
(
Component
.
render
||
NOOP
);
}
// support for 2.x options
// support for 2.x options
if
(
__VUE_OPTIONS_API__
&&
!
(
false
))
{
if
(
__VUE_OPTIONS_API__
&&
!
(
false
))
{
setCurrentInstance
(
instance
);
setCurrentInstance
(
instance
);
...
@@ -4276,15 +4281,21 @@ function getContext() {
...
@@ -4276,15 +4281,21 @@ function getContext() {
* only.
* only.
* @internal
* @internal
*/
*/
function
mergeDefaults
(
function
mergeDefaults
(
raw
,
defaults
)
{
// the base props is compiler-generated and guaranteed to be in this shape.
const
props
=
isArray
(
raw
)
props
,
defaults
)
{
?
raw
.
reduce
((
normalized
,
p
)
=>
((
normalized
[
p
]
=
{}),
normalized
),
{})
:
raw
;
for
(
const
key
in
defaults
)
{
for
(
const
key
in
defaults
)
{
const
val
=
props
[
key
];
const
opt
=
props
[
key
];
if
(
val
)
{
if
(
opt
)
{
val
.
default
=
defaults
[
key
];
if
(
isArray
(
opt
)
||
isFunction
(
opt
))
{
props
[
key
]
=
{
type
:
opt
,
default
:
defaults
[
key
]
};
}
else
{
opt
.
default
=
defaults
[
key
];
}
}
}
else
if
(
val
===
null
)
{
else
if
(
opt
===
null
)
{
props
[
key
]
=
{
default
:
defaults
[
key
]
};
props
[
key
]
=
{
default
:
defaults
[
key
]
};
}
}
else
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
else
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
...
@@ -4341,7 +4352,7 @@ const useSSRContext = () => {
...
@@ -4341,7 +4352,7 @@ const useSSRContext = () => {
};
};
// Core API ------------------------------------------------------------------
// Core API ------------------------------------------------------------------
const
version
=
"
3.2.
19
"
;
const
version
=
"
3.2.
20
"
;
/**
/**
* @internal only exposed in compat builds
* @internal only exposed in compat builds
*/
*/
...
@@ -4664,10 +4675,48 @@ function mountComponent(initialVNode, options) {
...
@@ -4664,10 +4675,48 @@ function mountComponent(initialVNode, options) {
}
}
return
instance
.
proxy
;
return
instance
.
proxy
;
}
}
const
getFunctionalFallthrough
=
(
attrs
)
=>
{
let
res
;
for
(
const
key
in
attrs
)
{
if
(
key
===
'
class
'
||
key
===
'
style
'
||
isOn
(
key
))
{
(
res
||
(
res
=
{}))[
key
]
=
attrs
[
key
];
}
}
return
res
;
};
function
renderComponentRoot
(
instance
)
{
const
{
type
:
Component
,
vnode
,
proxy
,
withProxy
,
props
,
slots
,
attrs
,
emit
,
render
,
renderCache
,
data
,
setupState
,
ctx
}
=
instance
;
let
result
;
const
prev
=
setCurrentRenderingInstance
(
instance
);
try
{
if
(
vnode
.
shapeFlag
&
4
/* STATEFUL_COMPONENT */
)
{
// withProxy is a proxy with a different `has` trap only for
// runtime-compiled render functions using `with` block.
const
proxyToUse
=
withProxy
||
proxy
;
result
=
render
.
call
(
proxyToUse
,
proxyToUse
,
renderCache
,
props
,
setupState
,
data
,
ctx
);
}
else
{
// functional
const
render
=
Component
;
result
=
render
.
length
>
1
?
render
(
props
,
{
attrs
,
slots
,
emit
})
:
render
(
props
,
null
/* we know it doesn't need it */
)
?
attrs
:
getFunctionalFallthrough
(
attrs
);
}
}
catch
(
err
)
{
handleError
(
err
,
instance
,
1
/* RENDER_FUNCTION */
);
result
=
false
;
}
setCurrentRenderingInstance
(
prev
);
return
result
;
}
function
setupRenderEffect
(
instance
)
{
function
setupRenderEffect
(
instance
)
{
const
componentUpdateFn
=
()
=>
{
const
componentUpdateFn
=
()
=>
{
if
(
!
instance
.
isMounted
)
{
if
(
!
instance
.
isMounted
)
{
instance
.
render
&&
instance
.
render
.
call
(
instance
.
proxy
);
renderComponentRoot
(
instance
);
patch
(
instance
);
patch
(
instance
);
}
}
else
{
else
{
...
@@ -4680,6 +4729,7 @@ function setupRenderEffect(instance) {
...
@@ -4680,6 +4729,7 @@ function setupRenderEffect(instance) {
invokeArrayFns
(
bu
);
invokeArrayFns
(
bu
);
}
}
effect
.
allowRecurse
=
true
;
effect
.
allowRecurse
=
true
;
renderComponentRoot
(
instance
);
patch
(
instance
);
patch
(
instance
);
// updated hook
// updated hook
if
(
u
)
{
if
(
u
)
{
...
@@ -4818,8 +4868,44 @@ function initOptionMergeStrategies(optionMergeStrategies) {
...
@@ -4818,8 +4868,44 @@ function initOptionMergeStrategies(optionMergeStrategies) {
});
});
}
}
let
realAtob
;
const
b64
=
'
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
'
;
const
b64re
=
/^
(?:[
A-Za-z
\d
+
/]{4})
*
?(?:[
A-Za-z
\d
+
/]{2}(?:
==
)?
|
[
A-Za-z
\d
+
/]{3}
=
?)?
$/
;
if
(
typeof
atob
!==
'
function
'
)
{
realAtob
=
function
(
str
)
{
str
=
String
(
str
).
replace
(
/
[\t\n\f\r
]
+/g
,
''
);
if
(
!
b64re
.
test
(
str
))
{
throw
new
Error
(
"
Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
"
);
}
// Adding the padding if missing, for semplicity
str
+=
'
==
'
.
slice
(
2
-
(
str
.
length
&
3
));
var
bitmap
;
var
result
=
''
;
var
r1
;
var
r2
;
var
i
=
0
;
for
(;
i
<
str
.
length
;)
{
bitmap
=
(
b64
.
indexOf
(
str
.
charAt
(
i
++
))
<<
18
)
|
(
b64
.
indexOf
(
str
.
charAt
(
i
++
))
<<
12
)
|
((
r1
=
b64
.
indexOf
(
str
.
charAt
(
i
++
)))
<<
6
)
|
(
r2
=
b64
.
indexOf
(
str
.
charAt
(
i
++
)));
result
+=
r1
===
64
?
String
.
fromCharCode
((
bitmap
>>
16
)
&
255
)
:
r2
===
64
?
String
.
fromCharCode
((
bitmap
>>
16
)
&
255
,
(
bitmap
>>
8
)
&
255
)
:
String
.
fromCharCode
((
bitmap
>>
16
)
&
255
,
(
bitmap
>>
8
)
&
255
,
bitmap
&
255
);
}
return
result
;
};
}
else
{
// 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
realAtob
=
atob
;
}
function
b64DecodeUnicode
(
str
)
{
function
b64DecodeUnicode
(
str
)
{
return
decodeURIComponent
(
a
tob
(
str
)
return
decodeURIComponent
(
realA
tob
(
str
)
.
split
(
''
)
.
split
(
''
)
.
map
(
function
(
c
)
{
.
map
(
function
(
c
)
{
return
'
%
'
+
(
'
00
'
+
c
.
charCodeAt
(
0
).
toString
(
16
)).
slice
(
-
2
);
return
'
%
'
+
(
'
00
'
+
c
.
charCodeAt
(
0
).
toString
(
16
)).
slice
(
-
2
);
...
@@ -4883,11 +4969,21 @@ function initApp(app) {
...
@@ -4883,11 +4969,21 @@ function initApp(app) {
var
plugin
=
{
var
plugin
=
{
install
(
app
)
{
install
(
app
)
{
initApp
(
app
);
initApp
(
app
);
// TODO 旧编译器使用了$createElement 导致告警
app
.
config
.
globalProperties
.
$createElement
=
()
=>
{
};
const
oldMount
=
app
.
mount
;
const
oldMount
=
app
.
mount
;
app
.
mount
=
function
mount
(
rootContainer
)
{
app
.
mount
=
function
mount
(
rootContainer
)
{
const
instance
=
oldMount
.
call
(
app
,
rootContainer
);
const
instance
=
oldMount
.
call
(
app
,
rootContainer
);
// @ts-ignore
if
(
global
.
createApp
)
{
createMiniProgramApp
(
instance
);
global
.
createApp
(
instance
);
}
else
{
// @ts-ignore 旧编译器
if
(
typeof
createMiniProgramApp
!==
'
undefined
'
)
{
// @ts-ignore
createMiniProgramApp
(
instance
);
}
}
return
instance
;
return
instance
;
};
};
},
},
...
...
packages/uni-mp-weixin/dist/uni.api.esm.js
浏览文件 @
e3cd58ad
...
@@ -698,7 +698,7 @@ const getLocale = () => {
...
@@ -698,7 +698,7 @@ const getLocale = () => {
if
(
app
&&
app
.
$vm
)
{
if
(
app
&&
app
.
$vm
)
{
return
app
.
$vm
.
$locale
;
return
app
.
$vm
.
$locale
;
}
}
return
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
return
wx
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
};
};
const
setLocale
=
(
locale
)
=>
{
const
setLocale
=
(
locale
)
=>
{
const
app
=
getApp
();
const
app
=
getApp
();
...
...
packages/uni-mp-weixin/dist/uni.mp.esm.js
浏览文件 @
e3cd58ad
...
@@ -568,7 +568,7 @@ function initCreateApp(parseAppOptions) {
...
@@ -568,7 +568,7 @@ function initCreateApp(parseAppOptions) {
};
};
}
}
function
initLocale
(
appVm
)
{
function
initLocale
(
appVm
)
{
const
locale
=
ref
(
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
const
locale
=
ref
(
wx
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
get
()
{
get
()
{
return
locale
.
value
;
return
locale
.
value
;
...
...
packages/uni-quickapp-webview/dist/uni.api.esm.js
浏览文件 @
e3cd58ad
...
@@ -734,7 +734,7 @@ const getLocale = () => {
...
@@ -734,7 +734,7 @@ const getLocale = () => {
if
(
app
&&
app
.
$vm
)
{
if
(
app
&&
app
.
$vm
)
{
return
app
.
$vm
.
$locale
;
return
app
.
$vm
.
$locale
;
}
}
return
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
return
qa
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
;
};
};
const
setLocale
=
(
locale
)
=>
{
const
setLocale
=
(
locale
)
=>
{
const
app
=
getApp
();
const
app
=
getApp
();
...
...
packages/uni-quickapp-webview/dist/uni.mp.esm.js
浏览文件 @
e3cd58ad
...
@@ -553,7 +553,7 @@ function initCreateApp(parseAppOptions) {
...
@@ -553,7 +553,7 @@ function initCreateApp(parseAppOptions) {
};
};
}
}
function
initLocale
(
appVm
)
{
function
initLocale
(
appVm
)
{
const
locale
=
ref
(
uni
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
const
locale
=
ref
(
qa
.
getSystemInfoSync
().
language
||
'
zh-Hans
'
);
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
Object
.
defineProperty
(
appVm
,
'
$locale
'
,
{
get
()
{
get
()
{
return
locale
.
value
;
return
locale
.
value
;
...
...
packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/style.js
浏览文件 @
e3cd58ad
...
@@ -30,6 +30,15 @@ function convertLength (k, v) {
...
@@ -30,6 +30,15 @@ function convertLength (k, v) {
}
}
let
isFirst
=
true
let
isFirst
=
true
const
ZERO_WIDTH_CHAR
=
{
NOTE
:
''
,
WARNING
:
'
\
u200B
'
,
ERROR
:
'
\
u200C
'
,
backup0
:
'
\
u200D
'
,
backup1
:
'
\
u200E
'
,
backup2
:
'
\
u200F
'
,
backup3
:
'
\
uFEFF
'
}
function
genStyleString
(
input
,
loader
)
{
function
genStyleString
(
input
,
loader
)
{
var
output
=
'
{}
'
var
output
=
'
{}
'
...
@@ -56,7 +65,11 @@ function genStyleString (input, loader) {
...
@@ -56,7 +65,11 @@ function genStyleString (input, loader) {
msgs
.
unshift
(
uniI18n
.
__
(
'
pluginHbuilderx.nvueCssWarning
'
))
msgs
.
unshift
(
uniI18n
.
__
(
'
pluginHbuilderx.nvueCssWarning
'
))
isFirst
=
false
isFirst
=
false
}
}
msgs
.
forEach
(
msg
=>
console
.
warn
(
msg
))
msgs
.
forEach
(
msg
=>
{
const
msgType
=
ZERO_WIDTH_CHAR
[
msg
.
split
(
'
:
'
)[
0
]]
msgType
&&
(
msg
=
msgType
+
msg
+
msgType
)
console
.
warn
(
msg
)
})
}
}
}
}
try
{
try
{
...
...
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
浏览文件 @
e3cd58ad
此差异已折叠。
点击以展开。
src/core/service/api/context/create-map-context.js
浏览文件 @
e3cd58ad
...
@@ -39,6 +39,13 @@ export class MapContext {
...
@@ -39,6 +39,13 @@ export class MapContext {
constructor
(
id
,
pageVm
)
{
constructor
(
id
,
pageVm
)
{
this
.
id
=
id
this
.
id
=
id
this
.
pageVm
=
pageVm
this
.
pageVm
=
pageVm
}
on
(
name
,
callback
)
{
operateMapPlayer
(
this
.
id
,
this
.
pageVm
,
'
on
'
,
{
name
,
callback
})
}
}
}
}
...
@@ -46,7 +53,7 @@ MapContext.prototype.$getAppMap = function () {
...
@@ -46,7 +53,7 @@ MapContext.prototype.$getAppMap = function () {
if
(
__PLATFORM__
===
'
app-plus
'
)
{
if
(
__PLATFORM__
===
'
app-plus
'
)
{
return
plus
.
maps
.
getMapById
(
this
.
pageVm
.
$page
.
id
+
'
-map-
'
+
this
.
id
)
return
plus
.
maps
.
getMapById
(
this
.
pageVm
.
$page
.
id
+
'
-map-
'
+
this
.
id
)
}
}
}
}
methods
.
forEach
(
function
(
method
)
{
methods
.
forEach
(
function
(
method
)
{
MapContext
.
prototype
[
method
]
=
callback
.
warp
(
function
(
options
,
callbackId
)
{
MapContext
.
prototype
[
method
]
=
callback
.
warp
(
function
(
options
,
callbackId
)
{
...
...
src/core/view/components/rich-text/index.vue
浏览文件 @
e3cd58ad
...
@@ -38,7 +38,7 @@ export default {
...
@@ -38,7 +38,7 @@ export default {
if
(
typeof
nodes
===
'
string
'
)
{
if
(
typeof
nodes
===
'
string
'
)
{
nodes
=
parseHtml
(
nodes
)
nodes
=
parseHtml
(
nodes
)
}
}
const
nodeList
=
parseNodes
(
nodes
,
document
.
createDocumentFragment
())
const
nodeList
=
parseNodes
(
nodes
,
document
.
createDocumentFragment
()
,
this
)
nodeList
.
appendChild
(
this
.
$refs
.
sensor
.
$el
)
nodeList
.
appendChild
(
this
.
$refs
.
sensor
.
$el
)
const
content
=
this
.
$refs
.
content
const
content
=
this
.
$refs
.
content
content
.
innerHTML
=
''
content
.
innerHTML
=
''
...
...
src/core/view/components/rich-text/nodes-parser.js
浏览文件 @
e3cd58ad
...
@@ -96,7 +96,13 @@ function decodeEntities (htmlString) {
...
@@ -96,7 +96,13 @@ function decodeEntities (htmlString) {
})
})
}
}
export
default
function
parseNodes
(
nodes
,
parentNode
)
{
export
default
function
parseNodes
(
nodes
,
parentNode
,
$vm
)
{
let
scopeId
=
''
while
(
$vm
)
{
!
scopeId
&&
(
scopeId
=
$vm
.
$options
.
_scopeId
)
$vm
=
$vm
.
$parent
}
nodes
.
forEach
(
function
(
node
)
{
nodes
.
forEach
(
function
(
node
)
{
if
(
!
isPlainObject
(
node
))
{
if
(
!
isPlainObject
(
node
))
{
return
return
...
@@ -124,6 +130,7 @@ export default function parseNodes (nodes, parentNode) {
...
@@ -124,6 +130,7 @@ export default function parseNodes (nodes, parentNode) {
Array
.
isArray
(
value
)
&&
(
value
=
value
.
join
(
'
'
))
Array
.
isArray
(
value
)
&&
(
value
=
value
.
join
(
'
'
))
case
'
style
'
:
case
'
style
'
:
elem
.
setAttribute
(
name
,
value
)
elem
.
setAttribute
(
name
,
value
)
scopeId
&&
elem
.
setAttribute
(
scopeId
,
''
)
break
break
default
:
default
:
if
(
tagAttrs
.
indexOf
(
name
)
!==
-
1
)
{
if
(
tagAttrs
.
indexOf
(
name
)
!==
-
1
)
{
...
@@ -146,4 +153,4 @@ export default function parseNodes (nodes, parentNode) {
...
@@ -146,4 +153,4 @@ export default function parseNodes (nodes, parentNode) {
}
}
})
})
return
parentNode
return
parentNode
}
}
src/platforms/app-plus-nvue/service/api/context/operate-map-player.js
浏览文件 @
e3cd58ad
...
@@ -52,6 +52,9 @@ const METHODS = {
...
@@ -52,6 +52,9 @@ const METHODS = {
},
},
openMapApp
(
ctx
,
args
)
{
openMapApp
(
ctx
,
args
)
{
return
invokeVmMethod
(
ctx
,
'
openMapApp
'
,
args
)
return
invokeVmMethod
(
ctx
,
'
openMapApp
'
,
args
)
},
on
(
ctx
,
args
)
{
return
ctx
.
on
(
args
.
name
,
args
.
callback
)
}
}
}
}
...
...
src/platforms/app-plus/service/api/ui/popup.js
浏览文件 @
e3cd58ad
...
@@ -121,24 +121,35 @@ export function showModal ({
...
@@ -121,24 +121,35 @@ export function showModal ({
cancelText
,
cancelText
,
cancelColor
,
cancelColor
,
confirmText
,
confirmText
,
confirmColor
confirmColor
,
editable
=
false
,
placeholderText
=
''
}
=
{},
callbackId
)
{
}
=
{},
callbackId
)
{
// TODO 在 editable 为 true 时,content 应该是输入框中可修改内容。后续找客户端商量。
const
buttons
=
showCancel
?
[
cancelText
,
confirmText
]
:
[
confirmText
]
const
tip
=
editable
?
placeholderText
:
buttons
content
=
content
||
'
'
content
=
content
||
'
'
plus
.
nativeUI
.
confirm
(
content
,
(
e
)
=>
{
plus
.
nativeUI
[
editable
?
'
prompt
'
:
'
confirm
'
]
(
content
,
(
e
)
=>
{
if
(
showCancel
)
{
if
(
showCancel
)
{
invoke
(
callbackId
,
{
const
isConfirm
=
e
.
index
===
1
const
res
=
{
errMsg
:
'
showModal:ok
'
,
errMsg
:
'
showModal:ok
'
,
confirm
:
e
.
index
===
1
,
confirm
:
isConfirm
,
cancel
:
e
.
index
===
0
||
e
.
index
===
-
1
cancel
:
e
.
index
===
0
||
e
.
index
===
-
1
})
}
isConfirm
&&
editable
&&
(
res
.
content
=
e
.
value
)
invoke
(
callbackId
,
res
)
}
else
{
}
else
{
invoke
(
callbackId
,
{
const
res
=
{
errMsg
:
'
showModal:ok
'
,
errMsg
:
'
showModal:ok
'
,
confirm
:
e
.
index
===
0
,
confirm
:
e
.
index
===
0
,
cancel
:
false
cancel
:
false
})
}
editable
&&
(
res
.
content
=
e
.
value
)
invoke
(
callbackId
,
res
)
}
}
},
title
,
showCancel
?
[
cancelText
,
confirmText
]
:
[
confirmText
]
)
},
title
,
tip
,
buttons
)
}
}
export
function
showActionSheet
({
export
function
showActionSheet
({
itemList
=
[],
itemList
=
[],
...
...
src/platforms/h5/components/app/popup/mixins/modal.js
浏览文件 @
e3cd58ad
...
@@ -21,9 +21,9 @@ export default {
...
@@ -21,9 +21,9 @@ export default {
},
},
methods
:
{
methods
:
{
// 处理 modal close 回调
// 处理 modal close 回调
_onModalClose
(
type
)
{
_onModalClose
(
res
)
{
this
.
showModal
.
visible
=
false
this
.
showModal
.
visible
=
false
isFn
(
this
.
onModalCloseCallback
)
&&
this
.
onModalCloseCallback
(
type
)
isFn
(
this
.
onModalCloseCallback
)
&&
this
.
onModalCloseCallback
(
res
)
}
}
}
}
}
}
src/platforms/h5/components/app/popup/modal.vue
浏览文件 @
e3cd58ad
...
@@ -15,7 +15,16 @@
...
@@ -15,7 +15,16 @@
v-text=
"title"
v-text=
"title"
/>
/>
</div>
</div>
<textarea
v-if=
"editable"
ref=
"editContent"
class=
"uni-modal__textarea"
rows=
"1"
:placeholder=
"placeholderText"
:value=
"content"
/>
<div
<div
v-else
class=
"uni-modal__bd"
class=
"uni-modal__bd"
@
touchmove.stop
@
touchmove.stop
v-text=
"content"
v-text=
"content"
...
@@ -41,7 +50,7 @@
...
@@ -41,7 +50,7 @@
<keypress
<keypress
:disable=
"!visible"
:disable=
"!visible"
@
esc=
"_close('cancel')"
@
esc=
"_close('cancel')"
@
enter=
"_close('confirm')"
@
enter=
"
!editable &&
_close('confirm')"
/>
/>
</uni-modal>
</uni-modal>
</transition>
</transition>
...
@@ -86,11 +95,25 @@ export default {
...
@@ -86,11 +95,25 @@ export default {
visible
:
{
visible
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
editable
:
{
type
:
Boolean
,
default
:
false
},
placeholderText
:
{
type
:
String
,
default
:
''
}
}
},
},
methods
:
{
methods
:
{
_close
(
type
)
{
_close
(
type
)
{
this
.
$emit
(
'
close
'
,
type
)
const
res
=
{
[
type
]:
true
}
if
(
this
.
editable
&&
type
===
'
confirm
'
)
{
res
.
content
=
this
.
$refs
.
editContent
.
value
}
this
.
$emit
(
'
close
'
,
res
)
}
}
}
}
}
}
...
@@ -156,6 +179,19 @@ export default {
...
@@ -156,6 +179,19 @@ export default {
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
uni-modal
.uni-modal__textarea
{
resize
:
none
;
border
:
0
;
margin
:
0
;
width
:
90%
;
padding
:
10px
;
font-size
:
20px
;
outline
:
none
;
border
:
none
;
background-color
:
#eee
;
text-decoration
:
inherit
;
}
uni-modal
.uni-modal__ft
{
uni-modal
.uni-modal__ft
{
position
:
relative
;
position
:
relative
;
line-height
:
48px
;
line-height
:
48px
;
...
...
src/platforms/h5/service/api/ui/popup.js
浏览文件 @
e3cd58ad
...
@@ -4,10 +4,8 @@ const {
...
@@ -4,10 +4,8 @@ const {
}
=
UniServiceJSBridge
}
=
UniServiceJSBridge
export
function
showModal
(
args
,
callbackId
)
{
export
function
showModal
(
args
,
callbackId
)
{
emit
(
'
onShowModal
'
,
args
,
function
(
type
)
{
emit
(
'
onShowModal
'
,
args
,
function
(
res
)
{
invoke
(
callbackId
,
{
invoke
(
callbackId
,
res
)
[
type
]:
true
})
})
})
}
}
...
@@ -43,4 +41,4 @@ export function showActionSheet (args, callbackId) {
...
@@ -43,4 +41,4 @@ export function showActionSheet (args, callbackId) {
})
})
}
}
})
})
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录