Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
erosXXX
uni-app
提交
a593f763
U
uni-app
项目概览
erosXXX
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a593f763
编写于
12月 19, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(cli): auto import components
上级
37d319c1
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
35 addition
and
39 deletion
+35
-39
lerna.json
lerna.json
+1
-1
packages/uni-app-plus/dist/index.js
packages/uni-app-plus/dist/index.js
+1
-1
packages/uni-mp-alipay/dist/index.js
packages/uni-mp-alipay/dist/index.js
+4
-1
packages/uni-mp-baidu/dist/index.js
packages/uni-mp-baidu/dist/index.js
+1
-1
packages/uni-mp-qq/dist/index.js
packages/uni-mp-qq/dist/index.js
+1
-1
packages/uni-mp-toutiao/dist/index.js
packages/uni-mp-toutiao/dist/index.js
+1
-1
packages/uni-mp-weixin/dist/index.js
packages/uni-mp-weixin/dist/index.js
+1
-1
packages/uni-template-compiler/lib/auto-components.js
packages/uni-template-compiler/lib/auto-components.js
+5
-0
packages/uni-template-compiler/lib/index.js
packages/uni-template-compiler/lib/index.js
+1
-1
packages/vue-cli-plugin-uni/lib/env.js
packages/vue-cli-plugin-uni/lib/env.js
+12
-25
packages/webpack-uni-pages-loader/lib/platforms/mp-qq/index.js
...ges/webpack-uni-pages-loader/lib/platforms/mp-qq/index.js
+7
-6
未找到文件。
lerna.json
浏览文件 @
a593f763
...
...
@@ -12,5 +12,5 @@
"message"
:
"chore(release): publish %s"
}
},
"version"
:
"2.0.0-alpha-247201912160
06
"
"version"
:
"2.0.0-alpha-247201912160
32
"
}
packages/uni-app-plus/dist/index.js
浏览文件 @
a593f763
...
...
@@ -19,7 +19,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
packages/uni-mp-alipay/dist/index.js
浏览文件 @
a593f763
...
...
@@ -19,7 +19,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
@@ -751,6 +751,9 @@ const protocols = { // 需要做转换的 API 列表
},
showShareMenu
:
{
name
:
'
showSharePanel
'
},
hideHomeButton
:
{
name
:
'
hideBackHome
'
}
};
...
...
packages/uni-mp-baidu/dist/index.js
浏览文件 @
a593f763
...
...
@@ -19,7 +19,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
packages/uni-mp-qq/dist/index.js
浏览文件 @
a593f763
...
...
@@ -19,7 +19,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
packages/uni-mp-toutiao/dist/index.js
浏览文件 @
a593f763
...
...
@@ -19,7 +19,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
packages/uni-mp-weixin/dist/index.js
浏览文件 @
a593f763
...
...
@@ -19,7 +19,7 @@ function hasOwn (obj, key) {
return
hasOwnProperty
.
call
(
obj
,
key
)
}
function
noop
()
{}
function
noop
()
{
}
/**
* Create a cached version of a pure function.
...
...
packages/uni-template-compiler/lib/auto-components.js
浏览文件 @
a593f763
...
...
@@ -20,6 +20,11 @@ function formatSource (source) {
if
(
source
.
indexOf
(
'
@/
'
)
===
0
)
{
// 根目录
source
=
source
.
replace
(
'
@/
'
,
''
)
}
else
{
// node_modules
if
(
process
.
env
.
UNI_PLATFORM
===
'
mp-alipay
'
)
{
if
(
source
.
indexOf
(
'
@
'
)
===
0
)
{
source
=
source
.
replace
(
'
@
'
,
'
npm-scope-
'
)
}
}
source
=
'
node-modules/
'
+
source
}
return
removeExt
(
source
)
...
...
packages/uni-template-compiler/lib/index.js
浏览文件 @
a593f763
...
...
@@ -79,7 +79,7 @@ module.exports = {
const
res
=
compileTemplate
(
source
,
Object
.
assign
(
options
,
{
optimize
:
false
}))
})
,
compile
)
options
.
mp
.
platform
=
platforms
[
options
.
mp
.
platform
]
...
...
packages/vue-cli-plugin-uni/lib/env.js
浏览文件 @
a593f763
...
...
@@ -267,20 +267,6 @@ if (process.env.UNI_PLATFORM === 'h5') {
moduleAlias
.
addAlias
(
'
vue-style-loader
'
,
'
@dcloudio/vue-cli-plugin-uni/packages/h5-vue-style-loader
'
)
}
// vue cache
if
(
// 非 h5 ,非 v3,非 native
process
.
env
.
UNI_PLATFORM
!==
'
h5
'
&&
!
process
.
env
.
UNI_USING_V3
&&
!
process
.
env
.
UNI_USING_NATIVE
)
{
moduleAlias
.
addAlias
(
'
./loaders/pitcher
'
,
(
fromPath
,
request
,
alias
)
=>
{
if
(
fromPath
.
indexOf
(
'
vue-loader
'
)
!==
-
1
)
{
return
require
.
resolve
(
'
@dcloudio/vue-cli-plugin-hbuilderx/packages/vue-loader/lib/loaders/pitcher
'
)
}
return
request
})
}
if
(
process
.
env
.
UNI_PLATFORM
===
'
mp-toutiao
'
)
{
// !important 始终带有一个空格
moduleAlias
.
addAlias
(
...
...
@@ -304,6 +290,18 @@ if (runByHBuilderX) {
}
}
}
// 组件自动导入配置
process
.
UNI_AUTO_COMPONENTS
=
[]
const
usingAutoImportComponents
=
pagesJsonObj
.
usingAutoImportComponents
if
(
usingAutoImportComponents
)
{
Object
.
keys
(
usingAutoImportComponents
).
forEach
(
pattern
=>
{
process
.
UNI_AUTO_COMPONENTS
.
push
({
pattern
:
new
RegExp
(
pattern
),
replacement
:
usingAutoImportComponents
[
pattern
]
})
})
}
if
(
process
.
env
.
UNI_USING_CACHE
&&
...
...
@@ -321,17 +319,6 @@ if (
require
(
'
@dcloudio/uni-cli-shared/lib/cache
'
).
restore
()
}
}
// 组件自动导入配置
process
.
UNI_AUTO_COMPONENTS
=
[]
const
usingAutoImportComponents
=
pagesJsonObj
.
usingAutoImportComponents
if
(
usingAutoImportComponents
)
{
Object
.
keys
(
usingAutoImportComponents
).
forEach
(
pattern
=>
{
process
.
UNI_AUTO_COMPONENTS
.
push
({
pattern
:
new
RegExp
(
pattern
),
replacement
:
usingAutoImportComponents
[
pattern
]
})
})
}
runByHBuilderX
&&
console
.
log
(
`正在编译中...`
)
...
...
packages/webpack-uni-pages-loader/lib/platforms/mp-qq/index.js
浏览文件 @
a593f763
...
...
@@ -5,12 +5,13 @@ module.exports = function (pagesJson, manifestJson) {
}
=
require
(
'
../mp
'
)(
pagesJson
,
manifestJson
,
require
(
'
./project.config.json
'
))
if
(
app
.
content
&&
app
.
content
.
subPackages
&&
app
.
content
.
subPackages
.
length
===
0
)
{
delete
app
.
content
.
subPackages
}
project
.
content
.
qqappid
=
project
.
content
.
appid
project
.
content
.
qqLibVersion
=
project
.
content
.
libVersion
delete
project
.
content
.
appid
delete
project
.
content
.
libVersion
}
if
(
project
)
{
project
.
content
.
qqappid
=
project
.
content
.
appid
project
.
content
.
qqLibVersion
=
project
.
content
.
libVersion
delete
project
.
content
.
appid
delete
project
.
content
.
libVersion
}
return
[
app
,
project
]
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录