Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
e3ccd51d
U
uni-app
项目概览
DCloud
/
uni-app
6 天 前同步成功
通知
815
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看板
提交
e3ccd51d
编写于
1月 15, 2024
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
3ef7dcb8
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
5702 addition
and
5686 deletion
+5702
-5686
packages/uni-app-plus/dist/style.css
packages/uni-app-plus/dist/style.css
+1
-1
packages/uni-h5/dist-x/uni-h5.cjs.js
packages/uni-h5/dist-x/uni-h5.cjs.js
+134
-116
packages/uni-h5/dist-x/uni-h5.es.js
packages/uni-h5/dist-x/uni-h5.es.js
+5567
-5569
未找到文件。
packages/uni-app-plus/dist/style.css
浏览文件 @
e3ccd51d
此差异已折叠。
点击以展开。
packages/uni-h5/dist-x/uni-h5.cjs.js
浏览文件 @
e3ccd51d
...
...
@@ -6389,7 +6389,7 @@ const indexX$1 = /* @__PURE__ */ defineBuiltInComponent({
"
style
"
:
setThumbStyle
.
value
,
"
class
"
:
"
uni-slider-thumb-value
"
},
null
,
4
)],
4
),
vue
.
createVNode
(
"
input
"
,
{
"
class
"
:
"
uni-slider-brower-input-range
"
,
"
class
"
:
"
uni-slider-brow
s
er-input-range
"
,
"
type
"
:
"
range
"
,
"
min
"
:
props2
.
min
,
"
max
"
:
props2
.
max
,
...
...
@@ -7860,8 +7860,141 @@ function pruneRouteCache(key) {
}
});
}
function
usePopupStyle
(
props2
)
{
const
popupWidth
=
vue
.
ref
(
0
);
const
popupHeight
=
vue
.
ref
(
0
);
const
isDesktop
=
vue
.
computed
(
()
=>
popupWidth
.
value
>=
500
&&
popupHeight
.
value
>=
500
);
const
popupStyle
=
vue
.
computed
(()
=>
{
const
style
=
{
content
:
{
transform
:
""
,
left
:
""
,
top
:
""
,
bottom
:
""
},
triangle
:
{
left
:
""
,
top
:
""
,
bottom
:
""
,
"
border-width
"
:
""
,
"
border-color
"
:
""
}
};
const
contentStyle
=
style
.
content
;
const
triangleStyle
=
style
.
triangle
;
const
popover
=
props2
.
popover
;
function
getNumber
(
value
)
{
return
Number
(
value
)
||
0
;
}
if
(
isDesktop
.
value
&&
popover
)
{
shared
.
extend
(
triangleStyle
,
{
position
:
"
absolute
"
,
width
:
"
0
"
,
height
:
"
0
"
,
"
margin-left
"
:
"
-6px
"
,
"
border-style
"
:
"
solid
"
});
const
popoverLeft
=
getNumber
(
popover
.
left
);
const
popoverWidth
=
getNumber
(
popover
.
width
);
const
popoverTop
=
getNumber
(
popover
.
top
);
const
popoverHeight
=
getNumber
(
popover
.
height
);
const
center
=
popoverLeft
+
popoverWidth
/
2
;
contentStyle
.
transform
=
"
none !important
"
;
const
contentLeft
=
Math
.
max
(
0
,
center
-
300
/
2
);
contentStyle
.
left
=
`
${
contentLeft
}
px`
;
let
triangleLeft
=
Math
.
max
(
12
,
center
-
contentLeft
);
triangleLeft
=
Math
.
min
(
300
-
12
,
triangleLeft
);
triangleStyle
.
left
=
`
${
triangleLeft
}
px`
;
const
vcl
=
popupHeight
.
value
/
2
;
if
(
popoverTop
+
popoverHeight
-
vcl
>
vcl
-
popoverTop
)
{
contentStyle
.
top
=
"
auto
"
;
contentStyle
.
bottom
=
`
${
popupHeight
.
value
-
popoverTop
+
6
}
px`
;
triangleStyle
.
bottom
=
"
-6px
"
;
triangleStyle
[
"
border-width
"
]
=
"
6px 6px 0 6px
"
;
triangleStyle
[
"
border-color
"
]
=
"
#fcfcfd transparent transparent transparent
"
;
}
else
{
contentStyle
.
top
=
`
${
popoverTop
+
popoverHeight
+
6
}
px`
;
triangleStyle
.
top
=
"
-6px
"
;
triangleStyle
[
"
border-width
"
]
=
"
0 6px 6px 6px
"
;
triangleStyle
[
"
border-color
"
]
=
"
transparent transparent #fcfcfd transparent
"
;
}
}
return
style
;
});
return
{
isDesktop
,
popupStyle
};
}
function
useKeyboard
()
{
const
key
=
vue
.
ref
(
""
);
const
disable
=
vue
.
ref
(
false
);
return
{
key
,
disable
};
}
function
getTheme
()
{
if
(
__uniConfig
.
darkmode
!==
true
)
return
shared
.
isString
(
__uniConfig
.
darkmode
)
?
__uniConfig
.
darkmode
:
"
light
"
;
try
{
return
window
.
matchMedia
(
"
(prefers-color-scheme: light)
"
).
matches
?
"
light
"
:
"
dark
"
;
}
catch
(
error
)
{
return
"
light
"
;
}
}
function
onThemeChange
(
callback
)
{
if
(
__uniConfig
.
darkmode
)
{
UniServiceJSBridge
.
on
(
uniShared
.
ON_THEME_CHANGE
,
callback
);
}
}
function
parseTheme
(
pageStyle
)
{
let
parsedStyle
=
{};
if
(
__uniConfig
.
darkmode
)
{
parsedStyle
=
uniShared
.
normalizeStyles
(
pageStyle
,
__uniConfig
.
themeConfig
,
getTheme
()
);
}
return
__uniConfig
.
darkmode
?
parsedStyle
:
pageStyle
;
}
function
useTheme
(
pageStyle
,
onThemeChangeCallback
)
{
const
isReactived
=
vue
.
isReactive
(
pageStyle
);
const
reactivePageStyle
=
isReactived
?
vue
.
reactive
(
parseTheme
(
pageStyle
))
:
parseTheme
(
pageStyle
);
if
(
__uniConfig
.
darkmode
&&
isReactived
)
{
vue
.
watch
(
pageStyle
,
(
value
)
=>
{
const
_pageStyle
=
parseTheme
(
value
);
for
(
const
key
in
_pageStyle
)
{
reactivePageStyle
[
key
]
=
_pageStyle
[
key
];
}
});
}
onThemeChangeCallback
&&
onThemeChange
(
onThemeChangeCallback
);
return
reactivePageStyle
;
}
let
showActionSheetState
;
const
hideActionSheet
=
()
=>
{
if
(
showActionSheetState
)
{
showActionSheetState
.
visible
=
false
;
}
};
let
showModalState
;
const
hideModal
=
()
=>
{
if
(
showModalState
)
{
showModalState
.
visible
=
false
;
}
};
function
initRouter
(
app
)
{
const
router
=
vueRouter
.
createRouter
(
createRouterOptions
());
router
.
beforeEach
((
to
,
from
)
=>
{
hideActionSheet
();
hideModal
();
uni
.
hideToast
();
uni
.
hideLoading
();
});
app
.
router
=
router
;
app
.
use
(
router
);
}
...
...
@@ -10194,82 +10327,6 @@ const index$8 = /* @__PURE__ */ defineBuiltInComponent({
};
}
});
function
usePopupStyle
(
props2
)
{
const
popupWidth
=
vue
.
ref
(
0
);
const
popupHeight
=
vue
.
ref
(
0
);
const
isDesktop
=
vue
.
computed
(
()
=>
popupWidth
.
value
>=
500
&&
popupHeight
.
value
>=
500
);
const
popupStyle
=
vue
.
computed
(()
=>
{
const
style
=
{
content
:
{
transform
:
""
,
left
:
""
,
top
:
""
,
bottom
:
""
},
triangle
:
{
left
:
""
,
top
:
""
,
bottom
:
""
,
"
border-width
"
:
""
,
"
border-color
"
:
""
}
};
const
contentStyle
=
style
.
content
;
const
triangleStyle
=
style
.
triangle
;
const
popover
=
props2
.
popover
;
function
getNumber
(
value
)
{
return
Number
(
value
)
||
0
;
}
if
(
isDesktop
.
value
&&
popover
)
{
shared
.
extend
(
triangleStyle
,
{
position
:
"
absolute
"
,
width
:
"
0
"
,
height
:
"
0
"
,
"
margin-left
"
:
"
-6px
"
,
"
border-style
"
:
"
solid
"
});
const
popoverLeft
=
getNumber
(
popover
.
left
);
const
popoverWidth
=
getNumber
(
popover
.
width
);
const
popoverTop
=
getNumber
(
popover
.
top
);
const
popoverHeight
=
getNumber
(
popover
.
height
);
const
center
=
popoverLeft
+
popoverWidth
/
2
;
contentStyle
.
transform
=
"
none !important
"
;
const
contentLeft
=
Math
.
max
(
0
,
center
-
300
/
2
);
contentStyle
.
left
=
`
${
contentLeft
}
px`
;
let
triangleLeft
=
Math
.
max
(
12
,
center
-
contentLeft
);
triangleLeft
=
Math
.
min
(
300
-
12
,
triangleLeft
);
triangleStyle
.
left
=
`
${
triangleLeft
}
px`
;
const
vcl
=
popupHeight
.
value
/
2
;
if
(
popoverTop
+
popoverHeight
-
vcl
>
vcl
-
popoverTop
)
{
contentStyle
.
top
=
"
auto
"
;
contentStyle
.
bottom
=
`
${
popupHeight
.
value
-
popoverTop
+
6
}
px`
;
triangleStyle
.
bottom
=
"
-6px
"
;
triangleStyle
[
"
border-width
"
]
=
"
6px 6px 0 6px
"
;
triangleStyle
[
"
border-color
"
]
=
"
#fcfcfd transparent transparent transparent
"
;
}
else
{
contentStyle
.
top
=
`
${
popoverTop
+
popoverHeight
+
6
}
px`
;
triangleStyle
.
top
=
"
-6px
"
;
triangleStyle
[
"
border-width
"
]
=
"
0 6px 6px 6px
"
;
triangleStyle
[
"
border-color
"
]
=
"
transparent transparent #fcfcfd transparent
"
;
}
}
return
style
;
});
return
{
isDesktop
,
popupStyle
};
}
function
useKeyboard
()
{
const
key
=
vue
.
ref
(
""
);
const
disable
=
vue
.
ref
(
false
);
return
{
key
,
disable
};
}
function
_isSlot
(
s
)
{
return
typeof
s
===
"
function
"
||
Object
.
prototype
.
toString
.
call
(
s
)
===
"
[object Object]
"
&&
!
vue
.
isVNode
(
s
);
}
...
...
@@ -11309,15 +11366,6 @@ const getStorageInfo = /* @__PURE__ */ defineAsyncApi(
resolve
(
getStorageInfoSync
());
}
);
function
getTheme
()
{
if
(
__uniConfig
.
darkmode
!==
true
)
return
shared
.
isString
(
__uniConfig
.
darkmode
)
?
__uniConfig
.
darkmode
:
"
light
"
;
try
{
return
window
.
matchMedia
(
"
(prefers-color-scheme: light)
"
).
matches
?
"
light
"
:
"
dark
"
;
}
catch
(
error
)
{
return
"
light
"
;
}
}
let
browserInfo
;
function
initBrowserInfo
()
{
{
...
...
@@ -11477,36 +11525,6 @@ const UniServiceJSBridge$1 = /* @__PURE__ */ shared.extend(ServiceJSBridge, {
UniViewJSBridge
.
subscribeHandler
(
event
,
args
,
pageId
);
}
});
function
onThemeChange
(
callback
)
{
if
(
__uniConfig
.
darkmode
)
{
UniServiceJSBridge
.
on
(
uniShared
.
ON_THEME_CHANGE
,
callback
);
}
}
function
parseTheme
(
pageStyle
)
{
let
parsedStyle
=
{};
if
(
__uniConfig
.
darkmode
)
{
parsedStyle
=
uniShared
.
normalizeStyles
(
pageStyle
,
__uniConfig
.
themeConfig
,
getTheme
()
);
}
return
__uniConfig
.
darkmode
?
parsedStyle
:
pageStyle
;
}
function
useTheme
(
pageStyle
,
onThemeChangeCallback
)
{
const
isReactived
=
vue
.
isReactive
(
pageStyle
);
const
reactivePageStyle
=
isReactived
?
vue
.
reactive
(
parseTheme
(
pageStyle
))
:
parseTheme
(
pageStyle
);
if
(
__uniConfig
.
darkmode
&&
isReactived
)
{
vue
.
watch
(
pageStyle
,
(
value
)
=>
{
const
_pageStyle
=
parseTheme
(
value
);
for
(
const
key
in
_pageStyle
)
{
reactivePageStyle
[
key
]
=
_pageStyle
[
key
];
}
});
}
onThemeChangeCallback
&&
onThemeChange
(
onThemeChangeCallback
);
return
reactivePageStyle
;
}
const
_middleButton
=
{
width
:
"
50px
"
,
height
:
"
50px
"
,
...
...
packages/uni-h5/dist-x/uni-h5.es.js
浏览文件 @
e3ccd51d
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录