history.push('/')}>
12 | Back Home
13 |
14 | }
15 | />
16 | );
17 |
18 | export default NoFoundPage;
19 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/CategoryList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/CategoryList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/CategoryList/components/UpdatePasswordForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 |
5 | const UpdatePasswordForm = props => {
6 |
7 | const { updateModalVisible, onCancel, handleUpdate, userName } = props;
8 |
9 | return (
10 | onCancel()}
16 | >
17 | {props.children}
18 |
19 | );
20 | };
21 |
22 | export default UpdatePasswordForm;
23 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/ContentTypeList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/ContentTypeList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/DemoDefaultModelList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/DemoDefaultModelList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/DemoDefaultModelList/components/UpdatePasswordForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 |
5 | const UpdatePasswordForm = props => {
6 |
7 | const { updateModalVisible, onCancel, handleUpdate, userName } = props;
8 |
9 | return (
10 | onCancel()}
16 | >
17 | {props.children}
18 |
19 | );
20 | };
21 |
22 | export default UpdatePasswordForm;
23 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/DemoForeignKeyList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/DemoForeignKeyList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/DemoForeignKeyList/components/UpdatePasswordForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 |
5 | const UpdatePasswordForm = props => {
6 |
7 | const { updateModalVisible, onCancel, handleUpdate, userName } = props;
8 |
9 | return (
10 | onCancel()}
16 | >
17 | {props.children}
18 |
19 | );
20 | };
21 |
22 | export default UpdatePasswordForm;
23 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/DemoModelList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/DemoModelList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/DemoModelList/components/UpdatePasswordForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 |
5 | const UpdatePasswordForm = props => {
6 |
7 | const { updateModalVisible, onCancel, handleUpdate, userName } = props;
8 |
9 | return (
10 | onCancel()}
16 | >
17 | {props.children}
18 |
19 | );
20 | };
21 |
22 | export default UpdatePasswordForm;
23 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/DemoModelRequireList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/DemoModelRequireList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/DemoModelRequireList/components/UpdatePasswordForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 |
5 | const UpdatePasswordForm = props => {
6 |
7 | const { updateModalVisible, onCancel, handleUpdate, userName } = props;
8 |
9 | return (
10 | onCancel()}
16 | >
17 | {props.children}
18 |
19 | );
20 | };
21 |
22 | export default UpdatePasswordForm;
23 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/GroupList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/GroupList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/PermissionList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/PermissionList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/RichTextDemoList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/RichTextDemoList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/RichTextDemoList/components/UpdatePasswordForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 |
5 | const UpdatePasswordForm = props => {
6 |
7 | const { updateModalVisible, onCancel, handleUpdate, userName } = props;
8 |
9 | return (
10 | onCancel()}
16 | >
17 | {props.children}
18 |
19 | );
20 | };
21 |
22 | export default UpdatePasswordForm;
23 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/TagsList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/TagsList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/TagsList/components/UpdatePasswordForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 |
5 | const UpdatePasswordForm = props => {
6 |
7 | const { updateModalVisible, onCancel, handleUpdate, userName } = props;
8 |
9 | return (
10 | onCancel()}
16 | >
17 | {props.children}
18 |
19 | );
20 | };
21 |
22 | export default UpdatePasswordForm;
23 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/UserProfileList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/UserProfileList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/UserProfileList/components/UpdatePasswordForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 |
5 | const UpdatePasswordForm = props => {
6 |
7 | const { updateModalVisible, onCancel, handleUpdate, userName } = props;
8 |
9 | return (
10 | onCancel()}
16 | >
17 | {props.children}
18 |
19 | );
20 | };
21 |
22 | export default UpdatePasswordForm;
23 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/AutoGenPage/placeholder.js:
--------------------------------------------------------------------------------
1 | alert("hi,mtianyan")
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/ChangePassword/service.js:
--------------------------------------------------------------------------------
1 | import request from 'umi-request';
2 |
3 | export async function changePassword(params) {
4 | return request('/api/xadmin/v1/change_password', {
5 | method: 'POST',
6 | data: { ...params },
7 | });
8 | }
9 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/Field/index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import styles from './index.less';
3 |
4 | const Field = ({ label, value, ...rest }) => (
5 |
6 | {label}
7 | {value}
8 |
9 | );
10 |
11 | export default Field;
12 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/Field/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/es/style/themes/default.less';
2 |
3 | .field {
4 | margin: 0;
5 | overflow: hidden;
6 | white-space: nowrap;
7 | text-overflow: ellipsis;
8 | .label,
9 | .number {
10 | font-size: @font-size-base;
11 | line-height: 22px;
12 | }
13 | .number {
14 | margin-left: 8px;
15 | color: @heading-color;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/TagCloud/index.less:
--------------------------------------------------------------------------------
1 | .tagCloud {
2 | overflow: hidden;
3 | canvas {
4 | transform-origin: 0 0;
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/TimelineChart/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/es/style/themes/default.less';
2 |
3 | .timelineChart {
4 | background: @component-background;
5 | }
6 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/WaterWave/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/es/style/themes/default.less';
2 |
3 | .waterWave {
4 | position: relative;
5 | display: inline-block;
6 | transform-origin: left;
7 | .text {
8 | position: absolute;
9 | top: 32px;
10 | left: 0;
11 | width: 100%;
12 | text-align: center;
13 | span {
14 | color: @text-color-secondary;
15 | font-size: 14px;
16 | line-height: 22px;
17 | }
18 | h4 {
19 | color: @heading-color;
20 | font-size: 24px;
21 | line-height: 32px;
22 | }
23 | }
24 | .waterWaveCanvasWrapper {
25 | transform: scale(0.5);
26 | transform-origin: 0 0;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/bizcharts.jsx:
--------------------------------------------------------------------------------
1 | import * as BizChart from 'bizcharts';
2 |
3 | export default BizChart;
4 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/index.less:
--------------------------------------------------------------------------------
1 | .miniChart {
2 | position: relative;
3 | width: 100%;
4 | .chartContent {
5 | position: absolute;
6 | bottom: -28px;
7 | width: 100%;
8 | > div {
9 | margin: 0 -5px;
10 | overflow: hidden;
11 | }
12 | }
13 | .chartLoading {
14 | position: absolute;
15 | top: 16px;
16 | left: 50%;
17 | margin-left: -7px;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/DashBoard/components/PageLoading/index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Spin } from 'antd'; // loading components from code split
3 | // https://umijs.org/plugin/umi-plugin-react.html#dynamicimport
4 |
5 | export default () => (
6 |
12 |
13 |
14 | );
15 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/EmailVerifyRecordList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/EmailVerifyRecordList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/TyAdminEmailVerifyRecordList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/TyAdminEmailVerifyRecordList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/TyAdminSysLogList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/pages/TyAdminBuiltIn/TyAdminSysLogList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/services/editor.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request';
2 | import { buildFileFormData, buildRichEditorFormData } from '@/utils/utils';
3 |
4 | export async function richEditUpload(params) {
5 | return request('/api/xadmin/v1/upload', {
6 | method: 'POST',
7 | data: params,
8 | });
9 | }
10 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/services/login.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request';
2 |
3 | export async function AccountLogin(params) {
4 | return request('/api/xadmin/v1/login/account', {
5 | method: 'POST',
6 | data: params,
7 | });
8 | }
9 |
10 | export async function getEmailCaptcha(email) {
11 | return request(`/api/xadmin/v1/sendEmailCaptcha?email=${email}`);
12 | }
13 |
14 | export async function getCode() {
15 | return request(
16 | '/api/xadmin/v1/captcha-generate', {
17 | method: 'GET',
18 | },
19 | );
20 | }
21 | export async function Logout() {
22 | return request(
23 | '/api/xadmin/v1/logout', {
24 | method: 'GET'
25 | }
26 | );
27 | }
28 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/services/user.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request';
2 |
3 | export async function query() {
4 | return request('/api/xadmin/v1/users');
5 | }
6 | export async function queryCurrent() {
7 | return request('/api/xadmin/v1/currentUser');
8 | }
9 | export async function queryNotices() {
10 | return request('/api/xadmin/v1/notices');
11 | }
12 |
13 | export async function queryMenu() {
14 | return request('/api/xadmin/v1/sys/menu');
15 | }
16 |
17 | export async function queryCount() {
18 | return request('/api/xadmin/v1/dashboard');
19 | }
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/utils/Authorized.js:
--------------------------------------------------------------------------------
1 | import RenderAuthorize from '@/components/Authorized';
2 | import { getAuthority } from './authority';
3 | /* eslint-disable eslint-comments/disable-enable-pair */
4 |
5 | /* eslint-disable import/no-mutable-exports */
6 |
7 | let Authorized = RenderAuthorize(getAuthority()); // Reload the rights component
8 |
9 | const reloadAuthorized = () => {
10 | Authorized = RenderAuthorize(getAuthority());
11 | };
12 | /**
13 | * hard code
14 | * block need it。
15 | */
16 |
17 | window.reloadAuthorized = reloadAuthorized;
18 | export { reloadAuthorized };
19 | export default Authorized;
20 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin/src/utils/utils.less:
--------------------------------------------------------------------------------
1 | // mixins for clearfix
2 | // ------------------------
3 | .clearfix() {
4 | zoom: 1;
5 | &::before,
6 | &::after {
7 | display: table;
8 | content: ' ';
9 | }
10 | &::after {
11 | clear: both;
12 | height: 0;
13 | font-size: 0;
14 | visibility: hidden;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin_api/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_finish/tyadmin_api/__init__.py
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin_api/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class XadminApiConfig(AppConfig):
5 | name = 'tyadmin_api'
6 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin_api/filters.py:
--------------------------------------------------------------------------------
1 | from django_filters import rest_framework as filters
2 | from tyadmin_api.custom import DateFromToRangeFilter
3 | from tyadmin_api.models import TyAdminSysLog, TyAdminEmailVerifyRecord
4 |
5 |
6 | class TyAdminSysLogFilter(filters.FilterSet):
7 | action_time = DateFromToRangeFilter(field_name="action_time")
8 |
9 | class Meta:
10 | model = TyAdminSysLog
11 | exclude = []
12 |
13 |
14 | class TyAdminEmailVerifyRecordFilter(filters.FilterSet):
15 | send_time = DateFromToRangeFilter(field_name="send_time")
16 |
17 | class Meta:
18 | model = TyAdminEmailVerifyRecord
19 | exclude = []
20 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin_api/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_finish/tyadmin_api/migrations/__init__.py
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin_api/settings.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_finish/tyadmin_api/settings.py
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin_api/test.py:
--------------------------------------------------------------------------------
1 | from tyadmin_api_cli.utils import init_django_env
2 |
3 | init_django_env("skyoms.settings")
4 | import django
5 | model_list = django.apps.apps.get_models()
6 | for one in model_list:
7 | print(one.objects.model._meta.object_name)
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin_api/ty_settings.py:
--------------------------------------------------------------------------------
1 | MAX_LIST_DISPLAY_COUNT = 6
2 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin_demo/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_finish/tyadmin_demo/__init__.py
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin_demo/asgi.py:
--------------------------------------------------------------------------------
1 | """
2 | ASGI config for tyadmin_demo project.
3 |
4 | It exposes the ASGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.asgi import get_asgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tyadmin_demo.settings')
15 |
16 | application = get_asgi_application()
17 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_finish/tyadmin_demo/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for tyadmin_demo project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tyadmin_demo.settings')
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/demo/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_init/demo/__init__.py
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/demo/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | # Register your models here.
4 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/demo/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class DemoConfig(AppConfig):
5 | name = 'demo'
6 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/demo/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_init/demo/migrations/__init__.py
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/demo/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/demo/views.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import render
2 |
3 | # Create your views here.
4 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/media/2020-11-30-f44ec51b-7709-43eb-b2bf-4b774c10956d-logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_init/media/2020-11-30-f44ec51b-7709-43eb-b2bf-4b774c10956d-logo.jpg
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/media/2020-11-30-fcbe0e2e-3909-4ad5-a5a5-69bc57fbaf9f-funpy.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_init/media/2020-11-30-fcbe0e2e-3909-4ad5-a5a5-69bc57fbaf9f-funpy.jpeg
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/media/funpy.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_init/media/funpy.jpeg
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/media/funpy_RRKdE2w.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_init/media/funpy_RRKdE2w.jpeg
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/media/funpy_dsWgUH7.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_init/media/funpy_dsWgUH7.jpeg
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/media/logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_init/media/logo.jpg
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/media/noImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_init/media/noImage.png
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/requirements.txt:
--------------------------------------------------------------------------------
1 | tyadmin-api-cli
2 | django-filter
3 | demjson
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/tyadmin_demo/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/demos/tyadmin_demo_init/tyadmin_demo/__init__.py
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/tyadmin_demo/asgi.py:
--------------------------------------------------------------------------------
1 | """
2 | ASGI config for tyadmin_demo project.
3 |
4 | It exposes the ASGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.asgi import get_asgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tyadmin_demo.settings')
15 |
16 | application = get_asgi_application()
17 |
--------------------------------------------------------------------------------
/demos/tyadmin_demo_init/tyadmin_demo/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for tyadmin_demo project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tyadmin_demo.settings')
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/__init__.py:
--------------------------------------------------------------------------------
1 | print("dev")
--------------------------------------------------------------------------------
/tyadmin_api_cli/adapters/__init__.py:
--------------------------------------------------------------------------------
1 | ADAPTER_DICT = {
2 | 'django_celery_beat': {
3 | 'PeriodicTask': ['task']
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/adapters/django_celery_beat_ty_admin.py:
--------------------------------------------------------------------------------
1 | from django.http import JsonResponse
2 |
3 | from tyadmin_api.custom import MtyCustomExecView
4 |
5 |
6 | class PeriodicTask_task(MtyCustomExecView):
7 | def get(self, request, *args, **kwargs):
8 | from django_celery_beat.admin import TaskSelectWidget
9 | ret = {}
10 | for one in TaskSelectWidget().choices:
11 | if one[0] != "":
12 | ret[one[0]]= one[1]
13 | return JsonResponse(ret)
14 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/antd/__init__.py
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/README.md:
--------------------------------------------------------------------------------
1 | # 由TyAdmin 自动生成, 使用Antd Pro V4。
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/config/defaultSettings.js:
--------------------------------------------------------------------------------
1 | const proSettings = {
2 | navTheme: 'light',
3 | // 拂晓蓝
4 | primaryColor: '#1890ff',
5 | layout: 'sidemenu',
6 | contentWidth: 'Fluid',
7 | fixedHeader: false,
8 | fixSiderbar: true,
9 | colorWeak: false,
10 | menu: {
11 | locale: true,
12 | },
13 | title: 'TyAdmin',
14 | pwa: false,
15 | iconfontUrl: '',
16 | };
17 | export default proSettings;
18 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/config/routes.js:
--------------------------------------------------------------------------------
1 | [
2 |
3 | ]
4 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | testURL: 'http://localhost:8000',
3 | testEnvironment: './tests/PuppeteerEnvironment',
4 | verbose: false,
5 | globals: {
6 | ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: false,
7 | localStorage: null,
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "emitDecoratorMetadata": true,
4 | "experimentalDecorators": true,
5 | "baseUrl": ".",
6 | "paths": {
7 | "@/*": ["./src/*"]
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/mock/route.js:
--------------------------------------------------------------------------------
1 | export default {
2 | '/api/auth_routes': {
3 | '/form/advanced-form': {
4 | authority: ['admin', 'user'],
5 | },
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/public/CNAME:
--------------------------------------------------------------------------------
1 | preview.pro.ant.design
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/public/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/antd_full_templates/public/favicon.png
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/public/home_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/antd_full_templates/public/home_bg.png
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/public/icons/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/antd_full_templates/public/icons/icon-128x128.png
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/public/icons/icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/antd_full_templates/public/icons/icon-192x192.png
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/public/icons/icon-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/antd_full_templates/public/icons/icon-512x512.png
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/Authorized/Authorized.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Result } from 'antd';
3 | import check from './CheckPermissions';
4 |
5 | const Authorized = ({
6 | children,
7 | authority,
8 | noMatch = (
9 |
14 | ),
15 | }) => {
16 | const childrenRender = typeof children === 'undefined' ? null : children;
17 | const dom = check(authority, childrenRender, noMatch);
18 | return <>{dom}>;
19 | };
20 |
21 | export default Authorized;
22 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/Authorized/index.jsx:
--------------------------------------------------------------------------------
1 | import Authorized from './Authorized';
2 | import Secured from './Secured';
3 | import check from './CheckPermissions';
4 | import renderAuthorize from './renderAuthorize';
5 |
6 | Authorized.Secured = Secured;
7 | Authorized.check = check;
8 | const RenderAuthorize = renderAuthorize(Authorized);
9 | export default RenderAuthorize;
10 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/DynamicIcon.js:
--------------------------------------------------------------------------------
1 | import loadable from "@loadable/component";
2 | var fistLetterUpper = function(str) {
3 | return str.charAt(0).toUpperCase()+str.slice(1);
4 | };
5 | const DynamicIcon = loadable(props =>{
6 | let iconType = ""
7 | if(props.type.includes("Outlined")){
8 | iconType = props.type
9 | }else {
10 | iconType = fistLetterUpper(props.type) + "Outlined"
11 | }
12 | // alert(iconType)
13 | // let iconType = fistLetterUpper(props.type)
14 | return import(`@ant-design/icons/es/icons/${iconType}.js`)
15 | .catch(err => import(`@ant-design/icons/es/icons/WarningOutlined.js`))
16 | })
17 |
18 | export default DynamicIcon;
19 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/Ellipsis/index.d.ts:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | export interface IEllipsisProps {
3 | tooltip?: boolean;
4 | length?: number;
5 | lines?: number;
6 | style?: React.CSSProperties;
7 | className?: string;
8 | fullWidthRecognition?: boolean;
9 | }
10 |
11 | export default class Ellipsis extends React.Component {}
12 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/Ellipsis/index.en-US.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Ellipsis
3 | cols: 1
4 | order: 10
5 | ---
6 |
7 | When the text is too long, the Ellipsis automatically shortens it according to its length or the maximum number of lines.
8 |
9 | ## API
10 |
11 | Property | Description | Type | Default
12 | ----|------|-----|------
13 | tooltip | tooltip for showing the full text content when hovering over | boolean | -
14 | length | maximum number of characters in the text before being truncated | number | -
15 | lines | maximum number of rows in the text before being truncated | number | `1`
16 | fullWidthRecognition | whether consider full-width character length as 2 when calculate string length | boolean | -
17 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/Ellipsis/index.less:
--------------------------------------------------------------------------------
1 | .ellipsis {
2 | overflow: hidden;
3 | display: inline-block;
4 | word-break: break-all;
5 | width: 100%;
6 | }
7 |
8 | .lines {
9 | position: relative;
10 | .shadow {
11 | display: block;
12 | position: relative;
13 | color: transparent;
14 | opacity: 0;
15 | z-index: -999;
16 | }
17 | }
18 |
19 | .lineClamp {
20 | position: relative;
21 | overflow: hidden;
22 | text-overflow: ellipsis;
23 | display: -webkit-box;
24 | }
25 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/Ellipsis/index.test.js:
--------------------------------------------------------------------------------
1 | import { getStrFullLength, cutStrByFullLength } from './index';
2 |
3 | describe('test calculateShowLength', () => {
4 | it('get full length', () => {
5 | expect(getStrFullLength('一二,a,')).toEqual(8);
6 | });
7 | it('cut str by full length', () => {
8 | expect(cutStrByFullLength('一二,a,', 7)).toEqual('一二,a');
9 | });
10 | it('cut str when length small', () => {
11 | expect(cutStrByFullLength('一22三', 5)).toEqual('一22');
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/Ellipsis/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Ellipsis
3 | subtitle: 文本自动省略号
4 | cols: 1
5 | order: 10
6 | ---
7 |
8 | 文本过长自动处理省略号,支持按照文本长度和最大行数两种方式截取。
9 |
10 | ## API
11 |
12 | 参数 | 说明 | 类型 | 默认值
13 | ----|------|-----|------
14 | tooltip | 移动到文本展示完整内容的提示 | boolean | -
15 | length | 在按照长度截取下的文本最大字符数,超过则截取省略 | number | -
16 | lines | 在按照行数截取下最大的行数,超过则截取省略 | number | `1`
17 | fullWidthRecognition | 是否将全角字符的长度视为2来计算字符串长度 | boolean | -
18 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/HeaderDropdown/index.jsx:
--------------------------------------------------------------------------------
1 | import { Dropdown } from 'antd';
2 | import React from 'react';
3 | import classNames from 'classnames';
4 | import styles from './index.less';
5 |
6 | const HeaderDropdown = ({ overlayClassName: cls, ...restProps }) => (
7 |
8 | );
9 |
10 | export default HeaderDropdown;
11 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/HeaderDropdown/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/es/style/themes/default.less';
2 |
3 | .container > * {
4 | background-color: @popover-bg;
5 | border-radius: 4px;
6 | box-shadow: @shadow-1-down;
7 | }
8 |
9 | @media screen and (max-width: @screen-xs) {
10 | .container {
11 | width: 100% !important;
12 | }
13 | .container > * {
14 | border-radius: 0 !important;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/Icon.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 | const Icon = ({type, ...rest}) => {
4 | const icons = require(`@ant-design/icons`);
5 | const Component = icons[type];
6 | return
7 | }
8 | export default Icon;
9 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/IconDisplay/icons.less:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/antd_full_templates/src/components/IconDisplay/icons.less
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/NoticeIcon/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/es/style/themes/default.less';
2 |
3 | .popover {
4 | position: relative;
5 | width: 336px;
6 | }
7 |
8 | .noticeButton {
9 | display: inline-block;
10 | cursor: pointer;
11 | transition: all 0.3s;
12 | }
13 | .icon {
14 | padding: 4px;
15 | vertical-align: middle;
16 | }
17 |
18 | .badge {
19 | font-size: 16px;
20 | }
21 |
22 | .tabs {
23 | :global {
24 | .ant-tabs-nav-list {
25 | margin: auto;
26 | }
27 |
28 | .ant-tabs-nav-scroll {
29 | text-align: center;
30 | }
31 | .ant-tabs-bar {
32 | margin-bottom: 0;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/PageLoading/index.jsx:
--------------------------------------------------------------------------------
1 | import { PageLoading } from '@ant-design/pro-layout'; // loading components from code split
2 | // https://umijs.org/plugin/umi-plugin-react.html#dynamicimport
3 |
4 | export default PageLoading;
5 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/UploadAvatar/index.less:
--------------------------------------------------------------------------------
1 | .container {
2 | :global {
3 | .avatar-uploader > .ant-upload {
4 | width: 128px;
5 | height: 128px;
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/components/UploadFileList/index.less:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/antd_full_templates/src/components/UploadFileList/index.less
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/e2e/__mocks__/antd-pro-merge-less.js:
--------------------------------------------------------------------------------
1 | export default undefined;
2 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/layouts/BlankLayout.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const Layout = ({ children }) => <>{children}>;
4 |
5 | export default Layout;
6 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/locales/en-US/component.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': 'Expand',
3 | 'component.tagSelect.collapse': 'Collapse',
4 | 'component.tagSelect.all': 'All',
5 | };
6 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/locales/en-US/pwa.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': 'You are offline now',
3 | 'app.pwa.serviceworker.updated': 'New content is available',
4 | 'app.pwa.serviceworker.updated.hint': 'Please press the "Refresh" button to reload current page',
5 | 'app.pwa.serviceworker.updated.ok': 'Refresh',
6 | };
7 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/locales/zh-CN/component.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': '展开',
3 | 'component.tagSelect.collapse': '收起',
4 | 'component.tagSelect.all': '全部',
5 | };
6 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/locales/zh-CN/pwa.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': '当前处于离线状态',
3 | 'app.pwa.serviceworker.updated': '有新内容',
4 | 'app.pwa.serviceworker.updated.hint': '请点击“刷新”按钮或者手动刷新页面',
5 | 'app.pwa.serviceworker.updated.ok': '刷新',
6 | };
7 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Ant Design Pro",
3 | "short_name": "Ant Design Pro",
4 | "display": "standalone",
5 | "start_url": "./?utm_source=homescreen",
6 | "theme_color": "#002140",
7 | "background_color": "#001529",
8 | "icons": [
9 | {
10 | "src": "icons/icon-192x192.png",
11 | "sizes": "192x192"
12 | },
13 | {
14 | "src": "icons/icon-128x128.png",
15 | "sizes": "128x128"
16 | },
17 | {
18 | "src": "icons/icon-512x512.png",
19 | "sizes": "512x512"
20 | }
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/404.jsx:
--------------------------------------------------------------------------------
1 | import { Button, Result } from 'antd';
2 | import React from 'react';
3 | import { history } from 'umi';
4 |
5 | const NoFoundPage = () => (
6 | history.push('/')}>
12 | Back Home
13 |
14 | }
15 | />
16 | );
17 |
18 | export default NoFoundPage;
19 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/AutoGenPage/placeholder.js:
--------------------------------------------------------------------------------
1 | alert("hi,mtianyan")
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/ChangePassword/service.js:
--------------------------------------------------------------------------------
1 | import request from 'umi-request';
2 |
3 | export async function changePassword(params) {
4 | return request('/api/xadmin/v1/change_password', {
5 | method: 'POST',
6 | data: { ...params },
7 | });
8 | }
9 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/Field/index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import styles from './index.less';
3 |
4 | const Field = ({ label, value, ...rest }) => (
5 |
6 | {label}
7 | {value}
8 |
9 | );
10 |
11 | export default Field;
12 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/Field/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/es/style/themes/default.less';
2 |
3 | .field {
4 | margin: 0;
5 | overflow: hidden;
6 | white-space: nowrap;
7 | text-overflow: ellipsis;
8 | .label,
9 | .number {
10 | font-size: @font-size-base;
11 | line-height: 22px;
12 | }
13 | .number {
14 | margin-left: 8px;
15 | color: @heading-color;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/TagCloud/index.less:
--------------------------------------------------------------------------------
1 | .tagCloud {
2 | overflow: hidden;
3 | canvas {
4 | transform-origin: 0 0;
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/TimelineChart/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/es/style/themes/default.less';
2 |
3 | .timelineChart {
4 | background: @component-background;
5 | }
6 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/WaterWave/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/es/style/themes/default.less';
2 |
3 | .waterWave {
4 | position: relative;
5 | display: inline-block;
6 | transform-origin: left;
7 | .text {
8 | position: absolute;
9 | top: 32px;
10 | left: 0;
11 | width: 100%;
12 | text-align: center;
13 | span {
14 | color: @text-color-secondary;
15 | font-size: 14px;
16 | line-height: 22px;
17 | }
18 | h4 {
19 | color: @heading-color;
20 | font-size: 24px;
21 | line-height: 32px;
22 | }
23 | }
24 | .waterWaveCanvasWrapper {
25 | transform: scale(0.5);
26 | transform-origin: 0 0;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/bizcharts.jsx:
--------------------------------------------------------------------------------
1 | import * as BizChart from 'bizcharts';
2 |
3 | export default BizChart;
4 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/DashBoard/components/Charts/index.less:
--------------------------------------------------------------------------------
1 | .miniChart {
2 | position: relative;
3 | width: 100%;
4 | .chartContent {
5 | position: absolute;
6 | bottom: -28px;
7 | width: 100%;
8 | > div {
9 | margin: 0 -5px;
10 | overflow: hidden;
11 | }
12 | }
13 | .chartLoading {
14 | position: absolute;
15 | top: 16px;
16 | left: 50%;
17 | margin-left: -7px;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/DashBoard/components/PageLoading/index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Spin } from 'antd'; // loading components from code split
3 | // https://umijs.org/plugin/umi-plugin-react.html#dynamicimport
4 |
5 | export default () => (
6 |
12 |
13 |
14 | );
15 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/EmailVerifyRecordList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/EmailVerifyRecordList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/TyAdminEmailVerifyRecordList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/TyAdminEmailVerifyRecordList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/TyAdminSysLogList/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/pages/TyAdminBuiltIn/TyAdminSysLogList/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/services/editor.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request';
2 | import { buildFileFormData, buildRichEditorFormData } from '@/utils/utils';
3 |
4 | export async function richEditUpload(params) {
5 | return request('/api/xadmin/v1/upload', {
6 | method: 'POST',
7 | data: params,
8 | });
9 | }
10 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/services/login.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request';
2 |
3 | export async function AccountLogin(params) {
4 | return request('/api/xadmin/v1/login/account', {
5 | method: 'POST',
6 | data: params,
7 | });
8 | }
9 |
10 | export async function getEmailCaptcha(email) {
11 | return request(`/api/xadmin/v1/sendEmailCaptcha?email=${email}`);
12 | }
13 |
14 | export async function getCode() {
15 | return request(
16 | '/api/xadmin/v1/captcha-generate', {
17 | method: 'GET',
18 | },
19 | );
20 | }
21 | export async function Logout() {
22 | return request(
23 | '/api/xadmin/v1/logout', {
24 | method: 'GET'
25 | }
26 | );
27 | }
28 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/services/user.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request';
2 |
3 | export async function query() {
4 | return request('/api/xadmin/v1/users');
5 | }
6 | export async function queryCurrent() {
7 | return request('/api/xadmin/v1/currentUser');
8 | }
9 | export async function queryNotices() {
10 | return request('/api/xadmin/v1/notices');
11 | }
12 |
13 | export async function queryMenu() {
14 | return request('/api/xadmin/v1/sys/menu');
15 | }
16 |
17 | export async function queryCount() {
18 | return request('/api/xadmin/v1/dashboard');
19 | }
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/utils/Authorized.js:
--------------------------------------------------------------------------------
1 | import RenderAuthorize from '@/components/Authorized';
2 | import { getAuthority } from './authority';
3 | /* eslint-disable eslint-comments/disable-enable-pair */
4 |
5 | /* eslint-disable import/no-mutable-exports */
6 |
7 | let Authorized = RenderAuthorize(getAuthority()); // Reload the rights component
8 |
9 | const reloadAuthorized = () => {
10 | Authorized = RenderAuthorize(getAuthority());
11 | };
12 | /**
13 | * hard code
14 | * block need it。
15 | */
16 |
17 | window.reloadAuthorized = reloadAuthorized;
18 | export { reloadAuthorized };
19 | export default Authorized;
20 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_full_templates/src/utils/utils.less:
--------------------------------------------------------------------------------
1 | // mixins for clearfix
2 | // ------------------------
3 | .clearfix() {
4 | zoom: 1;
5 | &::before,
6 | &::after {
7 | display: table;
8 | content: ' ';
9 | }
10 | &::after {
11 | clear: both;
12 | height: 0;
13 | font-size: 0;
14 | visibility: hidden;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_page_templates/base/components/CreateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const CreateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | >WIDTH_PLACEHOLDER<<
12 | onCancel={() => onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default CreateForm;
21 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_page_templates/base/components/UpdateForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 | const UpdateForm = props => {
5 | const { modalVisible, onCancel } = props;
6 | return (
7 | >WIDTH_PLACEHOLDER<<
12 | onCancel={() => onCancel()}
13 | footer={null}
14 | >
15 | {props.children}
16 |
17 | );
18 | };
19 |
20 | export default UpdateForm;
21 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/antd_page_templates/base/components/UpdatePasswordForm.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Modal } from 'antd';
3 |
4 |
5 | const UpdatePasswordForm = props => {
6 |
7 | const { updateModalVisible, onCancel, handleUpdate, userName } = props;
8 |
9 | return (
10 | onCancel()}
16 | >
17 | {props.children}
18 |
19 | );
20 | };
21 |
22 | export default UpdatePasswordForm;
23 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/contants.py:
--------------------------------------------------------------------------------
1 | MAIN_DISPLAY = "$显示字段$"
2 | MAIN_AVATAR = "$显示头像$"
3 | MAIN_PIC = "$显示图片$"
4 | SYS_LABELS = ['contenttypes','auth']
5 | INTENTION= ' '
--------------------------------------------------------------------------------
/tyadmin_api_cli/deal_xadmin.py:
--------------------------------------------------------------------------------
1 | from tyadmin_api_cli.utils import init_django_env
2 |
3 |
4 | def migration_from_xadmin(project_name_settings):
5 | init_django_env(project_name_settings)
6 | import xadmin
7 | for one, item in xadmin.site._registry.items():
8 | print(one._meta.object_name)
9 | print(item.list_display)
10 | print(item.list_filter)
11 | print(item.search_fields)
12 |
13 |
14 | if __name__ == '__main__':
15 | # TODO 提供xadmin迁移到TyAdmin的工具
16 | name = input("请输入项目settings位置:")
17 | migration_from_xadmin(name)
18 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/management/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/management/__init__.py
--------------------------------------------------------------------------------
/tyadmin_api_cli/management/commands/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/management/commands/__init__.py
--------------------------------------------------------------------------------
/tyadmin_api_cli/ty_admin_settings.py:
--------------------------------------------------------------------------------
1 | TY_ADMIN_CONFIG = {
2 | 'REWRITE': {
3 | 'auth': {
4 | 'Group': {
5 | 'permissions': {
6 | 'many_to_many': 'transfer'
7 | }
8 | }
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/tyadmin_api_cli/tyadmin_api_init/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/tyadmin_api_init/__init__.py
--------------------------------------------------------------------------------
/tyadmin_api_cli/tyadmin_api_init/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class XadminApiConfig(AppConfig):
5 | name = 'tyadmin_api'
6 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/tyadmin_api_init/filters.py:
--------------------------------------------------------------------------------
1 | from django_filters import rest_framework as filters
2 | from tyadmin_api.custom import DateFromToRangeFilter
3 | from tyadmin_api.models import TyAdminSysLog, TyAdminEmailVerifyRecord
4 |
5 |
6 | class TyAdminSysLogFilter(filters.FilterSet):
7 | action_time = DateFromToRangeFilter(field_name="action_time")
8 |
9 | class Meta:
10 | model = TyAdminSysLog
11 | exclude = []
12 |
13 |
14 | class TyAdminEmailVerifyRecordFilter(filters.FilterSet):
15 | send_time = DateFromToRangeFilter(field_name="send_time")
16 |
17 | class Meta:
18 | model = TyAdminEmailVerifyRecord
19 | exclude = []
20 |
--------------------------------------------------------------------------------
/tyadmin_api_cli/tyadmin_api_init/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/tyadmin_api_init/migrations/__init__.py
--------------------------------------------------------------------------------
/tyadmin_api_cli/tyadmin_api_init/settings.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mtianyan/django-react-tyadmin/3e74d63fe9233b8d703f6d21b27a5289308bd773/tyadmin_api_cli/tyadmin_api_init/settings.py
--------------------------------------------------------------------------------
/tyadmin_api_cli/tyadmin_api_init/test.py:
--------------------------------------------------------------------------------
1 | from tyadmin_api_cli.utils import init_django_env
2 |
3 | init_django_env("skyoms.settings")
4 | import django
5 | model_list = django.apps.apps.get_models()
6 | for one in model_list:
7 | print(one.objects.model._meta.object_name)
--------------------------------------------------------------------------------
/tyadmin_api_cli/tyadmin_api_init/ty_settings.py:
--------------------------------------------------------------------------------
1 | MAX_LIST_DISPLAY_COUNT = 6
2 |
--------------------------------------------------------------------------------