Skip to content

Commit

Permalink
fix(sys-client): fix styles & add util function(show)
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Sep 8, 2021
1 parent cab5747 commit 7809903
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
33 changes: 33 additions & 0 deletions packages/system-client/src/utils/show.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { Message, Notification } from 'element-ui'

export function showSuccess(message) {
Message.success(message)
}

export function showError(message) {
Message.error(message)
}

export function showInfo(message) {
Message.info(message)
}

export function showWarning(message) {
Message.warning(message)
}

export function notifySuccess(message, title) {
Notification.success({ message, title })
}

export function notifyError(message, title) {
Notification.error({ message, title })
}

export function notifyInfo(message, title) {
Notification.info({ message, title })
}

export function notifyWarning(message, title) {
Notification.warning({ message, title })
}
2 changes: 1 addition & 1 deletion packages/system-client/src/utils/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function isExternal(path) {
* @returns {Boolean}
*/
export function validUsername(str) {
return str.trim().length >= 2
return str.trim().length >= 4
}

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/system-client/src/views/application/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- My created apps -->
<div class="app-group">
<div class="app-group-title">我创建的应用</div>
<el-table v-loading="loading" empty-text="-" :data="applications.created" style="width: 100%;margin-top:10px;" stripe>
<el-table v-loading="loading" empty-text="还没有创建应用" :data="applications.created" style="width: 100%;margin-top:10px;" stripe>
<el-table-column align="center" label="App ID" width="320">
<template slot-scope="scope">
<div class="table-row">
Expand Down Expand Up @@ -67,7 +67,7 @@
<!-- My joined apps -->
<div class="app-group">
<div class="app-group-title">我加入的应用</div>
<el-table v-loading="loading" empty-text="-" :data="applications.joined" style="width: 100%;margin-top:10px;" stripe>
<el-table v-loading="loading" empty-text="还没有加入的应用" :data="applications.joined" style="width: 100%;margin-top:10px;" stripe>
<el-table-column align="center" label="App ID" width="320">
<template slot-scope="scope">
<div class="table-row">
Expand Down

0 comments on commit 7809903

Please sign in to comment.