Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lzb_79
uni-app
提交
78a3395e
U
uni-app
项目概览
lzb_79
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
78a3395e
编写于
3月 16, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: load => plugin
上级
a2b13dd4
变更
17
显示空白变更内容
内联
并排
Showing
17 changed file
with
2000 addition
and
145 deletion
+2000
-145
packages/uni-h5/dist/assets/index-80b8f81e.css
packages/uni-h5/dist/assets/index-80b8f81e.css
+1720
-0
packages/uni-h5/dist/uni-h5.esm.js
packages/uni-h5/dist/uni-h5.esm.js
+2
-2
packages/uni-h5/src/framework/components/async-error/index.vue
...ges/uni-h5/src/framework/components/async-error/index.vue
+14
-17
packages/uni-h5/src/framework/components/async-loading/index.vue
...s/uni-h5/src/framework/components/async-loading/index.vue
+12
-12
packages/vite-plugin-uni/package.json
packages/vite-plugin-uni/package.json
+3
-0
packages/vite-plugin-uni/src/config/index.ts
packages/vite-plugin-uni/src/config/index.ts
+2
-0
packages/vite-plugin-uni/src/configResolved/plugins/appVue.ts
...ages/vite-plugin-uni/src/configResolved/plugins/appVue.ts
+19
-0
packages/vite-plugin-uni/src/configResolved/plugins/index.ts
packages/vite-plugin-uni/src/configResolved/plugins/index.ts
+11
-0
packages/vite-plugin-uni/src/configResolved/plugins/json.ts
packages/vite-plugin-uni/src/configResolved/plugins/json.ts
+7
-2
packages/vite-plugin-uni/src/configResolved/plugins/mainJs.ts
...ages/vite-plugin-uni/src/configResolved/plugins/mainJs.ts
+25
-0
packages/vite-plugin-uni/src/configResolved/plugins/manifestJson.ts
...ite-plugin-uni/src/configResolved/plugins/manifestJson.ts
+94
-0
packages/vite-plugin-uni/src/configResolved/plugins/pagesJson.ts
...s/vite-plugin-uni/src/configResolved/plugins/pagesJson.ts
+78
-26
packages/vite-plugin-uni/src/index.ts
packages/vite-plugin-uni/src/index.ts
+13
-3
packages/vite-plugin-uni/src/load/app.ts
packages/vite-plugin-uni/src/load/app.ts
+0
-19
packages/vite-plugin-uni/src/load/index.ts
packages/vite-plugin-uni/src/load/index.ts
+0
-23
packages/vite-plugin-uni/src/load/main.ts
packages/vite-plugin-uni/src/load/main.ts
+0
-27
packages/vite-plugin-uni/src/resolveId.ts
packages/vite-plugin-uni/src/resolveId.ts
+0
-14
未找到文件。
packages/uni-h5/dist/assets/index-80b8f81e.css
0 → 100644
浏览文件 @
78a3395e
uni-tabbar
{
display
:
block
;
box-sizing
:
border-box
;
position
:
fixed
;
left
:
0
;
bottom
:
0
;
width
:
100%
;
z-index
:
998
;
}
uni-tabbar
.uni-tabbar
{
display
:
flex
;
position
:
fixed
;
left
:
0
;
bottom
:
0
;
width
:
100%
;
z-index
:
998
;
box-sizing
:
border-box
;
padding-bottom
:
0
;
padding-bottom
:
constant
(
safe-area-inset-bottom
);
padding-bottom
:
env
(
safe-area-inset-bottom
);
}
uni-tabbar
.uni-tabbar
~
.uni-placeholder
{
width
:
100%
;
height
:
50px
;
margin-bottom
:
0
;
margin-bottom
:
constant
(
safe-area-inset-bottom
);
margin-bottom
:
env
(
safe-area-inset-bottom
);
}
uni-tabbar
.uni-tabbar
*
{
box-sizing
:
border-box
;
}
uni-tabbar
.uni-tabbar__item
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
flex-direction
:
column
;
flex
:
1
;
font-size
:
0
;
text-align
:
center
;
-webkit-tap-highlight-color
:
rgba
(
0
,
0
,
0
,
0
);
}
uni-tabbar
.uni-tabbar__bd
{
position
:
relative
;
height
:
50px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
cursor
:
pointer
;
}
uni-tabbar
.uni-tabbar__icon
{
position
:
relative
;
display
:
inline-block
;
margin-top
:
5px
;
width
:
24px
;
height
:
24px
;
}
uni-tabbar
.uni-tabbar__icon.uni-tabbar__icon__diff
{
margin-top
:
0px
;
width
:
34px
;
height
:
34px
;
}
uni-tabbar
.uni-tabbar__icon
img
{
width
:
100%
;
height
:
100%
;
}
uni-tabbar
.uni-tabbar__label
{
position
:
relative
;
text-align
:
center
;
font-size
:
10px
;
line-height
:
1.8
;
}
uni-tabbar
.uni-tabbar-border
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
1px
;
transform
:
scaleY
(
0.5
);
}
uni-tabbar
.uni-tabbar__reddot
{
position
:
absolute
;
top
:
0
;
right
:
0
;
width
:
12px
;
height
:
12px
;
border-radius
:
50%
;
background-color
:
#f43530
;
color
:
#ffffff
;
transform
:
translate
(
40%
,
-20%
);
}
uni-tabbar
.uni-tabbar__badge
{
width
:
auto
;
height
:
16px
;
line-height
:
16px
;
border-radius
:
16px
;
min-width
:
16px
;
padding
:
0
2px
;
font-size
:
12px
;
text-align
:
center
;
white-space
:
nowrap
;
}
uni-toast
{
position
:
fixed
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
z-index
:
999
;
display
:
block
;
box-sizing
:
border-box
;
pointer-events
:
none
;
}
uni-toast
.uni-sample-toast
{
position
:
fixed
;
z-index
:
999
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
text-align
:
center
;
max-width
:
80%
;
}
uni-toast
.uni-simple-toast__text
{
display
:
inline-block
;
vertical-align
:
middle
;
color
:
#ffffff
;
background-color
:
rgba
(
17
,
17
,
17
,
0.7
);
padding
:
10px
20px
;
border-radius
:
5px
;
font-size
:
13px
;
text-align
:
center
;
max-width
:
100%
;
word-break
:
break-all
;
white-space
:
normal
;
}
uni-toast
.uni-mask
{
pointer-events
:
auto
;
}
uni-toast
.uni-toast
{
position
:
fixed
;
z-index
:
999
;
width
:
8em
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
background
:
rgba
(
17
,
17
,
17
,
0.7
);
text-align
:
center
;
border-radius
:
5px
;
color
:
#ffffff
;
}
uni-toast
.uni-toast
*
{
box-sizing
:
border-box
;
}
uni-toast
.uni-toast__icon
{
margin
:
20px
0
0
;
width
:
38px
;
height
:
38px
;
vertical-align
:
baseline
;
}
uni-toast
.uni-icon_toast
{
margin
:
15px
0
0
;
}
uni-toast
.uni-icon_toast.uni-icon-success-no-circle
:before
{
color
:
#ffffff
;
font-size
:
55px
;
}
uni-toast
.uni-icon_toast.uni-loading
{
margin
:
20px
0
0
;
width
:
38px
;
height
:
38px
;
vertical-align
:
baseline
;
}
uni-toast
.uni-toast__content
{
margin
:
0
0
15px
;
}
uni-modal
{
position
:
fixed
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
z-index
:
999
;
display
:
block
;
box-sizing
:
border-box
;
}
uni-modal
.uni-modal
{
position
:
fixed
;
z-index
:
999
;
width
:
80%
;
max-width
:
300px
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
background-color
:
#ffffff
;
text-align
:
center
;
border-radius
:
3px
;
overflow
:
hidden
;
}
uni-modal
.uni-modal
*
{
box-sizing
:
border-box
;
}
uni-modal
.uni-modal__hd
{
padding
:
1em
1.6em
0.3em
;
}
uni-modal
.uni-modal__title
{
font-weight
:
400
;
font-size
:
18px
;
word-wrap
:
break-word
;
word-break
:
break-all
;
white-space
:
pre-wrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
uni-modal
.uni-modal__bd
{
padding
:
1.3em
1.6em
1.3em
;
min-height
:
40px
;
font-size
:
15px
;
line-height
:
1.4
;
word-wrap
:
break-word
;
word-break
:
break-all
;
white-space
:
pre-wrap
;
color
:
#999999
;
max-height
:
400px
;
overflow-y
:
auto
;
}
uni-modal
.uni-modal__ft
{
position
:
relative
;
line-height
:
48px
;
font-size
:
18px
;
display
:
flex
;
}
uni-modal
.uni-modal__ft
:after
{
content
:
" "
;
position
:
absolute
;
left
:
0
;
top
:
0
;
right
:
0
;
height
:
1px
;
border-top
:
1px
solid
#d5d5d6
;
color
:
#d5d5d6
;
transform-origin
:
0
0
;
transform
:
scaleY
(
0.5
);
}
uni-modal
.uni-modal__btn
{
display
:
block
;
flex
:
1
;
color
:
#3cc51f
;
text-decoration
:
none
;
-webkit-tap-highlight-color
:
rgba
(
0
,
0
,
0
,
0
);
position
:
relative
;
}
uni-modal
.uni-modal__btn
:active
{
background-color
:
#eeeeee
;
}
uni-modal
.uni-modal__btn
:after
{
content
:
" "
;
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
1px
;
bottom
:
0
;
border-left
:
1px
solid
#d5d5d6
;
color
:
#d5d5d6
;
transform-origin
:
0
0
;
transform
:
scaleX
(
0.5
);
}
uni-modal
.uni-modal__btn
:first-child:after
{
display
:
none
;
}
uni-modal
.uni-modal__btn_default
{
color
:
#353535
;
}
uni-modal
.uni-modal__btn_primary
{
color
:
#007aff
;
}
uni-actionsheet
{
display
:
block
;
box-sizing
:
border-box
;
}
uni-actionsheet
.uni-actionsheet
{
position
:
fixed
;
left
:
0
;
bottom
:
0
;
transform
:
translate
(
0
,
100%
);
backface-visibility
:
hidden
;
z-index
:
999
;
width
:
100%
;
background-color
:
#efeff4
;
visibility
:
hidden
;
transition
:
transform
0.3s
,
visibility
0.3s
;
}
uni-actionsheet
.uni-actionsheet.uni-actionsheet_toggle
{
visibility
:
visible
;
transform
:
translate
(
0
,
0
);
}
uni-actionsheet
.uni-actionsheet
*
{
box-sizing
:
border-box
;
}
uni-actionsheet
.uni-actionsheet__menu
{
background-color
:
#fcfcfd
;
}
uni-actionsheet
.uni-actionsheet__action
{
margin-top
:
6px
;
background-color
:
#fcfcfd
;
}
uni-actionsheet
.uni-actionsheet__cell
,
uni-actionsheet
.uni-actionsheet__title
{
position
:
relative
;
padding
:
10px
0
;
text-align
:
center
;
font-size
:
18px
;
}
uni-actionsheet
.uni-actionsheet__cell
:before
{
content
:
" "
;
position
:
absolute
;
left
:
0
;
top
:
0
;
right
:
0
;
height
:
1px
;
border-top
:
1px
solid
#e5e5e5
;
color
:
#e5e5e5
;
transform-origin
:
0
0
;
transform
:
scaleY
(
0.5
);
}
uni-actionsheet
.uni-actionsheet__cell
:active
{
background-color
:
#ececec
;
}
uni-actionsheet
.uni-actionsheet__cell
:first-child:before
{
display
:
none
;
}
uni-canvas
{
width
:
300px
;
height
:
150px
;
display
:
block
;
position
:
relative
;
}
uni-canvas
>
canvas
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
}
uni-checkbox-group
[
hidden
]
{
display
:
none
;
}
.ql-container
{
display
:
block
;
position
:
relative
;
box-sizing
:
border-box
;
-webkit-user-select
:
text
;
user-select
:
text
;
outline
:
none
;
overflow
:
hidden
;
width
:
100%
;
height
:
200px
;
min-height
:
200px
;
}
.ql-container
[
hidden
]
{
display
:
none
;
}
.ql-container
.ql-editor
{
position
:
relative
;
font-size
:
inherit
;
line-height
:
inherit
;
font-family
:
inherit
;
min-height
:
inherit
;
width
:
100%
;
height
:
100%
;
padding
:
0
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
-webkit-tap-highlight-color
:
transparent
;
-webkit-touch-callout
:
none
;
-webkit-overflow-scrolling
:
touch
;
}
.ql-container
.ql-editor
::-webkit-scrollbar
{
width
:
0
!important
;
}
.ql-container
.ql-editor.scroll-disabled
{
overflow
:
hidden
;
}
.ql-container
.ql-image-overlay
{
display
:
flex
;
position
:
absolute
;
box-sizing
:
border-box
;
border
:
1px
dashed
#ccc
;
justify-content
:
center
;
align-items
:
center
;
-webkit-user-select
:
none
;
user-select
:
none
;
}
.ql-container
.ql-image-overlay
.ql-image-size
{
position
:
absolute
;
padding
:
4px
8px
;
text-align
:
center
;
background-color
:
#fff
;
color
:
#888
;
border
:
1px
solid
#ccc
;
box-sizing
:
border-box
;
opacity
:
0.8
;
right
:
4px
;
top
:
4px
;
font-size
:
12px
;
display
:
inline-block
;
width
:
auto
;
}
.ql-container
.ql-image-overlay
.ql-image-toolbar
{
position
:
relative
;
text-align
:
center
;
box-sizing
:
border-box
;
background
:
#000
;
border-radius
:
5px
;
color
:
#fff
;
font-size
:
0
;
min-height
:
24px
;
z-index
:
100
;
}
.ql-container
.ql-image-overlay
.ql-image-toolbar
span
{
display
:
inline-block
;
cursor
:
pointer
;
padding
:
5px
;
font-size
:
12px
;
border-right
:
1px
solid
#fff
;
}
.ql-container
.ql-image-overlay
.ql-image-toolbar
span
:last-child
{
border-right
:
0
;
}
.ql-container
.ql-image-overlay
.ql-image-toolbar
span
.triangle-up
{
padding
:
0
;
position
:
absolute
;
top
:
-12px
;
left
:
50%
;
transform
:
translatex
(
-50%
);
width
:
0
;
height
:
0
;
border-width
:
6px
;
border-style
:
solid
;
border-color
:
transparent
transparent
black
transparent
;
}
.ql-container
.ql-image-overlay
.ql-image-handle
{
position
:
absolute
;
height
:
12px
;
width
:
12px
;
border-radius
:
50%
;
border
:
1px
solid
#ccc
;
box-sizing
:
border-box
;
background
:
#fff
;
}
.ql-container
img
{
display
:
inline-block
;
max-width
:
100%
;
}
.ql-clipboard
p
{
margin
:
0
;
padding
:
0
;
}
.ql-editor
{
box-sizing
:
border-box
;
height
:
100%
;
outline
:
none
;
overflow-y
:
auto
;
tab-size
:
4
;
-moz-tab-size
:
4
;
text-align
:
left
;
white-space
:
pre-wrap
;
word-wrap
:
break-word
;
}
.ql-editor
>
*
{
cursor
:
text
;
}
.ql-editor
p
,
.ql-editor
ol
,
.ql-editor
ul
,
.ql-editor
pre
,
.ql-editor
blockquote
,
.ql-editor
h1
,
.ql-editor
h2
,
.ql-editor
h3
,
.ql-editor
h4
,
.ql-editor
h5
,
.ql-editor
h6
{
margin
:
0
;
padding
:
0
;
counter-reset
:
list-1
list-2
list-3
list-4
list-5
list-6
list-7
list-8
list-9
;
}
.ql-editor
ol
>
li
,
.ql-editor
ul
>
li
{
list-style-type
:
none
;
}
.ql-editor
ul
>
li
::before
{
content
:
'\2022'
;
}
.ql-editor
ul
[
data-checked
=
true
],
.ql-editor
ul
[
data-checked
=
false
]
{
pointer-events
:
none
;
}
.ql-editor
ul
[
data-checked
=
true
]
>
li
*,
.ql-editor
ul
[
data-checked
=
false
]
>
li
*
{
pointer-events
:
all
;
}
.ql-editor
ul
[
data-checked
=
true
]
>
li
::before
,
.ql-editor
ul
[
data-checked
=
false
]
>
li
::before
{
color
:
#777
;
cursor
:
pointer
;
pointer-events
:
all
;
}
.ql-editor
ul
[
data-checked
=
true
]
>
li
::before
{
content
:
'\2611'
;
}
.ql-editor
ul
[
data-checked
=
false
]
>
li
::before
{
content
:
'\2610'
;
}
.ql-editor
li
::before
{
display
:
inline-block
;
white-space
:
nowrap
;
width
:
2em
;
}
.ql-editor
ol
li
{
counter-reset
:
list-1
list-2
list-3
list-4
list-5
list-6
list-7
list-8
list-9
;
counter-increment
:
list-0
;
}
.ql-editor
ol
li
:before
{
content
:
counter
(
list-0
,
decimal
)
'. '
;
}
.ql-editor
ol
li
.ql-indent-1
{
counter-increment
:
list-1
;
}
.ql-editor
ol
li
.ql-indent-1
:before
{
content
:
counter
(
list-1
,
lower-alpha
)
'. '
;
}
.ql-editor
ol
li
.ql-indent-1
{
counter-reset
:
list-2
list-3
list-4
list-5
list-6
list-7
list-8
list-9
;
}
.ql-editor
ol
li
.ql-indent-2
{
counter-increment
:
list-2
;
}
.ql-editor
ol
li
.ql-indent-2
:before
{
content
:
counter
(
list-2
,
lower-roman
)
'. '
;
}
.ql-editor
ol
li
.ql-indent-2
{
counter-reset
:
list-3
list-4
list-5
list-6
list-7
list-8
list-9
;
}
.ql-editor
ol
li
.ql-indent-3
{
counter-increment
:
list-3
;
}
.ql-editor
ol
li
.ql-indent-3
:before
{
content
:
counter
(
list-3
,
decimal
)
'. '
;
}
.ql-editor
ol
li
.ql-indent-3
{
counter-reset
:
list-4
list-5
list-6
list-7
list-8
list-9
;
}
.ql-editor
ol
li
.ql-indent-4
{
counter-increment
:
list-4
;
}
.ql-editor
ol
li
.ql-indent-4
:before
{
content
:
counter
(
list-4
,
lower-alpha
)
'. '
;
}
.ql-editor
ol
li
.ql-indent-4
{
counter-reset
:
list-5
list-6
list-7
list-8
list-9
;
}
.ql-editor
ol
li
.ql-indent-5
{
counter-increment
:
list-5
;
}
.ql-editor
ol
li
.ql-indent-5
:before
{
content
:
counter
(
list-5
,
lower-roman
)
'. '
;
}
.ql-editor
ol
li
.ql-indent-5
{
counter-reset
:
list-6
list-7
list-8
list-9
;
}
.ql-editor
ol
li
.ql-indent-6
{
counter-increment
:
list-6
;
}
.ql-editor
ol
li
.ql-indent-6
:before
{
content
:
counter
(
list-6
,
decimal
)
'. '
;
}
.ql-editor
ol
li
.ql-indent-6
{
counter-reset
:
list-7
list-8
list-9
;
}
.ql-editor
ol
li
.ql-indent-7
{
counter-increment
:
list-7
;
}
.ql-editor
ol
li
.ql-indent-7
:before
{
content
:
counter
(
list-7
,
lower-alpha
)
'. '
;
}
.ql-editor
ol
li
.ql-indent-7
{
counter-reset
:
list-8
list-9
;
}
.ql-editor
ol
li
.ql-indent-8
{
counter-increment
:
list-8
;
}
.ql-editor
ol
li
.ql-indent-8
:before
{
content
:
counter
(
list-8
,
lower-roman
)
'. '
;
}
.ql-editor
ol
li
.ql-indent-8
{
counter-reset
:
list-9
;
}
.ql-editor
ol
li
.ql-indent-9
{
counter-increment
:
list-9
;
}
.ql-editor
ol
li
.ql-indent-9
:before
{
content
:
counter
(
list-9
,
decimal
)
'. '
;
}
.ql-editor
.ql-indent-1
:not
(
.ql-direction-rtl
)
{
padding-left
:
2em
;
}
.ql-editor
li
.ql-indent-1
:not
(
.ql-direction-rtl
)
{
padding-left
:
2em
;
}
.ql-editor
.ql-indent-1.ql-direction-rtl.ql-align-right
{
padding-right
:
2em
;
}
.ql-editor
li
.ql-indent-1.ql-direction-rtl.ql-align-right
{
padding-right
:
2em
;
}
.ql-editor
.ql-indent-2
:not
(
.ql-direction-rtl
)
{
padding-left
:
4em
;
}
.ql-editor
li
.ql-indent-2
:not
(
.ql-direction-rtl
)
{
padding-left
:
4em
;
}
.ql-editor
.ql-indent-2.ql-direction-rtl.ql-align-right
{
padding-right
:
4em
;
}
.ql-editor
li
.ql-indent-2.ql-direction-rtl.ql-align-right
{
padding-right
:
4em
;
}
.ql-editor
.ql-indent-3
:not
(
.ql-direction-rtl
)
{
padding-left
:
6em
;
}
.ql-editor
li
.ql-indent-3
:not
(
.ql-direction-rtl
)
{
padding-left
:
6em
;
}
.ql-editor
.ql-indent-3.ql-direction-rtl.ql-align-right
{
padding-right
:
6em
;
}
.ql-editor
li
.ql-indent-3.ql-direction-rtl.ql-align-right
{
padding-right
:
6em
;
}
.ql-editor
.ql-indent-4
:not
(
.ql-direction-rtl
)
{
padding-left
:
8em
;
}
.ql-editor
li
.ql-indent-4
:not
(
.ql-direction-rtl
)
{
padding-left
:
8em
;
}
.ql-editor
.ql-indent-4.ql-direction-rtl.ql-align-right
{
padding-right
:
8em
;
}
.ql-editor
li
.ql-indent-4.ql-direction-rtl.ql-align-right
{
padding-right
:
8em
;
}
.ql-editor
.ql-indent-5
:not
(
.ql-direction-rtl
)
{
padding-left
:
10em
;
}
.ql-editor
li
.ql-indent-5
:not
(
.ql-direction-rtl
)
{
padding-left
:
10em
;
}
.ql-editor
.ql-indent-5.ql-direction-rtl.ql-align-right
{
padding-right
:
10em
;
}
.ql-editor
li
.ql-indent-5.ql-direction-rtl.ql-align-right
{
padding-right
:
10em
;
}
.ql-editor
.ql-indent-6
:not
(
.ql-direction-rtl
)
{
padding-left
:
12em
;
}
.ql-editor
li
.ql-indent-6
:not
(
.ql-direction-rtl
)
{
padding-left
:
12em
;
}
.ql-editor
.ql-indent-6.ql-direction-rtl.ql-align-right
{
padding-right
:
12em
;
}
.ql-editor
li
.ql-indent-6.ql-direction-rtl.ql-align-right
{
padding-right
:
12em
;
}
.ql-editor
.ql-indent-7
:not
(
.ql-direction-rtl
)
{
padding-left
:
14em
;
}
.ql-editor
li
.ql-indent-7
:not
(
.ql-direction-rtl
)
{
padding-left
:
14em
;
}
.ql-editor
.ql-indent-7.ql-direction-rtl.ql-align-right
{
padding-right
:
14em
;
}
.ql-editor
li
.ql-indent-7.ql-direction-rtl.ql-align-right
{
padding-right
:
14em
;
}
.ql-editor
.ql-indent-8
:not
(
.ql-direction-rtl
)
{
padding-left
:
16em
;
}
.ql-editor
li
.ql-indent-8
:not
(
.ql-direction-rtl
)
{
padding-left
:
16em
;
}
.ql-editor
.ql-indent-8.ql-direction-rtl.ql-align-right
{
padding-right
:
16em
;
}
.ql-editor
li
.ql-indent-8.ql-direction-rtl.ql-align-right
{
padding-right
:
16em
;
}
.ql-editor
.ql-indent-9
:not
(
.ql-direction-rtl
)
{
padding-left
:
18em
;
}
.ql-editor
li
.ql-indent-9
:not
(
.ql-direction-rtl
)
{
padding-left
:
18em
;
}
.ql-editor
.ql-indent-9.ql-direction-rtl.ql-align-right
{
padding-right
:
18em
;
}
.ql-editor
li
.ql-indent-9.ql-direction-rtl.ql-align-right
{
padding-right
:
18em
;
}
.ql-editor
.ql-direction-rtl
{
direction
:
rtl
;
text-align
:
inherit
;
}
.ql-editor
.ql-align-center
{
text-align
:
center
;
}
.ql-editor
.ql-align-justify
{
text-align
:
justify
;
}
.ql-editor
.ql-align-right
{
text-align
:
right
;
}
.ql-editor.ql-blank
::before
{
color
:
rgba
(
0
,
0
,
0
,
0.6
);
content
:
attr
(
data-placeholder
);
font-style
:
italic
;
pointer-events
:
none
;
position
:
absolute
;
}
.ql-container.ql-disabled
.ql-editor
ul
[
data-checked
]
>
li
::before
{
pointer-events
:
none
;
}
.ql-clipboard
{
left
:
-100000px
;
height
:
1px
;
overflow-y
:
hidden
;
position
:
absolute
;
top
:
50%
;
}
uni-icon
{
display
:
inline-block
;
font-size
:
0
;
box-sizing
:
border-box
;
}
uni-icon
[
hidden
]
{
display
:
none
;
}
uni-icon
>
i
{
font
:
normal
normal
normal
14px
/
1
'weui'
;
}
uni-icon
>
i
:before
{
margin
:
0
;
box-sizing
:
border-box
;
}
@font-face
{
font-weight
:
normal
;
font-style
:
normal
;
font-family
:
'weui'
;
src
:
url('data:application/octet-stream;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzJAKEx8AAABfAAAAFZjbWFw65cFHQAAAhwAAAJQZ2x5Zp+UEEcAAASUAAAIvGhlYWQUqc7xAAAA4AAAADZoaGVhB/YD+wAAALwAAAAkaG10eEJoAAAAAAHUAAAASGxvY2EUxhJeAAAEbAAAACZtYXhwASEAQwAAARgAAAAgbmFtZeNcHtgAAA1QAAAB5nBvc3T6OoZLAAAPOAAAAOYAAQAAA+gAAABaA+gAAAAAA7MAAQAAAAAAAAAAAAAAAAAAABIAAQAAAAEAAMCU2KdfDzz1AAsD6AAAAADY7EUUAAAAANjsRRQAAAAAA7MD5AAAAAgAAgAAAAAAAAABAAAAEgA3AAUAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAAAAQOwAZAABQAIAnoCvAAAAIwCegK8AAAB4AAxAQIAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA6gHqEQPoAAAAWgPoAAAAAAABAAAAAAAAAAAAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAA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BlAGcAdQBsAGEAcgB3AGUAdQBpAHcAZQB1AGkAVgBlAHIAcwBpAG8AbgAgADEALgAwAHcAZQB1AGkARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAQIBAwEEAQUBBgEHAQgBCQEKAQsBDAENAQ4BDwEQAREBEgETAAZjaXJjbGUIZG93bmxvYWQEaW5mbwxzYWZlLXN1Y2Nlc3MJc2FmZS13YXJuB3N1Y2Nlc3MOc3VjY2Vzcy1jaXJjbGURc3VjY2Vzcy1uby1jaXJjbGUHd2FpdGluZw53YWl0aW5nLWNpcmNsZQR3YXJuC2luZm8tY2lyY2xlBmNhbmNlbAZzZWFyY2gFY2xlYXIEYmFjawZkZWxldGUAAAAA')
format
(
'truetype'
);
}
.uni-icon-success
:before
{
content
:
'\EA06'
;
}
.uni-icon-success_circle
:before
{
content
:
'\EA07'
;
}
.uni-icon-success_no_circle
:before
{
content
:
'\EA08'
;
}
.uni-icon-safe_success
:before
{
content
:
'\EA04'
;
}
.uni-icon-safe_warn
:before
{
content
:
'\EA05'
;
}
.uni-icon-info
:before
{
content
:
'\EA03'
;
}
.uni-icon-info_circle
:before
{
content
:
'\EA0C'
;
}
.uni-icon-warn
:before
{
content
:
'\EA0B'
;
}
.uni-icon-waiting
:before
{
content
:
'\EA09'
;
}
.uni-icon-waiting_circle
:before
{
content
:
'\EA0A'
;
}
.uni-icon-circle
:before
{
content
:
'\EA01'
;
}
.uni-icon-cancel
:before
{
content
:
'\EA0D'
;
}
.uni-icon-download
:before
{
content
:
'\EA02'
;
}
.uni-icon-search
:before
{
content
:
'\EA0E'
;
}
.uni-icon-clear
:before
{
content
:
'\EA0F'
;
}
.uni-icon-success
{
color
:
#007aff
;
}
.uni-icon-success_circle
{
color
:
#007aff
;
}
.uni-icon-success_no_circle
{
color
:
#007aff
;
}
.uni-icon-safe_success
{
color
:
#007aff
;
}
.uni-icon-safe_warn
{
color
:
#ffbe00
;
}
.uni-icon-info
{
color
:
#10aeff
;
}
.uni-icon-info_circle
{
color
:
#007aff
;
}
.uni-icon-warn
{
color
:
#f76260
;
}
.uni-icon-waiting
{
color
:
#10aeff
;
}
.uni-icon-waiting_circle
{
color
:
#10aeff
;
}
.uni-icon-circle
{
color
:
#c9c9c9
;
}
.uni-icon-cancel
{
color
:
#f43530
;
}
.uni-icon-download
{
color
:
#007aff
;
}
.uni-icon-search
{
color
:
#b2b2b2
;
}
.uni-icon-clear
{
color
:
#b2b2b2
;
}
uni-image
{
width
:
320px
;
height
:
240px
;
display
:
inline-block
;
overflow
:
hidden
;
position
:
relative
;
}
uni-image
[
hidden
]
{
display
:
none
;
}
uni-image
>
div
{
width
:
100%
;
height
:
100%
;
}
uni-image
>
img
{
-webkit-touch-callout
:
none
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
display
:
block
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
opacity
:
0
;
}
uni-image
>
.uni-image-will-change
{
will-change
:
transform
;
}
uni-input
{
display
:
block
;
font-size
:
16px
;
line-height
:
1.4em
;
height
:
1.4em
;
min-height
:
1.4em
;
overflow
:
hidden
;
}
uni-input
[
hidden
]
{
display
:
none
;
}
.uni-input-wrapper
,
.uni-input-placeholder
,
.uni-input-form
,
.uni-input-input
{
outline
:
none
;
border
:
none
;
padding
:
0
;
margin
:
0
;
text-decoration
:
inherit
;
}
.uni-input-wrapper
,
.uni-input-form
{
display
:
flex
;
position
:
relative
;
width
:
100%
;
height
:
100%
;
flex-direction
:
column
;
justify-content
:
center
;
}
.uni-input-placeholder
,
.uni-input-input
{
width
:
100%
;
}
.uni-input-placeholder
{
position
:
absolute
;
top
:
auto
!important
;
left
:
0
;
color
:
gray
;
overflow
:
hidden
;
text-overflow
:
clip
;
white-space
:
pre
;
word-break
:
keep-all
;
pointer-events
:
none
;
line-height
:
inherit
;
}
.uni-input-input
{
display
:
block
;
height
:
100%
;
background
:
none
;
color
:
inherit
;
opacity
:
1
;
-webkit-text-fill-color
:
currentcolor
;
font
:
inherit
;
line-height
:
inherit
;
letter-spacing
:
inherit
;
text-align
:
inherit
;
text-indent
:
inherit
;
text-transform
:
inherit
;
text-shadow
:
inherit
;
}
.uni-input-input
[
type
=
"search"
]
::-webkit-search-cancel-button
{
display
:
none
;
}
.uni-input-input
::-webkit-outer-spin-button
,
.uni-input-input
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
;
margin
:
0
;
}
.uni-input-input
[
type
=
"number"
]
{
-moz-appearance
:
textfield
;
}
.uni-label-pointer
{
cursor
:
pointer
;
}
uni-movable-view
{
display
:
inline-block
;
width
:
10px
;
height
:
10px
;
top
:
0px
;
left
:
0px
;
position
:
absolute
;
cursor
:
grab
;
}
uni-movable-view
[
hidden
]
{
display
:
none
;
}
uni-navigator
{
height
:
auto
;
width
:
auto
;
display
:
block
;
cursor
:
pointer
;
}
uni-navigator
[
hidden
]
{
display
:
none
;
}
.navigator-hover
{
background-color
:
rgba
(
0
,
0
,
0
,
0.1
);
opacity
:
0.7
;
}
uni-radio
{
-webkit-tap-highlight-color
:
transparent
;
display
:
inline-block
;
cursor
:
pointer
;
}
uni-radio
[
hidden
]
{
display
:
none
;
}
uni-radio
[
disabled
]
{
cursor
:
not-allowed
;
}
uni-radio
.uni-radio-wrapper
{
display
:
-webkit-inline-flex
;
display
:
inline-flex
;
-webkit-align-items
:
center
;
align-items
:
center
;
vertical-align
:
middle
;
}
uni-radio
.uni-radio-input
{
-webkit-appearance
:
none
;
appearance
:
none
;
margin-right
:
5px
;
outline
:
0
;
border
:
1px
solid
#D1D1D1
;
background-color
:
#ffffff
;
border-radius
:
50%
;
width
:
22px
;
height
:
22px
;
position
:
relative
;
}
uni-radio
:not
([
disabled
])
.uni-radio-input
:hover
{
border-color
:
#007aff
;
}
uni-radio
.uni-radio-input.uni-radio-input-checked
:before
{
font
:
normal
normal
normal
14px
/
1
"uni"
;
content
:
"\EA08"
;
color
:
#ffffff
;
font-size
:
18px
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-48%
)
scale
(
0.73
);
-webkit-transform
:
translate
(
-50%
,
-48%
)
scale
(
0.73
);
}
uni-radio
.uni-radio-input.uni-radio-input-disabled
{
background-color
:
#E1E1E1
;
border-color
:
#D1D1D1
;
}
uni-radio
.uni-radio-input.uni-radio-input-disabled
:before
{
color
:
#ADADAD
;
}
uni-radio-group
{
display
:
block
;
}
uni-radio-group
[
hidden
]
{
display
:
none
;
}
@keyframes
once-show
{
from
{
top
:
0
;
}
}
uni-resize-sensor
,
uni-resize-sensor
>
div
{
position
:
absolute
;
left
:
0
;
top
:
0
;
right
:
0
;
bottom
:
0
;
overflow
:
hidden
;
}
uni-resize-sensor
{
display
:
block
;
z-index
:
-1
;
visibility
:
hidden
;
animation
:
once-show
1ms
;
}
uni-resize-sensor
>
div
>
div
{
position
:
absolute
;
left
:
0
;
top
:
0
;
}
uni-resize-sensor
>
div
:first-child
>
div
{
width
:
100000px
;
height
:
100000px
;
}
uni-resize-sensor
>
div
:last-child
>
div
{
width
:
200%
;
height
:
200%
;
}
uni-scroll-view
{
display
:
block
;
width
:
100%
;
}
uni-scroll-view
[
hidden
]
{
display
:
none
;
}
.uni-scroll-view
{
position
:
relative
;
-webkit-overflow-scrolling
:
touch
;
width
:
100%
;
/* display: flex; 时在安卓下会导致scrollWidth和offsetWidth一样 */
height
:
100%
;
max-height
:
inherit
;
}
.uni-scroll-view-content
{
width
:
100%
;
height
:
100%
;
}
.uni-scroll-view-refresher
{
position
:
relative
;
overflow
:
hidden
;
}
.uni-scroll-view-refresh
{
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
align-items
:
center
;
}
.uni-scroll-view-refresh-inner
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
line-height
:
0
;
width
:
40px
;
height
:
40px
;
border-radius
:
50%
;
background-color
:
#fff
;
box-shadow
:
0
1px
6px
rgba
(
0
,
0
,
0
,
0.117647
),
0
1px
4px
rgba
(
0
,
0
,
0
,
0.117647
);
}
.uni-scroll-view-refresh__spinner
{
transform-origin
:
center
center
;
animation
:
uni-scroll-view-refresh-rotate
2s
linear
infinite
;
}
.uni-scroll-view-refresh__spinner
>
circle
{
stroke
:
currentColor
;
stroke-linecap
:
round
;
animation
:
uni-scroll-view-refresh-dash
2s
linear
infinite
;
}
@keyframes
uni-scroll-view-refresh-rotate
{
0
%
{
transform
:
rotate
(
0deg
);
}
100
%
{
transform
:
rotate
(
360deg
);
}
}
@keyframes
uni-scroll-view-refresh-dash
{
0
%
{
stroke-dasharray
:
1
,
200
;
stroke-dashoffset
:
0
;
}
50
%
{
stroke-dasharray
:
89
,
200
;
stroke-dashoffset
:
-35px
;
}
100
%
{
stroke-dasharray
:
89
,
200
;
stroke-dashoffset
:
-124px
;
}
}
uni-swiper-item
{
display
:
block
;
overflow
:
hidden
;
will-change
:
transform
;
position
:
absolute
;
width
:
100%
;
height
:
100%
;
cursor
:
grab
;
}
uni-swiper-item
[
hidden
]
{
display
:
none
;
}
uni-switch
{
-webkit-tap-highlight-color
:
transparent
;
display
:
inline-block
;
cursor
:
pointer
;
}
uni-switch
[
hidden
]
{
display
:
none
;
}
uni-switch
[
disabled
]
{
cursor
:
not-allowed
;
}
uni-switch
.uni-switch-wrapper
{
display
:
-webkit-inline-flex
;
display
:
inline-flex
;
-webkit-align-items
:
center
;
align-items
:
center
;
vertical-align
:
middle
;
}
uni-switch
.uni-switch-input
{
-webkit-appearance
:
none
;
appearance
:
none
;
position
:
relative
;
width
:
52px
;
height
:
32px
;
margin-right
:
5px
;
border
:
1px
solid
#DFDFDF
;
outline
:
0
;
border-radius
:
16px
;
box-sizing
:
border-box
;
background-color
:
#DFDFDF
;
transition
:
background-color
0.1s
,
border
0.1s
;
}
uni-switch
[
disabled
]
.uni-switch-input
{
opacity
:
.7
;
}
uni-switch
.uni-switch-input
:before
{
content
:
" "
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
50px
;
height
:
30px
;
border-radius
:
15px
;
background-color
:
#FDFDFD
;
transition
:
-webkit-transform
0.3s
;
transition
:
transform
0.3s
;
transition
:
transform
0.3s
,
-webkit-transform
0.3s
;
}
uni-switch
.uni-switch-input
:after
{
content
:
" "
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
30px
;
height
:
30px
;
border-radius
:
15px
;
background-color
:
#FFFFFF
;
box-shadow
:
0
1px
3px
rgba
(
0
,
0
,
0
,
0.4
);
transition
:
-webkit-transform
0.3s
;
transition
:
transform
0.3s
;
transition
:
transform
0.3s
,
-webkit-transform
0.3s
;
}
uni-switch
.uni-switch-input.uni-switch-input-checked
{
border-color
:
#007aff
;
background-color
:
#007aff
;
}
uni-switch
.uni-switch-input.uni-switch-input-checked
:before
{
-webkit-transform
:
scale
(
0
);
transform
:
scale
(
0
);
}
uni-switch
.uni-switch-input.uni-switch-input-checked
:after
{
-webkit-transform
:
translateX
(
20px
);
transform
:
translateX
(
20px
);
}
uni-switch
.uni-checkbox-input
{
margin-right
:
5px
;
-webkit-appearance
:
none
;
appearance
:
none
;
outline
:
0
;
border
:
1px
solid
#D1D1D1
;
background-color
:
#FFFFFF
;
border-radius
:
3px
;
width
:
22px
;
height
:
22px
;
position
:
relative
;
color
:
#007aff
;
}
uni-switch
:not
([
disabled
])
.uni-checkbox-input
:hover
{
border-color
:
#007aff
;
}
uni-switch
.uni-checkbox-input.uni-checkbox-input-checked
:before
{
font
:
normal
normal
normal
14px
/
1
"uni"
;
content
:
"\EA08"
;
color
:
inherit
;
font-size
:
22px
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-48%
)
scale
(
0.73
);
-webkit-transform
:
translate
(
-50%
,
-48%
)
scale
(
0.73
);
}
uni-switch
.uni-checkbox-input.uni-checkbox-input-disabled
{
background-color
:
#E1E1E1
;
}
uni-switch
.uni-checkbox-input.uni-checkbox-input-disabled
:before
{
color
:
#ADADAD
;
}
uni-textarea
{
width
:
300px
;
height
:
150px
;
display
:
block
;
position
:
relative
;
font-size
:
16px
;
line-height
:
normal
;
white-space
:
pre-wrap
;
word-break
:
break-all
;
}
uni-textarea
[
hidden
]
{
display
:
none
;
}
.uni-textarea-wrapper
,
.uni-textarea-placeholder
,
.uni-textarea-line
,
.uni-textarea-compute
,
.uni-textarea-textarea
{
outline
:
none
;
border
:
none
;
padding
:
0
;
margin
:
0
;
text-decoration
:
inherit
;
}
.uni-textarea-wrapper
{
display
:
block
;
position
:
relative
;
width
:
100%
;
height
:
100%
;
}
.uni-textarea-placeholder
,
.uni-textarea-line
,
.uni-textarea-compute
,
.uni-textarea-textarea
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
left
:
0
;
top
:
0
;
white-space
:
inherit
;
word-break
:
inherit
;
}
.uni-textarea-placeholder
{
color
:
grey
;
overflow
:
hidden
;
}
.uni-textarea-line
,
.uni-textarea-compute
{
visibility
:
hidden
;
height
:
auto
;
}
.uni-textarea-line
{
width
:
1em
;
}
.uni-textarea-textarea
{
resize
:
none
;
background
:
none
;
color
:
inherit
;
opacity
:
1
;
-webkit-text-fill-color
:
currentcolor
;
font
:
inherit
;
line-height
:
inherit
;
letter-spacing
:
inherit
;
text-align
:
inherit
;
text-indent
:
inherit
;
text-transform
:
inherit
;
text-shadow
:
inherit
;
}
/* 用于解决 iOS textarea 内部默认边距 */
.uni-textarea-textarea-fix-margin
{
width
:
auto
;
right
:
0
;
margin
:
0
-3px
;
}
uni-view
{
display
:
block
;
}
uni-view
[
hidden
]
{
display
:
none
;
}
uni-page-head
{
display
:
block
;
box-sizing
:
border-box
;
}
uni-page-head
.uni-page-head
{
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
44px
;
height
:
calc
(
44px
+
constant
(
safe-area-inset-top
));
height
:
calc
(
44px
+
env
(
safe-area-inset-top
));
padding
:
7px
3px
;
padding-top
:
calc
(
7px
+
constant
(
safe-area-inset-top
));
padding-top
:
calc
(
7px
+
env
(
safe-area-inset-top
));
display
:
flex
;
overflow
:
hidden
;
justify-content
:
space-between
;
box-sizing
:
border-box
;
z-index
:
998
;
color
:
#fff
;
background-color
:
#000
;
transition-property
:
all
;
}
uni-page-head
.uni-page-head-titlePenetrate
,
uni-page-head
.uni-page-head-titlePenetrate
.uni-page-head-bd
,
uni-page-head
.uni-page-head-titlePenetrate
.uni-page-head-bd
*
{
pointer-events
:
none
;
}
uni-page-head
.uni-page-head-titlePenetrate
*
{
pointer-events
:
auto
;
}
uni-page-head
.uni-page-head.uni-page-head-transparent
.uni-page-head-ft
>
div
{
justify-content
:
center
;
}
uni-page-head
.uni-page-head
~
.uni-placeholder
{
width
:
100%
;
height
:
44px
;
height
:
calc
(
44px
+
constant
(
safe-area-inset-top
));
height
:
calc
(
44px
+
env
(
safe-area-inset-top
));
}
uni-page-head
.uni-placeholder-titlePenetrate
{
pointer-events
:
none
;
}
uni-page-head
.uni-page-head
*
{
box-sizing
:
border-box
;
}
uni-page-head
.uni-page-head-hd
{
display
:
flex
;
align-items
:
center
;
font-size
:
16px
;
}
uni-page-head
.uni-page-head-bd
{
position
:
absolute
;
left
:
70px
;
right
:
70px
;
min-width
:
0
;
user-select
:
auto
;
}
.uni-page-head-btn
{
position
:
relative
;
width
:
auto
;
margin
:
0
2px
;
word-break
:
keep-all
;
white-space
:
pre
;
cursor
:
pointer
;
}
.uni-page-head-transparent
.uni-page-head-btn
{
display
:
flex
;
align-items
:
center
;
width
:
32px
;
height
:
32px
;
border-radius
:
50%
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
}
uni-page-head
.uni-btn-icon
{
overflow
:
hidden
;
min-width
:
1em
;
}
.uni-page-head-btn-red-dot
::after
{
content
:
attr
(
badge-text
);
position
:
absolute
;
right
:
0
;
top
:
0
;
background-color
:
red
;
color
:
white
;
width
:
18px
;
height
:
18px
;
line-height
:
18px
;
border-radius
:
18px
;
overflow
:
hidden
;
transform
:
scale
(
0.5
)
translate
(
40%
,
-40%
);
transform-origin
:
100%
0
;
}
.uni-page-head-btn-red-dot
[
badge-text
]
::after
{
font-size
:
12px
;
width
:
auto
;
min-width
:
18px
;
max-width
:
42px
;
text-align
:
center
;
padding
:
0
3px
;
transform
:
scale
(
0.7
)
translate
(
40%
,
-40%
);
}
.uni-page-head-btn-select
>
.uni-btn-icon
::after
{
display
:
inline-block
;
font-family
:
'unibtn'
;
content
:
'\e601'
;
margin-left
:
2px
;
transform
:
rotate
(
-90deg
)
scale
(
0.8
);
}
.uni-page-head-search
{
position
:
relative
;
display
:
flex
;
flex
:
1
;
margin
:
0
2px
;
line-height
:
30px
;
font-size
:
15px
;
}
.uni-page-head-search-input
{
width
:
100%
;
height
:
100%
;
padding-left
:
34px
;
text-align
:
left
;
}
.uni-page-head-search-placeholder
{
position
:
absolute
;
max-width
:
100%
;
height
:
100%
;
padding-left
:
34px
;
overflow
:
hidden
;
word-break
:
keep-all
;
white-space
:
pre
;
}
.uni-page-head-search-placeholder-right
{
right
:
0
;
}
.uni-page-head-search-placeholder-center
{
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.uni-page-head-search-placeholder
::before
{
position
:
absolute
;
top
:
0
;
left
:
2px
;
width
:
30px
;
content
:
'\ea0e'
;
display
:
block
;
font-size
:
20px
;
font-family
:
'uni'
;
text-align
:
center
;
}
uni-page-head
.uni-page-head-ft
{
display
:
flex
;
align-items
:
center
;
flex-direction
:
row-reverse
;
font-size
:
13px
;
}
uni-page-head
.uni-page-head__title
{
font-weight
:
bold
;
font-size
:
16px
;
line-height
:
30px
;
text-align
:
center
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
uni-page-head
.uni-page-head__title
.uni-loading
{
width
:
16px
;
height
:
16px
;
margin-top
:
-3px
;
}
uni-page-head
.uni-page-head__title
.uni-page-head__title_image
{
width
:
auto
;
height
:
26px
;
vertical-align
:
middle
;
}
uni-page-head
.uni-page-head-shadow
{
overflow
:
visible
;
}
uni-page-head
.uni-page-head-shadow
::after
{
content
:
''
;
position
:
absolute
;
left
:
0
;
right
:
0
;
top
:
100%
;
height
:
5px
;
background-size
:
100%
100%
;
}
uni-page-head
.uni-page-head-shadow-grey
::after
{
background-image
:
url('https://cdn.dcloud.net.cn/img/shadow-grey.png')
;
}
uni-page-head
.uni-page-head-shadow-blue
::after
{
background-image
:
url('https://cdn.dcloud.net.cn/img/shadow-blue.png')
;
}
uni-page-head
.uni-page-head-shadow-green
::after
{
background-image
:
url('https://cdn.dcloud.net.cn/img/shadow-green.png')
;
}
uni-page-head
.uni-page-head-shadow-orange
::after
{
background-image
:
url('https://cdn.dcloud.net.cn/img/shadow-orange.png')
;
}
uni-page-head
.uni-page-head-shadow-red
::after
{
background-image
:
url('https://cdn.dcloud.net.cn/img/shadow-red.png')
;
}
uni-page-head
.uni-page-head-shadow-yellow
::after
{
background-image
:
url('https://cdn.dcloud.net.cn/img/shadow-yellow.png')
;
}
uni-page-wrapper
{
display
:
block
;
height
:
100%
;
position
:
relative
;
}
uni-page-head
[
uni-page-head-type
=
"default"
]
~
uni-page-wrapper
{
height
:
calc
(
100%
-
44px
);
height
:
calc
(
100%
-
44px
-
constant
(
safe-area-inset-top
));
height
:
calc
(
100%
-
44px
-
env
(
safe-area-inset-top
));
}
.uni-app--showtabbar
uni-page-wrapper
{
display
:
block
;
height
:
calc
(
100%
-
50px
);
height
:
calc
(
100%
-
50px
-
constant
(
safe-area-inset-bottom
));
height
:
calc
(
100%
-
50px
-
env
(
safe-area-inset-bottom
));
}
.uni-app--showtabbar
uni-page-wrapper
::after
{
content
:
""
;
display
:
block
;
width
:
100%
;
height
:
50px
;
height
:
calc
(
50px
+
constant
(
safe-area-inset-bottom
));
height
:
calc
(
50px
+
env
(
safe-area-inset-bottom
));
}
.uni-app--showtabbar
uni-page-head
[
uni-page-head-type
=
"default"
]
~
uni-page-wrapper
{
height
:
calc
(
100%
-
44px
-
50px
);
height
:
calc
(
100%
-
44px
-
constant
(
safe-area-inset-top
)
-
50px
-
constant
(
safe-area-inset-bottom
));
height
:
calc
(
100%
-
44px
-
env
(
safe-area-inset-top
)
-
50px
-
env
(
safe-area-inset-bottom
));
}
uni-page-body
{
display
:
block
;
box-sizing
:
border-box
;
width
:
100%
;
}
uni-page-refresh
{
position
:
absolute
;
top
:
0
;
width
:
100%
;
height
:
40px
;
display
:
block
;
box-sizing
:
border-box
;
}
uni-page-refresh
.uni-page-refresh
{
position
:
absolute
;
top
:
-45px
;
left
:
50%
;
transform
:
translate3d
(
-50%
,
0
,
0
);
width
:
40px
;
height
:
40px
;
justify-content
:
center
;
align-items
:
center
;
background
:
#fff
;
border-radius
:
50%
;
box-shadow
:
0
1px
6px
rgba
(
0
,
0
,
0
,
.117647
),
0
1px
4px
rgba
(
0
,
0
,
0
,
.117647
);
display
:
none
;
z-index
:
997
;
}
uni-page-refresh
.uni-page-refresh-inner
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
line-height
:
0
;
width
:
40px
;
height
:
40px
;
border-radius
:
50%
;
}
uni-page-refresh
.uni-page-refresh--pulling
.uni-page-refresh
,
uni-page-refresh
.uni-page-refresh--aborting
.uni-page-refresh
,
uni-page-refresh
.uni-page-refresh--reached
.uni-page-refresh
,
uni-page-refresh
.uni-page-refresh--refreshing
.uni-page-refresh
,
uni-page-refresh
.uni-page-refresh--restoring
.uni-page-refresh
{
display
:
flex
;
}
uni-page-refresh
.uni-page-refresh--pulling
.uni-page-refresh__spinner
,
uni-page-refresh
.uni-page-refresh--aborting
.uni-page-refresh__spinner
,
uni-page-refresh
.uni-page-refresh--reached
.uni-page-refresh__spinner
,
uni-page-refresh
.uni-page-refresh--refreshing
.uni-page-refresh__icon
,
uni-page-refresh
.uni-page-refresh--restoring
.uni-page-refresh__icon
{
display
:
none
;
}
uni-page-refresh
.uni-page-refresh--refreshing
.uni-page-refresh__spinner
{
transform-origin
:
center
center
;
animation
:
uni-page-refresh-rotate
2s
linear
infinite
;
}
uni-page-refresh
.uni-page-refresh--refreshing
.uni-page-refresh__path
{
stroke-dasharray
:
1
,
200
;
stroke-dashoffset
:
0
;
stroke-linecap
:
round
;
animation
:
uni-page-refresh-dash
1.5s
ease-in-out
infinite
,
uni-page-refresh-colorful
6s
ease-in-out
infinite
;
}
@keyframes
uni-page-refresh-rotate
{
100
%
{
-webkit-transform
:
rotate
(
360deg
);
transform
:
rotate
(
360deg
);
}
}
@keyframes
uni-page-refresh-dash
{
0
%
{
stroke-dasharray
:
1
,
200
;
stroke-dashoffset
:
0
;
}
50
%
{
stroke-dasharray
:
89
,
200
;
stroke-dashoffset
:
-35px
;
}
100
%
{
stroke-dasharray
:
89
,
200
;
stroke-dashoffset
:
-124px
;
}
}
uni-page
{
display
:
block
;
width
:
100%
;
height
:
100%
;
}
.uni-async-error
{
position
:
absolute
;
left
:
0
;
right
:
0
;
top
:
0
;
bottom
:
0
;
color
:
#999
;
padding
:
100px
0
;
text-align
:
center
;
}
.uni-async-loading
{
box-sizing
:
border-box
;
width
:
100%
;
padding
:
50px
;
text-align
:
center
;
}
.uni-async-loading
.uni-loading
{
width
:
30px
;
height
:
30px
;
}
packages/uni-h5/dist/uni-h5.esm.js
浏览文件 @
78a3395e
...
...
@@ -9250,7 +9250,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
},
"
\
u8FDE
\
u63A5
\
u670D
\
u52A1
\
u5668
\
u8D85
\
u65F6
\
uFF0C
\
u70B9
\
u51FB
\
u5C4F
\
u5E55
\
u91CD
\
u8BD5
"
);
}
_sfc_main$1
.
render
=
_sfc_render$1
;
var
index_vue_vue_type_style_index_0_lang
=
"
\n
.uni-async-loading {
\
n
box-sizing: border-box;
\r\n
width: 100%;
\r\n
padding: 50px;
\r\n
text-align: center;
\n
}
\n
.uni-async-loading .uni-loading {
\r\n
width: 30px;
\r\n
height: 30px;
\n
}
\r\n
"
;
var
index_vue_vue_type_style_index_0_lang
=
"
\n
.uni-async-loading {
\
r\n
box-sizing: border-box;
\r\n
width: 100%;
\r\n
padding: 50px;
\r\n
text-align: center;
\n
}
\n
.uni-async-loading .uni-loading {
\r\n
width: 30px;
\r\n
height: 30px;
\n
}
\r\n
"
;
const
_sfc_main
=
{
name
:
"
AsyncLoading
"
};
...
...
packages/uni-h5/src/framework/components/async-error/index.vue
浏览文件 @
78a3395e
<
template
>
<div
class=
"uni-async-error"
@
click=
"_onClick"
>
<div
class=
"uni-async-error"
@
click=
"_onClick"
>
连接服务器超时,点击屏幕重试
</div>
</
template
>
<
style
>
.uni-async-error
{
.uni-async-error
{
position
:
absolute
;
left
:
0
;
right
:
0
;
...
...
@@ -16,16 +13,16 @@
color
:
#999
;
padding
:
100px
0
;
text-align
:
center
;
}
}
</
style
>
<
script
>
export
default
{
name
:
'
AsyncError
'
,
methods
:
{
_onClick
()
{
_onClick
()
{
// TODO 临时采用 reload
window
.
location
.
reload
()
}
}
}
,
}
,
}
</
script
>
packages/uni-h5/src/framework/components/async-loading/index.vue
浏览文件 @
78a3395e
...
...
@@ -4,20 +4,20 @@
</div>
</
template
>
<
style
>
.uni-async-loading
{
.uni-async-loading
{
box-sizing
:
border-box
;
width
:
100%
;
padding
:
50px
;
text-align
:
center
;
}
}
.uni-async-loading
.uni-loading
{
.uni-async-loading
.uni-loading
{
width
:
30px
;
height
:
30px
;
}
}
</
style
>
<
script
>
export
default
{
name
:
'
AsyncLoading
'
name
:
'
AsyncLoading
'
,
}
</
script
>
packages/vite-plugin-uni/package.json
浏览文件 @
78a3395e
...
...
@@ -36,5 +36,8 @@
},
"devDependencies"
:
{
"@types/sass"
:
"^1.16.0"
},
"uni-app"
:
{
"compilerVersion"
:
"3.1.2"
}
}
packages/vite-plugin-uni/src/config/index.ts
浏览文件 @
78a3395e
...
...
@@ -13,6 +13,8 @@ export function createConfig(
):
Plugin
[
'
config
'
]
{
return
()
=>
{
return
{
root
:
options
.
root
,
base
:
options
.
base
,
define
:
createDefine
(
options
),
resolve
:
createResolve
(
options
),
optimizeDeps
:
createOptimizeDeps
(
options
),
...
...
packages/vite-plugin-uni/src/configResolved/plugins/appVue.ts
0 → 100644
浏览文件 @
78a3395e
import
path
from
'
path
'
import
slash
from
'
slash
'
import
{
Plugin
}
from
'
vite
'
import
{
VitePluginUniResolvedOptions
}
from
'
../..
'
export
function
uniAppVuePlugin
(
options
:
VitePluginUniResolvedOptions
):
Plugin
{
const
appVuePath
=
slash
(
path
.
resolve
(
options
.
inputDir
,
'
App.vue
'
))
return
{
name
:
'
vite:uni-app-vue
'
,
transform
(
code
,
id
)
{
if
(
id
===
appVuePath
)
{
return
{
code
:
`<template><VUniApp ref="app"/></template><style src="@dcloudio/uni-h5/style/base.css"/>
${
code
}
`
,
map
:
this
.
getCombinedSourcemap
(),
}
}
},
}
}
packages/vite-plugin-uni/src/configResolved/plugins/index.ts
浏览文件 @
78a3395e
...
...
@@ -7,6 +7,12 @@ import { uniJsonPlugin } from './json'
import
{
uniPreCssPlugin
}
from
'
./preCss
'
import
{
uniEasycomPlugin
}
from
'
./easycom
'
import
{
InjectOptions
,
uniInjectPlugin
}
from
'
./inject
'
import
{
uniAppVuePlugin
}
from
'
./appVue
'
import
{
uniMainJsPlugin
}
from
'
./mainJs
'
import
{
uniPagesJsonPlugin
}
from
'
./pagesJson
'
import
{
uniManifestJsonPlugin
}
from
'
./manifestJson
'
const
debugPlugin
=
debug
(
'
uni:plugin
'
)
export
interface
UniPluginFilterOptions
extends
VitePluginUniResolvedOptions
{
...
...
@@ -64,6 +70,11 @@ export function resolvePlugins(
0
,
'
pre
'
)
addPlugin
(
plugins
,
uniAppVuePlugin
(
options
),
1
,
'
pre
'
)
addPlugin
(
plugins
,
uniMainJsPlugin
(
options
),
1
,
'
pre
'
)
addPlugin
(
plugins
,
uniPagesJsonPlugin
(
options
),
1
,
'
pre
'
)
addPlugin
(
plugins
,
uniManifestJsonPlugin
(
options
),
1
,
'
pre
'
)
addPlugin
(
plugins
,
uniPreCssPlugin
(
Object
.
assign
(
uniPreCssPluginOptions
,
options
)),
...
...
packages/vite-plugin-uni/src/configResolved/plugins/json.ts
浏览文件 @
78a3395e
...
...
@@ -6,11 +6,16 @@ import { VitePluginUniResolvedOptions } from '../..'
export
function
uniJsonPlugin
(
options
:
VitePluginUniResolvedOptions
):
Plugin
{
const
pagesJsonPath
=
slash
(
path
.
resolve
(
options
.
inputDir
,
'
pages.json
'
))
const
pagesJsonJsPath
=
pagesJsonPath
+
'
.js
'
const
manifestJsonPath
=
slash
(
path
.
resolve
(
options
.
inputDir
,
'
manifest.json
'
)
)
return
{
name
:
'
vite:uni-json
'
,
transform
(
code
,
id
)
{
if
(
id
.
startsWith
(
pagesJsonPath
)
&&
!
id
.
startsWith
(
pagesJsonJsPath
))
{
if
(
(
id
.
startsWith
(
pagesJsonPath
)
||
id
.
startsWith
(
manifestJsonPath
))
&&
!
id
.
endsWith
(
'
.json.js
'
)
)
{
code
=
JSON
.
stringify
(
parse
(
code
))
}
return
code
...
...
packages/vite-plugin-uni/src/configResolved/plugins/mainJs.ts
0 → 100644
浏览文件 @
78a3395e
import
path
from
'
path
'
import
slash
from
'
slash
'
import
{
Plugin
}
from
'
vite
'
import
{
VitePluginUniResolvedOptions
}
from
'
../..
'
export
function
uniMainJsPlugin
(
options
:
VitePluginUniResolvedOptions
):
Plugin
{
const
mainPath
=
slash
(
path
.
resolve
(
options
.
inputDir
,
'
main
'
))
const
mainJsPath
=
mainPath
+
'
.js
'
const
mainTsPath
=
mainPath
+
'
.ts
'
const
pagesJsonJsPath
=
slash
(
path
.
resolve
(
options
.
inputDir
,
'
pages.json.js
'
))
return
{
name
:
'
vite:uni-main-js
'
,
transform
(
code
,
id
)
{
if
(
id
===
mainJsPath
||
id
===
mainTsPath
)
{
return
{
code
:
`import { plugin } from '@dcloudio/uni-h5';import '
${
pagesJsonJsPath
}
';function createApp(rootComponent,rootProps){rootComponent && (rootComponent.mpType = 'app');return createVueApp(rootComponent, rootProps).use(plugin)};
${
code
.
replace
(
'
createApp
'
,
'
createVueApp
'
)}
`
,
map
:
this
.
getCombinedSourcemap
(),
}
}
},
}
}
packages/vite-plugin-uni/src/configResolved/plugins/manifestJson.ts
0 → 100644
浏览文件 @
78a3395e
import
fs
from
'
fs
'
import
path
from
'
path
'
import
{
parse
}
from
'
jsonc-parser
'
import
{
Plugin
}
from
'
vite
'
import
{
VitePluginUniResolvedOptions
}
from
'
../..
'
import
slash
from
'
slash
'
const
MANIFEST_JSON_JS
=
'
manifest.json.js
'
const
defaultRouter
=
{
mode
:
'
hash
'
,
base
:
'
/
'
,
}
const
defaultAsync
=
{
loading
:
'
AsyncLoading
'
,
error
:
'
AsyncError
'
,
delay
:
200
,
timeout
:
60000
,
suspensible
:
true
,
}
const
defaultNetworkTimeout
=
{
request
:
60000
,
connectSocket
:
60000
,
uploadFile
:
60000
,
downloadFile
:
60000
,
}
const
defaultQQMapKey
=
'
XVXBZ-NDMC4-JOGUS-XGIEE-QVHDZ-AMFV2
'
export
function
uniManifestJsonPlugin
(
options
:
VitePluginUniResolvedOptions
):
Plugin
{
const
manifestJsonPath
=
slash
(
path
.
join
(
options
.
inputDir
,
'
manifest.json
'
))
return
{
name
:
'
vite:uni-manifest-json
'
,
resolveId
(
id
)
{
if
(
id
.
endsWith
(
MANIFEST_JSON_JS
))
{
return
manifestJsonPath
+
'
.js
'
}
},
transform
(
code
,
id
)
{
if
(
id
.
endsWith
(
MANIFEST_JSON_JS
))
{
const
manifest
=
JSON
.
parse
(
code
)
const
{
debug
,
h5
}
=
manifest
const
appid
=
(
manifest
.
appid
||
''
).
replace
(
'
__UNI__
'
,
''
)
const
router
=
{
...
defaultRouter
,
...((
h5
&&
h5
.
router
)
||
{})
}
const
async
=
{
...
defaultAsync
,
...((
h5
&&
h5
.
async
)
||
{})
}
const
networkTimeout
=
{
...
defaultNetworkTimeout
,
...(
manifest
.
networkTimeout
||
{}),
}
const
sdkConfigs
=
(
h5
&&
h5
.
sdkConfigs
)
||
{}
const
qqMapKey
=
(
sdkConfigs
.
maps
&&
sdkConfigs
.
maps
.
qqmap
&&
sdkConfigs
.
maps
.
qqmap
.
key
)
||
defaultQQMapKey
const
flexDirection
=
(
manifest
[
'
app-plus
'
]
&&
manifest
[
'
app-plus
'
].
nvue
&&
manifest
[
'
app-plus
'
].
nvue
[
'
flex-direction
'
])
||
'
column
'
return
{
code
:
`export const appid = '
${
appid
||
''
}
'
export const debug =
${
!!
debug
}
export const nvue =
${
JSON
.
stringify
({
'
flex-direction
'
:
flexDirection
,
})}
export const networkTimeout =
${
JSON
.
stringify
(
networkTimeout
)}
// h5
export const router =
${
JSON
.
stringify
(
router
)}
export const async =
${
JSON
.
stringify
(
async
)}
export const qqMapKey = '
${
qqMapKey
}
'
export const sdkConfigs =
${
JSON
.
stringify
(
sdkConfigs
)}
`
,
map
:
{
mappings
:
''
},
}
}
},
load
(
id
)
{
if
(
id
.
endsWith
(
MANIFEST_JSON_JS
))
{
return
JSON
.
stringify
(
parse
(
fs
.
readFileSync
(
manifestJsonPath
,
'
utf8
'
)))
}
},
}
}
packages/vite-plugin-uni/src/
load/pages
.ts
→
packages/vite-plugin-uni/src/
configResolved/plugins/pagesJson
.ts
浏览文件 @
78a3395e
import
fs
from
'
fs
'
import
path
from
'
path
'
import
slash
from
'
slash
'
import
{
parse
}
from
'
jsonc-parser
'
import
{
Plugin
}
from
'
vite
'
import
{
camelize
,
capitalize
}
from
'
@vue/shared
'
import
{
VitePluginUniResolvedOptions
}
from
'
..
'
import
{
VitePluginUniResolvedOptions
}
from
'
..
/..
'
const
{
parseJson
}
=
require
(
'
@dcloudio/uni-cli-shared
'
)
const
pkg
=
require
(
'
@dcloudio/vite-plugin-uni/package.json
'
)
const
PAGES_JSON_JS
=
'
pages.json.js
'
export
const
pages
=
{
test
(
id
:
string
,
_inputDir
:
string
)
{
return
id
.
endsWith
(
'
pages.json.js
'
)
export
function
uniPagesJsonPlugin
(
options
:
VitePluginUniResolvedOptions
):
Plugin
{
const
pagesJsonPath
=
slash
(
path
.
join
(
options
.
inputDir
,
'
pages.json
'
))
return
{
name
:
'
vite:uni-pages-json
'
,
resolveId
(
id
)
{
if
(
id
.
endsWith
(
PAGES_JSON_JS
))
{
return
pagesJsonPath
+
'
.js
'
}
},
load
(
filename
:
string
,
options
:
VitePluginUniResolvedOptions
)
{
return
(
transform
(
code
,
id
)
{
if
(
id
.
endsWith
(
PAGES_JSON_JS
))
{
return
{
code
:
(
options
.
devServer
?
registerGlobalCode
:
''
)
+
parsePagesJson
(
fs
.
readFileSync
(
filename
.
substr
(
0
,
filename
.
length
-
3
),
'
utf-8
'
)
)
)
parsePagesJson
(
code
,
options
),
map
:
{
mappings
:
''
},
}
}
},
load
(
id
)
{
if
(
id
.
endsWith
(
PAGES_JSON_JS
))
{
return
JSON
.
stringify
(
parse
(
fs
.
readFileSync
(
pagesJsonPath
,
'
utf8
'
)))
}
},
}
}
interface
PageOptions
{
...
...
@@ -46,17 +65,24 @@ interface PageRouteOptions {
}
}
function
parsePagesJson
(
jsonStr
:
string
)
{
function
parsePagesJson
(
jsonStr
:
string
,
options
:
VitePluginUniResolvedOptions
)
{
const
pagesJson
=
formatPagesJson
(
jsonStr
)
const
definePagesCode
=
generatePagesDefineCode
(
pagesJson
)
const
uniRoutesCode
=
generateRoutes
(
pagesJson
).
join
(
'
,
'
)
const
uniConfigCode
=
generateConfig
(
pagesJson
)
const
uniRoutesCode
=
generateRoutes
(
pagesJson
)
const
uniConfigCode
=
generateConfig
(
pagesJson
,
options
)
const
manifestJsonPath
=
slash
(
path
.
resolve
(
options
.
inputDir
,
'
manifest.json.js
'
)
)
return
`
import { defineAsyncComponent, resolveComponent, createVNode, withCtx, openBlock, createBlock } from 'vue'
import { PageComponent } from '@dcloudio/uni-h5'
import { PageComponent, AsyncLoadingComponent, AsyncErrorComponent } from '@dcloudio/uni-h5'
import { appid, debug, networkTimeout, router, async, sdkConfigs, qqMapKey, nvue } from '
${
manifestJsonPath
}
'
${
uniConfigCode
}
${
definePagesCode
}
window.__uniConfig=
${
uniConfigCode
}
window.__uniRoutes=[
${
uniRoutesCode
}
]
${
uniRoutesCode
}
`
}
...
...
@@ -148,7 +174,14 @@ function formatPageIdentifier(path: string) {
function
generatePageDefineCode
(
pageOptions
:
PageOptions
)
{
return
`const
${
formatPageIdentifier
(
pageOptions
.
path
)}
= defineAsyncComponent(() => import('./
${
pageOptions
.
path
}
.vue'))`
)}
= defineAsyncComponent({
loader: () => import('./
${
pageOptions
.
path
}
.vue'),
loadingComponent: AsyncLoadingComponent,
errorComponent: AsyncErrorComponent,
delay: async.delay,
timeout: async.timeout,
suspensible: async.suspensible
})`
}
function
generatePagesDefineCode
(
pagesJson
:
Record
<
string
,
any
>
)
{
...
...
@@ -210,16 +243,35 @@ function generatePagesRoute(pagesRouteOptions: PageRouteOptions[]) {
}
function
generateRoutes
(
pagesJson
:
Record
<
string
,
any
>
)
{
return
[
return
`window.__uniRoutes=[
${
[
`{ path: '/
${
pagesJson
.
pages
[
0
].
path
}
', redirect: '/' }`
,
...
generatePagesRoute
(
formatPagesRoute
(
pagesJson
)),
]
]
.
join
(
'
,
'
)}
]`
}
function
generateConfig
(
pagesJson
:
Record
<
string
,
any
>
)
{
function
generateConfig
(
pagesJson
:
Record
<
string
,
any
>
,
options
:
VitePluginUniResolvedOptions
)
{
delete
pagesJson
.
pages
delete
pagesJson
.
subPackages
delete
pagesJson
.
subpackages
pagesJson
.
router
=
{}
// TODO
return
JSON
.
stringify
(
pagesJson
)
pagesJson
.
compilerVersion
=
pkg
[
'
uni-app
'
].
compilerVersion
return
(
(
options
.
devServer
?
''
:
`window['____'+appid+'____']=true
delete window['____'+appid+'____']
`
)
+
`window.__uniConfig=Object.assign(
${
JSON
.
stringify
(
pagesJson
)}
,{
async,
debug,
networkTimeout,
sdkConfigs,
qqMapKey,
nvue,
router
})
`
)
}
packages/vite-plugin-uni/src/index.ts
浏览文件 @
78a3395e
import
fs
from
'
fs
'
import
path
from
'
path
'
import
{
parse
}
from
'
jsonc-parser
'
import
{
Plugin
,
ViteDevServer
}
from
'
vite
'
import
{
initEnv
}
from
'
./env
'
import
{
createLoad
}
from
'
./load
'
import
{
createConfig
}
from
'
./config
'
import
{
createResolveId
}
from
'
./resolveId
'
import
{
createConfigResolved
}
from
'
./configResolved
'
...
...
@@ -16,6 +17,7 @@ export interface VitePluginUniOptions {
}
export
interface
VitePluginUniResolvedOptions
extends
VitePluginUniOptions
{
root
:
string
base
:
string
inputDir
:
string
assetsDir
:
string
devServer
?:
ViteDevServer
...
...
@@ -23,14 +25,23 @@ export interface VitePluginUniResolvedOptions extends VitePluginUniOptions {
export
*
from
'
./vue
'
function
resolveBase
(
inputDir
:
string
)
{
const
manifest
=
parse
(
fs
.
readFileSync
(
path
.
join
(
inputDir
,
'
manifest.json
'
),
'
utf8
'
)
)
return
(
manifest
.
h5
&&
manifest
.
h5
.
router
&&
manifest
.
h5
.
router
.
base
)
||
'
/
'
}
export
default
function
uniPlugin
(
rawOptions
:
VitePluginUniOptions
=
{}
):
Plugin
{
const
inputDir
=
rawOptions
.
inputDir
||
path
.
resolve
(
process
.
cwd
(),
'
src
'
)
const
options
:
VitePluginUniResolvedOptions
=
{
...
rawOptions
,
root
:
process
.
cwd
(),
base
:
resolveBase
(
inputDir
),
assetsDir
:
'
assets
'
,
inputDir
:
rawOptions
.
inputDir
||
path
.
resolve
(
process
.
cwd
(),
'
src
'
)
,
inputDir
,
}
initEnv
(
options
)
return
{
...
...
@@ -39,6 +50,5 @@ export default function uniPlugin(
configResolved
:
createConfigResolved
(
options
),
configureServer
:
createConfigureServer
(
options
),
resolveId
:
createResolveId
(
options
),
load
:
createLoad
(
options
),
}
}
packages/vite-plugin-uni/src/load/app.ts
已删除
100644 → 0
浏览文件 @
a2b13dd4
import
fs
from
'
fs
'
import
path
from
'
path
'
import
slash
from
'
slash
'
import
{
VitePluginUniResolvedOptions
}
from
'
..
'
let
appVuePath
:
string
export
const
app
=
{
test
(
id
:
string
,
inputDir
:
string
)
{
if
(
!
appVuePath
)
{
appVuePath
=
slash
(
path
.
resolve
(
inputDir
,
'
App.vue
'
))
}
return
id
===
appVuePath
},
load
(
filename
:
string
,
_options
:
VitePluginUniResolvedOptions
)
{
return
`<template><VUniApp ref="app"/></template><style src="@dcloudio/uni-h5/style/base.css"/>
${
fs
.
readFileSync
(
filename
,
'
utf-8
'
)
.
toString
()}
`
},
}
packages/vite-plugin-uni/src/load/index.ts
已删除
100644 → 0
浏览文件 @
a2b13dd4
import
debug
from
'
debug
'
import
{
Plugin
}
from
'
vite
'
import
{
VitePluginUniResolvedOptions
}
from
'
..
'
import
{
app
}
from
'
./app
'
import
{
main
}
from
'
./main
'
import
{
pages
}
from
'
./pages
'
const
debugLoad
=
debug
(
'
uni:load
'
)
const
loads
=
[
app
,
main
,
pages
]
export
function
createLoad
(
options
:
VitePluginUniResolvedOptions
):
Plugin
[
'
load
'
]
{
return
(
id
)
=>
{
const
item
=
loads
.
find
((
item
)
=>
item
.
test
(
id
,
options
.
inputDir
))
if
(
item
)
{
debugLoad
(
id
)
return
item
.
load
(
id
,
options
)
}
}
}
packages/vite-plugin-uni/src/load/main.ts
已删除
100644 → 0
浏览文件 @
a2b13dd4
import
fs
from
'
fs
'
import
path
from
'
path
'
import
slash
from
'
slash
'
import
{
VitePluginUniResolvedOptions
}
from
'
..
'
let
mainJsPath
:
string
let
mainTsPath
:
string
let
pagesJsPath
:
string
export
const
main
=
{
test
(
id
:
string
,
inputDir
:
string
)
{
if
(
!
mainJsPath
)
{
const
mainPath
=
slash
(
path
.
resolve
(
inputDir
,
'
main
'
))
mainJsPath
=
mainPath
+
'
.js
'
mainTsPath
=
mainPath
+
'
.ts
'
}
return
id
===
mainJsPath
||
id
===
mainTsPath
},
load
(
filename
:
string
,
options
:
VitePluginUniResolvedOptions
)
{
if
(
!
pagesJsPath
)
{
pagesJsPath
=
slash
(
path
.
resolve
(
options
.
inputDir
,
'
pages.json.js
'
))
}
return
`import { plugin } from '@dcloudio/uni-h5';import '
${
pagesJsPath
}
';function createApp(rootComponent,rootProps){rootComponent && (rootComponent.mpType = 'app');return createVueApp(rootComponent, rootProps).use(plugin)};
${
fs
.
readFileSync
(
filename
,
'
utf-8
'
)
.
toString
()
.
replace
(
'
createApp
'
,
'
createVueApp
'
)}
`
},
}
packages/vite-plugin-uni/src/resolveId.ts
浏览文件 @
78a3395e
import
path
from
'
path
'
import
debug
from
'
debug
'
import
{
Plugin
}
from
'
vite
'
import
{
VitePluginUniResolvedOptions
}
from
'
.
'
...
...
@@ -7,26 +6,13 @@ const debugResolve = debug('uni:resolve')
const
VUES
=
[
'
vue
'
,
'
vue.js
'
,
'
./vue.js
'
,
'
dist/vue.runtime.esm-bundler.js
'
]
let
pagesJsonJsPath
:
string
export
function
createResolveId
(
options
:
VitePluginUniResolvedOptions
):
Plugin
[
'
resolveId
'
]
{
return
function
(
id
)
{
if
(
id
.
endsWith
(
'
pages.json.js
'
))
{
if
(
!
pagesJsonJsPath
)
{
pagesJsonJsPath
=
path
.
resolve
(
options
.
inputDir
,
'
pages.json.js
'
)
}
debugResolve
(
id
)
return
pagesJsonJsPath
}
if
(
VUES
.
includes
(
id
))
{
debugResolve
(
id
)
return
'
@dcloudio/uni-h5-vue
'
}
// if (id.startsWith('@/')) {
// debugResolve(id)
// return path.join(options.inputDir, id.replace('@/', ''))
// }
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录