Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
菜鸟程序猿_c
uni-app
提交
cc9c1d47
U
uni-app
项目概览
菜鸟程序猿_c
/
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,发现更多精彩内容 >>
提交
cc9c1d47
编写于
4月 28, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: AsyncLoading, AsyncError
上级
2972d0c2
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
168 addition
and
176 deletion
+168
-176
packages/uni-h5/dist/uni-h5.esm.js
packages/uni-h5/dist/uni-h5.esm.js
+107
-116
packages/uni-h5/src/framework/components/async-error/index.tsx
...ges/uni-h5/src/framework/components/async-error/index.tsx
+19
-0
packages/uni-h5/src/framework/components/async-error/index.vue
...ges/uni-h5/src/framework/components/async-error/index.vue
+0
-35
packages/uni-h5/src/framework/components/async-loading/index.ts
...es/uni-h5/src/framework/components/async-loading/index.ts
+16
-0
packages/uni-h5/src/framework/components/async-loading/index.vue
...s/uni-h5/src/framework/components/async-loading/index.vue
+0
-23
packages/uni-h5/src/index.ts
packages/uni-h5/src/index.ts
+2
-2
packages/uni-h5/style/framework/async.css
packages/uni-h5/style/framework/async.css
+21
-0
packages/vite-plugin-uni/src/configResolved/plugins/pagesJson.ts
...s/vite-plugin-uni/src/configResolved/plugins/pagesJson.ts
+3
-0
未找到文件。
packages/uni-h5/dist/uni-h5.esm.js
浏览文件 @
cc9c1d47
此差异已折叠。
点击以展开。
packages/uni-h5/src/framework/components/async-error/index.tsx
0 → 100644
浏览文件 @
cc9c1d47
import
{
defineComponent
}
from
'
vue
'
import
{
useI18n
,
initI18nAsyncMsgsOnce
}
from
'
@dcloudio/uni-core
'
function
reload
()
{
window
.
location
.
reload
()
}
export
default
/*#__PURE__*/
defineComponent
({
name
:
'
AsyncError
'
,
setup
()
{
initI18nAsyncMsgsOnce
()
const
{
t
}
=
useI18n
()
return
()
=>
(
<
div
class
=
"uni-async-error"
onClick
=
{
reload
}
>
{
t
(
'
uni.async.error
'
)
}
</
div
>
)
},
})
packages/uni-h5/src/framework/components/async-error/index.vue
已删除
100644 → 0
浏览文件 @
2972d0c2
<
template
>
<div
class=
"uni-async-error"
@
click=
"reload"
>
{{
$$t
(
"
uni.async.error
"
)
}}
</div>
</
template
>
<
style
>
.uni-async-error
{
position
:
absolute
;
left
:
0
;
right
:
0
;
top
:
0
;
bottom
:
0
;
color
:
#999
;
padding
:
100px
10px
;
text-align
:
center
;
}
</
style
>
<
script
>
import
{
useI18n
,
initI18nAsyncMsgsOnce
}
from
'
@dcloudio/uni-core
'
export
default
{
name
:
'
AsyncError
'
,
setup
()
{
initI18nAsyncMsgsOnce
()
const
{
t
}
=
useI18n
()
return
{
$
$t
:
t
,
reload
()
{
window
.
location
.
reload
()
}
}
}
}
</
script
>
packages/uni-h5/src/framework/components/async-loading/index.ts
0 → 100644
浏览文件 @
cc9c1d47
import
{
createBlock
,
createVNode
,
defineComponent
,
openBlock
}
from
'
vue
'
const
clazz
=
{
class
:
'
uni-async-loading
'
}
const
loadingVNode
=
/*#__PURE__*/
createVNode
(
'
i
'
,
{
class
:
'
uni-loading
'
},
null
,
-
1
/* HOISTED */
)
export
default
/*#__PURE__*/
defineComponent
({
name
:
'
AsyncLoading
'
,
render
()
{
return
openBlock
(),
createBlock
(
'
div
'
,
clazz
,
[
loadingVNode
])
},
})
packages/uni-h5/src/framework/components/async-loading/index.vue
已删除
100644 → 0
浏览文件 @
2972d0c2
<
template
>
<div
class=
"uni-async-loading"
>
<i
class=
"uni-loading"
/>
</div>
</
template
>
<
style
>
.uni-async-loading
{
box-sizing
:
border-box
;
width
:
100%
;
padding
:
50px
;
text-align
:
center
;
}
.uni-async-loading
.uni-loading
{
width
:
30px
;
height
:
30px
;
}
</
style
>
<
script
>
export
default
{
name
:
'
AsyncLoading
'
}
</
script
>
packages/uni-h5/src/index.ts
浏览文件 @
cc9c1d47
...
@@ -15,5 +15,5 @@ export { getApp, getCurrentPages } from './framework'
...
@@ -15,5 +15,5 @@ export { getApp, getCurrentPages } from './framework'
export
{
default
as
LayoutComponent
}
from
'
./framework/components/layout/index
'
export
{
default
as
LayoutComponent
}
from
'
./framework/components/layout/index
'
export
{
default
as
PageComponent
}
from
'
./framework/components/page/index
'
export
{
default
as
PageComponent
}
from
'
./framework/components/page/index
'
export
{
default
as
AsyncErrorComponent
}
from
'
./framework/components/async-error/index
.vue
'
export
{
default
as
AsyncErrorComponent
}
from
'
./framework/components/async-error/index
'
export
{
default
as
AsyncLoadingComponent
}
from
'
./framework/components/async-loading
/index.vue
'
export
{
default
as
AsyncLoadingComponent
}
from
'
./framework/components/async-loading
'
packages/uni-h5/style/framework/async.css
0 → 100644
浏览文件 @
cc9c1d47
.uni-async-error
{
position
:
absolute
;
left
:
0
;
right
:
0
;
top
:
0
;
bottom
:
0
;
color
:
#999
;
padding
:
100px
10px
;
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/vite-plugin-uni/src/configResolved/plugins/pagesJson.ts
浏览文件 @
cc9c1d47
...
@@ -113,6 +113,9 @@ function generateCssCode(
...
@@ -113,6 +113,9 @@ function generateCssCode(
const
define
=
config
.
define
!
as
FEATURE_DEFINES
const
define
=
config
.
define
!
as
FEATURE_DEFINES
const
cssFiles
=
[
H5_FRAMEWORK_STYLE_PATH
+
'
base.css
'
]
const
cssFiles
=
[
H5_FRAMEWORK_STYLE_PATH
+
'
base.css
'
]
if
(
define
.
__UNI_FEATURE_PAGES__
)
{
if
(
define
.
__UNI_FEATURE_PAGES__
)
{
cssFiles
.
push
(
H5_FRAMEWORK_STYLE_PATH
+
'
async.css
'
)
}
if
(
define
.
__UNI_FEATURE_RESPONSIVE__
)
{
cssFiles
.
push
(
H5_FRAMEWORK_STYLE_PATH
+
'
layout.css
'
)
cssFiles
.
push
(
H5_FRAMEWORK_STYLE_PATH
+
'
layout.css
'
)
}
}
if
(
define
.
__UNI_FEATURE_NAVIGATIONBAR__
)
{
if
(
define
.
__UNI_FEATURE_NAVIGATIONBAR__
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录