You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
memos/web/src/helpers/consts.ts

24 lines
610 B
TypeScript

4 years ago
// 移动端样式适配额外类名
export const SHOW_SIDERBAR_MOBILE_CLASSNAME = "mobile-show-sidebar";
// 默认动画持续时长
export const ANIMATION_DURATION = 200;
// toast 动画持续时长
export const TOAST_ANIMATION_DURATION = 400;
// 一天的毫秒数
export const DAILY_TIMESTAMP = 3600 * 24 * 1000;
// 标签 正则
export const TAG_REG = /#\s(.+?)\s/g;
// URL 正则
export const LINK_REG = /(https?:\/\/[^\s<\\*>']+)/g;
// 图片 正则
export const IMAGE_URL_REG = /([^\s<\\*>']+\.(jpeg|jpg|gif|png|svg))/g;
4 years ago
// memo 关联正则
export const MEMO_LINK_REG = /\[@(.+?)\]\((.+?)\)/g;