mirror of https://github.com/openspug/spug
U 优化发布申请批量删除
parent
05e49a6c13
commit
b175f51a33
|
@ -13,5 +13,5 @@ export default function AuthButton(props) {
|
||||||
if (props.auth && !hasPermission(props.auth)) {
|
if (props.auth && !hasPermission(props.auth)) {
|
||||||
disabled = true;
|
disabled = true;
|
||||||
}
|
}
|
||||||
return props.hide && disabled ? null : <Button {...props} disabled={disabled}>{props.children}</Button>
|
return <Button {...props} disabled={disabled}>{props.children}</Button>
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
|
||||||
|
* Copyright (c) <spug.dev@gmail.com>
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
import React from 'react';
|
||||||
|
import { hasPermission } from "../libs";
|
||||||
|
|
||||||
|
|
||||||
|
export default function AuthFragment(props) {
|
||||||
|
return hasPermission(props.auth) ? <React.Fragment>{props.children}</React.Fragment> : null
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ import StatisticsCard from './StatisticsCard';
|
||||||
import SearchForm from './SearchForm';
|
import SearchForm from './SearchForm';
|
||||||
import LinkButton from './LinkButton';
|
import LinkButton from './LinkButton';
|
||||||
import AuthButton from './AuthButton';
|
import AuthButton from './AuthButton';
|
||||||
|
import AuthFragment from './AuthFragment';
|
||||||
import AuthLink from './AuthLink';
|
import AuthLink from './AuthLink';
|
||||||
import AuthCard from './AuthCard';
|
import AuthCard from './AuthCard';
|
||||||
import AuthDiv from './AuthDiv';
|
import AuthDiv from './AuthDiv';
|
||||||
|
@ -14,6 +15,7 @@ import ACEditor from './ACEditor';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
StatisticsCard,
|
StatisticsCard,
|
||||||
|
AuthFragment,
|
||||||
SearchForm,
|
SearchForm,
|
||||||
LinkButton,
|
LinkButton,
|
||||||
AuthButton,
|
AuthButton,
|
||||||
|
|
Loading…
Reference in New Issue