Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ChenYFan_OHHH
uni-app
提交
cfdd26fd
U
uni-app
项目概览
ChenYFan_OHHH
/
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,发现更多精彩内容 >>
提交
cfdd26fd
编写于
5月 14, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: add defineBuiltInComponent,defineSystemComponent
上级
0939a650
变更
50
隐藏空白更改
内联
并排
Showing
50 changed file
with
387 addition
and
346 deletion
+387
-346
packages/uni-cli-shared/src/json/pages.ts
packages/uni-cli-shared/src/json/pages.ts
+1
-0
packages/uni-components/src/components/button/index.tsx
packages/uni-components/src/components/button/index.tsx
+3
-2
packages/uni-components/src/components/checkbox-group/index.tsx
...es/uni-components/src/components/checkbox-group/index.tsx
+3
-2
packages/uni-components/src/components/checkbox/index.tsx
packages/uni-components/src/components/checkbox/index.tsx
+3
-9
packages/uni-components/src/components/editor/index.tsx
packages/uni-components/src/components/editor/index.tsx
+3
-2
packages/uni-components/src/components/form/index.tsx
packages/uni-components/src/components/form/index.tsx
+3
-2
packages/uni-components/src/components/icon/index.tsx
packages/uni-components/src/components/icon/index.tsx
+4
-2
packages/uni-components/src/components/image/index.tsx
packages/uni-components/src/components/image/index.tsx
+2
-2
packages/uni-components/src/components/input/index.tsx
packages/uni-components/src/components/input/index.tsx
+3
-3
packages/uni-components/src/components/label/index.tsx
packages/uni-components/src/components/label/index.tsx
+4
-4
packages/uni-components/src/components/movable-area/index.tsx
...ages/uni-components/src/components/movable-area/index.tsx
+4
-3
packages/uni-components/src/components/movable-view/index.tsx
...ages/uni-components/src/components/movable-view/index.tsx
+2
-2
packages/uni-components/src/components/picker-view-column/index.tsx
...ni-components/src/components/picker-view-column/index.tsx
+2
-2
packages/uni-components/src/components/picker-view/index.tsx
packages/uni-components/src/components/picker-view/index.tsx
+2
-2
packages/uni-components/src/components/progress/index.tsx
packages/uni-components/src/components/progress/index.tsx
+6
-10
packages/uni-components/src/components/radio-group/index.tsx
packages/uni-components/src/components/radio-group/index.tsx
+3
-2
packages/uni-components/src/components/radio/index.tsx
packages/uni-components/src/components/radio/index.tsx
+3
-9
packages/uni-components/src/components/resize-sensor/index.tsx
...ges/uni-components/src/components/resize-sensor/index.tsx
+2
-2
packages/uni-components/src/components/slider/index.tsx
packages/uni-components/src/components/slider/index.tsx
+3
-9
packages/uni-components/src/components/swiper-item/index.tsx
packages/uni-components/src/components/swiper-item/index.tsx
+3
-2
packages/uni-components/src/components/swiper/index.tsx
packages/uni-components/src/components/swiper/index.tsx
+2
-2
packages/uni-components/src/components/switch/index.tsx
packages/uni-components/src/components/switch/index.tsx
+4
-3
packages/uni-components/src/components/text/index.tsx
packages/uni-components/src/components/text/index.tsx
+3
-8
packages/uni-components/src/components/textarea/index.tsx
packages/uni-components/src/components/textarea/index.tsx
+5
-3
packages/uni-components/src/components/view/index.tsx
packages/uni-components/src/components/view/index.tsx
+2
-2
packages/uni-components/src/helpers/component.ts
packages/uni-components/src/helpers/component.ts
+23
-0
packages/uni-components/src/index.ts
packages/uni-components/src/index.ts
+4
-0
packages/uni-core/src/view/plugin/componentInstance.ts
packages/uni-core/src/view/plugin/componentInstance.ts
+0
-10
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+91
-85
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+108
-104
packages/uni-h5/src/framework/components/async-error/index.tsx
...ges/uni-h5/src/framework/components/async-error/index.tsx
+2
-2
packages/uni-h5/src/framework/components/async-loading/index.ts
...es/uni-h5/src/framework/components/async-loading/index.ts
+3
-3
packages/uni-h5/src/framework/components/layout/index.tsx
packages/uni-h5/src/framework/components/layout/index.tsx
+2
-2
packages/uni-h5/src/framework/components/layout/tabBar.tsx
packages/uni-h5/src/framework/components/layout/tabBar.tsx
+3
-2
packages/uni-h5/src/framework/components/page/index.ts
packages/uni-h5/src/framework/components/page/index.ts
+2
-2
packages/uni-h5/src/framework/components/page/pageBody.tsx
packages/uni-h5/src/framework/components/page/pageBody.tsx
+6
-4
packages/uni-h5/src/framework/components/page/pageHead.tsx
packages/uni-h5/src/framework/components/page/pageHead.tsx
+3
-3
packages/uni-h5/src/framework/setup/provide/page.ts
packages/uni-h5/src/framework/setup/provide/page.ts
+1
-0
packages/uni-h5/src/view/components/map/MapCircle.tsx
packages/uni-h5/src/view/components/map/MapCircle.tsx
+3
-3
packages/uni-h5/src/view/components/map/MapControl.tsx
packages/uni-h5/src/view/components/map/MapControl.tsx
+3
-3
packages/uni-h5/src/view/components/map/MapLocation.tsx
packages/uni-h5/src/view/components/map/MapLocation.tsx
+3
-3
packages/uni-h5/src/view/components/map/MapMarker.tsx
packages/uni-h5/src/view/components/map/MapMarker.tsx
+3
-3
packages/uni-h5/src/view/components/map/MapPolyline.tsx
packages/uni-h5/src/view/components/map/MapPolyline.tsx
+3
-3
packages/uni-h5/src/view/components/map/index.tsx
packages/uni-h5/src/view/components/map/index.tsx
+6
-4
packages/uni-h5/src/view/components/video/index.tsx
packages/uni-h5/src/view/components/video/index.tsx
+2
-2
packages/uni-h5/src/view/components/web-view/index.tsx
packages/uni-h5/src/view/components/web-view/index.tsx
+6
-10
packages/uni-h5/style/framework/base.css
packages/uni-h5/style/framework/base.css
+6
-2
packages/vite-plugin-uni/src/config/index.ts
packages/vite-plugin-uni/src/config/index.ts
+1
-1
packages/vite-plugin-uni/src/vue/compilerOptions.ts
packages/vite-plugin-uni/src/vue/compilerOptions.ts
+17
-6
packages/vite-plugin-uni/src/vue/transforms/block.ts
packages/vite-plugin-uni/src/vue/transforms/block.ts
+11
-0
未找到文件。
packages/uni-cli-shared/src/json/pages.ts
浏览文件 @
cfdd26fd
...
...
@@ -124,6 +124,7 @@ function normalizeNavigationBar(
pageStyle
:
Record
<
string
,
any
>
):
UniApp
.
PageNavigationBar
{
const
navigationBar
=
Object
.
create
(
null
)
as
UniApp
.
PageNavigationBar
Object
.
keys
(
navigationBarMaps
).
forEach
((
name
)
=>
{
if
(
hasOwn
(
pageStyle
,
name
))
{
// @ts-ignore
...
...
packages/uni-components/src/components/button/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
inject
}
from
'
vue
'
import
{
inject
}
from
'
vue
'
import
{
useI18n
,
initI18nButtonMsgsOnce
}
from
'
@dcloudio/uni-core
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
useHover
}
from
'
../../helpers/useHover
'
import
{
useBooleanAttr
}
from
'
../../helpers/useBooleanAttr
'
import
{
UniFormCtx
,
uniFormKey
}
from
'
../form
'
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Button
'
,
props
:
{
id
:
{
...
...
packages/uni-components/src/components/checkbox-group/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
inject
,
provide
,
ref
}
from
'
vue
'
import
{
inject
,
provide
,
ref
}
from
'
vue
'
import
type
{
Ref
,
ExtractPropTypes
,
ComputedRef
}
from
'
vue
'
import
{
PolySymbol
}
from
'
@dcloudio/uni-core
'
import
{
UniFormCtx
,
uniFormKey
}
from
'
../form
'
...
...
@@ -7,6 +7,7 @@ import {
useCustomEvent
,
EmitEvent
,
}
from
'
../../helpers/useEvent
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
export
const
uniCheckGroupKey
=
PolySymbol
(
__DEV__
?
'
uniCheckGroup
'
:
'
ucg
'
)
...
...
@@ -30,7 +31,7 @@ const props = {
type
CheckBoxGroupProps
=
ExtractPropTypes
<
typeof
props
>
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
CheckboxGroup
'
,
props
,
emits
:
[
'
change
'
],
...
...
packages/uni-components/src/components/checkbox/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
onBeforeUnmount
,
watch
,
inject
,
ref
,
computed
,
}
from
'
vue
'
import
{
onBeforeUnmount
,
watch
,
inject
,
ref
,
computed
}
from
'
vue
'
import
type
{
Ref
}
from
'
vue
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
useListeners
}
from
'
../../helpers/useListeners
'
import
{
useBooleanAttr
}
from
'
../../helpers/useBooleanAttr
'
import
{
UniCheckGroupCtx
,
uniCheckGroupKey
}
from
'
../checkbox-group
'
...
...
@@ -40,7 +34,7 @@ const props = {
},
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Checkbox
'
,
props
,
setup
(
props
,
{
slots
})
{
...
...
packages/uni-components/src/components/editor/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
onMounted
,
Ref
,
ref
,
watch
}
from
'
vue
'
import
{
onMounted
,
Ref
,
ref
,
watch
}
from
'
vue
'
import
QuillClass
,
{
QuillOptionsStatic
,
EventEmitter
,
...
...
@@ -7,6 +7,7 @@ import QuillClass, {
}
from
'
quill
'
import
{
useSubscribe
}
from
'
@dcloudio/uni-components
'
import
{
getRealPath
}
from
'
@dcloudio/uni-platform
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
CustomEventTrigger
,
useCustomEvent
}
from
'
../../helpers/useEvent
'
import
{
props
as
keyboardProps
,
...
...
@@ -441,7 +442,7 @@ const props = /*#__PURE__*/ Object.assign({}, keyboardProps, {
},
})
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Editor
'
,
props
,
emit
:
[
'
ready
'
,
'
focus
'
,
'
blur
'
,
'
input
'
,
'
statuschange
'
,
...
keyboardEmit
],
...
...
packages/uni-components/src/components/form/index.tsx
浏览文件 @
cfdd26fd
import
{
PolySymbol
}
from
'
@dcloudio/uni-core
'
import
{
defineComponent
,
provide
,
SetupContext
}
from
'
vue
'
import
{
provide
,
SetupContext
}
from
'
vue
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
export
const
uniFormKey
=
PolySymbol
(
__DEV__
?
'
uniForm
'
:
'
uf
'
)
...
...
@@ -15,7 +16,7 @@ interface UniFormFieldCtx {
reset
?:
()
=>
void
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Form
'
,
setup
(
_props
,
{
slots
,
emit
})
{
provideForm
(
emit
)
...
...
packages/uni-components/src/components/icon/index.tsx
浏览文件 @
cfdd26fd
import
{
computed
,
defineComponent
}
from
'
vue
'
import
{
computed
}
from
'
vue
'
import
{
PRIMARY_COLOR
}
from
'
@dcloudio/uni-shared
'
import
{
...
...
@@ -15,6 +15,8 @@ import {
ICON_PATH_SUCCESS_NO_CIRCLE
,
}
from
'
@dcloudio/uni-core
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
const
INFO_COLOR
=
'
#10aeff
'
const
WARN_COLOR
=
'
#f76260
'
const
GREY_COLOR
=
'
#b2b2b2
'
...
...
@@ -59,7 +61,7 @@ const ICONS = {
},
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Icon
'
,
props
:
{
type
:
{
...
...
packages/uni-components/src/components/image/index.tsx
浏览文件 @
cfdd26fd
...
...
@@ -6,10 +6,10 @@ import {
reactive
,
onMounted
,
onBeforeUnmount
,
defineComponent
,
ExtractPropTypes
,
}
from
'
vue
'
import
{
getRealPath
}
from
'
@dcloudio/uni-platform
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
CustomEventTrigger
,
useCustomEvent
}
from
'
../../helpers/useEvent
'
import
ResizeSensor
from
'
../resize-sensor/index
'
...
...
@@ -56,7 +56,7 @@ const IMAGE_MODES = {
'
bottom right
'
:
[
'
right bottom
'
],
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Image
'
,
props
,
setup
(
props
,
{
emit
})
{
...
...
packages/uni-components/src/components/input/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
Ref
,
ref
,
computed
}
from
'
vue
'
import
{
Ref
,
ref
,
computed
}
from
'
vue
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
props
as
fieldProps
,
emit
as
fieldEmit
,
emit
,
useField
,
}
from
'
../../helpers/useField
'
...
...
@@ -13,7 +13,7 @@ const props = /*#__PURE__*/ Object.assign({}, fieldProps, {
},
})
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Input
'
,
props
,
emit
:
[
'
confirm
'
,
...
fieldEmit
],
...
...
packages/uni-components/src/components/label/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
provide
,
computed
}
from
'
vue
'
import
{
provide
,
computed
}
from
'
vue
'
import
{
PolySymbol
,
useCurrentPageId
}
from
'
@dcloudio/uni-core
'
import
{
withWebEvent
}
from
'
@dcloudio/uni-components
'
import
{
withWebEvent
}
from
'
../../helpers/useEvent
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
export
const
uniLabelKey
=
PolySymbol
(
__DEV__
?
'
uniLabel
'
:
'
ul
'
)
const
props
=
{
for
:
{
...
...
@@ -10,7 +10,7 @@ const props = {
},
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Label
'
,
props
,
setup
(
props
,
{
emit
,
slots
})
{
...
...
packages/uni-components/src/components/movable-area/index.tsx
浏览文件 @
cfdd26fd
import
{
ref
,
defineComponent
,
ExtractPropTypes
,
reactive
,
Ref
,
...
...
@@ -9,7 +8,9 @@ import {
markRaw
,
provide
,
}
from
'
vue
'
import
{
useAttrs
,
withWebEvent
}
from
'
@dcloudio/uni-components
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
withWebEvent
}
from
'
../../helpers/useEvent
'
import
{
useAttrs
}
from
'
../../helpers/useAttrs
'
import
{
initScrollBounce
,
disableScrollBounce
}
from
'
../../helpers/scroll
'
import
ResizeSensor
from
'
../resize-sensor/index
'
import
{
flatVNode
}
from
'
../../helpers/flatVNode
'
...
...
@@ -31,7 +32,7 @@ export interface MovableViewContext {
export
type
AddMovableViewContext
=
(
context
:
MovableViewContext
)
=>
void
export
type
RemoveMovableViewContext
=
(
context
:
MovableViewContext
)
=>
void
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
inheritAttrs
:
false
,
name
:
'
MovableArea
'
,
props
,
...
...
packages/uni-components/src/components/movable-view/index.tsx
浏览文件 @
cfdd26fd
import
{
ref
,
defineComponent
,
ExtractPropTypes
,
Ref
,
onMounted
,
...
...
@@ -9,6 +8,7 @@ import {
watch
,
onUnmounted
,
}
from
'
vue
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
initScrollBounce
,
disableScrollBounce
}
from
'
../../helpers/scroll
'
import
{
useTouchtrack
,
TouchtrackEvent
}
from
'
../../helpers/useTouchtrack
'
import
ResizeSensor
from
'
../resize-sensor/index
'
...
...
@@ -82,7 +82,7 @@ const props = {
type
Props
=
ExtractPropTypes
<
typeof
props
>
type
RootRef
=
Ref
<
HTMLElement
|
null
>
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
MovableView
'
,
props
,
emits
:
[
'
change
'
,
'
scale
'
],
...
...
packages/uni-components/src/components/picker-view-column/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
Ref
,
ref
,
watch
,
...
...
@@ -11,6 +10,7 @@ import {
ComponentInternalInstance
,
nextTick
,
}
from
'
vue
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
useScroller
}
from
'
../../helpers/scroller
'
import
{
Friction
}
from
'
../../helpers/scroller/Friction
'
import
{
Spring
}
from
'
../../helpers/scroller/Spring
'
...
...
@@ -86,7 +86,7 @@ function useCustomClick(dom: HTMLElement) {
})
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
PickerViewColumn
'
,
setup
(
props
,
{
slots
,
emit
})
{
const
rootRef
:
Ref
<
HTMLElement
|
null
>
=
ref
(
null
)
...
...
packages/uni-components/src/components/picker-view/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
Ref
,
ref
,
watch
,
...
...
@@ -12,6 +11,7 @@ import {
PropType
,
ComponentInternalInstance
,
}
from
'
vue
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
flatVNode
}
from
'
../../helpers/flatVNode
'
import
ResizeSensor
from
'
../resize-sensor/index
'
import
{
useCustomEvent
}
from
'
../../helpers/useEvent
'
...
...
@@ -83,7 +83,7 @@ export type GetPickerViewColumn = (
columnInstance
:
ComponentInternalInstance
)
=>
ComputedRef
<
number
>
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
PickerView
'
,
props
,
emits
:
[
'
change
'
,
'
pickstart
'
,
'
pickend
'
,
'
update:value
'
],
...
...
packages/uni-components/src/components/progress/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
ref
,
reactive
,
watch
,
computed
,
ExtractPropTypes
,
}
from
'
vue
'
import
{
PRIMARY_COLOR
}
from
'
@dcloudio/uni-shared
'
import
{
ref
,
reactive
,
watch
,
computed
,
ExtractPropTypes
}
from
'
vue
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
const
VALUES
=
{
activeColor
:
'
#007AFF
'
,
activeColor
:
PRIMARY_COLOR
,
backgroundColor
:
'
#EBEBEB
'
,
activeMode
:
'
backwards
'
,
}
...
...
@@ -64,7 +60,7 @@ const props = {
type
ProgressProps
=
ExtractPropTypes
<
typeof
props
>
type
ProgerssState
=
ReturnType
<
typeof
useProgressState
>
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Progress
'
,
props
,
setup
(
props
)
{
...
...
packages/uni-components/src/components/radio-group/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
inject
,
provide
,
ref
,
onMounted
}
from
'
vue
'
import
{
inject
,
provide
,
ref
,
onMounted
}
from
'
vue
'
import
type
{
Ref
,
ExtractPropTypes
,
WritableComputedRef
}
from
'
vue
'
import
{
PolySymbol
}
from
'
@dcloudio/uni-core
'
import
{
UniFormCtx
,
uniFormKey
}
from
'
../form
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
CustomEventTrigger
,
useCustomEvent
}
from
'
../../helpers/useEvent
'
export
const
uniRadioGroupKey
=
PolySymbol
(
__DEV__
?
'
uniCheckGroup
'
:
'
ucg
'
)
...
...
@@ -26,7 +27,7 @@ const props = {
type
RadioGroupProps
=
ExtractPropTypes
<
typeof
props
>
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
RadioGroup
'
,
props
,
// emits: ['change'],
...
...
packages/uni-components/src/components/radio/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
onBeforeUnmount
,
watch
,
inject
,
ref
,
computed
,
}
from
'
vue
'
import
{
onBeforeUnmount
,
watch
,
inject
,
ref
,
computed
}
from
'
vue
'
import
type
{
Ref
}
from
'
vue
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
useListeners
}
from
'
../../helpers/useListeners
'
import
{
useBooleanAttr
}
from
'
../../helpers/useBooleanAttr
'
import
{
UniRadioGroupCtx
,
uniRadioGroupKey
}
from
'
../radio-group
'
...
...
@@ -40,7 +34,7 @@ const props = {
},
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Radio
'
,
props
,
setup
(
props
,
{
slots
})
{
...
...
packages/uni-components/src/components/resize-sensor/index.tsx
浏览文件 @
cfdd26fd
...
...
@@ -6,12 +6,12 @@ import {
nextTick
,
onMounted
,
onActivated
,
defineComponent
,
SetupContext
,
}
from
'
vue
'
import
{
extend
}
from
'
@vue/shared
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
ResizeSensor
'
,
props
:
{
initial
:
{
...
...
packages/uni-components/src/components/slider/index.tsx
浏览文件 @
cfdd26fd
import
{
computed
,
defineComponent
,
inject
,
onMounted
,
onBeforeUnmount
,
ref
,
}
from
'
vue
'
import
{
computed
,
inject
,
onMounted
,
onBeforeUnmount
,
ref
}
from
'
vue
'
import
type
{
ExtractPropTypes
,
Ref
}
from
'
vue
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
useTouchtrack
,
TouchtrackEvent
}
from
'
../../helpers/useTouchtrack
'
import
{
CustomEventTrigger
,
...
...
@@ -73,7 +67,7 @@ const props = {
type
SliderProps
=
ExtractPropTypes
<
typeof
props
>
type
HTMLRef
=
Ref
<
HTMLElement
|
null
>
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Slider
'
,
props
,
emits
:
[
'
changing
'
,
'
change
'
],
...
...
packages/uni-components/src/components/swiper-item/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
Ref
,
ref
,
onMounted
,
onUnmounted
,
inject
}
from
'
vue
'
import
{
Ref
,
ref
,
onMounted
,
onUnmounted
,
inject
}
from
'
vue
'
import
{
AddSwiperContext
,
SwiperContext
,
RemoveSwiperContext
}
from
'
../swiper
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
const
props
=
{
itemId
:
{
...
...
@@ -8,7 +9,7 @@ const props = {
},
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
SwiperItem
'
,
props
,
setup
(
props
,
{
slots
})
{
...
...
packages/uni-components/src/components/swiper/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
Ref
,
ref
,
watch
,
...
...
@@ -14,6 +13,7 @@ import {
SetupContext
,
}
from
'
vue
'
import
{
upx2px
}
from
'
@dcloudio/uni-api
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
useCustomEvent
,
CustomEventTrigger
}
from
'
../../helpers/useEvent
'
import
{
useTouchtrack
}
from
'
../../helpers/useTouchtrack
'
import
{
flatVNode
}
from
'
../../helpers/flatVNode
'
...
...
@@ -610,7 +610,7 @@ function useLayout(
}
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Swiper
'
,
props
,
emits
:
[
...
...
packages/uni-components/src/components/switch/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
ref
,
onBeforeUnmount
,
watch
,
...
...
@@ -8,7 +7,9 @@ import {
ExtractPropTypes
,
Ref
,
}
from
'
vue
'
import
{
useCustomEvent
,
EmitEvent
}
from
'
@dcloudio/uni-components
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
useCustomEvent
,
EmitEvent
}
from
'
../../helpers/useEvent
'
import
{
UniFormCtx
,
uniFormKey
}
from
'
../form
'
import
{
UniLabelCtx
,
uniLabelKey
}
from
'
../label
'
import
{
useListeners
}
from
'
../../helpers/useListeners
'
...
...
@@ -47,7 +48,7 @@ const props = {
type
SwitchProps
=
ExtractPropTypes
<
typeof
props
>
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Switch
'
,
props
,
emits
:
[
'
change
'
],
...
...
packages/uni-components/src/components/text/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
VNode
,
Component
,
createTextVNode
,
createVNode
,
}
from
'
vue
'
import
{
VNode
,
Component
,
createTextVNode
,
createVNode
}
from
'
vue
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
const
SPACE_UNICODE
=
{
ensp
:
'
\
u2002
'
,
...
...
@@ -34,7 +29,7 @@ function normalizeText(text: string, { space, decode }: DecodeOptions) {
.
replace
(
/'/g
,
"
'
"
)
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Text
'
,
props
:
{
selectable
:
{
...
...
packages/uni-components/src/components/textarea/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
Ref
,
ref
,
computed
,
watch
}
from
'
vue
'
import
{
Ref
,
ref
,
computed
,
watch
}
from
'
vue
'
import
{
extend
}
from
'
@vue/shared
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
props
as
fieldProps
,
emit
as
fieldEmit
,
...
...
@@ -6,7 +8,7 @@ import {
}
from
'
../../helpers/useField
'
import
ResizeSensor
from
'
../resize-sensor/index
'
const
props
=
/*#__PURE__*/
Object
.
assign
({},
fieldProps
,
{
const
props
=
/*#__PURE__*/
extend
({},
fieldProps
,
{
placeholderClass
:
{
type
:
String
,
default
:
'
input-placeholder
'
,
...
...
@@ -21,7 +23,7 @@ const props = /*#__PURE__*/ Object.assign({}, fieldProps, {
},
})
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Textarea
'
,
props
,
emit
:
[
'
confirm
'
,
'
linechange
'
,
...
fieldEmit
],
...
...
packages/uni-components/src/components/view/index.tsx
浏览文件 @
cfdd26fd
import
{
extend
}
from
'
@vue/shared
'
import
{
defineComponent
}
from
'
vue
'
import
{
defineBuiltInComponent
}
from
'
../../helpers/component
'
import
{
hoverProps
,
useHover
}
from
'
../../helpers/useHover
'
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
View
'
,
props
:
extend
({},
hoverProps
),
setup
(
props
,
{
slots
})
{
...
...
packages/uni-components/src/helpers/component.ts
0 → 100644
浏览文件 @
cfdd26fd
import
{
ComponentOptions
,
defineComponent
}
from
'
vue
'
/**
* 内置组件(对外,比如view)
* @param options
* @returns
*/
export
const
defineBuiltInComponent
:
typeof
defineComponent
=
(
options
:
any
)
=>
{
// TODO 可能会补充特殊标记
return
defineSystemComponent
(
options
)
}
/**
* 系统组件(不对外,比如App,Page等)
* @param options
* @returns
*/
export
const
defineSystemComponent
:
typeof
defineComponent
=
(
options
:
any
)
=>
{
;(
options
as
ComponentOptions
).
compatConfig
=
{
MODE
:
3
,
// 标记为vue3
}
return
defineComponent
(
options
)
}
packages/uni-components/src/index.ts
浏览文件 @
cfdd26fd
...
...
@@ -15,3 +15,7 @@ export { useUserAction } from './helpers/useUserAction'
export
{
useAttrs
}
from
'
./helpers/useAttrs
'
export
{
useBooleanAttr
}
from
'
./helpers/useBooleanAttr
'
export
{
useTouchtrack
}
from
'
./helpers/useTouchtrack
'
export
{
defineBuiltInComponent
,
defineSystemComponent
,
}
from
'
./helpers/component
'
packages/uni-core/src/view/plugin/componentInstance.ts
浏览文件 @
cfdd26fd
...
...
@@ -50,19 +50,9 @@ export function createNativeEvent(evt: Event | TouchEvent) {
if
(
__PLATFORM__
===
'
h5
'
)
{
extend
(
event
,
{
preventDefault
()
{
if
(
__DEV__
)
{
console
.
warn
(
'
preventDefault is only supported in h5, use `.prevent` instead.
'
)
}
return
evt
.
preventDefault
()
},
stopPropagation
()
{
if
(
__DEV__
)
{
console
.
warn
(
'
stopPropagation is only supported in h5, use `.stop` instead.
'
)
}
return
evt
.
stopPropagation
()
},
})
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
cfdd26fd
...
...
@@ -298,15 +298,9 @@ function createNativeEvent(evt) {
{
shared
.
extend
(
event
,
{
preventDefault
()
{
if
(
process
.
env
.
NODE_ENV
!==
"
production
"
)
{
console
.
warn
(
"
preventDefault is only supported in h5, use `.prevent` instead.
"
);
}
return
evt
.
preventDefault
();
},
stopPropagation
()
{
if
(
process
.
env
.
NODE_ENV
!==
"
production
"
)
{
console
.
warn
(
"
stopPropagation is only supported in h5, use `.stop` instead.
"
);
}
return
evt
.
stopPropagation
();
}
});
...
...
@@ -456,6 +450,7 @@ function normalizePageMeta(pageMeta) {
if
(
__UNI_FEATURE_NAVIGATIONBAR__
)
{
const
{
navigationBar
}
=
pageMeta
;
const
{
titleSize
,
titleColor
,
backgroundColor
}
=
navigationBar
;
navigationBar
.
type
=
navigationBar
.
type
||
"
default
"
;
navigationBar
.
backButton
=
pageMeta
.
isQuit
?
false
:
true
;
navigationBar
.
titleSize
=
titleSize
||
"
16px
"
;
navigationBar
.
titleColor
=
titleColor
||
"
#fff
"
;
...
...
@@ -1466,6 +1461,15 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
],
16
,
[
"
id
"
,
"
controls
"
]);
}
_sfc_main$8
.
render
=
_sfc_render$8
;
const
defineBuiltInComponent
=
(
options
)
=>
{
return
defineSystemComponent
(
options
);
};
const
defineSystemComponent
=
(
options
)
=>
{
options
.
compatConfig
=
{
MODE
:
3
};
return
vue
.
defineComponent
(
options
);
};
const
hoverProps
=
{
hoverClass
:
{
type
:
String
,
...
...
@@ -1550,7 +1554,7 @@ function useBooleanAttr(props2, keys) {
},
Object
.
create
(
null
));
}
const
uniFormKey$1
=
PolySymbol
(
process
.
env
.
NODE_ENV
!==
"
production
"
?
"
uniForm
"
:
"
uf
"
);
var
Form
=
/* @__PURE__ */
vue
.
define
Component
({
var
Form
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Form
"
,
setup
(
_props
,
{
slots
,
...
...
@@ -1589,7 +1593,7 @@ function provideForm(emit2) {
});
return
fields2
;
}
var
index$o
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$o
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Button
"
,
props
:
{
id
:
{
...
...
@@ -1666,7 +1670,7 @@ var index$o = /* @__PURE__ */ vue.defineComponent({
};
}
});
var
ResizeSensor
=
/* @__PURE__ */
vue
.
define
Component
({
var
ResizeSensor
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
ResizeSensor
"
,
props
:
{
initial
:
{
...
...
@@ -2258,7 +2262,7 @@ const props$p = {
default
:
""
}
};
var
index$n
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$n
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
CheckboxGroup
"
,
props
:
props$p
,
emits
:
[
"
change
"
],
...
...
@@ -2319,7 +2323,7 @@ const props$o = {
default
:
""
}
};
var
index$m
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$m
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Label
"
,
props
:
props$o
,
setup
(
props2
,
{
...
...
@@ -2388,7 +2392,7 @@ const props$n = {
default
:
""
}
};
var
index$l
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$l
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Checkbox
"
,
props
:
props$n
,
setup
(
props2
,
{
...
...
@@ -2655,7 +2659,7 @@ const props$l = /* @__PURE__ */ Object.assign({}, props$m, {
default
:
false
}
});
var
index$k
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$k
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Editor
"
,
props
:
props$l
,
emit
:
[
"
ready
"
,
"
focus
"
,
"
blur
"
,
"
input
"
,
"
statuschange
"
,
...
emit$1
],
...
...
@@ -2716,7 +2720,7 @@ const ICONS = {
c
:
GREY_COLOR
}
};
var
index$j
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$j
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Icon
"
,
props
:
{
type
:
{
...
...
@@ -2780,7 +2784,7 @@ const IMAGE_MODES = {
"
bottom left
"
:
[
"
left bottom
"
],
"
bottom right
"
:
[
"
right bottom
"
]
};
var
index$i
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$i
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Image
"
,
props
:
props$k
,
setup
(
props2
,
{
...
...
@@ -3261,7 +3265,7 @@ const props$i = /* @__PURE__ */ Object.assign({}, props$j, {
default
:
"
input-placeholder
"
}
});
var
Input
=
/* @__PURE__ */
vue
.
define
Component
({
var
Input
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Input
"
,
props
:
props$i
,
emit
:
[
"
confirm
"
,
...
emit
],
...
...
@@ -3361,6 +3365,43 @@ var Input = /* @__PURE__ */ vue.defineComponent({
};
}
});
function
entries
(
obj
)
{
return
Object
.
keys
(
obj
).
map
((
key
)
=>
[
key
,
obj
[
key
]]);
}
const
DEFAULT_EXCLUDE_KEYS
=
[
"
class
"
,
"
style
"
];
const
LISTENER_PREFIX
=
/^on
[
A-Z
]
+/
;
const
useAttrs
=
(
params
=
{})
=>
{
const
{
excludeListeners
=
false
,
excludeKeys
=
[]}
=
params
;
const
instance
=
vue
.
getCurrentInstance
();
const
attrs
=
vue
.
shallowRef
({});
const
listeners
=
vue
.
shallowRef
({});
const
excludeAttrs
=
vue
.
shallowRef
({});
const
allExcludeKeys
=
excludeKeys
.
concat
(
DEFAULT_EXCLUDE_KEYS
);
instance
.
attrs
=
vue
.
reactive
(
instance
.
attrs
);
vue
.
watchEffect
(()
=>
{
const
res
=
entries
(
instance
.
attrs
).
reduce
((
acc
,
[
key
,
val
])
=>
{
if
(
allExcludeKeys
.
includes
(
key
))
{
acc
.
exclude
[
key
]
=
val
;
}
else
if
(
LISTENER_PREFIX
.
test
(
key
))
{
if
(
!
excludeListeners
)
{
acc
.
attrs
[
key
]
=
val
;
}
acc
.
listeners
[
key
]
=
val
;
}
else
{
acc
.
attrs
[
key
]
=
val
;
}
return
acc
;
},
{
exclude
:
{},
attrs
:
{},
listeners
:
{}
});
attrs
.
value
=
res
.
attrs
;
listeners
.
value
=
res
.
listeners
;
excludeAttrs
.
value
=
res
.
exclude
;
});
return
{
$attrs
:
attrs
,
$listeners
:
listeners
,
$excludeAttrs
:
excludeAttrs
};
};
function
initScrollBounce
()
{
}
function
disableScrollBounce
({
disable
})
{
...
...
@@ -3388,7 +3429,7 @@ const props$h = {
default
:
false
}
};
var
index$h
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$h
=
/* @__PURE__ */
defineBuiltIn
Component
({
inheritAttrs
:
false
,
name
:
"
MovableArea
"
,
props
:
props$h
,
...
...
@@ -4031,7 +4072,7 @@ const props$g = {
default
:
true
}
};
var
index$g
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$g
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
MovableView
"
,
props
:
props$g
,
emits
:
[
"
change
"
,
"
scale
"
],
...
...
@@ -4548,7 +4589,7 @@ function useState$1(props2) {
});
return
state
;
}
var
PickerView
=
/* @__PURE__ */
vue
.
define
Component
({
var
PickerView
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
PickerView
"
,
props
:
props$f
,
emits
:
[
"
change
"
,
"
pickstart
"
,
"
pickend
"
,
"
update:value
"
],
...
...
@@ -5294,7 +5335,7 @@ function useScopedClass(indicatorHeightRef) {
vue
.
watch
(()
=>
indicatorHeightRef
.
value
,
updateStyle
);
return
className
;
}
var
PickerViewColumn
=
/* @__PURE__ */
vue
.
define
Component
({
var
PickerViewColumn
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
PickerViewColumn
"
,
setup
(
props2
,
{
slots
,
...
...
@@ -5389,7 +5430,7 @@ var PickerViewColumn = /* @__PURE__ */ vue.defineComponent({
}
});
const
VALUES
=
{
activeColor
:
"
#007AFF
"
,
activeColor
:
uniShared
.
PRIMARY_COLOR
,
backgroundColor
:
"
#EBEBEB
"
,
activeMode
:
"
backwards
"
};
...
...
@@ -5440,7 +5481,7 @@ const props$e = {
}
}
};
var
index$f
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$f
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Progress
"
,
props
:
props$e
,
setup
(
props2
)
{
...
...
@@ -5519,7 +5560,7 @@ const props$d = {
default
:
""
}
};
var
index$e
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$e
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
RadioGroup
"
,
props
:
props$d
,
setup
(
props2
,
{
...
...
@@ -5619,7 +5660,7 @@ const props$c = {
default
:
""
}
};
var
index$d
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$d
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Radio
"
,
props
:
props$c
,
setup
(
props2
,
{
...
...
@@ -7170,7 +7211,7 @@ const props$b = {
default
:
false
}
};
var
index$c
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$c
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Slider
"
,
props
:
props$b
,
emits
:
[
"
changing
"
,
"
change
"
],
...
...
@@ -7712,7 +7753,7 @@ function useLayout(props2, state, swiperContexts, slideFrameRef, emit2, trigger)
onSwiperDotClick
};
}
var
index$b
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$b
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Swiper
"
,
props
:
props$a
,
emits
:
[
"
change
"
,
"
transition
"
,
"
animationfinish
"
,
"
update:current
"
,
"
update:currentItemId
"
],
...
...
@@ -7815,7 +7856,7 @@ const props$9 = {
default
:
""
}
};
var
index$a
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$a
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
SwiperItem
"
,
props
:
props$9
,
setup
(
props2
,
{
...
...
@@ -7860,7 +7901,7 @@ const props$8 = {
default
:
"
#007aff
"
}
};
var
index$9
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$9
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Switch
"
,
props
:
props$8
,
emits
:
[
"
change
"
],
...
...
@@ -7950,7 +7991,7 @@ function normalizeText(text, {
}
return
text
.
replace
(
/ /g
,
SPACE_UNICODE
.
nbsp
).
replace
(
/ /g
,
SPACE_UNICODE
.
ensp
).
replace
(
/ /g
,
SPACE_UNICODE
.
emsp
).
replace
(
/</g
,
"
<
"
).
replace
(
/>/g
,
"
>
"
).
replace
(
/&/g
,
"
&
"
).
replace
(
/"/g
,
'
"
'
).
replace
(
/'/g
,
"
'
"
);
}
var
index$8
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$8
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Text
"
,
props
:
{
selectable
:
{
...
...
@@ -8003,7 +8044,7 @@ var index$8 = /* @__PURE__ */ vue.defineComponent({
};
}
});
const
props$7
=
/* @__PURE__ */
Object
.
assign
({},
props$j
,
{
const
props$7
=
/* @__PURE__ */
shared
.
extend
({},
props$j
,
{
placeholderClass
:
{
type
:
String
,
default
:
"
input-placeholder
"
...
...
@@ -8017,7 +8058,7 @@ const props$7 = /* @__PURE__ */ Object.assign({}, props$j, {
default
:
""
}
});
var
index$7
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$7
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Textarea
"
,
props
:
props$7
,
emit
:
[
"
confirm
"
,
"
linechange
"
,
...
emit
],
...
...
@@ -8137,7 +8178,7 @@ var index$7 = /* @__PURE__ */ vue.defineComponent({
};
}
});
var
index$6
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$6
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
View
"
,
props
:
shared
.
extend
({},
hoverProps
),
setup
(
props2
,
{
...
...
@@ -8165,43 +8206,6 @@ function useSubscribe(callback, name) {
}
function
useOn
(
name
,
callback
)
{
}
function
entries
(
obj
)
{
return
Object
.
keys
(
obj
).
map
((
key
)
=>
[
key
,
obj
[
key
]]);
}
const
DEFAULT_EXCLUDE_KEYS
=
[
"
class
"
,
"
style
"
];
const
LISTENER_PREFIX
=
/^on
[
A-Z
]
+/
;
const
useAttrs
=
(
params
=
{})
=>
{
const
{
excludeListeners
=
false
,
excludeKeys
=
[]}
=
params
;
const
instance
=
vue
.
getCurrentInstance
();
const
attrs
=
vue
.
shallowRef
({});
const
listeners
=
vue
.
shallowRef
({});
const
excludeAttrs
=
vue
.
shallowRef
({});
const
allExcludeKeys
=
excludeKeys
.
concat
(
DEFAULT_EXCLUDE_KEYS
);
instance
.
attrs
=
vue
.
reactive
(
instance
.
attrs
);
vue
.
watchEffect
(()
=>
{
const
res
=
entries
(
instance
.
attrs
).
reduce
((
acc
,
[
key
,
val
])
=>
{
if
(
allExcludeKeys
.
includes
(
key
))
{
acc
.
exclude
[
key
]
=
val
;
}
else
if
(
LISTENER_PREFIX
.
test
(
key
))
{
if
(
!
excludeListeners
)
{
acc
.
attrs
[
key
]
=
val
;
}
acc
.
listeners
[
key
]
=
val
;
}
else
{
acc
.
attrs
[
key
]
=
val
;
}
return
acc
;
},
{
exclude
:
{},
attrs
:
{},
listeners
:
{}
});
attrs
.
value
=
res
.
attrs
;
listeners
.
value
=
res
.
listeners
;
excludeAttrs
.
value
=
res
.
exclude
;
});
return
{
$attrs
:
attrs
,
$listeners
:
listeners
,
$excludeAttrs
:
excludeAttrs
};
};
function
formatTime
(
val
)
{
val
=
val
>
0
&&
val
<
Infinity
?
val
:
0
;
const
h
=
Math
.
floor
(
val
/
3600
);
...
...
@@ -8750,7 +8754,7 @@ const props$6 = {
default
:
true
}
};
var
index$5
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$5
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Video
"
,
props
:
props$6
,
emits
:
[
"
fullscreenchange
"
,
"
progress
"
,
"
loadedmetadata
"
,
"
waiting
"
,
"
error
"
,
"
play
"
,
"
pause
"
,
"
ended
"
,
"
timeupdate
"
],
...
...
@@ -8971,7 +8975,7 @@ const props$5 = {
default
:
""
}
};
var
index$4
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$4
=
/* @__PURE__ */
defineBuiltIn
Component
({
inheritAttrs
:
false
,
name
:
"
WebView
"
,
props
:
props$5
,
...
...
@@ -9086,7 +9090,7 @@ const props$4 = {
default
:
""
}
};
var
MapMarker
=
/* @__PURE__ */
vue
.
define
Component
({
var
MapMarker
=
/* @__PURE__ */
defineSystem
Component
({
name
:
"
MapMarker
"
,
props
:
props$4
,
setup
(
props2
)
{
...
...
@@ -9330,7 +9334,7 @@ const props$3 = {
default
:
""
}
};
var
MapPolyline
=
/* @__PURE__ */
vue
.
define
Component
({
var
MapPolyline
=
/* @__PURE__ */
defineSystem
Component
({
name
:
"
MapPolyline
"
,
props
:
props$3
,
setup
(
props2
)
{
...
...
@@ -9414,7 +9418,7 @@ const props$2 = {
default
:
""
}
};
var
MapCircle
=
/* @__PURE__ */
vue
.
define
Component
({
var
MapCircle
=
/* @__PURE__ */
defineSystem
Component
({
name
:
"
MapCircle
"
,
props
:
props$2
,
setup
(
props2
)
{
...
...
@@ -9477,7 +9481,7 @@ const props$1 = {
default
:
""
}
};
var
MapControl
=
/* @__PURE__ */
vue
.
define
Component
({
var
MapControl
=
/* @__PURE__ */
defineSystem
Component
({
name
:
"
MapControl
"
,
props
:
props$1
,
setup
(
props2
)
{
...
...
@@ -9534,7 +9538,7 @@ var MapControl = /* @__PURE__ */ vue.defineComponent({
}
});
const
ICON_PATH
=
"
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACECAMAAABmmnOVAAAC01BMVEUAAAAAef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8A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+OFm2JdCxIa8lugzkJs5K6MfxAaYPUcBpYG5khZJEkUUSb7DPCnKRfPBXj6M8FwuegoLpCgXcQszVjhbJFUJUee2hBhLoYTIcYtB57KY+opSMdVqwatSlZVj05aV//CwJLMX2DluaUcwhXm4ali2XOoLjxUrPV26zFtF4f5p0Gp310+z13BUWNvbehEXona6iAtX/zVZmtfN4WixfsNky4S6gCCVVq3RPLdfSfpv3MRRZfPoLc6Xs/5bt3EyMGzE9h07/Xft2t15z6i9+zgGg8FgMBgMBoPBYDAYDAYj8/APG67Rie8pUDsAAAAASUVORK5CYII=
"
;
var
MapLocation
=
/* @__PURE__ */
vue
.
define
Component
({
var
MapLocation
=
/* @__PURE__ */
defineSystem
Component
({
name
:
"
MapLocation
"
,
setup
()
{
const
state
=
vue
.
reactive
({
...
...
@@ -9659,7 +9663,7 @@ function useMap(props2, rootRef, emit2) {
mapRef
};
}
var
index$3
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$3
=
/* @__PURE__ */
defineBuiltIn
Component
({
name
:
"
Map
"
,
props
,
emits
:
[
"
markertap
"
,
"
labeltap
"
,
"
callouttap
"
,
"
controltap
"
,
"
regionchange
"
,
"
tap
"
,
"
click
"
,
"
updated
"
,
"
update:scale
"
,
"
update:latitude
"
,
"
update:longitude
"
],
...
...
@@ -10839,7 +10843,7 @@ const UniServiceJSBridge$1 = /* @__PURE__ */ shared.extend(ServiceJSBridge, {
UniViewJSBridge
.
subscribeHandler
(
pageId
+
"
.
"
+
event
,
args
,
pageId
);
}
});
var
TabBar
=
/* @__PURE__ */
vue
.
define
Component
({
var
TabBar
=
/* @__PURE__ */
defineSystem
Component
({
name
:
"
TabBar
"
,
setup
()
{
const
tabBar2
=
useTabBar
();
...
...
@@ -11078,7 +11082,7 @@ function createTabBarMidButtonTsx(color, iconPath, midButton, tabBar2, index2, o
"
src
"
:
getRealPath
(
iconPath
)
},
null
,
12
,
[
"
src
"
])],
4
),
createTabBarItemBdTsx
(
color
,
iconPath
,
midButton
,
tabBar2
)],
12
,
[
"
onClick
"
]);
}
var
LayoutComponent
=
vue
.
define
Component
({
var
LayoutComponent
=
/* @__PURE__ */
defineSystem
Component
({
name
:
"
Layout
"
,
setup
(
_props
,
{
emit
:
emit2
...
...
@@ -11232,7 +11236,7 @@ const ICON_PATHS = {
menu
:
"
M8.938 18.313q0.875 0 1.484-0.609t0.609-1.453-0.609-1.453-1.484-0.609q-0.844 0-1.453 0.609t-0.609 1.453 0.609 1.453 1.453 0.609zM16.188 18.313q0.875 0 1.484-0.609t0.609-1.453-0.609-1.453-1.484-0.609q-0.844 0-1.453 0.609t-0.609 1.453 0.609 1.453 1.453 0.609zM23.469 18.313q0.844 0 1.453-0.609t0.609-1.453-0.609-1.453-1.453-0.609q-0.875 0-1.484 0.609t-0.609 1.453 0.609 1.453 1.484 0.609z
"
,
close
:
"
M17.25 16.156l7.375-7.313q0.281-0.281 0.281-0.641t-0.281-0.641q-0.25-0.25-0.625-0.25t-0.625 0.25l-7.375 7.344-7.313-7.344q-0.25-0.25-0.625-0.25t-0.625 0.25q-0.281 0.25-0.281 0.625t0.281 0.625l7.313 7.344-7.375 7.344q-0.281 0.25-0.281 0.625t0.281 0.625q0.125 0.125 0.281 0.188t0.344 0.063q0.156 0 0.328-0.063t0.297-0.188l7.375-7.344 7.375 7.406q0.125 0.156 0.297 0.219t0.328 0.063q0.188 0 0.344-0.078t0.281-0.203q0.281-0.25 0.281-0.609t-0.281-0.641l-7.375-7.406z
"
};
var
PageHead
=
/* @__PURE__ */
vue
.
define
Component
({
var
PageHead
=
/* @__PURE__ */
defineSystem
Component
({
name
:
"
PageHead
"
,
setup
()
{
const
headRef
=
vue
.
ref
(
null
);
...
...
@@ -11620,7 +11624,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
]);
}
_sfc_main
.
render
=
_sfc_render
;
var
PageBody
=
vue
.
define
Component
({
var
PageBody
=
defineSystem
Component
({
name
:
"
PageBody
"
,
setup
(
props2
,
ctx
)
{
const
pageMeta
=
__UNI_FEATURE_PULL_DOWN_REFRESH__
&&
usePageMeta
();
...
...
@@ -11628,7 +11632,7 @@ var PageBody = vue.defineComponent({
const
pageRefresh
=
null
;
return
()
=>
{
const
pageRefreshTsx
=
__UNI_FEATURE_PULL_DOWN_REFRESH__
&&
createPageRefreshTsx
(
refreshRef
,
pageMeta
);
return
vue
.
createVNode
(
"
div
"
,
null
,
[
pageRefreshTsx
,
vue
.
createVNode
(
"
uni-page-wrapper
"
,
pageRefresh
,
[
vue
.
createVNode
(
"
uni-page-body
"
,
null
,
[
vue
.
renderSlot
(
ctx
.
slots
,
"
default
"
)])],
16
)]);
return
vue
.
createVNode
(
vue
.
Fragment
,
null
,
[
pageRefreshTsx
,
vue
.
createVNode
(
"
uni-page-wrapper
"
,
pageRefresh
,
[
vue
.
createVNode
(
"
uni-page-body
"
,
null
,
[
vue
.
renderSlot
(
ctx
.
slots
,
"
default
"
)])],
16
)]);
};
}
});
...
...
@@ -11640,7 +11644,7 @@ function createPageRefreshTsx(refreshRef, pageMeta) {
"
ref
"
:
refreshRef
},
null
,
512
);
}
var
index$2
=
vue
.
define
Component
({
var
index$2
=
defineSystem
Component
({
name
:
"
Page
"
,
setup
(
_props
,
ctx
)
{
const
{
navigationBar
}
=
providePageMeta
(
getStateId
());
...
...
@@ -11656,7 +11660,7 @@ function createPageBodyVNode(ctx) {
function
reload
()
{
window
.
location
.
reload
();
}
var
index$1
=
/* @__PURE__ */
vue
.
define
Component
({
var
index$1
=
/* @__PURE__ */
defineSystem
Component
({
name
:
"
AsyncError
"
,
setup
()
{
initI18nAsyncMsgsOnce
();
...
...
@@ -11671,7 +11675,7 @@ var index$1 = /* @__PURE__ */ vue.defineComponent({
});
const
clazz
=
{
class
:
"
uni-async-loading
"
};
const
loadingVNode
=
/* @__PURE__ */
vue
.
createVNode
(
"
i
"
,
{
class
:
"
uni-loading
"
},
null
,
-
1
);
var
index
=
/* @__PURE__ */
vue
.
define
Component
({
var
index
=
/* @__PURE__ */
defineSystem
Component
({
name
:
"
AsyncLoading
"
,
render
()
{
return
vue
.
openBlock
(),
vue
.
createBlock
(
"
div
"
,
clazz
,
[
loadingVNode
]);
...
...
@@ -11723,6 +11727,8 @@ exports.View = index$6;
exports
.
WebView
=
index$4
;
exports
.
clearStorage
=
clearStorage
;
exports
.
clearStorageSync
=
clearStorageSync
;
exports
.
defineBuiltInComponent
=
defineBuiltInComponent
;
exports
.
defineSystemComponent
=
defineSystemComponent
;
exports
.
disableScrollBounce
=
disableScrollBounce
;
exports
.
getApp
=
getApp$1
;
exports
.
getCurrentPages
=
getCurrentPages$1
;
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
cfdd26fd
import {isFunction, extend, hyphenate, isPlainObject, isString, isArray, hasOwn, isObject, capitalize, toRawType, makeMap as makeMap$1, isPromise, invokeArrayFns as invokeArrayFns$1} from "@vue/shared";
import {injectHook, withModifiers, createVNode, getCurrentInstance, inject, provide, reactive, computed, nextTick, onBeforeMount, onMounted, onBeforeActivate, onBeforeDeactivate, openBlock, createBlock, mergeProps, toDisplayString,
ref, defineComponent, watch, onActivated, resolveComponent, toHandlers, renderSlot, onUnmounted, onBeforeUnmount, withDirectives, vShow, isVNode, Fragment, markRaw, createCommentVNode, createTextVNode, shallowRef, watchEffect
, renderList, onDeactivated, Teleport, createApp, Transition, withCtx, KeepAlive, resolveDynamicComponent} from "vue";
import {injectHook, withModifiers, createVNode, getCurrentInstance, inject, provide, reactive, computed, nextTick, onBeforeMount, onMounted, onBeforeActivate, onBeforeDeactivate, openBlock, createBlock, mergeProps, toDisplayString,
defineComponent, ref, watch, onActivated, resolveComponent, toHandlers, renderSlot, onUnmounted, onBeforeUnmount, withDirectives, vShow, shallowRef, watchEffect, isVNode, Fragment, markRaw, createCommentVNode, createTextVNode
, renderList, onDeactivated, Teleport, createApp, Transition, withCtx, KeepAlive, resolveDynamicComponent} from "vue";
import {once, passive, normalizeTarget, isBuiltInComponent, invokeArrayFns, NAVBAR_HEIGHT, parseQuery, PRIMARY_COLOR, removeLeadingSlash, getLen, ON_REACH_BOTTOM_DISTANCE, decodedQuery, debounce, updateElementStyle, addFont, scrollTo, formatDateTime} from "@dcloudio/uni-shared";
import {initVueI18n, LOCALE_EN, LOCALE_ES, LOCALE_FR, LOCALE_ZH_HANS, LOCALE_ZH_HANT} from "@dcloudio/uni-i18n";
import {useRoute, createRouter, createWebHistory, createWebHashHistory, useRouter, isNavigationFailure, RouterView} from "vue-router";
...
...
@@ -485,7 +485,7 @@ var safeAreaInsets = {
onChange,
offChange
};
var
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out = safeAreaInsets;
var out = safeAreaInsets;
const onEventPrevent = /* @__PURE__ */ withModifiers(() => {
}, ["prevent"]);
const onEventStop = /* @__PURE__ */ withModifiers(() => {
...
...
@@ -497,10 +497,10 @@ function getWindowOffset() {
const left = parseInt(style.getPropertyValue("--window-left"));
const right = parseInt(style.getPropertyValue("--window-right"));
return {
top: top ? top +
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.top : 0,
bottom: bottom ? bottom +
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.bottom : 0,
left: left ? left +
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.left : 0,
right: right ? right +
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.right : 0
top: top ? top + out.top : 0,
bottom: bottom ? bottom + out.bottom : 0,
left: left ? left + out.left : 0,
right: right ? right + out.right : 0
};
}
function updateCssVar(cssVars) {
...
...
@@ -744,15 +744,9 @@ function createNativeEvent(evt) {
{
extend(event, {
preventDefault() {
if (process.env.NODE_ENV !== "production") {
console.warn("preventDefault is only supported in h5, use `.prevent` instead.");
}
return evt.preventDefault();
},
stopPropagation() {
if (process.env.NODE_ENV !== "production") {
console.warn("stopPropagation is only supported in h5, use `.stop` instead.");
}
return evt.stopPropagation();
}
});
...
...
@@ -1185,7 +1179,7 @@ function normalizePageMeta(pageMeta) {
let offset = rpx2px(refreshOptions.offset);
const {type} = navigationBar;
if (type !== "transparent" && type !== "none") {
offset += NAVBAR_HEIGHT +
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.top;
offset += NAVBAR_HEIGHT + out.top;
}
refreshOptions.offset = offset;
refreshOptions.height = rpx2px(refreshOptions.height);
...
...
@@ -1196,6 +1190,7 @@ function normalizePageMeta(pageMeta) {
if (__UNI_FEATURE_NAVIGATIONBAR__) {
const {navigationBar} = pageMeta;
const {titleSize, titleColor, backgroundColor} = navigationBar;
navigationBar.type = navigationBar.type || "default";
navigationBar.backButton = pageMeta.isQuit ? false : true;
navigationBar.titleSize = titleSize || "16px";
navigationBar.titleColor = titleColor || "#fff";
...
...
@@ -5116,6 +5111,15 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
], 16, ["id", "controls"]);
}
_sfc_main$8.render = _sfc_render$8;
const defineBuiltInComponent = (options) => {
return defineSystemComponent(options);
};
const defineSystemComponent = (options) => {
options.compatConfig = {
MODE: 3
};
return defineComponent(options);
};
const hoverProps = {
hoverClass: {
type: String,
...
...
@@ -5200,7 +5204,7 @@ function useBooleanAttr(props2, keys) {
}, Object.create(null));
}
const uniFormKey$1 = PolySymbol(process.env.NODE_ENV !== "production" ? "uniForm" : "uf");
var Form = /* @__PURE__ */ defineComponent({
var Form = /* @__PURE__ */ define
BuiltIn
Component({
name: "Form",
setup(_props, {
slots,
...
...
@@ -5239,7 +5243,7 @@ function provideForm(emit2) {
});
return fields2;
}
var index$k = /* @__PURE__ */ defineComponent({
var index$k = /* @__PURE__ */ define
BuiltIn
Component({
name: "Button",
props: {
id: {
...
...
@@ -5316,7 +5320,7 @@ var index$k = /* @__PURE__ */ defineComponent({
};
}
});
var ResizeSensor = /* @__PURE__ */ defineComponent({
var ResizeSensor = /* @__PURE__ */ define
BuiltIn
Component({
name: "ResizeSensor",
props: {
initial: {
...
...
@@ -6108,7 +6112,7 @@ const props$v = {
default: ""
}
};
var index$j = /* @__PURE__ */ defineComponent({
var index$j = /* @__PURE__ */ define
BuiltIn
Component({
name: "CheckboxGroup",
props: props$v,
emits: ["change"],
...
...
@@ -6169,7 +6173,7 @@ const props$u = {
default: ""
}
};
var index$i = /* @__PURE__ */ defineComponent({
var index$i = /* @__PURE__ */ define
BuiltIn
Component({
name: "Label",
props: props$u,
setup(props2, {
...
...
@@ -6238,7 +6242,7 @@ const props$t = {
default: ""
}
};
var index$h = /* @__PURE__ */ defineComponent({
var index$h = /* @__PURE__ */ define
BuiltIn
Component({
name: "Checkbox",
props: props$t,
setup(props2, {
...
...
@@ -7089,7 +7093,7 @@ const props$r = /* @__PURE__ */ Object.assign({}, props$s, {
default: false
}
});
var index$g = /* @__PURE__ */ defineComponent({
var index$g = /* @__PURE__ */ define
BuiltIn
Component({
name: "Editor",
props: props$r,
emit: ["ready", "focus", "blur", "input", "statuschange", ...emit$1],
...
...
@@ -7151,7 +7155,7 @@ const ICONS = {
c: GREY_COLOR
}
};
var index$f = /* @__PURE__ */ defineComponent({
var index$f = /* @__PURE__ */ define
BuiltIn
Component({
name: "Icon",
props: {
type: {
...
...
@@ -7215,7 +7219,7 @@ const IMAGE_MODES = {
"bottom left": ["left bottom"],
"bottom right": ["right bottom"]
};
var index$e = /* @__PURE__ */ defineComponent({
var index$e = /* @__PURE__ */ define
BuiltIn
Component({
name: "Image",
props: props$q,
setup(props2, {
...
...
@@ -7772,7 +7776,7 @@ const props$o = /* @__PURE__ */ Object.assign({}, props$p, {
default: "input-placeholder"
}
});
var Input = /* @__PURE__ */ defineComponent({
var Input = /* @__PURE__ */ define
BuiltIn
Component({
name: "Input",
props: props$o,
emit: ["confirm", ...emit],
...
...
@@ -7872,6 +7876,43 @@ var Input = /* @__PURE__ */ defineComponent({
};
}
});
function entries(obj) {
return Object.keys(obj).map((key) => [key, obj[key]]);
}
const DEFAULT_EXCLUDE_KEYS = ["class", "style"];
const LISTENER_PREFIX = /^on[A-Z]+/;
const useAttrs = (params = {}) => {
const {excludeListeners = false, excludeKeys = []} = params;
const instance2 = getCurrentInstance();
const attrs2 = shallowRef({});
const listeners = shallowRef({});
const excludeAttrs = shallowRef({});
const allExcludeKeys = excludeKeys.concat(DEFAULT_EXCLUDE_KEYS);
instance2.attrs = reactive(instance2.attrs);
watchEffect(() => {
const res = entries(instance2.attrs).reduce((acc, [key, val]) => {
if (allExcludeKeys.includes(key)) {
acc.exclude[key] = val;
} else if (LISTENER_PREFIX.test(key)) {
if (!excludeListeners) {
acc.attrs[key] = val;
}
acc.listeners[key] = val;
} else {
acc.attrs[key] = val;
}
return acc;
}, {
exclude: {},
attrs: {},
listeners: {}
});
attrs2.value = res.attrs;
listeners.value = res.listeners;
excludeAttrs.value = res.exclude;
});
return {$attrs: attrs2, $listeners: listeners, $excludeAttrs: excludeAttrs};
};
function initScrollBounce() {
}
function disableScrollBounce({disable}) {
...
...
@@ -7899,7 +7940,7 @@ const props$n = {
default: false
}
};
var MovableArea = /* @__PURE__ */ defineComponent({
var MovableArea = /* @__PURE__ */ define
BuiltIn
Component({
inheritAttrs: false,
name: "MovableArea",
props: props$n,
...
...
@@ -8557,7 +8598,7 @@ const props$m = {
default: true
}
};
var MovableView = /* @__PURE__ */ defineComponent({
var MovableView = /* @__PURE__ */ define
BuiltIn
Component({
name: "MovableView",
props: props$m,
emits: ["change", "scale"],
...
...
@@ -9287,7 +9328,7 @@ function useState$1(props2) {
});
return state2;
}
var PickerView = /* @__PURE__ */ defineComponent({
var PickerView = /* @__PURE__ */ define
BuiltIn
Component({
name: "PickerView",
props: props$l,
emits: ["change", "pickstart", "pickend", "update:value"],
...
...
@@ -10060,7 +10101,7 @@ function useCustomClick(dom) {
}
});
}
var PickerViewColumn = /* @__PURE__ */ defineComponent({
var PickerViewColumn = /* @__PURE__ */ define
BuiltIn
Component({
name: "PickerViewColumn",
setup(props2, {
slots,
...
...
@@ -10201,7 +10242,7 @@ var PickerViewColumn = /* @__PURE__ */ defineComponent({
}
});
const VALUES = {
activeColor:
"#007AFF"
,
activeColor:
PRIMARY_COLOR
,
backgroundColor: "#EBEBEB",
activeMode: "backwards"
};
...
...
@@ -10252,7 +10293,7 @@ const props$k = {
}
}
};
var index$d = /* @__PURE__ */ defineComponent({
var index$d = /* @__PURE__ */ define
BuiltIn
Component({
name: "Progress",
props: props$k,
setup(props2) {
...
...
@@ -10331,7 +10372,7 @@ const props$j = {
default: ""
}
};
var index$c = /* @__PURE__ */ defineComponent({
var index$c = /* @__PURE__ */ define
BuiltIn
Component({
name: "RadioGroup",
props: props$j,
setup(props2, {
...
...
@@ -10431,7 +10472,7 @@ const props$i = {
default: ""
}
};
var index$b = /* @__PURE__ */ defineComponent({
var index$b = /* @__PURE__ */ define
BuiltIn
Component({
name: "Radio",
props: props$i,
setup(props2, {
...
...
@@ -11992,7 +12033,7 @@ const props$h = {
default: false
}
};
var index$a = /* @__PURE__ */ defineComponent({
var index$a = /* @__PURE__ */ define
BuiltIn
Component({
name: "Slider",
props: props$h,
emits: ["changing", "change"],
...
...
@@ -12646,7 +12687,7 @@ function useLayout(props2, state2, swiperContexts, slideFrameRef, emit2, trigger
onSwiperDotClick
};
}
var Swiper = /* @__PURE__ */ defineComponent({
var Swiper = /* @__PURE__ */ define
BuiltIn
Component({
name: "Swiper",
props: props$g,
emits: ["change", "transition", "animationfinish", "update:current", "update:currentItemId"],
...
...
@@ -12749,7 +12790,7 @@ const props$f = {
default: ""
}
};
var SwiperItem = /* @__PURE__ */ defineComponent({
var SwiperItem = /* @__PURE__ */ define
BuiltIn
Component({
name: "SwiperItem",
props: props$f,
setup(props2, {
...
...
@@ -12826,7 +12867,7 @@ const props$e = {
default: "#007aff"
}
};
var index$9 = /* @__PURE__ */ defineComponent({
var index$9 = /* @__PURE__ */ define
BuiltIn
Component({
name: "Switch",
props: props$e,
emits: ["change"],
...
...
@@ -12925,7 +12966,7 @@ function normalizeText(text2, {
}
return text2.replace(/ /g, SPACE_UNICODE.nbsp).replace(/ /g, SPACE_UNICODE.ensp).replace(/ /g, SPACE_UNICODE.emsp).replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'");
}
var index$8 = /* @__PURE__ */ defineComponent({
var index$8 = /* @__PURE__ */ define
BuiltIn
Component({
name: "Text",
props: {
selectable: {
...
...
@@ -12978,7 +13019,7 @@ var index$8 = /* @__PURE__ */ defineComponent({
};
}
});
const props$d = /* @__PURE__ */
Object.assign
({}, props$p, {
const props$d = /* @__PURE__ */
extend
({}, props$p, {
placeholderClass: {
type: String,
default: "input-placeholder"
...
...
@@ -12992,7 +13033,7 @@ const props$d = /* @__PURE__ */ Object.assign({}, props$p, {
default: ""
}
});
var index$7 = /* @__PURE__ */ defineComponent({
var index$7 = /* @__PURE__ */ define
BuiltIn
Component({
name: "Textarea",
props: props$d,
emit: ["confirm", "linechange", ...emit],
...
...
@@ -13112,7 +13153,7 @@ var index$7 = /* @__PURE__ */ defineComponent({
};
}
});
var index$6 = /* @__PURE__ */ defineComponent({
var index$6 = /* @__PURE__ */ define
BuiltIn
Component({
name: "View",
props: extend({}, hoverProps),
setup(props2, {
...
...
@@ -13177,43 +13218,6 @@ function useOn(name, callback2) {
onMounted(() => UniViewJSBridge.on(name, callback2));
onBeforeUnmount(() => UniViewJSBridge.off(name));
}
function entries(obj) {
return Object.keys(obj).map((key) => [key, obj[key]]);
}
const DEFAULT_EXCLUDE_KEYS = ["class", "style"];
const LISTENER_PREFIX = /^on[A-Z]+/;
const useAttrs = (params = {}) => {
const {excludeListeners = false, excludeKeys = []} = params;
const instance2 = getCurrentInstance();
const attrs2 = shallowRef({});
const listeners = shallowRef({});
const excludeAttrs = shallowRef({});
const allExcludeKeys = excludeKeys.concat(DEFAULT_EXCLUDE_KEYS);
instance2.attrs = reactive(instance2.attrs);
watchEffect(() => {
const res = entries(instance2.attrs).reduce((acc, [key, val]) => {
if (allExcludeKeys.includes(key)) {
acc.exclude[key] = val;
} else if (LISTENER_PREFIX.test(key)) {
if (!excludeListeners) {
acc.attrs[key] = val;
}
acc.listeners[key] = val;
} else {
acc.attrs[key] = val;
}
return acc;
}, {
exclude: {},
attrs: {},
listeners: {}
});
attrs2.value = res.attrs;
listeners.value = res.listeners;
excludeAttrs.value = res.exclude;
});
return {$attrs: attrs2, $listeners: listeners, $excludeAttrs: excludeAttrs};
};
function formatTime(val) {
val = val > 0 && val < Infinity ? val : 0;
const h = Math.floor(val / 3600);
...
...
@@ -13846,7 +13850,7 @@ const props$c = {
default: true
}
};
var index$5 = /* @__PURE__ */ defineComponent({
var index$5 = /* @__PURE__ */ define
BuiltIn
Component({
name: "Video",
props: props$c,
emits: ["fullscreenchange", "progress", "loadedmetadata", "waiting", "error", "play", "pause", "ended", "timeupdate"],
...
...
@@ -14067,7 +14071,7 @@ const props$b = {
default: ""
}
};
var index$4 = /* @__PURE__ */ defineComponent({
var index$4 = /* @__PURE__ */ define
BuiltIn
Component({
inheritAttrs: false,
name: "WebView",
props: props$b,
...
...
@@ -14338,7 +14342,7 @@ const props$a = {
default: ""
}
};
var MapMarker = /* @__PURE__ */ defineComponent({
var MapMarker = /* @__PURE__ */ define
System
Component({
name: "MapMarker",
props: props$a,
setup(props2) {
...
...
@@ -14595,7 +14599,7 @@ const props$9 = {
default: ""
}
};
var MapPolyline = /* @__PURE__ */ defineComponent({
var MapPolyline = /* @__PURE__ */ define
System
Component({
name: "MapPolyline",
props: props$9,
setup(props2) {
...
...
@@ -14680,7 +14684,7 @@ const props$8 = {
default: ""
}
};
var MapCircle = /* @__PURE__ */ defineComponent({
var MapCircle = /* @__PURE__ */ define
System
Component({
name: "MapCircle",
props: props$8,
setup(props2) {
...
...
@@ -14744,7 +14748,7 @@ const props$7 = {
default: ""
}
};
var MapControl = /* @__PURE__ */ defineComponent({
var MapControl = /* @__PURE__ */ define
System
Component({
name: "MapControl",
props: props$7,
setup(props2) {
...
...
@@ -14964,7 +14968,7 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
const windowWidth = getWindowWidth(screenWidth);
let windowHeight = window.innerHeight;
const language = navigator.language;
const statusBarHeight =
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.top;
const statusBarHeight = out.top;
let osname;
let osversion;
let model;
...
...
@@ -15077,12 +15081,12 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
const system = `${osname} ${osversion}`;
const platform = osname.toLocaleLowerCase();
const safeArea = {
left:
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.left,
right: windowWidth -
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.right,
top:
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.top,
bottom: windowHeight -
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.bottom,
width: windowWidth -
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.left - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.right,
height: windowHeight -
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.bottom
left: out.left,
right: windowWidth - out.right,
top: out.top,
bottom: windowHeight - out.bottom,
width: windowWidth -
out.left -
out.right,
height: windowHeight -
out.top -
out.bottom
};
const {top: windowTop, bottom: windowBottom} = getWindowOffset();
windowHeight -= windowTop;
...
...
@@ -15102,10 +15106,10 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
model,
safeArea,
safeAreaInsets: {
top:
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.top,
right:
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.right,
bottom:
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.bottom,
left:
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.left
top: out.top,
right: out.right,
bottom: out.bottom,
left: out.left
}
};
});
...
...
@@ -17532,7 +17536,7 @@ var api = /* @__PURE__ */ Object.freeze({
});
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XbqJ+/iJMQliIEBhOU6AJhtlG/IpHE2bqrYQg5h6HA4yQiRqwEfkGCdTCMmMRw+IbPDCQaHCsCYAQxiZHw3TbmD/ESOHgHwShiEqPhp/gggYkSztIxxCRawy/bmEniJaJtfwiEscQkxkFgRqJESqQwwHhiEuMBp3Vm8RK/cZoHEzKXhCK2QxEPpiJe0YlKCFaKCNv/cYBNUsBRPlkJSc0U+dM7E9H0ThGJbgZT/iR7yj+VqMS06Qr4+OFm2JdCxIa8lugzkJs5K6MfxAaYPUcBpYG5khZJEkUUSb7DPCnKRfPBXj6M8FwuegoLpCgXcQszVjhbJFUJUee2hBhLoYTIcYtB57KY+opSMdVqwatSlZVj05aV//CwJLMX2DluaUcwhXm4ali2XOoLjxUrPV26zFtF4f5p0Gp310+z13BUWNvbehEXona6iAtX/zVZmtfN4WixfsNky4S6gCCVVq3RPLdfSfpv3MRRZfPoLc6Xs/5bt3EyMGzE9h07/Xft2t15z6i9+zgGg8FgMBgMBoPBYDAYDAYj8/APG67Rie8pUDsAAAAASUVORK5CYII=";
var MapLocation = /* @__PURE__ */ defineComponent({
var MapLocation = /* @__PURE__ */ define
System
Component({
name: "MapLocation",
setup() {
const state2 = reactive({
...
...
@@ -17905,7 +17909,7 @@ function useMap(props2, rootRef, emit2) {
mapRef
};
}
var index$3 = /* @__PURE__ */ defineComponent({
var index$3 = /* @__PURE__ */ define
BuiltIn
Component({
name: "Map",
props,
emits: ["markertap", "labeltap", "callouttap", "controltap", "regionchange", "tap", "click", "updated", "update:scale", "update:latitude", "update:longitude"],
...
...
@@ -18759,7 +18763,7 @@ const UniServiceJSBridge$1 = /* @__PURE__ */ extend(ServiceJSBridge, {
UniViewJSBridge.subscribeHandler(pageId + "." + event, args, pageId);
}
});
var TabBar = /* @__PURE__ */ defineComponent({
var TabBar = /* @__PURE__ */ define
System
Component({
name: "TabBar",
setup() {
const tabBar2 = useTabBar();
...
...
@@ -18999,7 +19003,7 @@ function createTabBarMidButtonTsx(color, iconPath, midButton, tabBar2, index2, o
}, null, 12, ["src"])], 4), createTabBarItemBdTsx(color, iconPath, midButton, tabBar2)], 12, ["onClick"]);
}
const DEFAULT_CSS_VAR_VALUE = "0px";
var LayoutComponent =
define
Component({
var LayoutComponent =
/* @__PURE__ */ defineSystem
Component({
name: "Layout",
setup(_props, {
emit: emit2
...
...
@@ -19216,7 +19220,7 @@ const ICON_PATHS = {
menu: "M8.938 18.313q0.875 0 1.484-0.609t0.609-1.453-0.609-1.453-1.484-0.609q-0.844 0-1.453 0.609t-0.609 1.453 0.609 1.453 1.453 0.609zM16.188 18.313q0.875 0 1.484-0.609t0.609-1.453-0.609-1.453-1.484-0.609q-0.844 0-1.453 0.609t-0.609 1.453 0.609 1.453 1.453 0.609zM23.469 18.313q0.844 0 1.453-0.609t0.609-1.453-0.609-1.453-1.453-0.609q-0.875 0-1.484 0.609t-0.609 1.453 0.609 1.453 1.484 0.609z",
close: "M17.25 16.156l7.375-7.313q0.281-0.281 0.281-0.641t-0.281-0.641q-0.25-0.25-0.625-0.25t-0.625 0.25l-7.375 7.344-7.313-7.344q-0.25-0.25-0.625-0.25t-0.625 0.25q-0.281 0.25-0.281 0.625t0.281 0.625l7.313 7.344-7.375 7.344q-0.281 0.25-0.281 0.625t0.281 0.625q0.125 0.125 0.281 0.188t0.344 0.063q0.156 0 0.328-0.063t0.297-0.188l7.375-7.344 7.375 7.406q0.125 0.156 0.297 0.219t0.328 0.063q0.188 0 0.344-0.078t0.281-0.203q0.281-0.25 0.281-0.609t-0.281-0.641l-7.375-7.406z"
};
var PageHead = /* @__PURE__ */ defineComponent({
var PageHead = /* @__PURE__ */ define
System
Component({
name: "PageHead",
setup() {
const headRef = ref(null);
...
...
@@ -19803,7 +19807,7 @@ function usePageRefresh(refreshRef) {
onTouchcancel: onTouchend
};
}
var PageBody = defineComponent({
var PageBody = define
System
Component({
name: "PageBody",
setup(props2, ctx) {
const pageMeta = __UNI_FEATURE_PULL_DOWN_REFRESH__ && usePageMeta();
...
...
@@ -19811,7 +19815,7 @@ var PageBody = defineComponent({
const pageRefresh = __UNI_FEATURE_PULL_DOWN_REFRESH__ && pageMeta.enablePullDownRefresh ? usePageRefresh(refreshRef) : null;
return () => {
const pageRefreshTsx = __UNI_FEATURE_PULL_DOWN_REFRESH__ && createPageRefreshTsx(refreshRef, pageMeta);
return createVNode(
"div"
, null, [pageRefreshTsx, createVNode("uni-page-wrapper", pageRefresh, [createVNode("uni-page-body", null, [renderSlot(ctx.slots, "default")])], 16)]);
return createVNode(
Fragment
, null, [pageRefreshTsx, createVNode("uni-page-wrapper", pageRefresh, [createVNode("uni-page-body", null, [renderSlot(ctx.slots, "default")])], 16)]);
};
}
});
...
...
@@ -19823,7 +19827,7 @@ function createPageRefreshTsx(refreshRef, pageMeta) {
"ref": refreshRef
}, null, 512);
}
var index$2 = defineComponent({
var index$2 = define
System
Component({
name: "Page",
setup(_props, ctx) {
const {navigationBar} = providePageMeta(getStateId());
...
...
@@ -19839,7 +19843,7 @@ function createPageBodyVNode(ctx) {
function reload() {
window.location.reload();
}
var index$1 = /* @__PURE__ */ defineComponent({
var index$1 = /* @__PURE__ */ define
System
Component({
name: "AsyncError",
setup() {
initI18nAsyncMsgsOnce();
...
...
@@ -19854,10 +19858,10 @@ var index$1 = /* @__PURE__ */ defineComponent({
});
const clazz = {class: "uni-async-loading"};
const loadingVNode = /* @__PURE__ */ createVNode("i", {class: "uni-loading"}, null, -1);
var index = /* @__PURE__ */ defineComponent({
var index = /* @__PURE__ */ define
System
Component({
name: "AsyncLoading",
render() {
return openBlock(), createBlock("div", clazz, [loadingVNode]);
}
});
export {index$1 as AsyncErrorComponent, index as AsyncLoadingComponent, _sfc_main$8 as Audio, index$k as Button, _sfc_main$7 as Canvas, index$h as Checkbox, index$j as CheckboxGroup, _sfc_main$2 as CoverImage, _sfc_main$3 as CoverView, index$g as Editor, Form, Friction$1 as Friction, index$f as Icon, index$e as Image, Input, index$i as Label, LayoutComponent, index$3 as Map, MovableArea, MovableView, _sfc_main$6 as Navigator, index$2 as PageComponent, _sfc_main$1 as Picker, PickerView, PickerViewColumn, index$d as Progress, index$b as Radio, index$c as RadioGroup, ResizeSensor, _sfc_main$5 as RichText, _sfc_main$4 as ScrollView, Scroller$1 as Scroller, index$a as Slider, Spring$1 as Spring, Swiper, SwiperItem, index$9 as Switch, index$8 as Text, index$7 as Textarea, UniServiceJSBridge$1 as UniServiceJSBridge, UniViewJSBridge$1 as UniViewJSBridge, index$5 as Video, index$6 as View, index$4 as WebView, addInterceptor, arrayBufferToBase64, base64ToArrayBuffer, canIUse, canvasGetImageData, canvasPutImageData, canvasToTempFilePath, chooseFile, chooseImage, chooseVideo, clearStorage, clearStorageSync, closeSocket, connectSocket, createCanvasContext, createInnerAudioContext, createIntersectionObserver, createMapContext, createSelectorQuery, createVideoContext, cssBackdropFilter, cssConstant, cssEnv, cssVar, disableScrollBounce, downloadFile, getApp$1 as getApp, getCurrentPages$1 as getCurrentPages, getFileInfo, getImageInfo, getLocation, getNetworkType, getSelectedTextRange, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getVideoInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideTabBar, hideTabBarRedDot, hideToast, initScrollBounce, loadFontFace, makePhoneCall, navigateBack, navigateTo, offAccelerometerChange, offCompassChange, offNetworkStatusChange, onAccelerometerChange, onCompassChange, onNetworkStatusChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onTabBarMidButtonTap, openDocument, openLocation, pageScrollTo, index$l as plugin, previewImage, promiseInterceptor, reLaunch, redirectTo, removeInterceptor, removeStorage, removeStorageSync, removeTabBarBadge, request, sendSocketMessage, setNavigationBarColor, setNavigationBarTitle, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, setupApp, setupPage, showActionSheet, showLoading, showModal, showNavigationBarLoading, showTabBar, showTabBarRedDot, showToast, startAccelerometer, startCompass, startPullDownRefresh, stopAccelerometer, stopCompass, stopPullDownRefresh, switchTab, uni$1 as uni, uploadFile, upx2px, useAttrs, useBooleanAttr, useCustomEvent, useNativeEvent, useOn, useScroller, useSubscribe, useTouchtrack, useUserAction, vibrateLong, vibrateShort, withWebEvent};
export {index$1 as AsyncErrorComponent, index as AsyncLoadingComponent, _sfc_main$8 as Audio, index$k as Button, _sfc_main$7 as Canvas, index$h as Checkbox, index$j as CheckboxGroup, _sfc_main$2 as CoverImage, _sfc_main$3 as CoverView, index$g as Editor, Form, Friction$1 as Friction, index$f as Icon, index$e as Image, Input, index$i as Label, LayoutComponent, index$3 as Map, MovableArea, MovableView, _sfc_main$6 as Navigator, index$2 as PageComponent, _sfc_main$1 as Picker, PickerView, PickerViewColumn, index$d as Progress, index$b as Radio, index$c as RadioGroup, ResizeSensor, _sfc_main$5 as RichText, _sfc_main$4 as ScrollView, Scroller$1 as Scroller, index$a as Slider, Spring$1 as Spring, Swiper, SwiperItem, index$9 as Switch, index$8 as Text, index$7 as Textarea, UniServiceJSBridge$1 as UniServiceJSBridge, UniViewJSBridge$1 as UniViewJSBridge, index$5 as Video, index$6 as View, index$4 as WebView, addInterceptor, arrayBufferToBase64, base64ToArrayBuffer, canIUse, canvasGetImageData, canvasPutImageData, canvasToTempFilePath, chooseFile, chooseImage, chooseVideo, clearStorage, clearStorageSync, closeSocket, connectSocket, createCanvasContext, createInnerAudioContext, createIntersectionObserver, createMapContext, createSelectorQuery, createVideoContext, cssBackdropFilter, cssConstant, cssEnv, cssVar, d
efineBuiltInComponent, defineSystemComponent, d
isableScrollBounce, downloadFile, getApp$1 as getApp, getCurrentPages$1 as getCurrentPages, getFileInfo, getImageInfo, getLocation, getNetworkType, getSelectedTextRange, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getVideoInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideTabBar, hideTabBarRedDot, hideToast, initScrollBounce, loadFontFace, makePhoneCall, navigateBack, navigateTo, offAccelerometerChange, offCompassChange, offNetworkStatusChange, onAccelerometerChange, onCompassChange, onNetworkStatusChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onTabBarMidButtonTap, openDocument, openLocation, pageScrollTo, index$l as plugin, previewImage, promiseInterceptor, reLaunch, redirectTo, removeInterceptor, removeStorage, removeStorageSync, removeTabBarBadge, request, sendSocketMessage, setNavigationBarColor, setNavigationBarTitle, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, setupApp, setupPage, showActionSheet, showLoading, showModal, showNavigationBarLoading, showTabBar, showTabBarRedDot, showToast, startAccelerometer, startCompass, startPullDownRefresh, stopAccelerometer, stopCompass, stopPullDownRefresh, switchTab, uni$1 as uni, uploadFile, upx2px, useAttrs, useBooleanAttr, useCustomEvent, useNativeEvent, useOn, useScroller, useSubscribe, useTouchtrack, useUserAction, vibrateLong, vibrateShort, withWebEvent};
packages/uni-h5/src/framework/components/async-error/index.tsx
浏览文件 @
cfdd26fd
import
{
define
Component
}
from
'
vue
'
import
{
define
SystemComponent
}
from
'
@dcloudio/uni-components
'
import
{
useI18n
,
initI18nAsyncMsgsOnce
}
from
'
@dcloudio/uni-core
'
function
reload
()
{
window
.
location
.
reload
()
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
System
Component
({
name
:
'
AsyncError
'
,
setup
()
{
initI18nAsyncMsgsOnce
()
...
...
packages/uni-h5/src/framework/components/async-loading/index.ts
浏览文件 @
cfdd26fd
import
{
createBlock
,
createVNode
,
defineComponent
,
openBlock
}
from
'
vue
'
import
{
createBlock
,
createVNode
,
openBlock
}
from
'
vue
'
import
{
defineSystemComponent
}
from
'
@dcloudio/uni-components
'
const
clazz
=
{
class
:
'
uni-async-loading
'
}
const
loadingVNode
=
/*#__PURE__*/
createVNode
(
'
i
'
,
...
...
@@ -8,7 +8,7 @@ const loadingVNode = /*#__PURE__*/ createVNode(
-
1
/* HOISTED */
)
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
System
Component
({
name
:
'
AsyncLoading
'
,
render
()
{
return
openBlock
(),
createBlock
(
'
div
'
,
clazz
,
[
loadingVNode
])
...
...
packages/uni-h5/src/framework/components/layout/index.tsx
浏览文件 @
cfdd26fd
...
...
@@ -8,7 +8,6 @@ import {
createBlock
,
createVNode
,
SetupContext
,
defineComponent
,
resolveComponent
,
ConcreteComponent
,
resolveDynamicComponent
,
...
...
@@ -16,6 +15,7 @@ import {
import
{
RouterView
,
useRoute
}
from
'
vue-router
'
import
{
defineSystemComponent
}
from
'
@dcloudio/uni-components
'
import
{
updateCssVar
}
from
'
@dcloudio/uni-core
'
import
{
useTabBar
}
from
'
../../setup/state
'
import
{
useKeepAliveRoute
}
from
'
../../setup/page
'
...
...
@@ -26,7 +26,7 @@ type KeepAliveRoute = ReturnType<typeof useKeepAliveRoute>
const
DEFAULT_CSS_VAR_VALUE
=
'
0px
'
export
default
define
Component
({
export
default
/*#__PURE__*/
defineSystem
Component
({
name
:
'
Layout
'
,
setup
(
_props
,
{
emit
})
{
!
__NODE_JS__
&&
initCssVar
()
...
...
packages/uni-h5/src/framework/components/layout/tabBar.tsx
浏览文件 @
cfdd26fd
import
{
watch
,
watchEffect
,
computed
,
defineComponent
}
from
'
vue
'
import
{
watch
,
watchEffect
,
computed
}
from
'
vue
'
import
{
RouteLocationNormalizedLoaded
,
useRoute
}
from
'
vue-router
'
import
{
invokeHook
,
updatePageCssVar
}
from
'
@dcloudio/uni-core
'
import
{
API_ON_TAB_BAR_MID_BUTTON_TAP
,
OnTabBarMidButtonTap
,
}
from
'
@dcloudio/uni-api
'
import
{
defineSystemComponent
}
from
'
@dcloudio/uni-components
'
import
{
getRealPath
}
from
'
../../../platform
'
import
{
useTabBar
}
from
'
../../setup/state
'
import
{
cssBackdropFilter
}
from
'
../../../service/api/base/canIUse
'
import
{
normalizeWindowBottom
}
from
'
../../../helpers/cssVar
'
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
System
Component
({
name
:
'
TabBar
'
,
setup
()
{
const
tabBar
=
useTabBar
()
!
...
...
packages/uni-h5/src/framework/components/page/index.ts
浏览文件 @
cfdd26fd
...
...
@@ -5,15 +5,15 @@ import {
createVNode
,
createBlock
,
SetupContext
,
defineComponent
,
}
from
'
vue
'
import
{
defineSystemComponent
}
from
'
@dcloudio/uni-components
'
import
PageHead
from
'
./pageHead
'
import
PageBody
from
'
./pageBody
'
import
{
providePageMeta
}
from
'
../../setup/provide
'
import
{
getStateId
}
from
'
../../../helpers/dom
'
export
default
defineComponent
({
export
default
define
System
Component
({
name
:
'
Page
'
,
setup
(
_props
,
ctx
)
{
const
{
navigationBar
}
=
providePageMeta
(
getStateId
())
...
...
packages/uni-h5/src/framework/components/page/pageBody.tsx
浏览文件 @
cfdd26fd
import
{
ref
,
renderSlot
,
defineComponent
,
Ref
}
from
'
vue
'
import
{
ref
,
renderSlot
,
Ref
}
from
'
vue
'
import
{
defineSystemComponent
}
from
'
@dcloudio/uni-components
'
import
{
usePageMeta
}
from
'
../../setup/provide
'
...
...
@@ -6,7 +8,7 @@ import PageRefresh from './page-refresh/component.vue'
import
{
usePageRefresh
}
from
'
./page-refresh
'
export
default
defineComponent
({
export
default
define
System
Component
({
name
:
'
PageBody
'
,
setup
(
props
,
ctx
)
{
const
pageMeta
=
(
__UNI_FEATURE_PULL_DOWN_REFRESH__
&&
...
...
@@ -27,12 +29,12 @@ export default defineComponent({
__UNI_FEATURE_PULL_DOWN_REFRESH__
&&
createPageRefreshTsx
(
refreshRef
,
pageMeta
)
return
(
<
div
>
<>
{
pageRefreshTsx
}
<
uni
-
page
-
wrapper
{
...
pageRefresh
}
>
<
uni
-
page
-
body
>
{
renderSlot
(
ctx
.
slots
,
'
default
'
)
}
</
uni
-
page
-
body
>
</
uni
-
page
-
wrapper
>
</
div
>
</>
)
}
},
...
...
packages/uni-h5/src/framework/components/page/pageHead.tsx
浏览文件 @
cfdd26fd
import
{
computed
,
defineComponent
,
onBeforeMount
,
ref
}
from
'
vue
'
import
{
computed
,
onBeforeMount
,
ref
}
from
'
vue
'
import
{
extend
,
isArray
}
from
'
@vue/shared
'
import
{
Input
}
from
'
@dcloudio/uni-components
'
import
{
defineSystemComponent
,
Input
}
from
'
@dcloudio/uni-components
'
import
{
getRealPath
}
from
'
@dcloudio/uni-platform
'
import
{
invokeHook
,
...
...
@@ -30,7 +30,7 @@ const ICON_PATHS = {
'
M17.25 16.156l7.375-7.313q0.281-0.281 0.281-0.641t-0.281-0.641q-0.25-0.25-0.625-0.25t-0.625 0.25l-7.375 7.344-7.313-7.344q-0.25-0.25-0.625-0.25t-0.625 0.25q-0.281 0.25-0.281 0.625t0.281 0.625l7.313 7.344-7.375 7.344q-0.281 0.25-0.281 0.625t0.281 0.625q0.125 0.125 0.281 0.188t0.344 0.063q0.156 0 0.328-0.063t0.297-0.188l7.375-7.344 7.375 7.406q0.125 0.156 0.297 0.219t0.328 0.063q0.188 0 0.344-0.078t0.281-0.203q0.281-0.25 0.281-0.609t-0.281-0.641l-7.375-7.406z
'
,
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
System
Component
({
name
:
'
PageHead
'
,
setup
()
{
const
headRef
=
ref
(
null
)
...
...
packages/uni-h5/src/framework/setup/provide/page.ts
浏览文件 @
cfdd26fd
...
...
@@ -105,6 +105,7 @@ function normalizePageMeta(pageMeta: UniApp.PageRouteMeta) {
if
(
__UNI_FEATURE_NAVIGATIONBAR__
)
{
const
{
navigationBar
}
=
pageMeta
const
{
titleSize
,
titleColor
,
backgroundColor
}
=
navigationBar
navigationBar
.
type
=
navigationBar
.
type
||
'
default
'
navigationBar
.
backButton
=
pageMeta
.
isQuit
?
false
:
true
navigationBar
.
titleSize
=
titleSize
||
'
16px
'
navigationBar
.
titleColor
=
titleColor
||
'
#fff
'
...
...
packages/uni-h5/src/view/components/map/MapCircle.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
inject
,
onUnmounted
,
watch
}
from
'
vue
'
import
{
useCustomEvent
}
from
'
@dcloudio/uni-components
'
import
{
inject
,
onUnmounted
,
watch
}
from
'
vue
'
import
{
defineSystemComponent
,
useCustomEvent
}
from
'
@dcloudio/uni-components
'
import
{
Map
,
Circle
}
from
'
./qqMap/types
'
import
{
QQMapsExt
}
from
'
./qqMap
'
...
...
@@ -22,7 +22,7 @@ type OnMapReadyCallback = (
)
=>
void
type
OnMapReady
=
(
callback
:
OnMapReadyCallback
)
=>
void
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
System
Component
({
name
:
'
MapCircle
'
,
props
,
setup
(
props
)
{
...
...
packages/uni-h5/src/view/components/map/MapControl.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
inject
,
onUnmounted
,
watch
,
PropType
}
from
'
vue
'
import
{
inject
,
onUnmounted
,
watch
,
PropType
}
from
'
vue
'
import
{
getRealPath
}
from
'
@dcloudio/uni-platform
'
import
{
useCustomEvent
}
from
'
@dcloudio/uni-components
'
import
{
defineSystemComponent
,
useCustomEvent
}
from
'
@dcloudio/uni-components
'
import
{
Map
}
from
'
./qqMap/types
'
import
{
QQMapsExt
}
from
'
./qqMap
'
...
...
@@ -27,7 +27,7 @@ type OnMapReadyCallback = (
)
=>
void
type
OnMapReady
=
(
callback
:
OnMapReadyCallback
)
=>
void
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
System
Component
({
name
:
'
MapControl
'
,
props
,
setup
(
props
)
{
...
...
packages/uni-h5/src/view/components/map/MapLocation.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
inject
,
onUnmounted
,
reactive
}
from
'
vue
'
import
{
useCustomEvent
}
from
'
@dcloudio/uni-components
'
import
{
inject
,
onUnmounted
,
reactive
}
from
'
vue
'
import
{
defineSystemComponent
,
useCustomEvent
}
from
'
@dcloudio/uni-components
'
//#if !_NODE_JS_
import
{
onCompassChange
,
...
...
@@ -38,7 +38,7 @@ type RemoveMapChidlContext = (context: Context) => void
const
ICON_PATH
=
'
data:image/png;base64,iVBOR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RqwEfkGCdTCMmMRw+IbPDCQaHCsCYAQxiZHw3TbmD/ESOHgHwShiEqPhp/gggYkSztIxxCRawy/bmEniJaJtfwiEscQkxkFgRqJESqQwwHhiEuMBp3Vm8RK/cZoHEzKXhCK2QxEPpiJe0YlKCFaKCNv/cYBNUsBRPlkJSc0U+dM7E9H0ThGJbgZT/iR7yj+VqMS06Qr4+OFm2JdCxIa8lugzkJs5K6MfxAaYPUcBpYG5khZJEkUUSb7DPCnKRfPBXj6M8FwuegoLpCgXcQszVjhbJFUJUee2hBhLoYTIcYtB57KY+opSMdVqwatSlZVj05aV//CwJLMX2DluaUcwhXm4ali2XOoLjxUrPV26zFtF4f5p0Gp310+z13BUWNvbehEXona6iAtX/zVZmtfN4WixfsNky4S6gCCVVq3RPLdfSfpv3MRRZfPoLc6Xs/5bt3EyMGzE9h07/Xft2t15z6i9+zgGg8FgMBgMBoPBYDAYDAYj8/APG67Rie8pUDsAAAAASUVORK5CYII=
'
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
System
Component
({
name
:
'
MapLocation
'
,
setup
()
{
const
state
:
State
=
reactive
({
...
...
packages/uni-h5/src/view/components/map/MapMarker.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
onUnmounted
,
inject
,
watch
}
from
'
vue
'
import
{
onUnmounted
,
inject
,
watch
}
from
'
vue
'
import
{
getRealPath
}
from
'
@dcloudio/uni-platform
'
import
{
useCustomEvent
}
from
'
@dcloudio/uni-components
'
import
{
defineSystemComponent
,
useCustomEvent
}
from
'
@dcloudio/uni-components
'
import
{
Map
,
Marker
,
Label
,
LatLng
}
from
'
./qqMap/types
'
import
{
Callout
,
CalloutOptions
,
QQMapsExt
}
from
'
./qqMap
'
...
...
@@ -98,7 +98,7 @@ interface MarkerExt extends Marker {
lastPosition
?:
LatLng
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
System
Component
({
name
:
'
MapMarker
'
,
props
,
setup
(
props
)
{
...
...
packages/uni-h5/src/view/components/map/MapPolyline.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
inject
,
PropType
,
onUnmounted
,
watch
}
from
'
vue
'
import
{
useCustomEvent
}
from
'
@dcloudio/uni-components
'
import
{
inject
,
PropType
,
onUnmounted
,
watch
}
from
'
vue
'
import
{
defineSystemComponent
,
useCustomEvent
}
from
'
@dcloudio/uni-components
'
import
{
Map
,
LatLng
,
Polyline
}
from
'
./qqMap/types
'
import
{
QQMapsExt
}
from
'
./qqMap
'
...
...
@@ -35,7 +35,7 @@ type OnMapReadyCallback = (
)
=>
void
type
OnMapReady
=
(
callback
:
OnMapReadyCallback
)
=>
void
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
System
Component
({
name
:
'
MapPolyline
'
,
props
,
setup
(
props
)
{
...
...
packages/uni-h5/src/view/components/map/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
onMounted
,
reactive
,
Ref
,
...
...
@@ -9,8 +8,11 @@ import {
PropType
,
provide
,
}
from
'
vue
'
import
{
useCustomEvent
}
from
'
@dcloudio/uni-components
'
import
{
useSubscribe
}
from
'
@dcloudio/uni-components
'
import
{
defineBuiltInComponent
,
useSubscribe
,
useCustomEvent
,
}
from
'
@dcloudio/uni-components
'
import
{
callback
}
from
'
../../../helpers/utils
'
import
{
QQMapsExt
,
loadMaps
}
from
'
./qqMap
'
import
{
Map
}
from
'
./qqMap/types
'
...
...
@@ -405,7 +407,7 @@ function useMap(
}
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Map
'
,
props
,
emits
:
[
...
...
packages/uni-h5/src/view/components/video/index.tsx
浏览文件 @
cfdd26fd
import
{
defineComponent
,
withModifiers
,
Ref
,
ref
,
...
...
@@ -14,6 +13,7 @@ import { passive } from '@dcloudio/uni-shared'
import
{
useI18n
,
initI18nVideoMsgsOnce
}
from
'
@dcloudio/uni-core
'
import
{
getRealPath
}
from
'
@dcloudio/uni-platform
'
import
{
defineBuiltInComponent
,
useSubscribe
,
useCustomEvent
,
EmitEvent
,
...
...
@@ -786,7 +786,7 @@ const props = {
default
:
true
,
},
}
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
name
:
'
Video
'
,
props
,
emits
:
[
...
...
packages/uni-h5/src/view/components/web-view/index.tsx
浏览文件 @
cfdd26fd
import
{
ref
,
onMounted
,
Ref
,
onActivated
,
onDeactivated
,
Teleport
}
from
'
vue
'
import
{
defineComponent
,
ref
,
onMounted
,
Ref
,
onActivated
,
onDeactivated
,
Teleport
,
}
from
'
vue
'
import
{
ResizeSensor
,
useAttrs
}
from
'
@dcloudio/uni-components
'
defineBuiltInComponent
,
ResizeSensor
,
useAttrs
,
}
from
'
@dcloudio/uni-components
'
import
{
getRealPath
}
from
'
@dcloudio/uni-platform
'
import
{
updateElementStyle
}
from
'
@dcloudio/uni-shared
'
...
...
@@ -20,7 +16,7 @@ const props = {
type
RootRef
=
Ref
<
HTMLElement
|
null
>
export
default
/*#__PURE__*/
defineComponent
({
export
default
/*#__PURE__*/
define
BuiltIn
Component
({
inheritAttrs
:
false
,
name
:
'
WebView
'
,
props
,
...
...
packages/uni-h5/style/framework/base.css
浏览文件 @
cfdd26fd
...
...
@@ -19,12 +19,16 @@ uni-app,
uni-page
,
uni-page-wrapper
,
uni-page-body
{
position
:
relative
;
display
:
block
;
box-sizing
:
border-box
;
width
:
100%
;
}
uni-page-wrapper
{
position
:
relative
;
}
#app
,
uni-app
,
uni-page
,
uni-page-wrapper
{
...
...
@@ -44,7 +48,7 @@ uni-page-wrapper {
/* toast,modal,actionSheet,picker */
.uni-fade-enter-active
,
.uni-fade-leave-active
{
transition-duration
:
.25s
;
transition-duration
:
0
.25s
;
transition-property
:
opacity
;
transition-timing-function
:
ease
;
}
...
...
packages/vite-plugin-uni/src/config/index.ts
浏览文件 @
cfdd26fd
...
...
@@ -28,7 +28,7 @@ export function createConfig(
options
.
command
=
env
.
command
options
.
platform
=
(
process
.
env
.
UNI_PLATFORM
as
UniApp
.
PLATFORM
)
||
'
h5
'
options
.
inputDir
=
normalizeInputDir
(
config
)
options
.
vueOptions
=
initPluginVueOptions
(
options
.
vueOptions
||
{}
)
options
.
vueOptions
=
initPluginVueOptions
(
options
)
options
.
compiler
.
init
()
const
define
=
createDefine
(
options
,
config
,
env
)
const
{
h5
}
=
parseManifestJsonOnce
(
options
.
inputDir
)
...
...
packages/vite-plugin-uni/src/vue/compilerOptions.ts
浏览文件 @
cfdd26fd
import
{
isArray
}
from
'
@vue/shared
'
import
{
extend
,
isArray
}
from
'
@vue/shared
'
import
{
CompilerOptions
,
SFCTemplateCompileOptions
}
from
'
@vue/compiler-sfc
'
import
{
Options
as
VueOptions
}
from
'
@vitejs/plugin-vue
'
import
{
isNativeTag
}
from
'
@dcloudio/uni-shared
'
import
{
EXTNAME_VUE_RE
}
from
'
@dcloudio/uni-cli-shared
'
import
{
EXTNAME_VUE_RE
,
parseCompatConfigOnce
}
from
'
@dcloudio/uni-cli-shared
'
import
{
block
}
from
'
./transforms/block
'
import
{
matchMedia
}
from
'
./transforms/matchMedia
'
import
{
VitePluginUniResolvedOptions
}
from
'
..
'
export
const
uniVueCompilerOptions
:
CompilerOptions
=
{
isNativeTag
,
nodeTransforms
:
[
matchMedia
],
nodeTransforms
:
[
block
,
matchMedia
],
}
export
const
uniVueTransformAssetUrls
:
SFCTemplateCompileOptions
[
'
transformAssetUrls
'
]
=
...
...
@@ -36,7 +37,8 @@ export const uniVueTemplateOptions: Partial<SFCTemplateCompileOptions> = {
transformAssetUrls
:
uniVueTransformAssetUrls
,
}
export
function
initPluginVueOptions
(
vueOptions
:
VueOptions
)
{
export
function
initPluginVueOptions
(
options
:
VitePluginUniResolvedOptions
)
{
const
vueOptions
=
options
.
vueOptions
||
(
options
.
vueOptions
=
{})
if
(
!
vueOptions
.
include
)
{
vueOptions
.
include
=
[]
}
...
...
@@ -55,6 +57,15 @@ export function initPluginVueOptions(vueOptions: VueOptions) {
if
(
!
compilerOptions
.
nodeTransforms
)
{
compilerOptions
.
nodeTransforms
=
[]
}
const
compatConfig
=
parseCompatConfigOnce
(
options
.
inputDir
)
compilerOptions
.
compatConfig
=
extend
(
compilerOptions
.
compatConfig
||
{},
compatConfig
)
compilerOptions
.
nodeTransforms
.
unshift
(
matchMedia
)
compilerOptions
.
nodeTransforms
.
unshift
(
block
)
return
vueOptions
}
packages/vite-plugin-uni/src/vue/transforms/block.ts
0 → 100644
浏览文件 @
cfdd26fd
import
{
ElementNode
,
NodeTransform
}
from
'
@vue/compiler-core
'
export
const
block
:
NodeTransform
=
(
node
)
=>
{
if
((
node
as
ElementNode
).
tag
!==
'
block
'
)
{
return
}
const
platform
=
process
.
env
.
UNI_PLATFORM
if
(
platform
===
'
h5
'
||
platform
===
'
app
'
)
{
;(
node
as
ElementNode
).
tag
=
'
template
'
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录