Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
b2970df4
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,发现更多精彩内容 >>
提交
b2970df4
编写于
4月 18, 2020
作者:
fxy060608
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of
https://github.com/dcloudio/uni-app
into dev-quickapp
上级
24119086
8df152a3
变更
26
展开全部
显示空白变更内容
内联
并排
Showing
26 changed file
with
225 addition
and
131 deletion
+225
-131
packages/uni-app-plus/template/common/__uniappopenlocation.js
...ages/uni-app-plus/template/common/__uniappopenlocation.js
+1
-1
packages/uni-app-plus/template/common/__uniapppicker.js
packages/uni-app-plus/template/common/__uniapppicker.js
+1
-1
packages/uni-cli-shared/lib/platform.js
packages/uni-cli-shared/lib/platform.js
+2
-2
packages/uni-cli-shared/template/common/__uniappopenlocation.js
...es/uni-cli-shared/template/common/__uniappopenlocation.js
+1
-1
packages/vue-cli-plugin-uni/lib/app-plus/index.js
packages/vue-cli-plugin-uni/lib/app-plus/index.js
+8
-0
packages/vue-cli-plugin-uni/lib/env.js
packages/vue-cli-plugin-uni/lib/env.js
+6
-0
packages/vue-cli-plugin-uni/packages/@vue/component-compiler-utils/dist/parse.js
...-uni/packages/@vue/component-compiler-utils/dist/parse.js
+3
-2
packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/style.js
...-plugin-uni/packages/webpack-uni-app-loader/view/style.js
+24
-0
packages/webpack-uni-pages-loader/lib/platforms/app-plus/define-pages.js
...k-uni-pages-loader/lib/platforms/app-plus/define-pages.js
+1
-1
src/core/view/components/canvas/index.vue
src/core/view/components/canvas/index.vue
+25
-25
src/core/view/components/editor/formats/image.js
src/core/view/components/editor/formats/image.js
+28
-0
src/core/view/components/editor/index.vue
src/core/view/components/editor/index.vue
+8
-2
src/core/view/components/image/index.vue
src/core/view/components/image/index.vue
+5
-8
src/core/view/components/input/index.vue
src/core/view/components/input/index.vue
+10
-7
src/core/view/components/movable-area/index.vue
src/core/view/components/movable-area/index.vue
+13
-11
src/core/view/components/picker-view/index.vue
src/core/view/components/picker-view/index.vue
+3
-1
src/core/view/components/swiper/index.vue
src/core/view/components/swiper/index.vue
+1
-18
src/core/view/components/textarea/index.vue
src/core/view/components/textarea/index.vue
+5
-2
src/core/view/mixins/base.js
src/core/view/mixins/base.js
+2
-2
src/core/view/mixins/keyboard.js
src/core/view/mixins/keyboard.js
+4
-0
src/platforms/app-plus/service/api/ui/popup.js
src/platforms/app-plus/service/api/ui/popup.js
+1
-1
src/platforms/app-plus/view/components/map/index.vue
src/platforms/app-plus/view/components/map/index.vue
+9
-2
src/platforms/app-plus/view/framework/plugins/data.js
src/platforms/app-plus/view/framework/plugins/data.js
+2
-2
src/platforms/h5/service/api/media/choose-image.js
src/platforms/h5/service/api/media/choose-image.js
+1
-1
src/platforms/h5/view/components/picker/index.vue
src/platforms/h5/view/components/picker/index.vue
+3
-1
src/shared/util.js
src/shared/util.js
+58
-40
未找到文件。
packages/uni-app-plus/template/common/__uniappopenlocation.js
浏览文件 @
b2970df4
此差异已折叠。
点击以展开。
packages/uni-app-plus/template/common/__uniapppicker.js
浏览文件 @
b2970df4
此差异已折叠。
点击以展开。
packages/uni-cli-shared/lib/platform.js
浏览文件 @
b2970df4
...
...
@@ -92,7 +92,7 @@ module.exports = {
return
uniPluginOptions
.
vue
||
'
@dcloudio/vue-cli-plugin-uni/packages/mp-vue
'
},
getPlatformCssVars
()
{
return
uniPluginOptions
.
cssVars
return
uniPluginOptions
.
cssVars
||
{}
},
getPlatformCssnano
()
{
return
{
...
...
packages/uni-cli-shared/template/common/__uniappopenlocation.js
浏览文件 @
b2970df4
此差异已折叠。
点击以展开。
packages/vue-cli-plugin-uni/lib/app-plus/index.js
浏览文件 @
b2970df4
...
...
@@ -236,6 +236,14 @@ const v3 = {
}
if
(
isAppView
)
{
if
(
process
.
env
.
UNI_USING_V3_SCOPED
)
{
webpackConfig
.
module
.
rule
(
'
vue
'
)
.
use
(
'
uniapp-app-style-scoped
'
)
.
loader
(
path
.
resolve
(
__dirname
,
'
../../packages/webpack-uni-app-loader/view/style
'
))
}
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
require
(
'
../h5/cssnano-options
'
)(
webpackConfig
)
}
...
...
packages/vue-cli-plugin-uni/lib/env.js
浏览文件 @
b2970df4
...
...
@@ -26,6 +26,8 @@ global.uniPlugin.validate.forEach(validate => {
process
.
UNI_MANIFEST
=
manifestJsonObj
process
.
env
.
UNI_USING_V3_SCOPED
=
true
process
.
UNI_CLOUD
=
false
process
.
UNI_CLOUD_TCB
=
false
process
.
UNI_CLOUD_ALIYUN
=
false
...
...
@@ -408,6 +410,10 @@ global.uniPlugin.configureEnv.forEach(configureEnv => {
configureEnv
()
})
if
(
process
.
env
.
UNI_PLATFORM
.
startsWith
(
'
mp-
'
))
{
console
.
log
(
'
小程序各家浏览器内核及自定义组件实现机制存在差异,可能存在样式布局兼容问题,参考:https://uniapp.dcloud.io/matter?id=mp
'
)
}
runByHBuilderX
&&
console
.
log
(
'
正在编译中...
'
)
module
.
exports
=
{
...
...
packages/vue-cli-plugin-uni/packages/@vue/component-compiler-utils/dist/parse.js
浏览文件 @
b2970df4
...
...
@@ -7,7 +7,8 @@ const splitRE = /\r?\n/g;
const
emptyRE
=
/^
(?:\/\/)?\s
*$/
;
function
parse
(
options
)
{
const
{
source
,
filename
=
''
,
compiler
,
compilerParseOptions
=
{
pad
:
'
line
'
},
sourceRoot
=
''
,
needMap
=
true
}
=
options
;
const
cacheKey
=
hash
(
filename
+
source
);
// fixed by xxxxxx (添加isAppNVue标记,防止nvue与vue引用相同组件时,走了相同的cache)
const
cacheKey
=
hash
(
String
(
options
.
isAppNVue
)
+
filename
+
source
);
let
output
=
cache
.
get
(
cacheKey
);
if
(
output
)
return
output
;
...
...
packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/style.js
0 → 100644
浏览文件 @
b2970df4
const
path
=
require
(
'
path
'
)
const
loaderUtils
=
require
(
'
loader-utils
'
)
const
isWin
=
/^win/
.
test
(
process
.
platform
)
const
normalizePath
=
path
=>
(
isWin
?
path
.
replace
(
/
\\
/g
,
'
/
'
)
:
path
)
const
AppPath
=
normalizePath
(
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
App.vue
'
))
module
.
exports
=
function
(
content
)
{
this
.
cacheable
&&
this
.
cacheable
()
if
(
this
.
resourceQuery
)
{
const
params
=
loaderUtils
.
parseQuery
(
this
.
resourceQuery
)
if
(
params
.
mpType
===
'
page
'
)
{
return
content
}
}
if
(
normalizePath
(
this
.
resourcePath
)
===
AppPath
)
{
return
content
}
if
(
content
.
indexOf
(
'
platform="mp-weixin"
'
)
!==
-
1
)
{
return
content
}
return
content
.
replace
(
/
(
<style
\b[^
><
]
*
)
>/ig
,
'
$1 scoped>
'
)
}
packages/webpack-uni-pages-loader/lib/platforms/app-plus/define-pages.js
浏览文件 @
b2970df4
...
...
@@ -3,7 +3,7 @@ function generatePageCode (pages, pageOptions) {
if
(
pageOptions
[
pagePath
].
nvue
)
{
return
''
}
return
`__definePage('
${
pagePath
}
',function(){return Vue.extend(require('
${
pagePath
}
.vue').default)})`
return
`__definePage('
${
pagePath
}
',function(){return Vue.extend(require('
${
pagePath
}
.vue
?mpType=page
').default)})`
}).
join
(
'
\n
'
)
}
...
...
src/core/view/components/canvas/index.vue
浏览文件 @
b2970df4
...
...
@@ -279,37 +279,37 @@ export default {
}
},
preloadImage
:
function
(
actions
)
{
var
se
fl
=
this
var
se
lf
=
this
actions
.
forEach
(
function
(
action
)
{
var
method
=
action
.
method
var
data
=
action
.
data
var
src
=
''
if
(
method
===
'
drawImage
'
)
{
src
=
data
[
0
]
src
=
se
fl
.
$getRealPath
(
src
)
src
=
se
lf
.
$getRealPath
(
src
)
data
[
0
]
=
src
}
else
if
(
method
===
'
setFillStyle
'
&&
data
[
0
]
===
'
pattern
'
)
{
src
=
data
[
1
]
src
=
se
fl
.
$getRealPath
(
src
)
src
=
se
lf
.
$getRealPath
(
src
)
data
[
1
]
=
src
}
if
(
src
&&
!
se
fl
.
_images
[
src
])
{
if
(
src
&&
!
se
lf
.
_images
[
src
])
{
loadImage
()
}
/**
* 加载图像
*/
function
loadImage
()
{
se
fl
.
_images
[
src
]
=
new
Image
()
se
fl
.
_images
[
src
].
onload
=
function
()
{
se
fl
.
_images
[
src
].
ready
=
true
se
lf
.
_images
[
src
]
=
new
Image
()
se
lf
.
_images
[
src
].
onload
=
function
()
{
se
lf
.
_images
[
src
].
ready
=
true
}
/**
* 从Blob加载
* @param {Blob} blob
*/
function
loadBlob
(
blob
)
{
se
fl
.
_images
[
src
].
src
=
(
window
.
URL
||
window
.
webkitURL
).
createObjectURL
(
blob
)
se
lf
.
_images
[
src
].
src
=
(
window
.
URL
||
window
.
webkitURL
).
createObjectURL
(
blob
)
}
/**
* 从本地文件加载
...
...
@@ -318,7 +318,7 @@ export default {
function
loadFile
(
path
)
{
var
bitmap
=
new
plus
.
nativeObj
.
Bitmap
(
'
bitmap
'
+
Date
.
now
())
bitmap
.
load
(
path
,
function
()
{
se
fl
.
_images
[
src
].
src
=
bitmap
.
toBase64Data
()
se
lf
.
_images
[
src
].
src
=
bitmap
.
toBase64Data
()
bitmap
.
clear
()
},
function
()
{
bitmap
.
clear
()
...
...
@@ -337,7 +337,7 @@ export default {
if
(
status
===
200
)
{
loadFile
(
d
.
filename
)
}
else
{
se
fl
.
_images
[
src
].
src
=
src
se
lf
.
_images
[
src
].
src
=
src
}
}).
start
()
}
...
...
@@ -350,20 +350,20 @@ export default {
}
}
xhr
.
onerror
=
window
.
plus
?
plusDownload
:
function
()
{
se
fl
.
_images
[
src
].
src
=
src
se
lf
.
_images
[
src
].
src
=
src
}
xhr
.
send
()
}
if
(
window
.
plus
&&
(
!
window
.
webkit
||
!
window
.
webkit
.
messageHandlers
))
{
se
fl
.
_images
[
src
].
src
=
src
se
lf
.
_images
[
src
].
src
=
src
}
else
{
// 解决 PLUS-APP(wkwebview)以及 H5 图像跨域问题(H5图像响应头需包含access-control-allow-origin)
if
(
window
.
plus
&&
src
.
indexOf
(
'
http://
'
)
!==
0
&&
src
.
indexOf
(
'
https://
'
)
!==
0
)
{
loadFile
(
src
)
}
else
if
(
/^data:.*,.*/
.
test
(
src
))
{
se
fl
.
_images
[
src
].
src
=
src
se
lf
.
_images
[
src
].
src
=
src
}
else
{
loadUrl
(
src
)
}
...
...
src/core/view/components/editor/formats/image.js
浏览文件 @
b2970df4
export
default
function
(
Quill
)
{
const
Image
=
Quill
.
import
(
'
formats/image
'
)
const
ATTRIBUTES
=
[
'
alt
'
,
'
height
'
,
'
width
'
,
'
data-custom
'
,
'
class
'
,
'
data-local
'
]
Image
.
sanitize
=
url
=>
url
Image
.
formats
=
function
formats
(
domNode
)
{
return
ATTRIBUTES
.
reduce
(
function
(
formats
,
attribute
)
{
if
(
domNode
.
hasAttribute
(
attribute
))
{
formats
[
attribute
]
=
domNode
.
getAttribute
(
attribute
)
}
return
formats
},
{})
}
const
format
=
Image
.
prototype
.
format
Image
.
prototype
.
format
=
function
(
name
,
value
)
{
if
(
ATTRIBUTES
.
indexOf
(
name
)
>
-
1
)
{
if
(
value
)
{
this
.
domNode
.
setAttribute
(
name
,
value
)
}
else
{
this
.
domNode
.
removeAttribute
(
name
)
}
}
else
{
format
.
call
(
this
,
name
,
value
)
}
}
}
src/core/view/components/editor/index.vue
浏览文件 @
b2970df4
...
...
@@ -142,9 +142,15 @@ export default {
case
'
insertImage
'
:
{
range
=
quill
.
getSelection
(
true
)
const
{
src
=
''
,
alt
=
''
,
data
=
{}
}
=
options
quill
.
insertEmbed
(
range
.
index
,
'
image
'
,
this
.
$getRealPath
(
src
),
Quill
.
sources
.
USER
)
const
{
src
=
''
,
alt
=
''
,
width
=
''
,
height
=
''
,
extClass
=
''
,
data
=
{}
}
=
options
const
path
=
this
.
$getRealPath
(
src
)
quill
.
insertEmbed
(
range
.
index
,
'
image
'
,
path
,
Quill
.
sources
.
USER
)
const
local
=
/^
(
file|blob
)
:/
.
test
(
path
)
?
path
:
false
quill
.
formatText
(
range
.
index
,
1
,
'
data-local
'
,
local
)
quill
.
formatText
(
range
.
index
,
1
,
'
alt
'
,
alt
)
quill
.
formatText
(
range
.
index
,
1
,
'
width
'
,
width
)
quill
.
formatText
(
range
.
index
,
1
,
'
height
'
,
height
)
quill
.
formatText
(
range
.
index
,
1
,
'
class
'
,
extClass
)
quill
.
formatText
(
range
.
index
,
1
,
'
data-custom
'
,
Object
.
keys
(
data
).
map
(
key
=>
`
${
key
}
=
${
data
[
key
]}
`
).
join
(
'
&
'
))
quill
.
setSelection
(
range
.
index
+
1
,
Quill
.
sources
.
SILENT
)
}
...
...
src/core/view/components/image/index.vue
浏览文件 @
b2970df4
...
...
@@ -34,8 +34,7 @@ export default {
return
{
originalWidth
:
0
,
originalHeight
:
0
,
availHeight
:
''
,
sizeFixed
:
false
availHeight
:
''
}
},
computed
:
{
...
...
@@ -43,7 +42,7 @@ export default {
return
this
.
originalWidth
&&
this
.
originalHeight
?
this
.
originalWidth
/
this
.
originalHeight
:
0
},
realImagePath
()
{
return
this
.
src
&&
this
.
$getRealPath
(
this
.
src
)
return
this
.
$getRealPath
(
this
.
src
)
},
modeStyle
()
{
let
size
=
'
auto
'
...
...
@@ -106,7 +105,6 @@ export default {
mode
(
newValue
,
oldValue
)
{
if
(
oldValue
===
'
widthFix
'
)
{
this
.
$el
.
style
.
height
=
this
.
availHeight
this
.
sizeFixed
=
false
}
if
(
newValue
===
'
widthFix
'
&&
this
.
ratio
)
{
this
.
_fixSize
()
...
...
@@ -123,7 +121,7 @@ export default {
},
methods
:
{
_resize
()
{
if
(
this
.
mode
===
'
widthFix
'
&&
!
this
.
sizeFixed
)
{
if
(
this
.
mode
===
'
widthFix
'
)
{
this
.
_fixSize
()
}
},
...
...
@@ -136,7 +134,6 @@ export default {
height
=
Math
.
round
(
height
/
2
)
*
2
}
this
.
$el
.
style
.
height
=
height
+
'
px
'
this
.
sizeFixed
=
true
}
},
_setContentImage
()
{
...
...
src/core/view/components/input/index.vue
浏览文件 @
b2970df4
...
...
@@ -97,7 +97,7 @@ export default {
},
data
()
{
return
{
inputValue
:
this
.
value
+
''
,
inputValue
:
this
.
_getValueString
(
this
.
value
)
,
composing
:
false
,
wrapperHeight
:
0
,
cachedValue
:
''
...
...
@@ -133,7 +133,7 @@ export default {
value
&&
this
.
_focusInput
()
},
value
(
value
)
{
this
.
inputValue
=
value
+
''
this
.
inputValue
=
this
.
_getValueString
(
value
)
},
inputValue
(
value
)
{
this
.
$emit
(
'
update:value
'
,
value
)
...
...
@@ -255,6 +255,9 @@ export default {
value
:
this
.
inputValue
,
key
:
this
.
name
}
:
{}
},
_getValueString
(
value
)
{
return
value
===
null
?
''
:
String
(
value
)
}
}
}
...
...
@@ -295,7 +298,7 @@ uni-input[hidden] {
}
.uni-input-placeholder
,
.uni-input-input
{
.uni-input-input
{
width
:
100%
;
}
...
...
src/core/view/components/movable-area/index.vue
浏览文件 @
b2970df4
<
script
>
import
{
disableScrollBounce
disableScrollBounce
,
deepClone
}
from
'
uni-shared
'
function
calc
(
e
)
{
...
...
@@ -142,8 +143,9 @@ export default {
},
render
(
createElement
)
{
var
items
=
[]
if
(
this
.
$slots
.
default
)
{
this
.
$slots
.
default
.
forEach
(
vnode
=>
{
const
$slots
=
this
.
$slots
.
default
&&
deepClone
(
this
.
$slots
.
default
,
createElement
)
if
(
$slots
)
{
$slots
.
forEach
(
vnode
=>
{
if
(
vnode
.
componentOptions
&&
vnode
.
componentOptions
.
tag
===
'
v-uni-movable-view
'
)
{
items
.
push
(
vnode
)
}
...
...
@@ -163,7 +165,7 @@ export default {
on
:
{
resize
:
this
.
_resize
}
}),
this
.
$slots
.
default
])
}),
$slots
])
}
}
</
script
>
...
...
src/core/view/components/picker-view/index.vue
浏览文件 @
b2970df4
<
script
>
import
{
deepClone
}
from
'
uni-shared
'
export
default
{
name
:
'
PickerView
'
,
props
:
{
...
...
@@ -93,7 +95,7 @@ export default {
render
(
createElement
)
{
var
items
=
[]
if
(
this
.
$slots
.
default
)
{
this
.
$slots
.
default
.
forEach
(
vnode
=>
{
deepClone
(
this
.
$slots
.
default
,
createElement
)
.
forEach
(
vnode
=>
{
if
(
vnode
.
componentOptions
&&
vnode
.
componentOptions
.
tag
===
'
v-uni-picker-view-column
'
)
{
items
.
push
(
vnode
)
}
...
...
src/core/view/components/swiper/index.vue
浏览文件 @
b2970df4
<
script
>
import
touchtrack
from
'
uni-mixins/touchtrack
'
function
deepClone
(
vnodes
,
createElement
)
{
function
cloneVNode
(
vnode
)
{
var
clonedChildren
=
vnode
.
children
&&
vnode
.
children
.
map
(
cloneVNode
)
var
cloned
=
createElement
(
vnode
.
tag
,
vnode
.
data
,
clonedChildren
)
cloned
.
text
=
vnode
.
text
cloned
.
isComment
=
vnode
.
isComment
cloned
.
componentOptions
=
vnode
.
componentOptions
cloned
.
elm
=
vnode
.
elm
cloned
.
context
=
vnode
.
context
cloned
.
ns
=
vnode
.
ns
cloned
.
isStatic
=
vnode
.
isStatic
cloned
.
key
=
vnode
.
key
return
cloned
}
return
vnodes
.
map
(
cloneVNode
)
}
import
{
deepClone
}
from
'
uni-shared
'
export
default
{
name
:
'
Swiper
'
,
...
...
src/core/view/components/textarea/index.vue
浏览文件 @
b2970df4
...
...
@@ -119,7 +119,7 @@ export default {
},
data
()
{
return
{
valueSync
:
String
(
this
.
value
),
valueSync
:
this
.
_getValue
String
(
this
.
value
),
valueComposition
:
''
,
composition
:
false
,
focusSync
:
this
.
focus
,
...
...
@@ -152,7 +152,7 @@ export default {
},
watch
:
{
value
(
val
)
{
this
.
valueSync
=
String
(
val
)
this
.
valueSync
=
this
.
_getValue
String
(
val
)
},
valueSync
(
val
)
{
if
(
val
!==
this
.
_oldValue
)
{
...
...
@@ -296,6 +296,9 @@ export default {
},
_resetFormData
()
{
this
.
valueSync
=
''
},
_getValueString
(
value
)
{
return
value
===
null
?
''
:
String
(
value
)
}
}
}
...
...
src/core/view/mixins/base.js
浏览文件 @
b2970df4
...
...
@@ -6,7 +6,7 @@ import {
export
default
{
methods
:
{
$getRealPath
(
src
)
{
return
getRealPath
(
src
)
return
src
?
getRealPath
(
src
)
:
src
},
$trigger
(
name
,
$event
,
detail
)
{
this
.
$emit
(
name
,
processEvent
.
call
(
this
,
name
,
$event
,
detail
,
this
.
$el
,
this
.
$el
))
...
...
src/core/view/mixins/keyboard.js
浏览文件 @
b2970df4
...
...
@@ -107,6 +107,10 @@ export default {
UniViewJSBridge
.
unsubscribe
(
'
hideKeyboard
'
,
this
.
hideKeyboardTemp
)
document
.
removeEventListener
(
'
click
'
,
iosHideKeyboard
,
false
)
this
.
resetSoftinputNavBar
()
// 修复ios端显示与点击位置错位的Bug by:wyq
if
(
document
.
body
.
scrollIntoView
)
{
document
.
body
.
scrollIntoView
()
}
}
}
}
src/platforms/app-plus/service/api/ui/popup.js
浏览文件 @
b2970df4
...
...
@@ -168,7 +168,7 @@ export function showActionSheet ({
}
if
(
plus
.
os
.
name
===
'
iOS
'
)
{
options
.
cancel
=
'
取消
'
options
.
cancel
=
''
}
plus
.
nativeUI
.
actionSheet
(
Object
.
assign
(
options
,
{
popover
}),
(
e
)
=>
{
...
...
src/platforms/app-plus/view/components/map/index.vue
浏览文件 @
b2970df4
...
...
@@ -320,11 +320,18 @@ export default {
nativeMap
.
__markers__
[
id
+
''
]
=
nativeMarker
})
},
_clearMarkers
()
{
const
map
=
this
.
map
const
data
=
map
.
__markers__
for
(
const
key
in
data
)
{
map
.
removeOverlay
(
data
[
key
])
}
map
.
__markers__
=
{}
},
_addMarkers
(
markers
,
clear
)
{
if
(
this
.
map
)
{
if
(
clear
)
{
this
.
map
.
clearOverlays
()
this
.
map
.
__markers__
=
{}
this
.
_clearMarkers
()
}
markers
.
forEach
(
marker
=>
{
this
.
_addMarker
(
this
.
map
,
marker
)
...
...
src/platforms/app-plus/view/framework/plugins/data.js
浏览文件 @
b2970df4
...
...
@@ -127,7 +127,7 @@ function getData (id, name) {
try
{
return
this
.
$r
[
id
][
name
]
}
catch
(
e
)
{
console
.
error
(
this
.
$options
.
__file
+
`:[
${
this
.
_$id
}
]$r[
${
id
}
][
${
name
}
] is undefined`
)
//
console.error(this.$options.__file + `:[${this._$id}]$r[${id}][${name}] is undefined`)
}
}
/**
...
...
@@ -143,7 +143,7 @@ function getChangeData (id, name) {
this
.
$set
(
this
.
wxsProps
,
wxsPropName
,
value
)
return
value
}
catch
(
e
)
{
console
.
error
(
this
.
$options
.
__file
+
`:[
${
this
.
_$id
}
]$r[
${
id
}
][
${
name
}
] is undefined`
)
//
console.error(this.$options.__file + `:[${this._$id}]$r[${id}][${name}] is undefined`)
}
}
...
...
src/platforms/h5/service/api/media/choose-image.js
浏览文件 @
b2970df4
...
...
@@ -55,7 +55,7 @@ export function chooseImage ({
for
(
let
i
=
0
;
i
<
fileCount
;
i
++
)
{
const
file
=
event
.
target
.
files
[
i
]
let
filePath
Object
.
defineProperty
(
file
,
'
fileP
ath
'
,
{
Object
.
defineProperty
(
file
,
'
p
ath
'
,
{
get
()
{
filePath
=
filePath
||
fileToUrl
(
file
)
return
filePath
...
...
src/platforms/h5/view/components/picker/index.vue
浏览文件 @
b2970df4
...
...
@@ -385,7 +385,9 @@ export default {
for
(
let
index
=
0
;
index
<
length
;
index
++
)
{
const
val0
=
Number
(
val
[
index
])
const
val1
=
Number
(
this
.
valueSync
[
index
])
this
.
valueSync
.
splice
(
index
,
1
,
isNaN
(
val0
)
?
(
isNaN
(
val1
)
?
0
:
val1
)
:
val0
)
const
val2
=
isNaN
(
val0
)
?
(
isNaN
(
val1
)
?
0
:
val1
)
:
val0
const
maxVal
=
this
.
range
[
index
]
?
this
.
range
[
index
].
length
-
1
:
0
this
.
valueSync
.
splice
(
index
,
1
,
val2
>
maxVal
?
0
:
val2
)
}
}
break
...
...
src/shared/util.js
浏览文件 @
b2970df4
...
...
@@ -135,3 +135,21 @@ export function looseEqual (a, b) {
return
false
}
}
export
function
deepClone
(
vnodes
,
createElement
)
{
function
cloneVNode
(
vnode
)
{
var
clonedChildren
=
vnode
.
children
&&
vnode
.
children
.
map
(
cloneVNode
)
var
cloned
=
createElement
(
vnode
.
tag
,
vnode
.
data
,
clonedChildren
)
cloned
.
text
=
vnode
.
text
cloned
.
isComment
=
vnode
.
isComment
cloned
.
componentOptions
=
vnode
.
componentOptions
cloned
.
elm
=
vnode
.
elm
cloned
.
context
=
vnode
.
context
cloned
.
ns
=
vnode
.
ns
cloned
.
isStatic
=
vnode
.
isStatic
cloned
.
key
=
vnode
.
key
return
cloned
}
return
vnodes
.
map
(
cloneVNode
)
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录