Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
20岁爱吃必胜客
uni-app
提交
e6fba19a
U
uni-app
项目概览
20岁爱吃必胜客
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
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,发现更多精彩内容 >>
提交
e6fba19a
编写于
10月 30, 2019
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'v3' of github.com:dcloudio/uni-app into v3
上级
b6844ab2
b006ae0f
变更
18
展开全部
隐藏空白更改
内联
并排
Showing
18 changed file
with
179 addition
and
1364 deletion
+179
-1364
packages/uni-app-plus/dist/view.css
packages/uni-app-plus/dist/view.css
+1
-1358
packages/uni-app-plus/dist/view.umd.min.js
packages/uni-app-plus/dist/view.umd.min.js
+2
-2
packages/vue-cli-plugin-uni/lib/env.js
packages/vue-cli-plugin-uni/lib/env.js
+13
-2
src/core/runtime/wrapper/create-vue-component/index.js
src/core/runtime/wrapper/create-vue-component/index.js
+14
-0
src/core/runtime/wrapper/create-vue-component/parser/behaviors-parser.js
...e/wrapper/create-vue-component/parser/behaviors-parser.js
+5
-0
src/core/runtime/wrapper/create-vue-component/parser/data-parser.js
...untime/wrapper/create-vue-component/parser/data-parser.js
+9
-0
src/core/runtime/wrapper/create-vue-component/parser/definition-filter-parser.js
...r/create-vue-component/parser/definition-filter-parser.js
+5
-0
src/core/runtime/wrapper/create-vue-component/parser/external-classes-parser.js
...er/create-vue-component/parser/external-classes-parser.js
+5
-0
src/core/runtime/wrapper/create-vue-component/parser/index.js
...core/runtime/wrapper/create-vue-component/parser/index.js
+12
-0
src/core/runtime/wrapper/create-vue-component/parser/lifecycle-parser.js
...e/wrapper/create-vue-component/parser/lifecycle-parser.js
+3
-0
src/core/runtime/wrapper/create-vue-component/parser/lifetimes-parser.js
...e/wrapper/create-vue-component/parser/lifetimes-parser.js
+5
-0
src/core/runtime/wrapper/create-vue-component/parser/methods-parser.js
...ime/wrapper/create-vue-component/parser/methods-parser.js
+6
-0
src/core/runtime/wrapper/create-vue-component/parser/observers-parser.js
...e/wrapper/create-vue-component/parser/observers-parser.js
+24
-0
src/core/runtime/wrapper/create-vue-component/parser/options-parser.js
...ime/wrapper/create-vue-component/parser/options-parser.js
+5
-0
src/core/runtime/wrapper/create-vue-component/parser/page-lifetimes-parser.js
...pper/create-vue-component/parser/page-lifetimes-parser.js
+5
-0
src/core/runtime/wrapper/create-vue-component/parser/properties-parser.js
.../wrapper/create-vue-component/parser/properties-parser.js
+33
-0
src/core/runtime/wrapper/create-vue-component/parser/relations-parser.js
...e/wrapper/create-vue-component/parser/relations-parser.js
+5
-0
src/platforms/app-plus/view/framework/plugins/data.js
src/platforms/app-plus/view/framework/plugins/data.js
+27
-2
未找到文件。
packages/uni-app-plus/dist/view.css
浏览文件 @
e6fba19a
此差异已折叠。
点击以展开。
packages/uni-app-plus/dist/view.umd.min.js
浏览文件 @
e6fba19a
此差异已折叠。
点击以展开。
packages/vue-cli-plugin-uni/lib/env.js
浏览文件 @
e6fba19a
...
...
@@ -190,6 +190,7 @@ const warningMsg =
:
`uni-app将于2019年11月1日起停止支持非自定义组件模式 [详情](https://ask.dcloud.net.cn/article/36385)`
const
needWarning
=
!
platformOptions
.
usingComponents
||
usingComponentsAbsent
let
hasNVue
=
false
// 输出编译器版本等信息
if
(
process
.
env
.
UNI_USING_NATIVE
)
{
console
.
log
(
'
当前nvue编译模式:
'
+
(
isNVueCompiler
?
'
uni-app
'
:
'
weex
'
)
+
...
...
@@ -207,9 +208,10 @@ if (process.env.UNI_USING_NATIVE) {
info
=
'
编译器版本:
'
+
pagesPkg
[
'
uni-app
'
][
'
compilerVersion
'
]
+
(
process
.
env
.
UNI_USING_V3
?
'
(v3)
'
:
''
)
}
const
glob
=
require
(
'
glob
'
)
if
(
glob
.
sync
(
'
pages/**/*.nvue
'
,
{
hasNVue
=
!!
glob
.
sync
(
'
pages/**/*.nvue
'
,
{
cwd
:
process
.
env
.
UNI_INPUT_DIR
}).
length
)
{
}).
length
if
(
hasNVue
)
{
console
.
log
(
info
)
console
.
log
(
modeText
)
if
(
needWarning
)
{
...
...
@@ -231,6 +233,15 @@ if (process.env.UNI_USING_NATIVE) {
}
}
catch
(
e
)
{}
}
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
// 运行模式性能提示
let
perfMsg
=
`请注意运行模式下,因日志输出、sourcemap以及未压缩源码等原因,性能和包体积,均不如发行模式。`
if
(
hasNVue
)
{
// app-nvue
perfMsg
=
perfMsg
+
`尤其是app-nvue的sourcemap影响较大`
}
else
if
(
process
.
env
.
UNI_PLATFORM
.
indexOf
(
'
mp-
'
)
===
0
)
{
// 小程序
perfMsg
=
perfMsg
+
`若要正式发布,请点击发行菜单或使用cli发布命令进行发布`
}
console
.
log
(
perfMsg
)
}
const
moduleAlias
=
require
(
'
module-alias
'
)
...
...
src/core/runtime/wrapper/create-vue-component/index.js
0 → 100644
浏览文件 @
e6fba19a
import
{
parseProperties
}
from
'
./parser
'
export
default
function
createVueComponent
(
mpComponentOptions
)
{
const
vueComponentOptions
=
{
watch
:
{},
mpObservers
:
[]
}
parseProperties
(
mpComponentOptions
.
properties
,
vueComponentOptions
)
return
vueComponentOptions
}
src/core/runtime/wrapper/create-vue-component/parser/behaviors-parser.js
0 → 100644
浏览文件 @
e6fba19a
export
function
parseBehaviors
(
behaviors
,
vueComponentOptions
)
{
if
(
!
behaviors
)
{
}
}
src/core/runtime/wrapper/create-vue-component/parser/data-parser.js
0 → 100644
浏览文件 @
e6fba19a
export
function
parseData
(
data
,
vueComponentOptions
)
{
if
(
!
data
)
{
return
}
const
dataJson
=
JSON
.
stringify
(
data
)
vueComponentOptions
.
data
=
function
()
{
return
JSON
.
parse
(
dataJson
)
}
}
src/core/runtime/wrapper/create-vue-component/parser/definition-filter-parser.js
0 → 100644
浏览文件 @
e6fba19a
export
function
parseDefinitionFilter
(
definitionFilter
,
vueComponentOptions
)
{
if
(
!
definitionFilter
)
{
}
}
src/core/runtime/wrapper/create-vue-component/parser/external-classes-parser.js
0 → 100644
浏览文件 @
e6fba19a
export
function
parseExternalClasses
(
externalClasses
,
vueComponentOptions
)
{
if
(
!
externalClasses
)
{
}
}
src/core/runtime/wrapper/create-vue-component/parser/index.js
0 → 100644
浏览文件 @
e6fba19a
export
*
from
'
./proerties-parser
'
export
*
from
'
./data-parser
'
export
*
from
'
./observers-parser
'
export
*
from
'
./behaviors-parser
'
export
*
from
'
./methods-parser
'
export
*
from
'
./lifecycle-parser
'
export
*
from
'
./relations-parser
'
export
*
from
'
./external-classes-parser
'
export
*
from
'
./options-parser
'
export
*
from
'
./lifetimes-parser
'
export
*
from
'
./page-lifetimes-parser
'
export
*
from
'
./definition-filter-parser
'
src/core/runtime/wrapper/create-vue-component/parser/lifecycle-parser.js
0 → 100644
浏览文件 @
e6fba19a
export
function
parseLifecycle
(
mpComponentOptions
,
vueComponentOptions
)
{
}
src/core/runtime/wrapper/create-vue-component/parser/lifetimes-parser.js
0 → 100644
浏览文件 @
e6fba19a
export
function
parseLifetimes
(
lifetimes
,
vueComponentOptions
)
{
if
(
!
lifetimes
)
{
}
}
src/core/runtime/wrapper/create-vue-component/parser/methods-parser.js
0 → 100644
浏览文件 @
e6fba19a
export
function
parseMethods
(
methods
,
vueComponentOptions
)
{
if
(
!
methods
)
{
return
}
vueComponentOptions
.
methods
=
methods
}
src/core/runtime/wrapper/create-vue-component/parser/observers-parser.js
0 → 100644
浏览文件 @
e6fba19a
function
parseSinglePath
(
path
)
{
return
path
.
split
(
'
.
'
)
}
function
parseMultiPaths
(
paths
)
{
return
paths
.
split
(
'
,
'
).
map
(
path
=>
parseSinglePath
(
path
))
}
export
function
parseObservers
(
observers
,
vueComponentOptions
)
{
if
(
!
observers
)
{
return
}
const
{
mpObservers
}
=
vueComponentOptions
Object
.
keys
(
observers
).
forEach
(
path
=>
{
mpObservers
.
push
({
paths
:
parseMultiPaths
(
path
),
observer
:
observers
[
path
]
})
})
}
src/core/runtime/wrapper/create-vue-component/parser/options-parser.js
0 → 100644
浏览文件 @
e6fba19a
export
function
parseOptions
(
options
,
vueComponentOptions
)
{
if
(
!
options
)
{
}
}
src/core/runtime/wrapper/create-vue-component/parser/page-lifetimes-parser.js
0 → 100644
浏览文件 @
e6fba19a
export
function
parsePageLifetimes
(
pageLifetimes
,
vueComponentOptions
)
{
if
(
!
pageLifetimes
)
{
}
}
src/core/runtime/wrapper/create-vue-component/parser/properties-parser.js
0 → 100644
浏览文件 @
e6fba19a
import
{
hasOwn
}
from
'
uni-shared
'
function
parseProperty
(
name
,
property
,
watch
)
{
const
type
=
[
property
.
type
]
if
(
Array
.
isArray
(
property
.
optionalTypes
))
{
type
.
push
(...
property
.
optionalTypes
)
}
const
prop
=
Object
.
create
(
null
)
prop
.
type
=
type
if
(
hasOwn
(
property
,
'
value
'
))
{
prop
[
'
default
'
]
=
prop
.
value
}
if
(
hasOwn
(
property
,
'
observer
'
))
{
watch
[
name
]
=
property
.
observer
}
return
prop
}
export
function
parseProperties
(
properties
,
vueComponentOptions
)
{
if
(
!
properties
)
{
return
}
const
props
=
Object
.
create
(
null
)
const
{
watch
}
=
vueComponentOptions
Object
.
keys
(
properties
).
forEach
(
name
=>
{
props
[
name
]
=
parseProperty
(
name
,
properties
[
name
],
watch
)
})
vueComponentOptions
.
props
=
props
}
src/core/runtime/wrapper/create-vue-component/parser/relations-parser.js
0 → 100644
浏览文件 @
e6fba19a
export
function
parseRelations
(
relations
,
vueComponentOptions
)
{
if
(
!
relations
)
{
}
}
src/platforms/app-plus/view/framework/plugins/data.js
浏览文件 @
e6fba19a
...
...
@@ -59,6 +59,30 @@ const handleData = {
}
}
function
broadcast
(
vm
,
componentName
,
eventName
,
...
params
)
{
vm
.
$children
.
forEach
(
child
=>
{
const
name
=
child
.
$options
.
name
&&
child
.
$options
.
name
.
substr
(
1
)
if
(
~
componentName
.
indexOf
(
name
))
{
child
.
$emit
(
eventName
,
...
params
)
}
broadcast
(
child
,
componentName
,
eventName
,
...
params
)
})
}
const
NATIVE_COMPONENTS
=
[
'
Camera
'
,
'
LivePlayer
'
,
'
LivePusher
'
,
'
Map
'
,
'
Video
'
]
function
updateView
()
{
const
pages
=
getCurrentPages
()
const
pageVm
=
pages
[
0
]
&&
pages
[
0
].
$vm
pageVm
&&
broadcast
(
pageVm
,
NATIVE_COMPONENTS
,
'
uni-view-update
'
)
}
window
.
addEventListener
(
'
resize
'
,
updateView
)
function
vdSync
({
data
,
options
...
...
@@ -71,8 +95,9 @@ function vdSync ({
handleData
[
data
[
0
]](
data
[
1
])
})
vd
.
flush
()
isVdCallback
&&
Vue
.
nextTick
(()
=>
{
UniViewJSBridge
.
publishHandler
(
VD_SYNC_CALLBACK
)
Vue
.
nextTick
(()
=>
{
updateView
()
isVdCallback
&&
UniViewJSBridge
.
publishHandler
(
VD_SYNC_CALLBACK
)
})
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录