Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
82962545
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
751
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
82962545
编写于
5月 14, 2024
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
197501e7
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
40 addition
and
6 deletion
+40
-6
packages/uni-h5/dist-x/uni-h5.cjs.js
packages/uni-h5/dist-x/uni-h5.cjs.js
+19
-2
packages/uni-h5/dist-x/uni-h5.es.js
packages/uni-h5/dist-x/uni-h5.es.js
+19
-2
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+1
-1
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+1
-1
未找到文件。
packages/uni-h5/dist-x/uni-h5.cjs.js
浏览文件 @
82962545
...
...
@@ -134,6 +134,9 @@ function isAnyType(type) {
function
isUTSType
(
type
)
{
return
type
&&
type
.
prototype
&&
type
.
prototype
instanceof
UTSType
;
}
function
normalizeGenericValue
(
value
,
genericType
,
isJSONParse
=
false
)
{
return
value
==
null
?
null
:
isBaseType
(
genericType
)
||
isUnknownType
(
genericType
)
||
isAnyType
(
genericType
)
?
value
:
genericType
===
Array
?
new
Array
(...
value
)
:
new
genericType
(
value
,
void
0
,
isJSONParse
);
}
class
UTSType
{
static
get
$UTSMetadata$
(...
args
)
{
return
{
...
...
@@ -161,10 +164,24 @@ class UTSType {
}
super
();
return
options
.
map
((
item
)
=>
{
return
item
==
null
?
null
:
isBaseType
(
generics
[
0
])
||
isUnknownType
(
generics
[
0
])
||
isAnyType
(
generics
[
0
])
?
item
:
generics
[
0
]
===
Array
?
new
Array
(...
item
)
:
new
generics
[
0
](
item
,
void
0
,
isJSONParse2
);
return
normalizeGenericValue
(
item
,
generics
[
0
]
,
isJSONParse2
);
});
}
};
}
else
if
(
parent
===
Map
||
parent
===
WeakMap
)
{
return
class
UTSMap
extends
UTSType
{
constructor
(
options
,
isJSONParse2
=
false
)
{
if
(
options
==
null
||
typeof
options
!==
"
object
"
)
{
throw
new
UTSError
(
`Failed to contruct type,
${
options
}
is not an object`
);
}
super
();
const
obj
=
new
parent
();
for
(
const
key
in
options
)
{
obj
.
set
(
normalizeGenericValue
(
key
,
generics
[
0
],
isJSONParse2
),
normalizeGenericValue
(
options
[
key
],
generics
[
1
],
isJSONParse2
));
}
return
obj
;
}
};
}
else
if
(
isUTSType
(
parent
))
{
return
class
VirtualClassWithGenerics
extends
parent
{
static
get
$UTSMetadata$
()
{
...
...
@@ -1664,7 +1681,7 @@ function addBase(filePath) {
function
getRealPath
(
filePath
)
{
const
{
base
,
assets
}
=
__uniConfig
.
router
;
if
(
base
===
"
./
"
)
{
if
(
filePath
.
indexOf
(
"
./
static/
"
)
===
0
||
assets
&&
filePath
.
indexOf
(
"
./
"
+
assets
+
"
/
"
)
===
0
)
{
if
(
filePath
.
indexOf
(
"
./
"
)
===
0
&&
(
filePath
.
includes
(
"
/static/
"
)
||
filePath
.
indexOf
(
"
./
"
+
(
assets
||
"
assets
"
)
+
"
/
"
)
===
0
)
)
{
filePath
=
filePath
.
slice
(
1
);
}
}
...
...
packages/uni-h5/dist-x/uni-h5.es.js
浏览文件 @
82962545
...
...
@@ -133,6 +133,9 @@ function isAnyType(type) {
function isUTSType(type) {
return type && type.prototype && type.prototype instanceof UTSType;
}
function normalizeGenericValue(value, genericType, isJSONParse = false) {
return value == null ? null : isBaseType(genericType) || isUnknownType(genericType) || isAnyType(genericType) ? value : genericType === Array ? new Array(...value) : new genericType(value, void 0, isJSONParse);
}
class UTSType {
static get$UTSMetadata$(...args) {
return {
...
...
@@ -160,10 +163,24 @@ class UTSType {
}
super();
return options.map((item) => {
return
item == null ? null : isBaseType(generics[0]) || isUnknownType(generics[0]) || isAnyType(generics[0]) ? item : generics[0] === Array ? new Array(...item) : new generics[0](item, void 0
, isJSONParse2);
return
normalizeGenericValue(item, generics[0]
, isJSONParse2);
});
}
};
} else if (parent === Map || parent === WeakMap) {
return class UTSMap extends UTSType {
constructor(options, isJSONParse2 = false) {
if (options == null || typeof options !== "object") {
throw new UTSError(`Failed to contruct type, ${options} is not an object`);
}
super();
const obj = new parent();
for (const key in options) {
obj.set(normalizeGenericValue(key, generics[0], isJSONParse2), normalizeGenericValue(options[key], generics[1], isJSONParse2));
}
return obj;
}
};
} else if (isUTSType(parent)) {
return class VirtualClassWithGenerics extends parent {
static get$UTSMetadata$() {
...
...
@@ -3021,7 +3038,7 @@ function addBase(filePath) {
function getRealPath(filePath) {
const { base, assets } = __uniConfig.router;
if (base === "./") {
if (filePath.indexOf("./
static/") === 0 || assets && filePath.indexOf("./" + assets + "/") === 0
) {
if (filePath.indexOf("./
") === 0 && (filePath.includes("/static/") || filePath.indexOf("./" + (assets || "assets") + "/") === 0)
) {
filePath = filePath.slice(1);
}
}
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
82962545
...
...
@@ -1048,7 +1048,7 @@ function addBase(filePath) {
function
getRealPath
(
filePath
)
{
const
{
base
,
assets
}
=
__uniConfig
.
router
;
if
(
base
===
"
./
"
)
{
if
(
filePath
.
indexOf
(
"
./
static/
"
)
===
0
||
assets
&&
filePath
.
indexOf
(
"
./
"
+
assets
+
"
/
"
)
===
0
)
{
if
(
filePath
.
indexOf
(
"
./
"
)
===
0
&&
(
filePath
.
includes
(
"
/static/
"
)
||
filePath
.
indexOf
(
"
./
"
+
(
assets
||
"
assets
"
)
+
"
/
"
)
===
0
)
)
{
filePath
=
filePath
.
slice
(
1
);
}
}
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
82962545
...
...
@@ -2367,7 +2367,7 @@ function addBase(filePath) {
function getRealPath(filePath) {
const { base, assets } = __uniConfig.router;
if (base === "./") {
if (filePath.indexOf("./
static/") === 0 || assets && filePath.indexOf("./" + assets + "/") === 0
) {
if (filePath.indexOf("./
") === 0 && (filePath.includes("/static/") || filePath.indexOf("./" + (assets || "assets") + "/") === 0)
) {
filePath = filePath.slice(1);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录