Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
c69c516b
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,发现更多精彩内容 >>
提交
c69c516b
编写于
10月 28, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(v3): init createVueComponent
上级
55c2e4de
变更
16
展开全部
显示空白变更内容
内联
并排
Showing
16 changed file
with
139 addition
and
1360 deletion
+139
-1360
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
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
未找到文件。
packages/uni-app-plus/dist/view.css
浏览文件 @
c69c516b
此差异已折叠。
点击以展开。
packages/uni-app-plus/dist/view.umd.min.js
浏览文件 @
c69c516b
此差异已折叠。
点击以展开。
src/core/runtime/wrapper/create-vue-component/index.js
0 → 100644
浏览文件 @
c69c516b
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
浏览文件 @
c69c516b
export
function
parseBehaviors
(
behaviors
,
vueComponentOptions
)
{
if
(
!
behaviors
)
{
}
}
src/core/runtime/wrapper/create-vue-component/parser/data-parser.js
0 → 100644
浏览文件 @
c69c516b
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
浏览文件 @
c69c516b
export
function
parseDefinitionFilter
(
definitionFilter
,
vueComponentOptions
)
{
if
(
!
definitionFilter
)
{
}
}
src/core/runtime/wrapper/create-vue-component/parser/external-classes-parser.js
0 → 100644
浏览文件 @
c69c516b
export
function
parseExternalClasses
(
externalClasses
,
vueComponentOptions
)
{
if
(
!
externalClasses
)
{
}
}
src/core/runtime/wrapper/create-vue-component/parser/index.js
0 → 100644
浏览文件 @
c69c516b
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
浏览文件 @
c69c516b
export
function
parseLifecycle
(
mpComponentOptions
,
vueComponentOptions
)
{
}
src/core/runtime/wrapper/create-vue-component/parser/lifetimes-parser.js
0 → 100644
浏览文件 @
c69c516b
export
function
parseLifetimes
(
lifetimes
,
vueComponentOptions
)
{
if
(
!
lifetimes
)
{
}
}
src/core/runtime/wrapper/create-vue-component/parser/methods-parser.js
0 → 100644
浏览文件 @
c69c516b
export
function
parseMethods
(
methods
,
vueComponentOptions
)
{
if
(
!
methods
)
{
return
}
vueComponentOptions
.
methods
=
methods
}
src/core/runtime/wrapper/create-vue-component/parser/observers-parser.js
0 → 100644
浏览文件 @
c69c516b
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
浏览文件 @
c69c516b
export
function
parseOptions
(
options
,
vueComponentOptions
)
{
if
(
!
options
)
{
}
}
src/core/runtime/wrapper/create-vue-component/parser/page-lifetimes-parser.js
0 → 100644
浏览文件 @
c69c516b
export
function
parsePageLifetimes
(
pageLifetimes
,
vueComponentOptions
)
{
if
(
!
pageLifetimes
)
{
}
}
src/core/runtime/wrapper/create-vue-component/parser/properties-parser.js
0 → 100644
浏览文件 @
c69c516b
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
浏览文件 @
c69c516b
export
function
parseRelations
(
relations
,
vueComponentOptions
)
{
if
(
!
relations
)
{
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录