From b1ae997ee83bc19c6800d4704fc5728030c6f768 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Thu, 2 Sep 2021 09:53:41 +0800 Subject: [PATCH] style: format scripts --- antd-tools/generator-types/index.js | 1 + antd-tools/generator-types/src/formatter.ts | 7 +- antd-tools/generator-types/src/index.ts | 4 +- antd-tools/generator-types/src/type.ts | 2 +- antd-tools/generator-types/src/utils.ts | 2 +- antd-tools/generator-types/src/vetur.ts | 2 +- antd-tools/generator-types/src/web-types.ts | 2 +- package.json | 10 +- plugin/md/markdown/plugins/header.ts | 2 +- plugin/md/markdown/plugins/highlightLines.ts | 2 +- plugin/md/markdown/plugins/lineNumbers.ts | 2 +- plugin/md/markdown/plugins/link.ts | 2 +- plugin/md/markdown/plugins/preWrapper.ts | 4 +- plugin/md/markdown/plugins/slugify.ts | 3 +- plugin/md/markdown/plugins/snippet.ts | 2 +- scripts/run.js | 3 + site/src/hooks/useMenus.ts | 2 +- site/src/router/demoRoutes.js | 319 ------------------- site/src/views/user/login/index.vue | 2 +- tsconfig.json | 11 +- v2-doc | 1 - 21 files changed, 32 insertions(+), 353 deletions(-) delete mode 100644 site/src/router/demoRoutes.js delete mode 160000 v2-doc diff --git a/antd-tools/generator-types/index.js b/antd-tools/generator-types/index.js index 90be7a5e7..d36eb2087 100644 --- a/antd-tools/generator-types/index.js +++ b/antd-tools/generator-types/index.js @@ -13,6 +13,7 @@ try { outputDir: path.resolve(rootPath, './vetur'), tagPrefix: 'a-', }); + // eslint-disable-next-line no-console console.log('generator types success'); } catch (e) { console.error('generator types error', e); diff --git a/antd-tools/generator-types/src/formatter.ts b/antd-tools/generator-types/src/formatter.ts index d70f5510a..5a17d0082 100644 --- a/antd-tools/generator-types/src/formatter.ts +++ b/antd-tools/generator-types/src/formatter.ts @@ -1,7 +1,6 @@ -/* eslint-disable no-continue */ -import { Artical, Articals } from './parser'; +import type { Articals } from './parser'; import { formatType, removeVersion, toKebabCase } from './utils'; -import { VueTag } from './type'; +import type { VueTag } from './type'; function getComponentName(name: string, tagPrefix: string) { if (name) { @@ -35,7 +34,7 @@ function parserProps(tag: VueTag, line: any) { }); } -export function formatter(articals: Articals, componentName: string, tagPrefix: string = '') { +export function formatter(articals: Articals, componentName: string, tagPrefix = '') { if (!articals.length) { return; } diff --git a/antd-tools/generator-types/src/index.ts b/antd-tools/generator-types/src/index.ts index 62598960e..3536a8808 100644 --- a/antd-tools/generator-types/src/index.ts +++ b/antd-tools/generator-types/src/index.ts @@ -1,10 +1,10 @@ import glob from 'fast-glob'; -import { join, dirname, basename } from 'path'; +import { join, dirname } from 'path'; import { mdParser } from './parser'; import { formatter } from './formatter'; import { genWebTypes } from './web-types'; import { readFileSync, outputFileSync } from 'fs-extra'; -import { Options, VueTag } from './type'; +import type { Options, VueTag } from './type'; import { normalizePath, getComponentName } from './utils'; import { genVeturTags, genVeturAttributes } from './vetur'; diff --git a/antd-tools/generator-types/src/type.ts b/antd-tools/generator-types/src/type.ts index 248eb98ab..503c9cf56 100644 --- a/antd-tools/generator-types/src/type.ts +++ b/antd-tools/generator-types/src/type.ts @@ -1,4 +1,4 @@ -import { PathLike } from 'fs'; +import type { PathLike } from 'fs'; export type VueSlot = { name: string; diff --git a/antd-tools/generator-types/src/utils.ts b/antd-tools/generator-types/src/utils.ts index 67fc1e8a6..4b0aa3f80 100644 --- a/antd-tools/generator-types/src/utils.ts +++ b/antd-tools/generator-types/src/utils.ts @@ -18,7 +18,7 @@ export function formatType(type: string) { } export function getComponentName(name: string) { - let title = name + const title = name .split('-') .map(it => it.substring(0, 1) + it.substring(1)) .join(''); diff --git a/antd-tools/generator-types/src/vetur.ts b/antd-tools/generator-types/src/vetur.ts index 7d2ba38d1..da3445823 100644 --- a/antd-tools/generator-types/src/vetur.ts +++ b/antd-tools/generator-types/src/vetur.ts @@ -1,4 +1,4 @@ -import { VueTag, VeturTags, VeturAttributes } from './type'; +import type { VueTag, VeturTags, VeturAttributes } from './type'; export function genVeturTags(tags: VueTag[]) { const veturTags: VeturTags = {}; diff --git a/antd-tools/generator-types/src/web-types.ts b/antd-tools/generator-types/src/web-types.ts index 1ac46af41..c2ed48d04 100644 --- a/antd-tools/generator-types/src/web-types.ts +++ b/antd-tools/generator-types/src/web-types.ts @@ -1,4 +1,4 @@ -import { VueTag, Options } from './type'; +import type { VueTag, Options } from './type'; // create web-types.json to provide autocomplete in JetBrains IDEs export function genWebTypes(tags: VueTag[], options: Options) { diff --git a/package.json b/package.json index 91a7a13f2..dfb4d04c6 100644 --- a/package.json +++ b/package.json @@ -42,12 +42,16 @@ "prettier": "prettier -c --write '**/*'", "pretty-quick": "pretty-quick", "dist": "node --max_old_space_size=8192 antd-tools/cli/run.js dist", - "lint": "eslint -c ./.eslintrc.js --fix --ext .jsx,.js,.ts,.tsx ./components", - "lint:demo": "eslint -c ./.eslintrc.js --fix --ext .vue ./components", + "lint": "npm run tsc && npm run lint:demo && npm run lint:md && npm run lint:script && npm run lint:site", + "lint:components": "eslint --fix --ext .jsx,.js,.ts,.tsx ./components", + "lint:demo": "eslint --fix components/*/demo/*.vue", + "lint:md": "eslint --fix *.md", + "lint:script": "eslint . --ext '.js,.jsx,.ts,.tsx'", "lint:site": "eslint -c ./.eslintrc.js --fix --ext .jsx,.js,.ts,.tsx,vue ./site", "lint:style": "stylelint \"{site,components}/**/*.less\" --syntax less", "codecov": "codecov", - "routes": "node site/scripts/genrateRoutes.js" + "routes": "node site/scripts/genrateRoutes.js", + "tsc": "tsc --noEmit" }, "repository": { "type": "git", diff --git a/plugin/md/markdown/plugins/header.ts b/plugin/md/markdown/plugins/header.ts index f120f072d..9f69930d7 100644 --- a/plugin/md/markdown/plugins/header.ts +++ b/plugin/md/markdown/plugins/header.ts @@ -4,7 +4,7 @@ import { deeplyParseHeader } from '../../utils/parseHeader'; import { slugify } from './slugify'; export const extractHeaderPlugin = (md: MarkdownIt, include = ['h2', 'h3']) => { - md.renderer.rules.heading_open = (tokens, i, options, env, self) => { + md.renderer.rules.heading_open = (tokens, i, options, _env, self) => { const token = tokens[i]; if (include.includes(token.tag)) { const title = tokens[i + 1].content; diff --git a/plugin/md/markdown/plugins/highlightLines.ts b/plugin/md/markdown/plugins/highlightLines.ts index d72a55b72..f2f22b8d8 100644 --- a/plugin/md/markdown/plugins/highlightLines.ts +++ b/plugin/md/markdown/plugins/highlightLines.ts @@ -28,7 +28,7 @@ export const highlightLinePlugin = (md: MarkdownIt) => { const rawCode = code.replace(wrapperRE, ''); const highlightLinesCode = rawCode .split('\n') - .map((split, index) => { + .map((_split, index) => { const lineNumber = index + 1; const inRange = lineNumbers.some(([start, end]) => { if (start && end) { diff --git a/plugin/md/markdown/plugins/lineNumbers.ts b/plugin/md/markdown/plugins/lineNumbers.ts index 99d6ff159..968e5c233 100644 --- a/plugin/md/markdown/plugins/lineNumbers.ts +++ b/plugin/md/markdown/plugins/lineNumbers.ts @@ -11,7 +11,7 @@ export const lineNumberPlugin = (md: MarkdownIt) => { const lines = code.split('\n'); const lineNumbersCode = [...Array(lines.length - 1)] - .map((line, index) => `${index + 1}
`) + .map((_line, index) => `${index + 1}
`) .join(''); const lineNumbersWrapperCode = `
${lineNumbersCode}
`; diff --git a/plugin/md/markdown/plugins/link.ts b/plugin/md/markdown/plugins/link.ts index e4021d50f..164f521a7 100644 --- a/plugin/md/markdown/plugins/link.ts +++ b/plugin/md/markdown/plugins/link.ts @@ -9,7 +9,7 @@ import { URL } from 'url'; const indexRE = /(^|.*\/)index.md(#?.*)$/i; export const linkPlugin = (md: MarkdownIt, externalAttrs: Record) => { - md.renderer.rules.link_open = (tokens, idx, options, env, self) => { + md.renderer.rules.link_open = (tokens, idx, options, _env, self) => { const token = tokens[idx]; const hrefIndex = token.attrIndex('href'); if (hrefIndex >= 0) { diff --git a/plugin/md/markdown/plugins/preWrapper.ts b/plugin/md/markdown/plugins/preWrapper.ts index dc40ec92c..2ae3f0045 100644 --- a/plugin/md/markdown/plugins/preWrapper.ts +++ b/plugin/md/markdown/plugins/preWrapper.ts @@ -7,8 +7,8 @@ // 3. // 4. -import MarkdownIt from 'markdown-it'; -import { MarkdownParsedData } from '../markdown'; +import type MarkdownIt from 'markdown-it'; +import type { MarkdownParsedData } from '../markdown'; export const preWrapperPlugin = (md: MarkdownIt) => { const fence = md.renderer.rules.fence!; diff --git a/plugin/md/markdown/plugins/slugify.ts b/plugin/md/markdown/plugins/slugify.ts index bb5f04ee3..63888cb70 100644 --- a/plugin/md/markdown/plugins/slugify.ts +++ b/plugin/md/markdown/plugins/slugify.ts @@ -1,6 +1,7 @@ // string.js slugify drops non ascii chars so we have to // use a custom implementation here -const removeDiacritics = require('diacritics').remove; +import diacritics from 'diacritics'; +const removeDiacritics = diacritics.remove; // eslint-disable-next-line no-control-regex const rControl = /[\u0000-\u001f]/g; const rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'<>,.?/]+/g; diff --git a/plugin/md/markdown/plugins/snippet.ts b/plugin/md/markdown/plugins/snippet.ts index 8818cba3d..09394e56b 100644 --- a/plugin/md/markdown/plugins/snippet.ts +++ b/plugin/md/markdown/plugins/snippet.ts @@ -3,7 +3,7 @@ import type MarkdownIt from 'markdown-it'; import type { RuleBlock } from 'markdown-it/lib/parser_block'; export const snippetPlugin = (md: MarkdownIt, root: string) => { - const parser: RuleBlock = (state, startLine, endLine, silent) => { + const parser: RuleBlock = (state, startLine, _endLine, silent) => { const CH = '<'.charCodeAt(0); const pos = state.bMarks[startLine] + state.tShift[startLine]; const max = state.eMarks[startLine]; diff --git a/scripts/run.js b/scripts/run.js index fabe1f657..fc6ab5128 100644 --- a/scripts/run.js +++ b/scripts/run.js @@ -8,7 +8,9 @@ const gulp = require('gulp'); const program = require('commander'); program.on('--help', () => { + // eslint-disable-next-line no-console console.log(' Usage:'.to.bold.blue.color); + // eslint-disable-next-line no-console console.log(); }); @@ -41,6 +43,7 @@ const task = program.args[0]; if (!task) { program.help(); } else { + // eslint-disable-next-line no-console console.log('scripts run', task); require('./gulpfile'); diff --git a/site/src/hooks/useMenus.ts b/site/src/hooks/useMenus.ts index 70c240808..caf74eb3c 100644 --- a/site/src/hooks/useMenus.ts +++ b/site/src/hooks/useMenus.ts @@ -34,7 +34,7 @@ const useMenus = (): { const inCategory = r.meta && r.meta.category && - r.meta.category.toLowerCase() === category && + (r.meta.category as string).toLowerCase() === category && !pattern.test(r.path); if (inCategory && category === 'docs') { if (isZhCN) { diff --git a/site/src/router/demoRoutes.js b/site/src/router/demoRoutes.js deleted file mode 100644 index e034d6502..000000000 --- a/site/src/router/demoRoutes.js +++ /dev/null @@ -1,319 +0,0 @@ - -export default [ - - { - path: 'affix:lang(-cn)?', - meta: {"category":"Components","type":"导航","title":"Affix","cover":"https://gw.alipayobjects.com/zos/alicdn/tX6-md4H6/Affix.svg","subtitle":"固钉"}, - component: () => import('../../../components/affix/demo/index.vue'), - }, - { - path: 'alert:lang(-cn)?', - meta: {"category":"Components","type":"反馈","title":"Alert","cover":"https://gw.alipayobjects.com/zos/alicdn/8emPa3fjl/Alert.svg","subtitle":"警告提示"}, - component: () => import('../../../components/alert/demo/index.vue'), - }, - { - path: 'auto-complete:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","cols":2,"title":"AutoComplete","cover":"https://gw.alipayobjects.com/zos/alicdn/qtJm4yt45/AutoComplete.svg","subtitle":"自动完成"}, - component: () => import('../../../components/auto-complete/demo/index.vue'), - }, - { - path: 'avatar:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Avatar","cover":"https://gw.alipayobjects.com/zos/antfincdn/aBcnbw68hP/Avatar.svg","subtitle":"头像"}, - component: () => import('../../../components/avatar/demo/index.vue'), - }, - { - path: 'back-top:lang(-cn)?', - meta: {"category":"Components","type":"其他","title":"BackTop","cover":"https://gw.alipayobjects.com/zos/alicdn/tJZ5jbTwX/BackTop.svg","subtitle":"回到顶部"}, - component: () => import('../../../components/back-top/demo/index.vue'), - }, - { - path: 'badge:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Badge","cover":"https://gw.alipayobjects.com/zos/antfincdn/6%26GF9WHwvY/Badge.svg","subtitle":"徽标数"}, - component: () => import('../../../components/badge/demo/index.vue'), - }, - { - path: 'breadcrumb:lang(-cn)?', - meta: {"category":"Components","type":"导航","title":"Breadcrumb","cover":"https://gw.alipayobjects.com/zos/alicdn/9Ltop8JwH/Breadcrumb.svg","subtitle":"面包屑"}, - component: () => import('../../../components/breadcrumb/demo/index.vue'), - }, - { - path: 'button:lang(-cn)?', - meta: {"category":"Components","type":"通用","title":"Button","cover":"https://gw.alipayobjects.com/zos/alicdn/fNUKzY1sk/Button.svg","subtitle":"按钮"}, - component: () => import('../../../components/button/demo/index.vue'), - }, - { - path: 'anchor:lang(-cn)?', - meta: {"category":"Components","type":"其他","cols":2,"title":"Anchor","cover":"https://gw.alipayobjects.com/zos/alicdn/_1-C1JwsC/Anchor.svg","subtitle":"锚点"}, - component: () => import('../../../components/anchor/demo/index.vue'), - }, - { - path: 'calendar:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Calendar","cover":"https://gw.alipayobjects.com/zos/antfincdn/dPQmLq08DI/Calendar.svg","subtitle":"日历"}, - component: () => import('../../../components/calendar/demo/index.vue'), - }, - { - path: 'card:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Card","cover":"https://gw.alipayobjects.com/zos/antfincdn/NqXt8DJhky/Card.svg","subtitle":"卡片"}, - component: () => import('../../../components/card/demo/index.vue'), - }, - { - path: 'carousel:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Carousel","cover":"https://gw.alipayobjects.com/zos/antfincdn/%24C9tmj978R/Carousel.svg","subtitle":"走马灯"}, - component: () => import('../../../components/carousel/demo/index.vue'), - }, - { - path: 'cascader:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"Cascader","cover":"https://gw.alipayobjects.com/zos/alicdn/UdS8y8xyZ/Cascader.svg","subtitle":"级联选择"}, - component: () => import('../../../components/cascader/demo/index.vue'), - }, - { - path: 'checkbox:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"Checkbox","cover":"https://gw.alipayobjects.com/zos/alicdn/8nbVbHEm_/CheckBox.svg","subtitle":"多选框"}, - component: () => import('../../../components/checkbox/demo/index.vue'), - }, - { - path: 'collapse:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Collapse","cover":"https://gw.alipayobjects.com/zos/alicdn/IxH16B9RD/Collapse.svg","subtitle":"折叠面板"}, - component: () => import('../../../components/collapse/demo/index.vue'), - }, - { - path: 'comment:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Comment","cover":"https://gw.alipayobjects.com/zos/alicdn/ILhxpGzBO/Comment.svg","subtitle":"评论"}, - component: () => import('../../../components/comment/demo/index.vue'), - }, - { - path: 'config-provider:lang(-cn)?', - meta: {"category":"Components","type":"其他","cols":1,"title":"ConfigProvider","cover":"https://gw.alipayobjects.com/zos/alicdn/kegYxl1wj/ConfigProvider.svg","subtitle":"全局化配置"}, - component: () => import('../../../components/config-provider/demo/index.vue'), - }, - { - path: 'date-picker:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"DatePicker","cover":"https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg","subtitle":"日期选择框"}, - component: () => import('../../../components/date-picker/demo/index.vue'), - }, - { - path: 'descriptions:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Descriptions","cover":"https://gw.alipayobjects.com/zos/alicdn/MjtG9_FOI/Descriptions.svg","subtitle":"描述列表"}, - component: () => import('../../../components/descriptions/demo/index.vue'), - }, - { - path: 'divider:lang(-cn)?', - meta: {"category":"Components","type":"布局","title":"Divider","cover":"https://gw.alipayobjects.com/zos/alicdn/5swjECahe/Divider.svg","subtitle":"分割线"}, - component: () => import('../../../components/divider/demo/index.vue'), - }, - { - path: 'drawer:lang(-cn)?', - meta: {"category":"Components","type":"反馈","title":"Drawer","cover":"https://gw.alipayobjects.com/zos/alicdn/7z8NJQhFb/Drawer.svg","subtitle":"抽屉"}, - component: () => import('../../../components/drawer/demo/index.vue'), - }, - { - path: 'dropdown:lang(-cn)?', - meta: {"category":"Components","type":"导航","title":"Dropdown","cover":"https://gw.alipayobjects.com/zos/alicdn/eedWN59yJ/Dropdown.svg","subtitle":"下拉菜单"}, - component: () => import('../../../components/dropdown/demo/index.vue'), - }, - { - path: 'empty:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Empty","cover":"https://gw.alipayobjects.com/zos/alicdn/MNbKfLBVb/Empty.svg","subtitle":"空状态"}, - component: () => import('../../../components/empty/demo/index.vue'), - }, - { - path: 'form:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","cols":1,"title":"Form","cover":"https://gw.alipayobjects.com/zos/alicdn/ORmcdeaoO/Form.svg","subtitle":"表单"}, - component: () => import('../../../components/form/demo/index.vue'), - }, - { - path: 'grid:lang(-cn)?', - meta: {"category":"Components","type":"布局","cols":1,"title":"Grid","cover":"https://gw.alipayobjects.com/zos/alicdn/5rWLU27so/Grid.svg","subtitle":"栅格"}, - component: () => import('../../../components/grid/demo/index.vue'), - }, - { - path: 'icon:lang(-cn)?', - meta: {"category":"Components","type":"通用","title":"Icon","cover":"https://gw.alipayobjects.com/zos/alicdn/rrwbSt3FQ/Icon.svg","subtitle":"图标"}, - component: () => import('../../../components/icon/demo/index.vue'), - }, - { - path: 'image:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Image","cover":"https://gw.alipayobjects.com/zos/antfincdn/D1dXz9PZqa/image.svg","subtitle":"图片"}, - component: () => import('../../../components/image/demo/index.vue'), - }, - { - path: 'input:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"Input","cover":"https://gw.alipayobjects.com/zos/alicdn/xS9YEJhfe/Input.svg","subtitle":"输入框"}, - component: () => import('../../../components/input/demo/index.vue'), - }, - { - path: 'input-number:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"InputNumber","cover":"https://gw.alipayobjects.com/zos/alicdn/XOS8qZ0kU/InputNumber.svg","subtitle":"数字输入框"}, - component: () => import('../../../components/input-number/demo/index.vue'), - }, - { - path: 'layout:lang(-cn)?', - meta: {"category":"Components","type":"布局","cols":1,"title":"Layout","cover":"https://gw.alipayobjects.com/zos/alicdn/hzEndUVEx/Layout.svg","subtitle":"布局"}, - component: () => import('../../../components/layout/demo/index.vue'), - }, - { - path: 'list:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"List","cover":"https://gw.alipayobjects.com/zos/alicdn/5FrZKStG_/List.svg","subtitle":"列表"}, - component: () => import('../../../components/list/demo/index.vue'), - }, - { - path: 'mentions:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"Mentions","cover":"https://gw.alipayobjects.com/zos/alicdn/jPE-itMFM/Mentions.svg","subtitle":"提及"}, - component: () => import('../../../components/mentions/demo/index.vue'), - }, - { - path: 'menu:lang(-cn)?', - meta: {"category":"Components","cols":1,"type":"导航","title":"Menu","cover":"https://gw.alipayobjects.com/zos/alicdn/3XZcjGpvK/Menu.svg","subtitle":"导航菜单"}, - component: () => import('../../../components/menu/demo/index.vue'), - }, - { - path: 'message:lang(-cn)?', - meta: {"category":"Components","type":"反馈","title":"Message","cover":"https://gw.alipayobjects.com/zos/alicdn/hAkKTIW0K/Message.svg","subtitle":"全局提示"}, - component: () => import('../../../components/message/demo/index.vue'), - }, - { - path: 'modal:lang(-cn)?', - meta: {"category":"Components","type":"反馈","title":"Modal","cover":"https://gw.alipayobjects.com/zos/alicdn/3StSdUlSH/Modal.svg","subtitle":"对话框"}, - component: () => import('../../../components/modal/demo/index.vue'), - }, - { - path: 'notification:lang(-cn)?', - meta: {"category":"Components","type":"反馈","title":"Notification","cover":"https://gw.alipayobjects.com/zos/alicdn/Jxm5nw61w/Notification.svg","subtitle":"通知提醒框"}, - component: () => import('../../../components/notification/demo/index.vue'), - }, - { - path: 'page-header:lang(-cn)?', - meta: {"category":"Components","type":"导航","title":"PageHeader","cols":1,"subtitle":"页头","cover":"https://gw.alipayobjects.com/zos/alicdn/6bKE0Cq0R/PageHeader.svg"}, - component: () => import('../../../components/page-header/demo/index.vue'), - }, - { - path: 'pagination:lang(-cn)?', - meta: {"category":"Components","type":"导航","title":"Pagination","cols":1,"cover":"https://gw.alipayobjects.com/zos/alicdn/1vqv2bj68/Pagination.svg","subtitle":"分页"}, - component: () => import('../../../components/pagination/demo/index.vue'), - }, - { - path: 'popconfirm:lang(-cn)?', - meta: {"category":"Components","type":"反馈","title":"Popconfirm","cover":"https://gw.alipayobjects.com/zos/alicdn/fjMCD9xRq/Popconfirm.svg","subtitle":"气泡确认框"}, - component: () => import('../../../components/popconfirm/demo/index.vue'), - }, - { - path: 'popover:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Popover","cover":"https://gw.alipayobjects.com/zos/alicdn/1PNL1p_cO/Popover.svg","subtitle":"气泡卡片"}, - component: () => import('../../../components/popover/demo/index.vue'), - }, - { - path: 'progress:lang(-cn)?', - meta: {"category":"Components","type":"反馈","title":"Progress","cover":"https://gw.alipayobjects.com/zos/alicdn/xqsDu4ZyR/Progress.svg","subtitle":"进度条"}, - component: () => import('../../../components/progress/demo/index.vue'), - }, - { - path: 'radio:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"Radio","cover":"https://gw.alipayobjects.com/zos/alicdn/8cYb5seNB/Radio.svg","subtitle":"单选框"}, - component: () => import('../../../components/radio/demo/index.vue'), - }, - { - path: 'rate:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"Rate","cover":"https://gw.alipayobjects.com/zos/alicdn/R5uiIWmxe/Rate.svg","subtitle":"评分"}, - component: () => import('../../../components/rate/demo/index.vue'), - }, - { - path: 'result:lang(-cn)?', - meta: {"category":"Components","type":"反馈","title":"Result","cover":"https://gw.alipayobjects.com/zos/alicdn/9nepwjaLa/Result.svg","subtitle":"结果"}, - component: () => import('../../../components/result/demo/index.vue'), - }, - { - path: 'select:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"Select","cover":"https://gw.alipayobjects.com/zos/alicdn/_0XzgOis7/Select.svg","subtitle":"选择器"}, - component: () => import('../../../components/select/demo/index.vue'), - }, - { - path: 'skeleton:lang(-cn)?', - meta: {"category":"Components","type":"反馈","title":"Skeleton","cover":"https://gw.alipayobjects.com/zos/alicdn/KpcciCJgv/Skeleton.svg","subtitle":"骨架屏"}, - component: () => import('../../../components/skeleton/demo/index.vue'), - }, - { - path: 'slider:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"Slider","cover":"https://gw.alipayobjects.com/zos/alicdn/HZ3meFc6W/Silder.svg","subtitle":"滑动输入条"}, - component: () => import('../../../components/slider/demo/index.vue'), - }, - { - path: 'space:lang(-cn)?', - meta: {"category":"Components","type":"布局","title":"Space","cols":1,"cover":"https://gw.alipayobjects.com/zos/antfincdn/wc6%263gJ0Y8/Space.svg","subtitle":"间距"}, - component: () => import('../../../components/space/demo/index.vue'), - }, - { - path: 'spin:lang(-cn)?', - meta: {"category":"Components","type":"反馈","title":"Spin","cover":"https://gw.alipayobjects.com/zos/alicdn/8emPa3fjl/Alert.svg","subtitle":"加载中"}, - component: () => import('../../../components/spin/demo/index.vue'), - }, - { - path: 'statistic:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Statistic","cover":"https://gw.alipayobjects.com/zos/antfincdn/rcBNhLBrKbE/Statistic.svg","subtitle":"统计数值"}, - component: () => import('../../../components/statistic/demo/index.vue'), - }, - { - path: 'steps:lang(-cn)?', - meta: {"category":"Components","type":"导航","cols":1,"title":"Steps","cover":"https://gw.alipayobjects.com/zos/antfincdn/UZYqMizXHaj/Steps.svg","subtitle":"步骤条"}, - component: () => import('../../../components/steps/demo/index.vue'), - }, - { - path: 'switch:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"Switch","cover":"https://gw.alipayobjects.com/zos/alicdn/zNdJQMhfm/Switch.svg","subtitle":"开关"}, - component: () => import('../../../components/switch/demo/index.vue'), - }, - { - path: 'table:lang(-cn)?', - meta: {"category":"Components","cols":1,"type":"数据展示","title":"Table","cover":"https://gw.alipayobjects.com/zos/alicdn/f-SbcX2Lx/Table.svg","subtitle":"表格"}, - component: () => import('../../../components/table/demo/index.vue'), - }, - { - path: 'tabs:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Tabs","cover":"https://gw.alipayobjects.com/zos/antfincdn/lkI2hNEDr2V/Tabs.svg","subtitle":"标签页"}, - component: () => import('../../../components/tabs/demo/index.vue'), - }, - { - path: 'tag:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Tag","cover":"https://gw.alipayobjects.com/zos/alicdn/cH1BOLfxC/Tag.svg","subtitle":"标签"}, - component: () => import('../../../components/tag/demo/index.vue'), - }, - { - path: 'time-picker:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"TimePicker","cover":"https://gw.alipayobjects.com/zos/alicdn/h04Zsl98I/TimePicker.svg","subtitle":"时间选择框"}, - component: () => import('../../../components/time-picker/demo/index.vue'), - }, - { - path: 'timeline:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Timeline","cover":"https://gw.alipayobjects.com/zos/antfincdn/vJmo00mmgR/Timeline.svg","subtitle":"时间轴"}, - component: () => import('../../../components/timeline/demo/index.vue'), - }, - { - path: 'tooltip:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Tooltip","cover":"https://gw.alipayobjects.com/zos/alicdn/Vyyeu8jq2/Tooltp.svg","subtitle":"文字提示"}, - component: () => import('../../../components/tooltip/demo/index.vue'), - }, - { - path: 'transfer:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"Transfer","cover":"https://gw.alipayobjects.com/zos/alicdn/QAXskNI4G/Transfer.svg","subtitle":"穿梭框"}, - component: () => import('../../../components/transfer/demo/index.vue'), - }, - { - path: 'tree:lang(-cn)?', - meta: {"category":"Components","type":"数据展示","title":"Tree","cover":"https://gw.alipayobjects.com/zos/alicdn/Xh-oWqg9k/Tree.svg","subtitle":"树形控件"}, - component: () => import('../../../components/tree/demo/index.vue'), - }, - { - path: 'tree-select:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"TreeSelect","cover":"https://gw.alipayobjects.com/zos/alicdn/Ax4DA0njr/TreeSelect.svg","subtitle":"树选择"}, - component: () => import('../../../components/tree-select/demo/index.vue'), - }, - { - path: 'typography:lang(-cn)?', - meta: {"category":"Components","type":"通用","title":"Typography","cols":1,"cover":"https://gw.alipayobjects.com/zos/alicdn/GOM1KQ24O/Typography.svg","subtitle":"排版"}, - component: () => import('../../../components/typography/demo/index.vue'), - }, - { - path: 'upload:lang(-cn)?', - meta: {"category":"Components","type":"数据录入","title":"Upload","cover":"https://gw.alipayobjects.com/zos/alicdn/QaeBt_ZMg/Upload.svg","subtitle":"上传"}, - component: () => import('../../../components/upload/demo/index.vue'), - }, -]; \ No newline at end of file diff --git a/site/src/views/user/login/index.vue b/site/src/views/user/login/index.vue index 2fb933dff..e0f4d2c4d 100644 --- a/site/src/views/user/login/index.vue +++ b/site/src/views/user/login/index.vue @@ -49,7 +49,7 @@