& { readonly pageDate?: PageData };
22 | export default component;
23 | }
24 |
25 | declare module '*.svg';
26 |
--------------------------------------------------------------------------------
/tools/buildConfig.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const buildConfig = {
3 | esm: {
4 | module: 'ESNext',
5 | format: 'esm',
6 | ext: 'mjs',
7 | output: {
8 | name: 'es',
9 | path: path.resolve('es'),
10 | },
11 | },
12 | cjs: {
13 | module: 'CommonJS',
14 | format: 'cjs',
15 | ext: 'js',
16 | output: {
17 | name: 'lib',
18 | path: path.resolve('lib'),
19 | },
20 | },
21 | };
22 | const buildConfigEntries = Object.entries(buildConfig);
23 |
24 | module.exports = {
25 | buildConfig,
26 | buildConfigEntries,
27 | };
28 |
--------------------------------------------------------------------------------
/components/Rate/demo/text.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 2
4 | title: 文案展现
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 给评分组件加上文案展示。
10 |
11 |
12 |
13 |
14 |
15 | {{ desc[value - 1] }}
16 |
17 |
18 |
31 |
--------------------------------------------------------------------------------
/components/Badge/demo/status.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 4
4 | title: 状态点
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 用于表示状态的小圆点。
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/components/Checkbox/index.ts:
--------------------------------------------------------------------------------
1 | import type { App } from 'vue';
2 | import Checkbox from 'ant-design-vue/lib/checkbox/Checkbox';
3 | import CheckboxGroup from 'ant-design-vue/lib/checkbox/Group';
4 |
5 | export type {
6 | CheckboxProps,
7 | CheckboxGroupProps,
8 | CheckboxOptionType,
9 | } from 'ant-design-vue/lib/checkbox/interface';
10 |
11 | CheckboxGroup.name = 'JCheckboxGroup';
12 |
13 | Checkbox.name = 'JCheckbox';
14 | Checkbox.install = function (app: App) {
15 | app.component('JCheckbox', Checkbox);
16 | app.component('JCheckboxGroup', CheckboxGroup);
17 | return app;
18 | };
19 |
20 | export default Checkbox;
21 |
22 | export { CheckboxGroup };
23 |
--------------------------------------------------------------------------------
/components/InputNumber/demo/basic.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 0
4 | title: 基本用法
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 数字输入框。
10 |
11 |
12 |
13 |
14 |
15 |
21 | 当前值:{{ value }}
22 |
23 |
24 |
36 |
--------------------------------------------------------------------------------
/components/Progress/demo/format.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 6
4 | title: 自定义文字格式
5 | ---
6 |
7 | ## zh-CN
8 |
9 | `format` 属性指定格式。
10 |
11 |
12 |
13 |
14 |
15 |
20 |
21 |
22 |
23 | {{ percent }}
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/components/Result/demo/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
28 |
--------------------------------------------------------------------------------
/components/Scrollbar/demo/basic.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 0
4 | title: 基础用法
5 | ---
6 |
7 | 通过 height 属性设置滚动条高度,若不设置则根据父容器高度自适应。
8 |
9 |
10 |
11 |
12 |
13 | {{ item }}
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/components/Calendar/demo/basic.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 0
4 | title: 基本
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 一个通用的日历面板,支持年/月切换。
10 |
11 |
12 |
13 |
14 |
15 |
33 |
--------------------------------------------------------------------------------
/plugin/md/utils/query.ts:
--------------------------------------------------------------------------------
1 | import qs from 'qs';
2 |
3 | export interface VueQuery {
4 | vue?: boolean;
5 | src?: boolean;
6 | type?: 'script' | 'template' | 'style' | 'custom';
7 | index?: number;
8 | lang?: string;
9 | }
10 |
11 | export function parseVueRequest(id: string): any {
12 | const [filename, rawQuery] = id.split(`?`, 2);
13 | const query = qs.parse(rawQuery) as VueQuery;
14 | if (query.vue != null) {
15 | query.vue = true;
16 | }
17 | if (query.src != null) {
18 | query.src = true;
19 | }
20 | if (query.index != null) {
21 | query.index = Number(query.index);
22 | }
23 | return {
24 | filename,
25 | query,
26 | };
27 | }
28 |
--------------------------------------------------------------------------------
/components/Card/demo/basic.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 0
4 | title: 典型卡片
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 包含标题、内容、操作区域。
10 | 可通过设置size为`default`或者`small`,控制尺寸
11 |
12 |
13 |
14 |
15 |
16 | more
17 | card content
18 | card content
19 | card content
20 |
21 |
22 |
23 | more
24 | card content
25 | card content
26 | card content
27 |
28 |
29 |
--------------------------------------------------------------------------------
/components/Descriptions/demo/basic.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 0
4 | title: 基本
5 | ---
6 |
7 | 简单的展示。
8 |
9 |
10 |
11 |
12 |
13 | Zhou Maomao
14 | 1810000000
15 | Hangzhou, Zhejiang
16 | empty
17 |
18 | No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/components/Grid/demo/basic.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 0
4 | title: 基础栅格
5 | ---
6 |
7 |
8 | 从堆叠到水平排列。
9 |
10 | 使用单一的一组 `Row` 和 `Col` 栅格组件,就可以创建一个基本的栅格系统,所有列(Col)必须放在 `Row` 内。
11 |
12 |
13 |
14 |
15 |
16 | col-12
17 | col-12
18 |
19 |
20 | col-8
21 | col-8
22 | col-8
23 |
24 |
25 | col-6
26 | col-6
27 | col-6
28 | col-6
29 |
30 |
31 |
--------------------------------------------------------------------------------
/components/InputNumber/demo/borderless.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 6
4 | title: 无边框
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 没有边框。
10 |
11 |
12 |
13 |
14 |
15 |
22 |
23 |
24 |
36 |
--------------------------------------------------------------------------------
/components/Tabs/demo/basic.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 0
4 | title: 基本用法
5 | ---
6 |
7 | 默认选中第一项。
8 |
9 |
10 |
11 |
12 |
13 |
14 | Content of Tab Pane 1
15 | Content of Tab Pane 2
16 | Content of Tab Pane 3
17 |
18 |
19 |
30 |
--------------------------------------------------------------------------------
/tools/generator-types/src/web-types.ts:
--------------------------------------------------------------------------------
1 | import type { VueTag, Options } from './type';
2 |
3 | // create web-types.json to provide autocomplete in JetBrains IDEs
4 | export function genWebTypes(tags: VueTag[], options: Options) {
5 | return {
6 | $schema:
7 | 'https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json',
8 | framework: 'vue',
9 | name: options.name,
10 | version: options.version,
11 | contributions: {
12 | html: {
13 | tags,
14 | attributes: [],
15 | 'types-syntax': 'typescript',
16 | },
17 | },
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/components/Radio/demo/radioGroup.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 7
4 | title: 单选组合
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 一组互斥的 Radio 配合使用。
10 |
11 |
12 |
13 |
14 |
15 | A
16 | B
17 | C
18 | D
19 |
20 |
21 |
22 |
33 |
--------------------------------------------------------------------------------
/components/Spin/demo/custom-indicator.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 6
4 | title: 自定义指示符
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 使用自定义指示符。
10 |
11 |
12 |
13 |
14 |
15 |
16 |
33 |
--------------------------------------------------------------------------------
/tools/runCmd.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const isWindows = require('is-windows');
4 | const getRunCmdEnv = require('./utils/getRunCmdEnv');
5 |
6 | function runCmd(cmd, _args, fn) {
7 | const args = _args || [];
8 |
9 | if (isWindows()) {
10 | args.unshift(cmd);
11 | args.unshift('/c');
12 | cmd = process.env.ComSpec;
13 | }
14 |
15 | const runner = require('child_process').spawn(cmd, args, {
16 | // keep color
17 | stdio: 'inherit',
18 | env: getRunCmdEnv(),
19 | });
20 |
21 | runner.on('close', (code) => {
22 | if (fn) {
23 | fn(code);
24 | }
25 | });
26 | }
27 |
28 | module.exports = runCmd;
29 |
--------------------------------------------------------------------------------
/components/ColorPicker/demo/size.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 0
4 | title: 不同尺寸
5 | ---
6 |
7 | 通过改变size可设置合适尺寸
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
29 |
--------------------------------------------------------------------------------
/components/TableCard/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 表格卡片
4 | cols: 2
5 | type: 导航
6 | title: TableCard
7 | cover: https://gw.alipayobjects.com/zos/alicdn/1vqv2bj68/Pagination.svg
8 | ---
9 |
10 | ## API
11 |
12 | ## TableCard
13 |
14 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
15 | | --- | --- | --- | --- | --- |
16 | | name | 卡片标题 | string | - | |
17 | | width | 卡片高度 | string | 400px | |
18 | | content | 卡片内容插槽 | slot | - | |
19 | | actions | 卡片下方按钮,最多显示三个按钮 ,按钮图标引用ICON组件,可自定义 | []{name: string, icon: string, key: string, disabled: string, onClick: Function} | - | |
20 | | moreActions| 卡片隐藏按钮 | 同actions | - | |
21 | | status | 卡片右上角状态 | {text: string, value: string, color: string} | - | |
--------------------------------------------------------------------------------
/components/Tag/demo/controlled.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 4
4 | title:
5 | zh-CN: 控制关闭状态
6 | en-US: Controlled
7 | ---
8 |
9 | ## zh-CN
10 |
11 | 通过 `visible` 属性控制关闭状态。
12 |
13 | ## en-US
14 |
15 | By using the `visible` prop, you can control the close state of Tag.
16 |
17 |
18 |
19 |
20 | Movies
21 |
22 | Toggle
23 |
24 |
34 |
--------------------------------------------------------------------------------
/components/Alert/demo/smooth-closed.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 8
4 | title: 平滑地卸载
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 平滑、自然的卸载提示。
10 |
11 |
12 |
13 |
14 |
21 |
22 |
37 |
--------------------------------------------------------------------------------
/tools/cli/index.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | 'use strict';
4 |
5 | require('colorful').colorful();
6 |
7 | const program = require('commander');
8 | const packageInfo = require('../../package.json');
9 |
10 | program
11 | .version(packageInfo.version)
12 | .command('run [name]', 'run specified task')
13 | .parse(process.argv);
14 |
15 | // https://github.com/tj/commander.js/pull/260
16 | const proc = program.runningCommand;
17 | if (proc) {
18 | proc.on('close', process.exit.bind(process));
19 | proc.on('error', () => {
20 | process.exit(1);
21 | });
22 | }
23 |
24 | const subCmd = program.args[0];
25 | if (!subCmd || subCmd !== 'run') {
26 | program.help();
27 | }
28 |
--------------------------------------------------------------------------------
/components/Mentions/demo/placement.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 4
4 | title: 向上展开
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 向上展开建议。
10 |
11 |
12 |
13 |
14 | afc163
15 | zombieJ
16 | yesmeck
17 |
18 |
19 |
30 |
--------------------------------------------------------------------------------
/components/Switch/demo/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
31 |
--------------------------------------------------------------------------------
/components/Search/Demo/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/components/Upload/asset/uploadIcon.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/components/Card/demo/loading.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 6
4 | title: 预加载的卡片
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 数据读入前会有文本块样式
10 |
11 |
12 |
13 |
14 | whatever content
15 | Toggle loading
16 |
17 |
35 |
--------------------------------------------------------------------------------
/components/Descriptions/demo/vertical.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 4
4 | title: 垂直
5 | ---
6 |
7 | 垂直的列表。
8 |
9 |
10 |
11 |
12 |
13 | Zhou Maomao
14 | 1810000000
15 | Hangzhou, Zhejiang
16 |
17 | No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China
18 |
19 | empty
20 |
21 |
22 |
--------------------------------------------------------------------------------
/components/ColorPicker/demo/opacity.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 0
4 | title: 是否显示透明度控制块
5 | ---
6 |
7 | 是否显示透明度控制块
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
30 |
--------------------------------------------------------------------------------
/components/AIcon/demo/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
30 |
--------------------------------------------------------------------------------
/components/Modal/demo/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
31 |
--------------------------------------------------------------------------------
/components/Search/style/Item.less:
--------------------------------------------------------------------------------
1 | .JSearch-item {
2 | display: flex;
3 | gap: 16px;
4 | align-items: center;
5 |
6 | .JSearch-item--type {
7 | width: 90px;
8 | min-width: 0;
9 | > span {
10 | line-height: 34px;
11 | font-weight: bold;
12 | }
13 | }
14 |
15 | .JSearch-item--column {
16 | width: 130px;
17 | min-width: 0;
18 | }
19 |
20 | .JSearch-item--termType {
21 | width: 100px;
22 | min-width: 0;
23 | }
24 | .JSearch-item--label {
25 | min-width: 40px;
26 | }
27 |
28 | .JSearch-item--value {
29 | display: flex;
30 | width: 0;
31 | flex-grow: 1;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/site/src/theme/static/not-found.less:
--------------------------------------------------------------------------------
1 | #page-404 {
2 | position: fixed;
3 | top: 0;
4 | right: 0;
5 | bottom: 0;
6 | left: 0;
7 | z-index: 100;
8 | width: 100%;
9 | height: 100%;
10 | background-color: #fff;
11 | background-repeat: no-repeat;
12 | background-position: center;
13 | background-size: 100%;
14 | background-attachment: fixed;
15 |
16 | section {
17 | position: absolute;
18 | top: 50%;
19 | left: 50%;
20 | text-align: center;
21 | transform: translate(-50%, -50%);
22 | }
23 |
24 | h1 {
25 | color: @primary-color;
26 | font-weight: 500;
27 | font-size: 120px;
28 | }
29 |
30 | p {
31 | color: @site-text-color;
32 | font-size: 18px;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/components/Anchor/demo/basic.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 0
4 | title: 基本使用
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 最简单的用法。
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/components/Space/demo/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
33 |
--------------------------------------------------------------------------------
/components/InputNumber/demo/digit.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 3
4 | title: 高精度小数
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 通过 `stringMode` 开启高精度小数支持,`change` 事件将返回 string 类型。
10 | 对于旧版浏览器,你需要 BigInt polyfill。
11 |
12 |
13 |
14 |
15 |
23 |
24 |
36 |
--------------------------------------------------------------------------------
/components/Rate/demo/clear.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 4
4 | title: 清除
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 支持允许或者禁用清除。
10 |
11 |
12 |
13 |
14 |
15 | allowClear: true
16 |
17 |
18 | allowClear: false
19 |
20 |
21 |
34 |
--------------------------------------------------------------------------------
/tools/utils/get-npm-args.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // NOTE: the following code was partially adopted from https://github.com/iarna/in-publish
4 | module.exports = function getNpmArgs() {
5 | // https://github.com/iarna/in-publish/pull/14
6 | if (process.env.npm_command) {
7 | return [process.env.npm_command];
8 | }
9 |
10 | let npmArgv = null;
11 |
12 | try {
13 | npmArgv = JSON.parse(process.env.npm_config_argv);
14 | } catch (err) {
15 | return null;
16 | }
17 |
18 | if (
19 | typeof npmArgv !== 'object' ||
20 | !npmArgv.cooked ||
21 | !Array.isArray(npmArgv.cooked)
22 | ) {
23 | return null;
24 | }
25 |
26 | return npmArgv.cooked;
27 | };
28 |
--------------------------------------------------------------------------------
/components/Space/demo/customize.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 3
4 | title: 自定义尺寸
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 自定义间距大小。
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | Primary
20 | Default
21 | Dashed
22 | Link
23 |
24 |
25 |
26 |
37 |
--------------------------------------------------------------------------------
/components/Statistic/demo/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
32 |
--------------------------------------------------------------------------------
/components/Ellipsis/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | title: Ellipsis
4 | subtitle: 文本省略
5 | cover: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*7sMiTbzvaDoAAAAAAAAAAAAADrJ8AQ/original
6 | cols: 2
7 | type: 布局
8 | order: 3
9 | ---
10 |
11 | 内容超长显示省略号。
12 |
13 | ## 何时使用
14 |
15 | - 单行或多行文本超出一定宽度后显示省略号,并且可以给予提示。
16 |
17 | ## API
18 |
19 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
20 | |----------------|----------------|-----------|-----------------|--------|
21 | | expand-trigger | 展开的触发方式 | 'click' | - | |
22 | | line-clamp | 最大行数 | `number` \| `string` | - | |
23 | | tooltip | Tooltip 的属性或内容 | `boolean` \| `TooltipProps`\| `Slot` | - | |
--------------------------------------------------------------------------------
/components/Rate/demo/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
35 |
--------------------------------------------------------------------------------
/components/Affix/demo/basic.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 0
4 | title: 基本
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 最简单的用法。
10 |
11 |
12 |
13 |
14 |
15 | Affix top
16 |
17 |
18 |
19 | Affix bottom
20 |
21 |
22 |
23 |
36 |
--------------------------------------------------------------------------------
/components/Calendar/demo/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
31 |
--------------------------------------------------------------------------------
/components/Card/demo/inner.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 5
4 | title: 内部卡片
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 可以放在普通卡片内部,展示多层级结构的信息
10 |
11 |
12 |
13 |
14 |
15 |
16 | Group title
17 |
18 |
19 |
20 | More
21 |
22 | Inner Card content
23 |
24 |
25 |
26 | More
27 |
28 | Inner Card content
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/components/List/demo/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
33 |
--------------------------------------------------------------------------------
/components/Slider/demo/tip-formatter.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 3
4 | title: 自定义提示
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 使用 `tipFormatter` 可以格式化 `Tooltip` 的内容,设置 `tipFormatter={null}`,则隐藏 `Tooltip`。
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
36 | ```
37 |
--------------------------------------------------------------------------------
/components/TimePicker/demo/12hours.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 2
4 | title: 12 小时制
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 12 小时制的时间选择器,默认的 format 为 `h:mm:ss a`。
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
31 |
--------------------------------------------------------------------------------
/components/AIcon/style/index.less:
--------------------------------------------------------------------------------
1 | // // @import 'ant-design-vue/lib/style/index.less';
2 | @import '../../style/variable.less';
3 |
4 | .icon {
5 | font-size: 16px;
6 | }
7 |
8 | .icon-display {
9 | width: 100%;
10 | margin-bottom: 30px;
11 | .icon-display-item {
12 | padding: 10px;
13 | .icon-display-item-icon,
14 | .icon-display-item-title {
15 | display: flex;
16 | justify-content: center;
17 | align-content: center;
18 | }
19 | .icon-display-item-icon {
20 | font-size: 36px;
21 | color: #555555;
22 | padding: 10px;
23 | }
24 | .icon-display-item-title {
25 | font-size: 10px;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/components/BackTop/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | type: 其他
4 | subtitle: 回到顶部
5 | title: BackTop
6 | cover: https://gw.alipayobjects.com/zos/alicdn/tJZ5jbTwX/BackTop.svg
7 | ---
8 |
9 | 返回页面顶部的操作按钮。
10 |
11 | ## 何时使用
12 |
13 | - 当页面内容区域比较长时;
14 | - 当用户需要频繁返回顶部查看相关内容时。
15 |
16 | ## API
17 |
18 | > 有默认样式,距离底部 `50px`,可覆盖。
19 | >
20 | > 自定义样式宽高不大于 40px \* 40px。
21 |
22 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
23 | | --- | --- | --- | --- | --- |
24 | | target | 设置需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数 | Function | () => window | |
25 | | visibilityHeight | 滚动高度达到此参数值才出现 `BackTop` | number | 400 | |
26 |
27 | ### 事件
28 |
29 | | 事件名称 | 说明 | 回调参数 | 版本 |
30 | | -------- | ------------------ | -------- | ---- |
31 | | click | 点击按钮的回调函数 | Function | |
32 |
--------------------------------------------------------------------------------
/components/List/index.ts:
--------------------------------------------------------------------------------
1 | import type { App } from 'vue';
2 | import List from 'ant-design-vue/lib/list/index';
3 | import ListItem from 'ant-design-vue/lib/list/Item';
4 | import ListItemMeta from 'ant-design-vue/lib/list/ItemMeta';
5 |
6 | export type {
7 | ListProps,
8 | ListItemProps,
9 | ListItemMetaProps,
10 | } from 'ant-design-vue/lib/list/index';
11 |
12 | List.name = 'JList';
13 | ListItem.name = 'JListItem';
14 | ListItemMeta.name = 'JListItemMeta';
15 |
16 | List.install = function (app: App) {
17 | app.component(List.name, List);
18 | app.component(ListItem.name, ListItem);
19 | app.component(ListItemMeta.name, ListItemMeta);
20 | return app;
21 | };
22 |
23 | export default List;
24 |
25 | export { ListItem, ListItemMeta };
26 |
--------------------------------------------------------------------------------
/components/Search/Demo/Custom.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
34 |
35 |
--------------------------------------------------------------------------------
/components/Grid/demo/flex-stretch.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 7
4 | title: Flex 填充
5 | ---
6 |
7 | ## zh-CN
8 |
9 | Col 提供 `flex` 属性以支持填充。
10 |
11 |
12 |
13 |
14 | Percentage columns
15 |
16 | 2 / 5
17 | 3 / 5
18 |
19 | Fill rest
20 |
21 | 100px
22 | auto
23 |
24 | Raw flex style
25 |
26 | 1 1 200px
27 | 0 1 300px
28 |
29 |
30 |
--------------------------------------------------------------------------------
/components/Mentions/demo/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
33 |
--------------------------------------------------------------------------------
/components/Popover/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | type: 数据展示
4 | title: Popover
5 | subtitle: 气泡卡片
6 | cover: https://gw.alipayobjects.com/zos/alicdn/1PNL1p_cO/Popover.svg
7 | ---
8 |
9 | 点击/鼠标移入元素,弹出气泡式的卡片浮层。
10 |
11 | ## 何时使用
12 |
13 | 当目标元素有进一步的描述和相关操作时,可以收纳到卡片中,根据用户的操作行为进行展现。
14 |
15 | 和 `Tooltip` 的区别是,用户可以对浮层上的元素进行操作,因此它可以承载更复杂的内容,比如链接或按钮等。
16 |
17 | ## API
18 |
19 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
20 | | ------- | -------- | ------------------- | ------ | ---- |
21 | | content | 卡片内容 | string\|slot\|VNode | - | |
22 | | title | 卡片标题 | string\|slot\|VNode | - | |
23 |
24 | 更多属性请参考 [Tooltip](/components/tooltip-cn/#API)。
25 |
26 | ## 注意
27 |
28 | 请确保 `Popover` 的子元素能接受 `mouseenter`、`mouseleave`、`focus`、`click` 事件。
29 |
--------------------------------------------------------------------------------
/site/src/layouts/UserLayout.vue:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
27 |
28 |
--------------------------------------------------------------------------------
/site/src/views/user/login/style.less:
--------------------------------------------------------------------------------
1 | @import 'ant-design-vue/es/style/themes/default.less';
2 |
3 | .main {
4 | width: 368px;
5 | margin: 0 auto;
6 | @media screen and (max-width: @screen-sm) {
7 | width: 95%;
8 | }
9 |
10 | .icon {
11 | margin-left: 16px;
12 | color: rgba(0, 0, 0, 0.2);
13 | font-size: 24px;
14 | vertical-align: middle;
15 | cursor: pointer;
16 | transition: color 0.3s;
17 |
18 | &:hover {
19 | color: @primary-color;
20 | }
21 | }
22 |
23 | .other {
24 | margin-top: 24px;
25 | line-height: 22px;
26 | text-align: left;
27 |
28 | .register {
29 | float: right;
30 | }
31 | }
32 | }
33 | .main /deep/ .antd-pro-login-submit {
34 | width: 100%;
35 | margin-top: 24px;
36 | }
37 |
--------------------------------------------------------------------------------
/components/TimePicker/demo/suffix.vue:
--------------------------------------------------------------------------------
1 |
2 | ---
3 | order: 7
4 | title: 后缀图标
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 点击 TimePicker,然后可以在浮层中选择或者输入某一时间。
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
35 |
--------------------------------------------------------------------------------
/plugin/md/markdown/plugins/hoist.ts:
--------------------------------------------------------------------------------
1 | import type MarkdownIt from 'markdown-it';
2 | import type { MarkdownParsedData } from '../markdown';
3 |
4 | // hoist