Commit 12e928eb authored by Bill's avatar Bill

fix: 修改版本号提示信息

parent 3a7d5333
......@@ -3,7 +3,7 @@ import NiceForm from '@/components/NiceForm';
import ReutrnEle from '@/components/ReturnEle';
import { usePageStatus } from '@/hooks/usePageStatus';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Button, Card, message } from 'antd';
import { Button, Card, message, Tooltip } from 'antd';
import { history } from 'umi';
import schema from './schema';
import { Radio } from '@formily/antd-components'
......@@ -15,6 +15,7 @@ import { PublicApi } from '@/services/api';
import { GetManageAppVersionFindResponse } from '@/services/PlatformApi';
import { omit } from '@/utils';
import BraftEditor from 'braft-editor';
import { QuestionCircleOutlined } from '@ant-design/icons';
const formActions = createFormActions();
......@@ -46,7 +47,6 @@ function range(start: number, end: number) {
const AppVersionAdd = () => {
const { id, preview } = usePageStatus();
console.log(preview);
const isEdit = id && !preview;
const isAdd = !id && !preview;
const isView = id && preview;
......@@ -94,6 +94,30 @@ const AppVersionAdd = () => {
}
const createRichTextUtils = () => {
return {
text(...args) {
return React.createElement('span', {}, ...args)
},
help(text, offset = 3) {
return React.createElement(
Tooltip,
{ title: text },
<QuestionCircleOutlined
style={{ margin: '0 3px', cursor: 'default', marginLeft: offset }}
/>
)
},
tips(text, tips) {
return React.createElement(
Tooltip,
{ title: tips },
<span style={{ margin: '0 3px', cursor: 'default' }}>{text}</span>
)
}
}
}
const disabledDate = (current: Moment) => {
return current < lastDay.endOf('day');
}
......@@ -123,7 +147,8 @@ const AppVersionAdd = () => {
value={initialValue}
expressionScope={{
disabledDate,
disabledTime
disabledTime,
...createRichTextUtils()
}}
actions={formActions}
schema={schema}
......
import { QuestionCircleOutlined } from '@ant-design/icons';
import { ISchema } from '@formily/antd';
import { Upload, message } from 'antd';
import { Upload, message, Tooltip } from 'antd';
import { UploadFile } from 'antd/lib/upload/interface';
const schema: ISchema = {
......@@ -17,7 +18,7 @@ const schema: ISchema = {
},
properties: {
version: {
title: '版本号',
title: `{{ text('版本号',help('当前填写的版本号需要跟上传的安装包一致')) }}`,
type: 'string',
'x-rules': [
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment