Skip to content

Commit 6ad3eee

Browse files
committed
feat: 1.12.9版本更新BPageloading新增回复超时和处理异常
1 parent 905a1df commit 6ad3eee

10 files changed

Lines changed: 30 additions & 9 deletions

File tree

docs/.vitepress/components/BPageLoading/action.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<FRadio value="emptyInitResult">emptyInitResult</FRadio>
77
<FRadio value="emptyQueryResult">emptyQueryResult</FRadio>
88
<FRadio value="noPermissions">noPermissions</FRadio>
9+
<FRadio value="handleException">handleException</FRadio>
10+
<FRadio value="responseTimedOut">responseTimedOut</FRadio>
911
</FRadioGroup>
1012
</FSpace>
1113
<FSpace
@@ -16,6 +18,8 @@
1618
emptyInitResult: <FInput v-model="loadingText.emptyInitResult"></FInput>
1719
emptyQueryResult: <FInput v-model="loadingText.emptyQueryResult"></FInput>
1820
noPermissions: <FInput v-model="loadingText.noPermissions"></FInput>
21+
handleException: <FInput v-model="loadingText.handleException"></FInput>
22+
responseTimedOut: <FInput v-model="loadingText.responseTimedOut"></FInput>
1923
</FSpace>
2024
<BPageLoading
2125
:actionType="actionType"
@@ -34,7 +38,9 @@ const loadingText = ref({
3438
loading: 'Loading. . .',
3539
emptyInitResult: '这里还没有数据. . .',
3640
emptyQueryResult: '没有符合条件的结果. . .',
37-
noPermissions: '暂无权限'
41+
noPermissions: '暂无权限',
42+
handleException: '处理异常',
43+
responseTimedOut: '响应超时'
3844
})
3945
const logout = () => {
4046
FMessage.info('logout');

docs/.vitepress/components/BPageLoading/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ app.use(BPageLoading);
3131
| 属性 | 说明 | 类型 | 默认值 |
3232
| ----- | ----------------------------- | ---------------------------------------- |------------------ |
3333
| type | 类型,可选有'normal' 、 'page'| string|normal|
34-
| actionType | 类型,可选有'loading' 、 'emptyInitResult' 、 'emptyQueryResult'、'noPermissions' | string|'loading'|
35-
| loadingText | 对象,替换默认展示文案,会自动合并,不用每次替换所有的状态的展示文案| Object| `{loading: 'Loding. . .',emptyInitResult: '这里还没有数据. . .',emptyQueryResult: '没有符合条件的结果. . .',noPermissions: '暂无权限'}`|
34+
| actionType | 类型,可选有'loading' 、 'emptyInitResult' 、 'emptyQueryResult'、'noPermissions'、'handleException'、'responseTimedOut' | string|'loading'|
35+
| loadingText | 对象,替换默认展示文案,会自动合并,不用每次替换所有的状态的展示文案| Object| `{loading: 'Loding. . .',emptyInitResult: '这里还没有数据. . .',emptyQueryResult: '没有符合条件的结果. . .',noPermissions: '暂无权限',handleException: '处理异常',responseTimedOut: '响应超时'}`|
3636
| logout | 事件,暂无权限时点击登出按钮触发的事件| Function| () => {}|

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fesjs/traction-widget",
3-
"version": "1.12.8",
3+
"version": "1.12.9",
44
"description": "集合大型中台项目使用到的通用组件和工具函数",
55
"scripts": {
66
"docs:dev": "npm run build && node docs/.vitepress/scripts/generate-doc.js && vitepress dev docs",

packages/traction-widget/components/PageLoading/pageLoading.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,16 @@ const props = defineProps({
3232
default: 'normal'
3333
},
3434
actionType: {
35-
type: String as PropType<'loading' | 'emptyInitResult' | 'emptyQueryResult' | 'noPermissions'>,
35+
type: String as PropType<'loading' | 'emptyInitResult' | 'emptyQueryResult' | 'noPermissions' | 'handleException' | 'responseTimedOut'>,
3636
default: 'loading'
3737
},
3838
loadingText: {
3939
type: Object as PropType<{
4040
loading?: string,
4141
emptyInitResult?: string,
42-
emptyQueryResult?: string
42+
emptyQueryResult?: string,
43+
handleException?: string,
44+
responseTimedOut?: string
4345
}>,
4446
default: () => ({})
4547
}
@@ -51,6 +53,8 @@ const loadingText = computed(() => ({
5153
emptyInitResult: pageLoadingLocalObj?.noData,
5254
emptyQueryResult: pageLoadingLocalObj?.noResult,
5355
noPermissions: pageLoadingLocalObj?.noPermissions,
56+
handleException: pageLoadingLocalObj?.handleException || '处理异常',
57+
responseTimedOut: pageLoadingLocalObj?.responseTimedOut || '响应超时',
5458
...props.loadingText
5559
}));
5660
const tip = computed(() => {

packages/traction-widget/components/PageLoading/style/index.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,10 @@
4343
}
4444
.noPermissions{
4545
background: url('../../assets/images/noPermissions.svg') center no-repeat;
46+
}
47+
.handleException{
48+
background: url('../../assets/images/handleException.png') center no-repeat;
49+
}
50+
.responseTimedOut{
51+
background: url('../../assets/images/responseTimedOut.png') center no-repeat;
4652
}
35.1 KB
Loading
40.5 KB
Loading

packages/traction-widget/components/locales/lang/enUS.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ export default {
55
logout: 'Logout',
66
noData: 'No data here. . .',
77
noResult: 'No results match the conditions. . .',
8-
noPermissions: 'No permissions'
8+
noPermissions: 'No permissions',
9+
handleException: 'Handle Exception',
10+
responseTimedOut: 'Response Timed Out'
911
},
1012
SearchData: {
1113
search: 'Search',

packages/traction-widget/components/locales/lang/zhCN.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ export default {
55
logout: '退出登录',
66
noData: '这里还没有数据. . .',
77
noResult: '没有符合条件的结果. . .',
8-
noPermissions: '暂无权限'
8+
noPermissions: '暂无权限',
9+
handleException: '处理异常',
10+
responseTimedOut: '响应超时'
11+
912
},
1013
SearchData: {
1114
search: '查询',

packages/traction-widget/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fesjs/traction-widget",
3-
"version": "1.12.8",
3+
"version": "1.12.9",
44
"description": "集合大型中台项目使用到的通用组件和工具函数",
55
"main": "dist/traction-widget.min.js",
66
"module": "es/components/index.js",

0 commit comments

Comments
 (0)