x-pro-components
v1.1.19
Published
``` 项目 layout.tsx 执行------>>>: import { useIntl } from '@umijs/max' window.intl = useIntl() 入口文件 app.tsx 执行------>>>: token相关: window.LocalKey = 'locale' window.TokenKey = 'token' window.RedirectKey = 'main' window.RedirectUrl = '/login' window.CompanyIdK
Downloads
576
Readme
注意事项(组件内需要方法:)
项目 layout.tsx 执行------>>>:
import { useIntl } from '@umijs/max'
window.intl = useIntl()
入口文件 app.tsx 执行------>>>:
token相关:
window.LocalKey = 'locale'
window.TokenKey = 'token'
window.RedirectKey = 'main'
window.RedirectUrl = '/login'
window.CompanyIdKey = 'companyId'
window.TenantIdentificationKey = 'tenantIdentification'
window.SaasTokenKey = 'saasToken'
iconfont相关:
window.scriptUrl = ['//at.alicdn.com/t/c/font_4059265_esvaka7d6de.js']
request相关(todo):
window.baseUrl = '/api/web'
window.baseUrlManage = '/api/manage'
window.codes = {}
window.zhCnMsg = {}
window.getCodeMessage = (code: number) => {
return 'string'
}
组件具体参数参考 ProComponents
{
BeautifulDnd,
IconFont,
LinkButton,
PlusButton,
PrimaryButton,
StartEditableNode,
XButton,
XConfirmModal,
XConfirmRequestModal,
XDeleteModal,
XDeleteRequestModal,
XEditableProTable,
XExpandableProTable,
XModalForm,
XPageHeader,
XProDescriptions,
XProForm,
XProFormCascader,
XProFormCheckbox,
XProFormDatePicker,
XProFormDateRangePicker,
XProFormDateTimePicker,
XProFormDateTimeRangePicker,
XProFormDigit,
XProFormDigitRange,
XProFormMoney,
XProFormRadio,
XProFormRate,
XProFormSegmented,
XProFormSelect,
XProFormSlider,
XProFormSwitch,
XProFormText,
XProFormTextArea,
XProFormTextPassword,
XProFormTimePicker,
XProFormTimeRangePicker,
XProFormTreeSelect,
XProFormUpload,
XProTable,
XSelect,
XSelectLang,
XTransfer,
XUpload,
XWarnModal,
XWarnRequestModal,
// 工具类
utils, constd, cookies, forms, regular, time, tool, uuid
} from 'x-pro-components'
constd
request相关(todo):
cookies
getCookie,setCookie,removeCookie,removeAllCookie,
getExpiresIn,setExpiresIn,removeExpiresIn
forms
creatRules, optional, optionalInput, required, requiredDigitRange, requiredInput, requiredSelect,
getFieldsValue, resetFields, setFieldsValue
time
export const TIME_START_FORMAT = '00:00:00'
export const TIME_END_FORMAT = '23:59:59'
export const DATE_FORMAT = 'YYYY-MM-DD'
export const DATE_FORMAT_TIME = 'YYYY-MM-DD HH:mm:ss'
export const transStartTime = (time: string) => `${time} ${TIME_START_FORMAT}`
export const transEndTime = (time: string) => `${time} ${TIME_END_FORMAT}`
获取默认日期格式 getDateFormat
获取默认日期格式 getDateFormatMini
获取默认时间格式 getTimeFormat
获取默认时间格式 getTimeFormatUtil
开始日期时间转换 getTimeStartFormatUtil
获取默认时间格式 getTimeFormatMini
格式化日期,不指定格式时使用默认日期格式 formatDate
格式化时间,不指定格式时使用默认时间格式 formatTime
格式化时间,不指定格式时使用默认时间格式 formatTimeUtil
获取当前日期的 2020-05-18 || Jun 2, 2020 getStartOfDate
tool
分页器 pagination
比较两个对象之间的差异 difference
复制到粘贴板 copyToClipboard
文件下载-url downloadUrlFile
文件下载-blob downloadBlobFile
windows系统(windows)客户端 isWindows
苹果系统(mac os)客户端 isiOS
获取query getQuery
是否来源crm isCrm
通用的请求接口的方法 fetchRequestDone(request)
通用的请求接口的方法 fetchRequestData(request)
通用的列表请求接口的方法 fetchDoneList(request,mark)
uuid
uuid
UnixUuid