Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wulaladx
uni-app
提交
315ac2cf
U
uni-app
项目概览
wulaladx
/
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,发现更多精彩内容 >>
提交
315ac2cf
编写于
10月 17, 2022
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' into alpha
上级
d30323ee
79b231d5
变更
12
展开全部
隐藏空白更改
内联
并排
Showing
12 changed file
with
122 addition
and
123 deletion
+122
-123
packages/uni-cli-shared/lib/index.js
packages/uni-cli-shared/lib/index.js
+1
-2
packages/uni-cli-shared/lib/uni_modules-loader.js
packages/uni-cli-shared/lib/uni_modules-loader.js
+0
-8
packages/uni-cli-shared/lib/uni_modules/uni_modules.js
packages/uni-cli-shared/lib/uni_modules/uni_modules.js
+74
-84
packages/vue-cli-plugin-uni/lib/app-plus/index.js
packages/vue-cli-plugin-uni/lib/app-plus/index.js
+2
-3
packages/vue-cli-plugin-uni/lib/configure-webpack.js
packages/vue-cli-plugin-uni/lib/configure-webpack.js
+21
-10
packages/vue-cli-plugin-uni/lib/h5/index.js
packages/vue-cli-plugin-uni/lib/h5/index.js
+2
-3
packages/vue-cli-plugin-uni/lib/mp/index.js
packages/vue-cli-plugin-uni/lib/mp/index.js
+2
-3
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/view/components/swiper/index.vue
src/core/view/components/swiper/index.vue
+6
-5
src/platforms/app-plus/service/api/device/system.js
src/platforms/app-plus/service/api/device/system.js
+3
-3
src/platforms/app-plus/view/components/video/index.vue
src/platforms/app-plus/view/components/video/index.vue
+6
-1
src/platforms/mp-baidu/runtime/api/index.js
src/platforms/mp-baidu/runtime/api/index.js
+4
-0
未找到文件。
packages/uni-cli-shared/lib/index.js
浏览文件 @
315ac2cf
...
@@ -112,6 +112,5 @@ module.exports = {
...
@@ -112,6 +112,5 @@ module.exports = {
getPlatformGlobal
,
getPlatformGlobal
,
getPlatformStat
,
getPlatformStat
,
getPlatformPush
,
getPlatformPush
,
getPlatformUniCloud
,
getPlatformUniCloud
uniModulesLoader
:
normalizePath
(
require
.
resolve
(
'
./uni_modules-loader
'
))
}
}
packages/uni-cli-shared/lib/uni_modules-loader.js
已删除
100644 → 0
浏览文件 @
d30323ee
const
{
genUniModulesExports
}
=
require
(
'
./uni_modules/uni_modules
'
)
module
.
exports
=
function
()
{
this
.
cacheable
&&
this
.
cacheable
()
return
genUniModulesExports
()
}
packages/uni-cli-shared/lib/uni_modules/uni_modules.js
浏览文件 @
315ac2cf
'
use strict
'
"
use strict
"
;
var
__importDefault
=
(
this
&&
this
.
__importDefault
)
||
function
(
mod
)
{
var
__importDefault
=
(
this
&&
this
.
__importDefault
)
||
function
(
mod
)
{
return
(
mod
&&
mod
.
__esModule
)
?
mod
:
{
default
:
mod
}
return
(
mod
&&
mod
.
__esModule
)
?
mod
:
{
"
default
"
:
mod
};
}
};
Object
.
defineProperty
(
exports
,
'
__esModule
'
,
{
value
:
true
})
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
parseDefines
=
exports
.
parseExports
=
exports
.
genUniModulesExports
=
void
0
exports
.
parseInject
=
exports
.
parseInjects
=
exports
.
parseUniExtApis
=
void
0
;
const
path_1
=
__importDefault
(
require
(
'
path
'
))
const
path_1
=
__importDefault
(
require
(
"
path
"
));
const
fs_extra_1
=
__importDefault
(
require
(
'
fs-extra
'
))
const
fs_extra_1
=
__importDefault
(
require
(
"
fs-extra
"
));
const
merge_1
=
require
(
'
merge
'
)
const
merge_1
=
require
(
"
merge
"
);
function
genUniModulesExports
()
{
function
parseUniExtApis
()
{
const
uniModulesDir
=
path_1
.
default
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
uni_modules
'
)
const
uniModulesDir
=
path_1
.
default
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
uni_modules
'
);
if
(
!
fs_extra_1
.
default
.
existsSync
(
uniModulesDir
))
{
if
(
!
fs_extra_1
.
default
.
existsSync
(
uniModulesDir
))
{
return
''
return
{};
}
const
importCodes
=
[]
const
assignCodes
=
[]
fs_extra_1
.
default
.
readdirSync
(
uniModulesDir
).
forEach
((
uniModuleDir
)
=>
{
var
_a
,
_b
const
pkgPath
=
path_1
.
default
.
resolve
(
uniModulesDir
,
uniModuleDir
,
'
package.json
'
)
if
(
!
fs_extra_1
.
default
.
existsSync
(
pkgPath
))
{
return
}
const
exports
=
(
_b
=
(
_a
=
JSON
.
parse
(
fs_extra_1
.
default
.
readFileSync
(
pkgPath
,
'
utf8
'
)))
===
null
||
_a
===
void
0
?
void
0
:
_a
.
uni_modules
)
===
null
||
_b
===
void
0
?
void
0
:
_b
.
exports
if
(
exports
)
{
const
[
exportsImportCodes
,
exportsAssignCodes
]
=
parseExports
(
process
.
env
.
UNI_PLATFORM
===
'
h5
'
?
'
web
'
:
process
.
env
.
UNI_PLATFORM
,
`@/uni_modules/
${
uniModuleDir
}
`
,
exports
)
importCodes
.
push
(...
exportsImportCodes
)
assignCodes
.
push
(...
exportsAssignCodes
)
}
})
if
(
!
importCodes
.
length
)
{
return
''
}
return
`
${
importCodes
.
join
(
'
\n
'
)}
${
assignCodes
.
join
(
'
\n
'
)}
`
}
exports
.
genUniModulesExports
=
genUniModulesExports
function
parseExports
(
platform
,
source
,
exports
=
{})
{
const
rootDefines
=
{}
Object
.
keys
(
exports
).
forEach
((
name
)
=>
{
if
(
name
.
startsWith
(
'
uni
'
))
{
rootDefines
[
name
]
=
exports
[
name
]
}
}
})
const
injects
=
{};
const
platformDefines
=
exports
[
platform
]
fs_extra_1
.
default
.
readdirSync
(
uniModulesDir
).
forEach
((
uniModuleDir
)
=>
{
// 该平台不支持
var
_a
,
_b
;
if
(
platformDefines
===
false
)
{
// 必须以 uni- 开头
return
[[],
[]]
if
(
!
uniModuleDir
.
startsWith
(
'
uni-
'
))
{
}
return
;
return
parseDefines
(
source
,
(
0
,
merge_1
.
recursive
)(
true
,
rootDefines
,
platformDefines
))
}
const
pkgPath
=
path_1
.
default
.
resolve
(
uniModulesDir
,
uniModuleDir
,
'
package.json
'
);
if
(
!
fs_extra_1
.
default
.
existsSync
(
pkgPath
))
{
return
;
}
const
exports
=
(
_b
=
(
_a
=
JSON
.
parse
(
fs_extra_1
.
default
.
readFileSync
(
pkgPath
,
'
utf8
'
)))
===
null
||
_a
===
void
0
?
void
0
:
_a
.
uni_modules
)
===
null
||
_b
===
void
0
?
void
0
:
_b
[
'
uni-ext-api
'
];
if
(
exports
)
{
Object
.
assign
(
injects
,
parseInjects
(
process
.
env
.
UNI_PLATFORM
===
'
h5
'
?
'
web
'
:
process
.
env
.
UNI_PLATFORM
,
`@/uni_modules/
${
uniModuleDir
}
`
,
exports
));
}
});
return
injects
;
}
}
exports
.
parseExports
=
parseExports
exports
.
parseUniExtApis
=
parseUniExtApis
;
function
parseDefines
(
source
,
defines
=
{})
{
const
importCodes
=
[]
const
assignCodes
=
[]
Object
.
keys
(
defines
).
forEach
((
name
)
=>
{
const
[
defineImportCodes
,
defineAssignCodes
]
=
parseDefine
(
source
,
name
,
defines
[
name
])
importCodes
.
push
(...
defineImportCodes
)
assignCodes
.
push
(...
defineAssignCodes
)
})
return
[
importCodes
,
assignCodes
]
}
exports
.
parseDefines
=
parseDefines
/**
/**
* uni:'getBatteryInfo'
* uni:'getBatteryInfo'
* import getBatteryInfo from '..'
* import getBatteryInfo from '..'
...
@@ -81,29 +52,48 @@ exports.parseDefines = parseDefines
...
@@ -81,29 +52,48 @@ exports.parseDefines = parseDefines
* @param define
* @param define
* @returns
* @returns
*/
*/
function
parseDefine
(
source
,
globalObject
,
define
)
{
function
parseInjects
(
platform
,
source
,
exports
=
{})
{
const
importCodes
=
[]
let
rootDefines
=
{};
const
assignCodes
=
[]
Object
.
keys
(
exports
).
forEach
((
name
)
=>
{
if
(
typeof
define
===
'
string
'
)
{
if
(
name
.
startsWith
(
'
uni
'
))
{
importCodes
.
push
(
`import
${
define
}
from '
${
source
}
'`
)
rootDefines
[
name
]
=
exports
[
name
];
assignCodes
.
push
(
`
${
globalObject
}
.
${
define
}
=
${
define
}
`
)
}
}
else
if
(
Array
.
isArray
(
define
))
{
});
importCodes
.
push
(
`import {
${
define
.
join
(
'
,
'
)}
} from '
${
source
}
'`
)
const
platformDefines
=
exports
[
platform
];
define
.
forEach
((
d
)
=>
{
// 该平台不支持
assignCodes
.
push
(
`
${
globalObject
}
.
${
d
}
=
${
d
}
`
)
if
(
platformDefines
===
false
)
{
})
return
{};
}
else
{
}
const
keys
=
Object
.
keys
(
define
)
if
(
platformDefines
)
{
const
specifiers
=
[]
rootDefines
=
(
0
,
merge_1
.
recursive
)(
true
,
rootDefines
,
platformDefines
);
keys
.
forEach
((
d
)
=>
{
}
if
(
d
!==
define
[
d
])
{
const
injects
=
{};
specifiers
.
push
(
`
${
define
[
d
]}
as
${
d
}
`
)
for
(
const
key
in
rootDefines
)
{
}
else
{
Object
.
assign
(
injects
,
parseInject
(
source
,
'
uni
'
,
rootDefines
[
key
]));
specifiers
.
push
(
d
)
}
}
return
injects
;
assignCodes
.
push
(
`
${
globalObject
}
.
${
d
}
=
${
d
}
`
)
}
})
exports
.
parseInjects
=
parseInjects
;
importCodes
.
push
(
`import {
${
specifiers
.
join
(
'
,
'
)}
} from '
${
source
}
'`
)
function
parseInject
(
source
,
globalObject
,
define
)
{
}
const
injects
=
{};
return
[
importCodes
,
assignCodes
]
if
(
define
===
false
)
{
}
else
if
(
typeof
define
===
'
string
'
)
{
// {'uni.getBatteryInfo' : '@dcloudio/uni-getbatteryinfo'}
injects
[
globalObject
+
'
.
'
+
define
]
=
source
;
}
else
if
(
Array
.
isArray
(
define
))
{
// {'uni.getBatteryInfo' : ['@dcloudio/uni-getbatteryinfo','getBatteryInfo]}
define
.
forEach
((
d
)
=>
{
injects
[
globalObject
+
'
.
'
+
d
]
=
[
source
,
d
];
});
}
else
{
const
keys
=
Object
.
keys
(
define
);
keys
.
forEach
((
d
)
=>
{
injects
[
globalObject
+
'
.
'
+
d
]
=
[
source
,
define
[
d
]];
});
}
return
injects
;
}
}
exports
.
parseInject
=
parseInject
;
packages/vue-cli-plugin-uni/lib/app-plus/index.js
浏览文件 @
315ac2cf
...
@@ -5,8 +5,7 @@ const {
...
@@ -5,8 +5,7 @@ const {
getMainEntry
,
getMainEntry
,
getPlatformStat
,
getPlatformStat
,
getPlatformPush
,
getPlatformPush
,
getPlatformUniCloud
,
getPlatformUniCloud
uniModulesLoader
}
=
require
(
'
@dcloudio/uni-cli-shared
'
)
}
=
require
(
'
@dcloudio/uni-cli-shared
'
)
const
vueLoader
=
require
(
'
@dcloudio/uni-cli-shared/lib/vue-loader
'
)
const
vueLoader
=
require
(
'
@dcloudio/uni-cli-shared/lib/vue-loader
'
)
...
@@ -66,7 +65,7 @@ const v3 = {
...
@@ -66,7 +65,7 @@ const v3 = {
const
pushCode
=
getPlatformPush
()
const
pushCode
=
getPlatformPush
()
const
uniCloudCode
=
getPlatformUniCloud
()
const
uniCloudCode
=
getPlatformUniCloud
()
const
beforeCode
=
`import 'uni-pages';import '
${
uniModulesLoader
}
!';`
const
beforeCode
=
'
import
\'
uni-pages
\'
;
'
if
(
!
webpackConfig
.
optimization
)
{
if
(
!
webpackConfig
.
optimization
)
{
webpackConfig
.
optimization
=
{}
webpackConfig
.
optimization
=
{}
}
}
...
...
packages/vue-cli-plugin-uni/lib/configure-webpack.js
浏览文件 @
315ac2cf
...
@@ -73,8 +73,8 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
...
@@ -73,8 +73,8 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
const
normalized
=
RuleSet
.
normalizeRule
(
clone
,
{},
''
)
const
normalized
=
RuleSet
.
normalizeRule
(
clone
,
{},
''
)
return
(
return
(
!
rule
.
enforce
&&
!
rule
.
enforce
&&
normalized
.
resource
&&
normalized
.
resource
&&
normalized
.
resource
(
fakeFile
)
normalized
.
resource
(
fakeFile
)
)
)
}
}
}
}
...
@@ -230,7 +230,10 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
...
@@ -230,7 +230,10 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
webpackConfig
.
resolve
.
modules
=
webpackConfig
.
resolve
.
modules
.
filter
(
module
=>
module
!==
'
node_modules
'
)
webpackConfig
.
resolve
.
modules
=
webpackConfig
.
resolve
.
modules
.
filter
(
module
=>
module
!==
'
node_modules
'
)
}
}
const
plugins
=
[]
const
plugins
=
[
new
webpack
.
ProvidePlugin
(
require
(
'
@dcloudio/uni-cli-shared/lib/uni_modules/uni_modules
'
)
.
parseUniExtApis
())
]
const
isAppView
=
process
.
env
.
UNI_PLATFORM
===
'
app-plus
'
&&
const
isAppView
=
process
.
env
.
UNI_PLATFORM
===
'
app-plus
'
&&
vueOptions
.
pluginOptions
&&
vueOptions
.
pluginOptions
&&
...
@@ -239,7 +242,9 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
...
@@ -239,7 +242,9 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
if
(
!
isAppView
)
{
// app-plus view不需要copy
if
(
!
isAppView
)
{
// app-plus view不需要copy
const
patterns
=
getCopyWebpackPluginOptions
(
manifestPlatformOptions
,
vueOptions
)
const
patterns
=
getCopyWebpackPluginOptions
(
manifestPlatformOptions
,
vueOptions
)
plugins
.
push
(
new
CopyWebpackPlugin
(
CopyWebpackPluginVersion
>
5
?
{
patterns
}
:
patterns
))
plugins
.
push
(
new
CopyWebpackPlugin
(
CopyWebpackPluginVersion
>
5
?
{
patterns
}
:
patterns
))
}
}
if
(
!
process
.
env
.
UNI_SUBPACKGE
||
!
process
.
env
.
UNI_MP_PLUGIN
)
{
if
(
!
process
.
env
.
UNI_SUBPACKGE
||
!
process
.
env
.
UNI_MP_PLUGIN
)
{
try
{
try
{
...
@@ -258,8 +263,10 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
...
@@ -258,8 +263,10 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
return
''
return
''
}
}
}]
}]
plugins
.
push
(
new
CopyWebpackPlugin
(
CopyWebpackPluginVersion
>
5
?
{
patterns
}
:
patterns
))
plugins
.
push
(
new
CopyWebpackPlugin
(
CopyWebpackPluginVersion
>
5
?
{
}
catch
(
e
)
{
}
patterns
}
:
patterns
))
}
catch
(
e
)
{}
}
}
if
(
process
.
UNI_SCRIPT_ENV
&&
Object
.
keys
(
process
.
UNI_SCRIPT_ENV
).
length
)
{
if
(
process
.
UNI_SCRIPT_ENV
&&
Object
.
keys
(
process
.
UNI_SCRIPT_ENV
).
length
)
{
...
@@ -309,7 +316,8 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
...
@@ -309,7 +316,8 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
})
})
}
}
if
(
process
.
env
.
NODE_ENV
===
'
development
'
||
(
process
.
env
.
NODE_ENV
===
'
production
'
&&
process
.
env
.
SOURCEMAP
===
'
true
'
))
{
if
(
process
.
env
.
NODE_ENV
===
'
development
'
||
(
process
.
env
.
NODE_ENV
===
'
production
'
&&
process
.
env
.
SOURCEMAP
===
'
true
'
))
{
const
sourceMap
=
require
(
'
@dcloudio/uni-cli-shared/lib/source-map
'
)
const
sourceMap
=
require
(
'
@dcloudio/uni-cli-shared/lib/source-map
'
)
let
isAppService
=
false
let
isAppService
=
false
if
(
if
(
...
@@ -331,7 +339,9 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
...
@@ -331,7 +339,9 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
noSources
:
true
,
noSources
:
true
,
append
:
false
append
:
false
}
}
if
(
isInHBuilderX
&&
process
.
env
.
SOURCEMAP_PATH
)
{
sourceMapOptions
.
filename
=
process
.
env
.
SOURCEMAP_PATH
}
if
(
isInHBuilderX
&&
process
.
env
.
SOURCEMAP_PATH
)
{
sourceMapOptions
.
filename
=
process
.
env
.
SOURCEMAP_PATH
}
if
(
useEvalSourceMap
||
useSourceMap
)
{
if
(
useEvalSourceMap
||
useSourceMap
)
{
plugins
.
push
(
sourceMap
.
createSourceMapDevToolPlugin
(
!
sourceMapOptions
.
filename
,
sourceMapOptions
))
plugins
.
push
(
sourceMap
.
createSourceMapDevToolPlugin
(
!
sourceMapOptions
.
filename
,
sourceMapOptions
))
}
}
...
@@ -339,7 +349,8 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
...
@@ -339,7 +349,8 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
if
(
useEvalSourceMap
)
{
if
(
useEvalSourceMap
)
{
plugins
.
push
(
sourceMap
.
createEvalSourceMapDevToolPlugin
())
plugins
.
push
(
sourceMap
.
createEvalSourceMapDevToolPlugin
())
}
else
if
(
useSourceMap
)
{
}
else
if
(
useSourceMap
)
{
plugins
.
push
(
sourceMap
.
createSourceMapDevToolPlugin
(
process
.
env
.
UNI_PLATFORM
===
'
mp-weixin
'
||
process
.
env
.
UNI_PLATFORM
===
'
mp-toutiao
'
))
plugins
.
push
(
sourceMap
.
createSourceMapDevToolPlugin
(
process
.
env
.
UNI_PLATFORM
===
'
mp-weixin
'
||
process
.
env
.
UNI_PLATFORM
===
'
mp-toutiao
'
))
}
}
}
}
}
}
...
@@ -407,4 +418,4 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
...
@@ -407,4 +418,4 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
watchOptions
:
require
(
'
./util
'
).
getWatchOptions
()
watchOptions
:
require
(
'
./util
'
).
getWatchOptions
()
},
platformWebpackConfig
)
},
platformWebpackConfig
)
}
}
}
}
packages/vue-cli-plugin-uni/lib/h5/index.js
浏览文件 @
315ac2cf
...
@@ -7,8 +7,7 @@ const {
...
@@ -7,8 +7,7 @@ const {
getH5Options
,
getH5Options
,
getPlatformStat
,
getPlatformStat
,
getPlatformPush
,
getPlatformPush
,
getPlatformUniCloud
,
getPlatformUniCloud
uniModulesLoader
}
=
require
(
'
@dcloudio/uni-cli-shared
'
)
}
=
require
(
'
@dcloudio/uni-cli-shared
'
)
const
{
const
{
...
@@ -104,7 +103,7 @@ module.exports = {
...
@@ -104,7 +103,7 @@ module.exports = {
}
catch
(
e
)
{}
}
catch
(
e
)
{}
const
beforeCode
=
(
useBuiltIns
===
'
entry
'
?
'
import
\'
@babel/polyfill
\'
;
'
:
''
)
+
const
beforeCode
=
(
useBuiltIns
===
'
entry
'
?
'
import
\'
@babel/polyfill
\'
;
'
:
''
)
+
`import 'uni-pages';import 'uni-
${
process
.
env
.
UNI_PLATFORM
}
';
import '
${
uniModulesLoader
}
!';
`
`import 'uni-pages';import 'uni-
${
process
.
env
.
UNI_PLATFORM
}
';`
return
{
return
{
resolve
:
{
resolve
:
{
...
...
packages/vue-cli-plugin-uni/lib/mp/index.js
浏览文件 @
315ac2cf
...
@@ -9,8 +9,7 @@ const {
...
@@ -9,8 +9,7 @@ const {
getPlatformCssnano
,
getPlatformCssnano
,
getPlatformStat
,
getPlatformStat
,
getPlatformPush
,
getPlatformPush
,
getPlatformUniCloud
,
getPlatformUniCloud
uniModulesLoader
}
=
require
(
'
@dcloudio/uni-cli-shared
'
)
}
=
require
(
'
@dcloudio/uni-cli-shared
'
)
const
WebpackUniAppPlugin
=
require
(
'
../../packages/webpack-uni-app-loader/plugin/index
'
)
const
WebpackUniAppPlugin
=
require
(
'
../../packages/webpack-uni-app-loader/plugin/index
'
)
...
@@ -182,7 +181,7 @@ module.exports = {
...
@@ -182,7 +181,7 @@ module.exports = {
const
pushCode
=
getPlatformPush
()
const
pushCode
=
getPlatformPush
()
const
uniCloudCode
=
getPlatformUniCloud
()
const
uniCloudCode
=
getPlatformUniCloud
()
let
beforeCode
=
`import 'uni-pages';import '
${
uniModulesLoader
}
!';`
let
beforeCode
=
'
import
\'
uni-pages
\'
;
'
const
plugins
=
[
const
plugins
=
[
new
WebpackUniAppPlugin
(),
new
WebpackUniAppPlugin
(),
...
...
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
浏览文件 @
315ac2cf
此差异已折叠。
点击以展开。
src/core/view/components/swiper/index.vue
浏览文件 @
315ac2cf
...
@@ -638,9 +638,11 @@ export default {
...
@@ -638,9 +638,11 @@ export default {
this
.
circularEnabled
?
1
:
0
this
.
circularEnabled
?
1
:
0
)
)
},
},
_navigationClick
(
$event
,
type
)
{
_navigationClick
(
$event
,
type
,
disabled
)
{
$event
.
stopPropagation
()
$event
.
stopPropagation
()
if
(
disabled
)
return
const
swiperItemLength
=
this
.
items
.
length
const
swiperItemLength
=
this
.
items
.
length
let
_current
=
this
.
currentSync
let
_current
=
this
.
currentSync
...
@@ -796,7 +798,7 @@ export default {
...
@@ -796,7 +798,7 @@ export default {
'
div
'
,
'
div
'
,
{
{
on
:
{
on
:
{
click
:
(
e
)
=>
this
.
_navigationClick
(
e
,
'
prev
'
),
click
:
(
e
)
=>
this
.
_navigationClick
(
e
,
'
prev
'
,
this
.
prevDisabled
),
...
navigationEvent
...
navigationEvent
},
},
class
:
[
class
:
[
...
@@ -814,7 +816,7 @@ export default {
...
@@ -814,7 +816,7 @@ export default {
'
div
'
,
'
div
'
,
{
{
on
:
{
on
:
{
click
:
(
e
)
=>
this
.
_navigationClick
(
e
,
'
next
'
),
click
:
(
e
)
=>
this
.
_navigationClick
(
e
,
'
next
'
,
this
.
nextDisabled
),
...
navigationEvent
...
navigationEvent
},
},
class
:
[
class
:
[
...
@@ -949,8 +951,7 @@ uni-swiper .uni-swiper-navigation {
...
@@ -949,8 +951,7 @@ uni-swiper .uni-swiper-navigation {
uni-swiper
.uni-swiper-navigation-disabled
{
uni-swiper
.uni-swiper-navigation-disabled
{
opacity
:
0.35
;
opacity
:
0.35
;
cursor
:
auto
;
cursor
:
not-allowed
;
pointer-events
:
none
;
}
}
uni-swiper
.uni-swiper-navigation-hide
{
uni-swiper
.uni-swiper-navigation-hide
{
...
...
src/platforms/app-plus/service/api/device/system.js
浏览文件 @
315ac2cf
import
{
callApiSync
}
from
'
../util
'
import
{
callApiSync
}
from
'
../util
'
import
{
getWindowInfo
}
from
'
./get-window-info
'
import
{
getWindowInfo
}
from
'
./get-window-info
'
import
deviceId
from
'
uni-platform/helpers/uuid
'
import
{
sortObject
}
from
'
uni-shared
'
import
{
sortObject
}
from
'
uni-shared
'
let
systemInfo
=
{}
let
systemInfo
=
{}
...
@@ -21,7 +20,8 @@ export function getDeviceInfo () {
...
@@ -21,7 +20,8 @@ export function getDeviceInfo () {
weexGetSystemInfoSync
()
weexGetSystemInfoSync
()
const
{
const
{
deviceBrand
=
''
,
deviceModel
,
osName
,
deviceBrand
=
''
,
deviceModel
,
osName
,
osVersion
,
deviceOrientation
,
deviceType
osVersion
,
deviceOrientation
,
deviceType
,
deviceId
}
=
systemInfo
}
=
systemInfo
const
brand
=
deviceBrand
.
toLowerCase
()
const
brand
=
deviceBrand
.
toLowerCase
()
...
@@ -32,7 +32,7 @@ export function getDeviceInfo () {
...
@@ -32,7 +32,7 @@ export function getDeviceInfo () {
deviceBrand
:
brand
,
deviceBrand
:
brand
,
deviceModel
,
deviceModel
,
devicePixelRatio
:
plus
.
screen
.
scale
,
devicePixelRatio
:
plus
.
screen
.
scale
,
deviceId
:
deviceId
()
,
deviceId
,
deviceOrientation
,
deviceOrientation
,
deviceType
,
deviceType
,
model
:
deviceModel
,
model
:
deviceModel
,
...
...
src/platforms/app-plus/view/components/video/index.vue
浏览文件 @
315ac2cf
...
@@ -66,7 +66,8 @@ const attrs = [
...
@@ -66,7 +66,8 @@ const attrs = [
'
httpCache
'
,
'
httpCache
'
,
'
playStrategy
'
,
'
playStrategy
'
,
'
header
'
,
'
header
'
,
'
advanced
'
'
advanced
'
,
'
title
'
]
]
export
default
{
export
default
{
...
@@ -198,6 +199,10 @@ export default {
...
@@ -198,6 +199,10 @@ export default {
default
()
{
default
()
{
return
[]
return
[]
}
}
},
title
:
{
type
:
String
,
default
:
''
}
}
},
},
computed
:
{
computed
:
{
...
...
src/platforms/mp-baidu/runtime/api/index.js
浏览文件 @
315ac2cf
...
@@ -32,6 +32,10 @@ export function createIntersectionObserver (component, options) {
...
@@ -32,6 +32,10 @@ export function createIntersectionObserver (component, options) {
return
swan
.
createIntersectionObserver
(
component
,
options
)
return
swan
.
createIntersectionObserver
(
component
,
options
)
}
}
export
function
createVideoContext
(
videoId
)
{
return
swan
.
createVideoContext
(
videoId
)
}
export
{
export
{
createMediaQueryObserver
createMediaQueryObserver
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录