npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

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