chore: update build config
parent
ea67dd5d03
commit
d2d613980a
|
@ -32,7 +32,8 @@
|
|||
"@typescript-eslint/ban-types": 0,
|
||||
"@typescript-eslint/explicit-module-boundary-types": 0,
|
||||
"@typescript-eslint/no-empty-function": 0,
|
||||
"@typescript-eslint/no-non-null-assertion": 0
|
||||
"@typescript-eslint/no-non-null-assertion": 0,
|
||||
"@typescript-eslint/no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": true }]
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
'use strict';
|
||||
|
||||
require('colorful').colorful();
|
||||
require('colorful').isatty = true;
|
||||
|
||||
const program = require('commander');
|
||||
const packageInfo = require('../../package.json');
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env node
|
||||
/* eslint-disable no-console */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
|
|
@ -1,25 +1,31 @@
|
|||
'use strict';
|
||||
const { resolve } = require('./utils/projectHelper');
|
||||
|
||||
module.exports = function(modules) {
|
||||
const plugins = [
|
||||
[require.resolve('@vue/babel-plugin-jsx'), { mergeProps: false }],
|
||||
require.resolve('@babel/plugin-proposal-optional-chaining'),
|
||||
require.resolve('@babel/plugin-transform-object-assign'),
|
||||
require.resolve('@babel/plugin-proposal-object-rest-spread'),
|
||||
require.resolve('@babel/plugin-proposal-export-default-from'),
|
||||
require.resolve('@babel/plugin-proposal-class-properties'),
|
||||
require.resolve('@babel/plugin-syntax-dynamic-import'),
|
||||
// require.resolve('babel-plugin-inline-import-data-uri'),
|
||||
// require.resolve('@babel/plugin-transform-member-expression-literals'),
|
||||
// require.resolve('@babel/plugin-transform-property-literals'),
|
||||
// require.resolve('@babel/plugin-proposal-export-default-from'),
|
||||
// require.resolve('@babel/plugin-transform-object-assign'),
|
||||
// require.resolve('@babel/plugin-transform-template-literals'),
|
||||
// require.resolve('@babel/plugin-proposal-object-rest-spread'),
|
||||
// require.resolve('@babel/plugin-proposal-class-properties'),
|
||||
[
|
||||
resolve('@babel/plugin-transform-typescript'),
|
||||
{
|
||||
isTSX: true,
|
||||
},
|
||||
],
|
||||
[resolve('@vue/babel-plugin-jsx'), { mergeProps: false }],
|
||||
resolve('@babel/plugin-proposal-optional-chaining'),
|
||||
resolve('@babel/plugin-transform-object-assign'),
|
||||
resolve('@babel/plugin-proposal-object-rest-spread'),
|
||||
resolve('@babel/plugin-proposal-export-default-from'),
|
||||
resolve('@babel/plugin-proposal-class-properties'),
|
||||
resolve('@babel/plugin-syntax-dynamic-import'),
|
||||
// resolve('babel-plugin-inline-import-data-uri'),
|
||||
// resolve('@babel/plugin-transform-member-expression-literals'),
|
||||
// resolve('@babel/plugin-transform-property-literals'),
|
||||
// resolve('@babel/plugin-proposal-export-default-from'),
|
||||
// resolve('@babel/plugin-transform-object-assign'),
|
||||
// resolve('@babel/plugin-transform-template-literals'),
|
||||
// resolve('@babel/plugin-proposal-object-rest-spread'),
|
||||
// resolve('@babel/plugin-proposal-class-properties'),
|
||||
];
|
||||
plugins.push([
|
||||
require.resolve('@babel/plugin-transform-runtime'),
|
||||
resolve('@babel/plugin-transform-runtime'),
|
||||
{
|
||||
helpers: false,
|
||||
},
|
||||
|
@ -27,7 +33,7 @@ module.exports = function(modules) {
|
|||
return {
|
||||
presets: [
|
||||
[
|
||||
require.resolve('@babel/preset-env'),
|
||||
resolve('@babel/preset-env'),
|
||||
{
|
||||
modules,
|
||||
targets: {
|
||||
|
@ -46,7 +52,7 @@ module.exports = function(modules) {
|
|||
plugins,
|
||||
env: {
|
||||
test: {
|
||||
plugins: [require.resolve('babel-plugin-istanbul')],
|
||||
plugins: [resolve('babel-plugin-istanbul')],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const assign = require('object-assign');
|
||||
const { getProjectPath } = require('./utils/projectHelper');
|
||||
|
||||
module.exports = function() {
|
||||
let my = {};
|
||||
if (fs.existsSync(getProjectPath('tsconfig.json'))) {
|
||||
my = require(getProjectPath('tsconfig.json'));
|
||||
}
|
||||
return assign(
|
||||
{
|
||||
noUnusedParameters: true,
|
||||
noUnusedLocals: true,
|
||||
strictNullChecks: true,
|
||||
target: 'es6',
|
||||
jsx: 'preserve',
|
||||
moduleResolution: 'node',
|
||||
declaration: true,
|
||||
allowSyntheticDefaultImports: true,
|
||||
},
|
||||
my.compilerOptions,
|
||||
);
|
||||
};
|
|
@ -1,3 +1,5 @@
|
|||
const { getProjectPath, resolve, injectRequire } = require('./utils/projectHelper');
|
||||
injectRequire();
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const WebpackBar = require('webpackbar');
|
||||
|
@ -23,7 +25,7 @@ const imageOptions = {
|
|||
};
|
||||
|
||||
function getWebpackConfig(modules) {
|
||||
const pkg = require(path.join(process.cwd(), 'package.json'));
|
||||
const pkg = require(getProjectPath('package.json'));
|
||||
const babelConfig = require('./getBabelCommonConfig')(modules || false);
|
||||
|
||||
const pluginImportOptions = {
|
||||
|
@ -31,7 +33,7 @@ function getWebpackConfig(modules) {
|
|||
libraryName: distFileBaseName,
|
||||
libraryDirectory: 'components',
|
||||
};
|
||||
babelConfig.plugins.push([require.resolve('babel-plugin-import'), pluginImportOptions]);
|
||||
babelConfig.plugins.push([resolve('babel-plugin-import'), pluginImportOptions]);
|
||||
|
||||
if (modules === false) {
|
||||
babelConfig.plugins.push(require.resolve('./replaceLib'));
|
||||
|
@ -41,13 +43,25 @@ function getWebpackConfig(modules) {
|
|||
devtool: 'source-map',
|
||||
|
||||
output: {
|
||||
path: path.join(process.cwd(), './dist/'),
|
||||
path: getProjectPath('./dist/'),
|
||||
filename: '[name].js',
|
||||
},
|
||||
|
||||
resolve: {
|
||||
modules: ['node_modules', path.join(__dirname, '../node_modules')],
|
||||
extensions: ['.js', '.jsx', '.vue', '.md', '.json'],
|
||||
extensions: [
|
||||
'.web.tsx',
|
||||
'.web.ts',
|
||||
'.web.jsx',
|
||||
'.web.js',
|
||||
'.ts',
|
||||
'.tsx',
|
||||
'.js',
|
||||
'.jsx',
|
||||
'.vue',
|
||||
'.md',
|
||||
'.json',
|
||||
],
|
||||
alias: {
|
||||
'@': process.cwd(),
|
||||
},
|
||||
|
@ -81,10 +95,10 @@ function getWebpackConfig(modules) {
|
|||
{
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: [require.resolve('@babel/preset-env')],
|
||||
presets: [resolve('@babel/preset-env')],
|
||||
plugins: [
|
||||
[require.resolve('@vue/babel-plugin-jsx'), { mergeProps: false }],
|
||||
require.resolve('@babel/plugin-proposal-object-rest-spread'),
|
||||
[resolve('@vue/babel-plugin-jsx'), { mergeProps: false }],
|
||||
resolve('@babel/plugin-proposal-object-rest-spread'),
|
||||
],
|
||||
},
|
||||
},
|
||||
|
@ -100,6 +114,21 @@ function getWebpackConfig(modules) {
|
|||
exclude: /node_modules/,
|
||||
options: babelConfig,
|
||||
},
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'babel-loader',
|
||||
options: babelConfig,
|
||||
},
|
||||
{
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
transpileOnly: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
|
@ -231,6 +260,7 @@ All rights reserved.
|
|||
return config;
|
||||
}
|
||||
|
||||
getWebpackConfig.webpack = webpack;
|
||||
getWebpackConfig.svgRegex = svgRegex;
|
||||
getWebpackConfig.svgOptions = svgOptions;
|
||||
getWebpackConfig.imageOptions = imageOptions;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/* eslint-disable no-console */
|
||||
'use strict';
|
||||
const { getProjectPath, injectRequire } = require('./utils/projectHelper');
|
||||
|
||||
injectRequire();
|
||||
|
||||
// const install = require('./install')
|
||||
const runCmd = require('./runCmd');
|
||||
|
@ -13,7 +15,6 @@ const babel = require('gulp-babel');
|
|||
const argv = require('minimist')(process.argv.slice(2));
|
||||
const { Octokit } = require('@octokit/rest');
|
||||
|
||||
const packageJson = require(`${process.cwd()}/package.json`);
|
||||
// const getNpm = require('./getNpm')
|
||||
// const selfPackage = require('../package.json')
|
||||
const chalk = require('chalk');
|
||||
|
@ -21,21 +22,25 @@ const getNpmArgs = require('./utils/get-npm-args');
|
|||
const getChangelog = require('./utils/getChangelog');
|
||||
const path = require('path');
|
||||
// const watch = require('gulp-watch')
|
||||
const ts = require('gulp-typescript');
|
||||
const gulp = require('gulp');
|
||||
const fs = require('fs');
|
||||
const rimraf = require('rimraf');
|
||||
const tsConfig = require('./getTSCommonConfig')();
|
||||
const replaceLib = require('./replaceLib');
|
||||
const stripCode = require('gulp-strip-code');
|
||||
const compareVersions = require('compare-versions');
|
||||
|
||||
const packageJson = require(getProjectPath('package.json'));
|
||||
const tsDefaultReporter = ts.reporter.defaultReporter();
|
||||
const cwd = process.cwd();
|
||||
const libDir = path.join(cwd, 'lib');
|
||||
const esDir = path.join(cwd, 'es');
|
||||
const libDir = getProjectPath('lib');
|
||||
const esDir = getProjectPath('es');
|
||||
|
||||
function dist(done) {
|
||||
rimraf.sync(path.join(cwd, 'dist'));
|
||||
process.env.RUN_ENV = 'PRODUCTION';
|
||||
const webpackConfig = require(path.join(cwd, 'webpack.build.conf.js'));
|
||||
const webpackConfig = require(getProjectPath('webpack.build.conf.js'));
|
||||
webpack(webpackConfig, (err, stats) => {
|
||||
if (err) {
|
||||
console.error(err.stack || err);
|
||||
|
@ -69,6 +74,30 @@ function dist(done) {
|
|||
});
|
||||
}
|
||||
|
||||
const tsFiles = ['**/*.ts', '**/*.tsx', '!node_modules/**/*.*', 'typings/**/*.d.ts'];
|
||||
|
||||
function compileTs(stream) {
|
||||
return stream
|
||||
.pipe(ts(tsConfig))
|
||||
.js.pipe(
|
||||
through2.obj(function(file, encoding, next) {
|
||||
// console.log(file.path, file.base);
|
||||
file.path = file.path.replace(/\.[jt]sx$/, '.js');
|
||||
this.push(file);
|
||||
next();
|
||||
}),
|
||||
)
|
||||
.pipe(gulp.dest(process.cwd()));
|
||||
}
|
||||
|
||||
gulp.task('tsc', () =>
|
||||
compileTs(
|
||||
gulp.src(tsFiles, {
|
||||
base: cwd,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
function babelify(js, modules) {
|
||||
const babelConfig = getBabelCommonConfig(modules);
|
||||
babelConfig.babelrc = false;
|
||||
|
@ -133,10 +162,37 @@ function compile(modules) {
|
|||
const assets = gulp
|
||||
.src(['components/**/*.@(png|svg)'])
|
||||
.pipe(gulp.dest(modules === false ? esDir : libDir));
|
||||
let error = 0;
|
||||
const source = [
|
||||
'components/**/*.js',
|
||||
'components/**/*.jsx',
|
||||
'components/**/*.tsx',
|
||||
'components/**/*.ts',
|
||||
'typings/**/*.d.ts',
|
||||
'!components/*/__tests__/*',
|
||||
];
|
||||
|
||||
const source = ['components/**/*.js', 'components/**/*.jsx', '!components/*/__tests__/*'];
|
||||
const jsFilesStream = babelify(gulp.src(source), modules);
|
||||
return merge2([less, jsFilesStream, assets]);
|
||||
const tsResult = gulp.src(source).pipe(
|
||||
ts(tsConfig, {
|
||||
error(e) {
|
||||
tsDefaultReporter.error(e);
|
||||
error = 1;
|
||||
},
|
||||
finish: tsDefaultReporter.finish,
|
||||
}),
|
||||
);
|
||||
|
||||
function check() {
|
||||
if (error && !argv['ignore-error']) {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
tsResult.on('finish', check);
|
||||
tsResult.on('end', check);
|
||||
const tsFilesStream = babelify(tsResult.js, modules);
|
||||
const tsd = tsResult.dts.pipe(gulp.dest(modules === false ? esDir : libDir));
|
||||
return merge2([less, tsFilesStream, tsd, assets]);
|
||||
}
|
||||
|
||||
function tag() {
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
const { join, dirname } = require('path');
|
||||
const { dirname } = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const cwd = process.cwd();
|
||||
const { getProjectPath } = require('./utils/projectHelper');
|
||||
|
||||
function replacePath(path) {
|
||||
if (path.node.source && /\/lib\//.test(path.node.source.value)) {
|
||||
const esModule = path.node.source.value.replace('/lib/', '/es/');
|
||||
const esPath = dirname(join(cwd, `node_modules/${esModule}`));
|
||||
const esPath = dirname(getProjectPath('node_modules', esModule));
|
||||
if (fs.existsSync(esPath)) {
|
||||
path.node.source.value = esModule;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ function transformLess(lessFile, config = {}) {
|
|||
.render(data, lessOpts)
|
||||
.then(result => {
|
||||
const source = result.css;
|
||||
return postcss(postcssConfig.plugins).process(source);
|
||||
return postcss(postcssConfig.plugins).process(source, { from: undefined });
|
||||
})
|
||||
.then(r => {
|
||||
return r.css;
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const cwd = process.cwd();
|
||||
|
||||
function getProjectPath(...filePath) {
|
||||
return path.join(cwd, ...filePath);
|
||||
}
|
||||
|
||||
function resolve(moduleName) {
|
||||
return require.resolve(moduleName);
|
||||
}
|
||||
|
||||
// We need hack the require to ensure use package module first
|
||||
// For example, `typescript` is required by `gulp-typescript` but provided by `antd`
|
||||
let injected = false;
|
||||
function injectRequire() {
|
||||
if (injected) return;
|
||||
|
||||
const Module = require('module');
|
||||
|
||||
const oriRequire = Module.prototype.require;
|
||||
Module.prototype.require = function(...args) {
|
||||
const moduleName = args[0];
|
||||
try {
|
||||
return oriRequire.apply(this, args);
|
||||
} catch (err) {
|
||||
const newArgs = [...args];
|
||||
if (moduleName[0] !== '/') {
|
||||
newArgs[0] = getProjectPath('node_modules', moduleName);
|
||||
}
|
||||
return oriRequire.apply(this, newArgs);
|
||||
}
|
||||
};
|
||||
|
||||
injected = true;
|
||||
}
|
||||
|
||||
function getConfig() {
|
||||
const configPath = getProjectPath('.antd-tools.config.js');
|
||||
if (fs.existsSync(configPath)) {
|
||||
return require(configPath);
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getProjectPath,
|
||||
resolve,
|
||||
injectRequire,
|
||||
getConfig,
|
||||
};
|
|
@ -1,5 +1,6 @@
|
|||
import { CSSProperties, VNodeTypes } from 'vue';
|
||||
import { CSSProperties } from 'vue';
|
||||
import { createTypes, VueTypeValidableDef, VueTypesInterface } from 'vue-types';
|
||||
import { VueNode } from '../type';
|
||||
const PropTypes = createTypes({
|
||||
func: undefined,
|
||||
bool: undefined,
|
||||
|
@ -34,9 +35,8 @@ export function withUndefined<T extends { default?: any }>(type: T): T {
|
|||
type.default = undefined;
|
||||
return type;
|
||||
}
|
||||
|
||||
export default PropTypes as VueTypesInterface & {
|
||||
readonly looseBool: VueTypeValidableDef<boolean>;
|
||||
readonly style: VueTypeValidableDef<CSSProperties>;
|
||||
readonly VNodeChild: VueTypeValidableDef<VNodeTypes>;
|
||||
readonly VNodeChild: VueTypeValidableDef<VueNode>;
|
||||
};
|
||||
|
|
|
@ -66,7 +66,7 @@ export interface AntAnchor {
|
|||
scrollTo: (link: string) => void;
|
||||
$emit?: Function;
|
||||
}
|
||||
interface AnchorState {
|
||||
export interface AnchorState {
|
||||
activeLink: null | string;
|
||||
scrollContainer: HTMLElement | Window;
|
||||
links: string[];
|
||||
|
|
|
@ -4,6 +4,8 @@ import { getComponent } from '../_util/props-util';
|
|||
import classNames from '../_util/classNames';
|
||||
import { defaultConfigProvider } from '../config-provider';
|
||||
import { AntAnchor } from './Anchor';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
function noop(..._any: any[]): any {}
|
||||
|
||||
const AnchorLinkProps = {
|
||||
|
|
|
@ -11,7 +11,7 @@ export default defineComponent({
|
|||
shape: PropTypes.oneOf(tuple('circle', 'square')),
|
||||
size: {
|
||||
type: [Number, String] as PropType<'large' | 'small' | 'default' | number>,
|
||||
default: 'default'
|
||||
default: 'default',
|
||||
},
|
||||
src: PropTypes.string,
|
||||
/** Srcset of image avatar */
|
||||
|
@ -20,8 +20,8 @@ export default defineComponent({
|
|||
srcSet: PropTypes.string,
|
||||
icon: PropTypes.VNodeChild,
|
||||
alt: PropTypes.string,
|
||||
loadError: {
|
||||
type: Function as PropType<()=>boolean>
|
||||
loadError: {
|
||||
type: Function as PropType<() => boolean>,
|
||||
},
|
||||
},
|
||||
setup() {
|
||||
|
@ -35,7 +35,7 @@ export default defineComponent({
|
|||
isMounted: false,
|
||||
scale: 1,
|
||||
lastChildrenWidth: undefined,
|
||||
lastNodeWidth: undefined
|
||||
lastNodeWidth: undefined,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -120,7 +120,9 @@ export default defineComponent({
|
|||
|
||||
let children: VueNode = this.$slots.default && this.$slots.default();
|
||||
if (src && isImgExist) {
|
||||
children = <img src={src} srcset={srcset || srcSet} onError={this.handleImgLoadError} alt={alt} />;
|
||||
children = (
|
||||
<img src={src} srcset={srcset || srcSet} onError={this.handleImgLoadError} alt={alt} />
|
||||
);
|
||||
} else if (icon) {
|
||||
children = icon;
|
||||
} else {
|
||||
|
|
|
@ -40,7 +40,7 @@ export default defineComponent({
|
|||
setup() {
|
||||
return {
|
||||
configProvider: inject('configProvider', defaultConfigProvider),
|
||||
badgeCount: undefined
|
||||
badgeCount: undefined,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -161,10 +161,18 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
render() {
|
||||
const { prefixCls: customizePrefixCls, title, component: Tag = 'sup' as any, displayComponent } = this;
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
title,
|
||||
component: Tag = 'sup' as any,
|
||||
displayComponent,
|
||||
} = this;
|
||||
const getPrefixCls = this.configProvider.getPrefixCls;
|
||||
const prefixCls = getPrefixCls('scroll-number', customizePrefixCls);
|
||||
const { class: className, style = {} } = this.$attrs as {class?: string, style?: CSSProperties};
|
||||
const { class: className, style = {} } = this.$attrs as {
|
||||
class?: string;
|
||||
style?: CSSProperties;
|
||||
};
|
||||
if (displayComponent) {
|
||||
return cloneElement(displayComponent, {
|
||||
class: classNames(
|
||||
|
|
|
@ -15,16 +15,13 @@ export interface Route {
|
|||
|
||||
const BreadcrumbProps = {
|
||||
prefixCls: PropTypes.string,
|
||||
routes: {type: Array as PropType<Route[]>},
|
||||
routes: { type: Array as PropType<Route[]> },
|
||||
params: PropTypes.any,
|
||||
separator: PropTypes.VNodeChild,
|
||||
itemRender: {
|
||||
type: Function as PropType<(
|
||||
route: Route,
|
||||
params: any,
|
||||
routes: Array<Route>,
|
||||
paths: Array<string>,
|
||||
) => VueNode>
|
||||
type: Function as PropType<
|
||||
(route: Route, params: any, routes: Array<Route>, paths: Array<string>) => VueNode
|
||||
>,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -39,8 +36,13 @@ function getBreadcrumbName(route: Route, params: any) {
|
|||
);
|
||||
return name;
|
||||
}
|
||||
function defaultItemRender(opt: {route: Route, params: any, routes: Route[], paths: string[]}): VueNode {
|
||||
const { route, params, routes, paths } = opt
|
||||
function defaultItemRender(opt: {
|
||||
route: Route;
|
||||
params: any;
|
||||
routes: Route[];
|
||||
paths: string[];
|
||||
}): VueNode {
|
||||
const { route, params, routes, paths } = opt;
|
||||
const isLastItem = routes.indexOf(route) === routes.length - 1;
|
||||
const name = getBreadcrumbName(route, params);
|
||||
return isLastItem ? <span>{name}</span> : <a href={`#/${paths.join('/')}`}>{name}</a>;
|
||||
|
@ -63,7 +65,7 @@ export default defineComponent({
|
|||
return path;
|
||||
},
|
||||
|
||||
addChildPath(paths: string[], childPath: string = '', params: any) {
|
||||
addChildPath(paths: string[], childPath = '', params: any) {
|
||||
const originalPaths = [...paths];
|
||||
const path = this.getPath(childPath, params);
|
||||
if (path) {
|
||||
|
|
|
@ -18,7 +18,7 @@ export default defineComponent({
|
|||
configProvider: inject('configProvider', defaultConfigProvider),
|
||||
children: [],
|
||||
iconCom: undefined,
|
||||
delayTimeout: undefined
|
||||
delayTimeout: undefined,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
|
@ -68,7 +68,7 @@ export default defineComponent({
|
|||
ghost,
|
||||
block,
|
||||
$attrs,
|
||||
} = this
|
||||
} = this;
|
||||
const getPrefixCls = this.configProvider.getPrefixCls;
|
||||
const prefixCls = getPrefixCls('btn', customizePrefixCls);
|
||||
const autoInsertSpace = this.configProvider.autoInsertSpaceInButton !== false;
|
||||
|
@ -140,7 +140,7 @@ export default defineComponent({
|
|||
},
|
||||
render() {
|
||||
this.iconCom = getComponent(this, 'icon');
|
||||
const { type, htmlType, iconCom, disabled, handleClick, sLoading,href,title, $attrs } = this;
|
||||
const { type, htmlType, iconCom, disabled, handleClick, sLoading, href, title, $attrs } = this;
|
||||
const children = getSlot(this);
|
||||
this.children = children;
|
||||
const classes = this.getClasses();
|
||||
|
|
|
@ -32,10 +32,10 @@ export const HeaderProps = {
|
|||
yearSelectTotal: PropTypes.number,
|
||||
type: PropTypes.string,
|
||||
value: {
|
||||
type: Object as PropType<moment.Moment>
|
||||
type: Object as PropType<moment.Moment>,
|
||||
},
|
||||
validRange: {
|
||||
type: Array as PropType<moment.Moment[]>
|
||||
type: Array as PropType<moment.Moment[]>,
|
||||
},
|
||||
headerRender: PropTypes.func,
|
||||
onValueChange: PropTypes.func,
|
||||
|
@ -53,7 +53,7 @@ export default defineComponent({
|
|||
setup() {
|
||||
return {
|
||||
configProvider: inject('configProvider', defaultConfigProvider),
|
||||
calendarHeaderNode: undefined
|
||||
calendarHeaderNode: undefined,
|
||||
};
|
||||
},
|
||||
// private calendarHeaderNode: HTMLDivElement;
|
||||
|
@ -119,7 +119,7 @@ export default defineComponent({
|
|||
);
|
||||
},
|
||||
|
||||
onYearChange(year) {
|
||||
onYearChange(year: string) {
|
||||
const { value, validRange } = this;
|
||||
const newValue = value.clone();
|
||||
newValue.year(parseInt(year, 10));
|
||||
|
@ -138,17 +138,17 @@ export default defineComponent({
|
|||
this.$emit('valueChange', newValue);
|
||||
},
|
||||
|
||||
onMonthChange(month) {
|
||||
onMonthChange(month: string) {
|
||||
const newValue = this.value.clone();
|
||||
newValue.month(parseInt(month, 10));
|
||||
this.$emit('valueChange', newValue);
|
||||
},
|
||||
|
||||
onInternalTypeChange(e) {
|
||||
this.triggerTypeChange(e.target.value);
|
||||
onInternalTypeChange(e: Event) {
|
||||
this.triggerTypeChange((e.target as any).value);
|
||||
},
|
||||
|
||||
triggerTypeChange(val) {
|
||||
triggerTypeChange(val: string) {
|
||||
this.$emit('typeChange', val);
|
||||
},
|
||||
getMonthYearSelections(getPrefixCls) {
|
||||
|
@ -176,8 +176,8 @@ export default defineComponent({
|
|||
</Group>
|
||||
);
|
||||
},
|
||||
triggerValueChange() {
|
||||
this.$emit('valueChange', ...arguments);
|
||||
triggerValueChange(...args: any[]) {
|
||||
this.$emit('valueChange', ...args);
|
||||
},
|
||||
saveCalendarHeaderNode(node: HTMLElement) {
|
||||
this.calendarHeaderNode = node;
|
||||
|
|
|
@ -57,7 +57,7 @@ const Calendar = defineComponent({
|
|||
setup() {
|
||||
return {
|
||||
configProvider: inject('configProvider', defaultConfigProvider),
|
||||
sPrefixCls: undefined
|
||||
sPrefixCls: undefined,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
|
@ -124,7 +124,7 @@ const Calendar = defineComponent({
|
|||
getDateRange(
|
||||
validRange: [moment.Moment, moment.Moment],
|
||||
disabledDate?: (current: moment.Moment) => boolean,
|
||||
) {
|
||||
) {
|
||||
return (current: moment.Moment) => {
|
||||
if (!current) {
|
||||
return false;
|
||||
|
|
|
@ -266,12 +266,12 @@ const Cascader = defineComponent({
|
|||
},
|
||||
|
||||
defaultRenderFilteredOption(opt: {
|
||||
inputValue: string,
|
||||
path: CascaderOptionType[],
|
||||
prefixCls: string | undefined,
|
||||
names: FilledFieldNamesType,
|
||||
inputValue: string;
|
||||
path: CascaderOptionType[];
|
||||
prefixCls: string | undefined;
|
||||
names: FilledFieldNamesType;
|
||||
}) {
|
||||
const { inputValue, path, prefixCls, names } = opt
|
||||
const { inputValue, path, prefixCls, names } = opt;
|
||||
return path.map((option, index) => {
|
||||
const label = option[names.label];
|
||||
const node =
|
||||
|
@ -316,7 +316,7 @@ const Cascader = defineComponent({
|
|||
this.$emit('blur', e);
|
||||
},
|
||||
|
||||
handleInputClick(e: MouseEvent & {nativeEvent?: any}) {
|
||||
handleInputClick(e: MouseEvent & { nativeEvent?: any }) {
|
||||
const { inputFocused, sPopupVisible } = this;
|
||||
// Prevent `Trigger` behaviour.
|
||||
if (inputFocused || sPopupVisible) {
|
||||
|
@ -389,7 +389,7 @@ const Cascader = defineComponent({
|
|||
const { flattenOptions = [], inputValue } = this.$data;
|
||||
|
||||
// Limit the filter if needed
|
||||
let filtered: Array<CascaderOptionType[]>
|
||||
let filtered: Array<CascaderOptionType[]>;
|
||||
if (limit > 0) {
|
||||
filtered = [];
|
||||
let matchCount = 0;
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
import { CSSProperties, defineComponent, inject, PropType } from 'vue';
|
||||
import animation from '../_util/openAnimation';
|
||||
import {
|
||||
getOptionProps,
|
||||
getComponent,
|
||||
isValidElement,
|
||||
getSlot,
|
||||
} from '../_util/props-util';
|
||||
import { getOptionProps, getComponent, isValidElement, getSlot } from '../_util/props-util';
|
||||
import { cloneElement } from '../_util/vnode';
|
||||
import VcCollapse from '../vc-collapse';
|
||||
import RightOutlined from '@ant-design/icons-vue/RightOutlined';
|
||||
|
@ -13,7 +8,7 @@ import { defaultConfigProvider } from '../config-provider';
|
|||
import PropTypes from '../_util/vue-types';
|
||||
import { tuple, VueNode } from '../_util/type';
|
||||
|
||||
interface PanelProps {
|
||||
export interface PanelProps {
|
||||
isActive?: boolean;
|
||||
header?: VueNode;
|
||||
className?: string;
|
||||
|
@ -30,8 +25,8 @@ export default defineComponent({
|
|||
inheritAttrs: false,
|
||||
props: {
|
||||
prefixCls: PropTypes.string,
|
||||
activeKey: {type: [Array, Number, String] as PropType<ActiveKeyType>},
|
||||
defaultActiveKey: {type: [Array, Number, String] as PropType<ActiveKeyType>},
|
||||
activeKey: { type: [Array, Number, String] as PropType<ActiveKeyType> },
|
||||
defaultActiveKey: { type: [Array, Number, String] as PropType<ActiveKeyType> },
|
||||
accordion: PropTypes.looseBool,
|
||||
destroyInactivePanel: PropTypes.looseBool,
|
||||
bordered: PropTypes.looseBool.def(true),
|
||||
|
@ -47,7 +42,7 @@ export default defineComponent({
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
renderExpandIcon(panelProps: PanelProps={}, prefixCls: string) {
|
||||
renderExpandIcon(panelProps: PanelProps = {}, prefixCls: string) {
|
||||
const expandIcon = getComponent(this, 'expandIcon', panelProps);
|
||||
const icon = expandIcon || <RightOutlined rotate={panelProps.isActive ? 90 : undefined} />;
|
||||
return isValidElement(Array.isArray(expandIcon) ? icon[0] : icon)
|
||||
|
|
|
@ -30,7 +30,7 @@ const RenderEmpty = (props: RenderEmptyProps) => {
|
|||
return renderHtml(props.componentName);
|
||||
};
|
||||
|
||||
function renderEmpty(componentName?: string): VNodeChild | JSX.Element{
|
||||
function renderEmpty(componentName?: string): VNodeChild | JSX.Element {
|
||||
return <RenderEmpty componentName={componentName} />;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import moment from 'moment';
|
||||
import { CSSProperties, DefineComponent } from 'vue';
|
||||
import { CSSProperties } from 'vue';
|
||||
import { tuple, VueNode } from '../_util/type';
|
||||
|
||||
export type RangePickerValue =
|
||||
|
|
|
@ -7,10 +7,17 @@ interface ColProps {
|
|||
colon: boolean;
|
||||
type?: 'label' | 'content';
|
||||
layout?: 'horizontal' | 'vertical';
|
||||
colKey?: string
|
||||
colKey?: string;
|
||||
}
|
||||
const Col = (_props: ColProps, { attrs }: SetupContext) => {
|
||||
const { child = {} as VNode, bordered, colon, type, layout, colKey: key } = attrs as unknown as ColProps;
|
||||
const {
|
||||
child = {} as VNode,
|
||||
bordered,
|
||||
colon,
|
||||
type,
|
||||
layout,
|
||||
colKey: key,
|
||||
} = (attrs as unknown) as ColProps;
|
||||
const { prefixCls, span = 1 } = getOptionProps(child);
|
||||
const { children = {} as any, props = {} } = child;
|
||||
const label = props.label || (children.label && children.label());
|
||||
|
|
|
@ -52,7 +52,7 @@ const Drawer = defineComponent({
|
|||
configProvider,
|
||||
destroyClose: false,
|
||||
preVisible: props.visible,
|
||||
parentDrawer: inject('parentDrawer', null)
|
||||
parentDrawer: inject('parentDrawer', null),
|
||||
};
|
||||
},
|
||||
beforeCreate() {
|
||||
|
|
|
@ -38,7 +38,7 @@ export default defineComponent({
|
|||
setup() {
|
||||
return {
|
||||
configProvider: inject('configProvider', defaultConfigProvider),
|
||||
popupRef: null
|
||||
popupRef: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
|
@ -40,19 +40,19 @@ export type ValidationRule = {
|
|||
/** custom validate function (Note: callback must be called) */
|
||||
validator?: (rule: any, value: any, callback: any, source?: any, options?: any) => any;
|
||||
|
||||
trigger?: string
|
||||
trigger?: string;
|
||||
};
|
||||
|
||||
export const FormProps = {
|
||||
layout: PropTypes.oneOf(tuple('horizontal', 'inline', 'vertical')),
|
||||
labelCol: {type: Object as PropType<ColProps>},
|
||||
wrapperCol: {type: Object as PropType<ColProps>},
|
||||
labelCol: { type: Object as PropType<ColProps> },
|
||||
wrapperCol: { type: Object as PropType<ColProps> },
|
||||
colon: PropTypes.looseBool,
|
||||
labelAlign: PropTypes.oneOf(tuple('left', 'right')),
|
||||
prefixCls: PropTypes.string,
|
||||
hideRequiredMark: PropTypes.looseBool,
|
||||
model: PropTypes.object,
|
||||
rules: {type: Object as PropType<ValidationRule[]>},
|
||||
rules: { type: Object as PropType<ValidationRule[]> },
|
||||
validateMessages: PropTypes.object,
|
||||
validateOnRuleChange: PropTypes.looseBool,
|
||||
// 提交失败自动滚动到第一个错误字段
|
||||
|
@ -60,11 +60,9 @@ export const FormProps = {
|
|||
onFinish: PropTypes.func,
|
||||
onFinishFailed: PropTypes.func,
|
||||
name: PropTypes.string,
|
||||
validateTrigger: {type: [String, Array] as PropType<string | string[]>}
|
||||
validateTrigger: { type: [String, Array] as PropType<string | string[]> },
|
||||
};
|
||||
|
||||
|
||||
|
||||
function isEqualName(name1: any, name2: any) {
|
||||
return isEqual(toArray(name1), toArray(name2));
|
||||
}
|
||||
|
@ -87,7 +85,7 @@ const Form = defineComponent({
|
|||
fields: [],
|
||||
form: undefined,
|
||||
lastValidatePromise: null,
|
||||
vertical: computed(()=>props.layout === 'vertical')
|
||||
vertical: computed(() => props.layout === 'vertical'),
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -156,7 +154,7 @@ const Form = defineComponent({
|
|||
validate(...args: any[]) {
|
||||
return this.validateField(...args);
|
||||
},
|
||||
scrollToField(name: string | number , options = {}) {
|
||||
scrollToField(name: string | number, options = {}) {
|
||||
const fields = this.getFieldsByNameList([name]);
|
||||
if (fields.length) {
|
||||
const fieldId = fields[0].fieldId;
|
||||
|
@ -181,7 +179,9 @@ const Form = defineComponent({
|
|||
return values;
|
||||
} else {
|
||||
const res: any = {};
|
||||
toArray(nameList as NamePath[]).forEach((namePath) => (res[namePath as string] = values[namePath as string]));
|
||||
toArray(nameList as NamePath[]).forEach(
|
||||
namePath => (res[namePath as string] = values[namePath as string]),
|
||||
);
|
||||
return res;
|
||||
}
|
||||
},
|
||||
|
@ -196,7 +196,9 @@ const Form = defineComponent({
|
|||
return Promise.reject('Form `model` is required for validateFields to work.');
|
||||
}
|
||||
const provideNameList = !!nameList;
|
||||
const namePathList: InternalNamePath[] = provideNameList ? toArray(nameList).map(getNamePath) : [];
|
||||
const namePathList: InternalNamePath[] = provideNameList
|
||||
? toArray(nameList).map(getNamePath)
|
||||
: [];
|
||||
|
||||
// Collect result in promise list
|
||||
const promiseList: Promise<{
|
||||
|
@ -291,5 +293,5 @@ const Form = defineComponent({
|
|||
});
|
||||
|
||||
export default Form as typeof Form & {
|
||||
readonly Item: typeof FormItem
|
||||
readonly Item: typeof FormItem;
|
||||
};
|
||||
|
|
|
@ -44,7 +44,7 @@ function getPropByPath(obj: any, namePathList: any, strict?: boolean) {
|
|||
try {
|
||||
for (let len = keyArr.length; i < len - 1; ++i) {
|
||||
if (!tempObj && !strict) break;
|
||||
let key = keyArr[i];
|
||||
const key = keyArr[i];
|
||||
if (key in tempObj) {
|
||||
tempObj = tempObj[key];
|
||||
} else {
|
||||
|
@ -74,20 +74,20 @@ export const FormItemProps = {
|
|||
label: PropTypes.VNodeChild,
|
||||
help: PropTypes.VNodeChild,
|
||||
extra: PropTypes.VNodeChild,
|
||||
labelCol: {type: Object as PropType<ColProps>},
|
||||
wrapperCol: {type: Object as PropType<ColProps>},
|
||||
labelCol: { type: Object as PropType<ColProps> },
|
||||
wrapperCol: { type: Object as PropType<ColProps> },
|
||||
hasFeedback: PropTypes.looseBool.def(false),
|
||||
colon: PropTypes.looseBool,
|
||||
labelAlign: PropTypes.oneOf(tuple('left', 'right')),
|
||||
prop: {type: [String, Number, Array] as PropType<string | number | string[] | number[]>},
|
||||
name: {type: [String, Number, Array] as PropType<string | number | string[] | number[]>},
|
||||
prop: { type: [String, Number, Array] as PropType<string | number | string[] | number[]> },
|
||||
name: { type: [String, Number, Array] as PropType<string | number | string[] | number[]> },
|
||||
rules: PropTypes.oneOfType([Array, Object]),
|
||||
autoLink: PropTypes.looseBool.def(true),
|
||||
required: PropTypes.looseBool,
|
||||
validateFirst: PropTypes.looseBool,
|
||||
validateStatus: PropTypes.oneOf(tuple('', 'success', 'warning', 'error', 'validating')),
|
||||
validateTrigger: {type: [String, Array] as PropType<string | string[]>},
|
||||
messageVariables: {type: Object as PropType<Record<string, string>>},
|
||||
validateTrigger: { type: [String, Array] as PropType<string | string[]> },
|
||||
messageVariables: { type: Object as PropType<Record<string, string>> },
|
||||
};
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -97,14 +97,14 @@ export default defineComponent({
|
|||
__ANT_NEW_FORM_ITEM: true,
|
||||
props: FormItemProps,
|
||||
setup(props) {
|
||||
const FormContext = inject('FormContext', {}) as any
|
||||
const fieldName = computed(()=>props.name || props.prop);
|
||||
const namePath = computed(()=>{
|
||||
const val = fieldName.value
|
||||
return getNamePath(val)
|
||||
})
|
||||
const fieldId = computed(()=>{
|
||||
const {id} = props;
|
||||
const FormContext = inject('FormContext', {}) as any;
|
||||
const fieldName = computed(() => props.name || props.prop);
|
||||
const namePath = computed(() => {
|
||||
const val = fieldName.value;
|
||||
return getNamePath(val);
|
||||
});
|
||||
const fieldId = computed(() => {
|
||||
const { id } = props;
|
||||
if (id) {
|
||||
return id;
|
||||
} else if (!namePath.value.length) {
|
||||
|
@ -114,19 +114,17 @@ export default defineComponent({
|
|||
const mergedId = namePath.value.join('_');
|
||||
return formName ? `${formName}_${mergedId}` : mergedId;
|
||||
}
|
||||
})
|
||||
const fieldValue = computed(()=> {
|
||||
});
|
||||
const fieldValue = computed(() => {
|
||||
const model = FormContext.model;
|
||||
if (!model || !fieldName.value) {
|
||||
return;
|
||||
}
|
||||
return getPropByPath(model, namePath.value, true).v;
|
||||
})
|
||||
});
|
||||
const mergedValidateTrigger = computed(() => {
|
||||
let validateTrigger =
|
||||
props.validateTrigger !== undefined
|
||||
? props.validateTrigger
|
||||
: FormContext.validateTrigger;
|
||||
props.validateTrigger !== undefined ? props.validateTrigger : FormContext.validateTrigger;
|
||||
validateTrigger = validateTrigger === undefined ? 'change' : validateTrigger;
|
||||
return toArray(validateTrigger);
|
||||
});
|
||||
|
@ -134,7 +132,7 @@ export default defineComponent({
|
|||
let formRules = FormContext.rules;
|
||||
const selfRules = props.rules;
|
||||
const requiredRule =
|
||||
props.required !== undefined
|
||||
props.required !== undefined
|
||||
? { required: !!props.required, trigger: mergedValidateTrigger.value }
|
||||
: [];
|
||||
const prop = getPropByPath(formRules, namePath.value);
|
||||
|
@ -147,7 +145,7 @@ export default defineComponent({
|
|||
}
|
||||
};
|
||||
const isRequired = computed(() => {
|
||||
let rules = getRules();
|
||||
const rules = getRules();
|
||||
let isRequired = false;
|
||||
if (rules && rules.length) {
|
||||
rules.every(rule => {
|
||||
|
@ -170,7 +168,7 @@ export default defineComponent({
|
|||
isRequired,
|
||||
getRules,
|
||||
fieldValue,
|
||||
mergedValidateTrigger
|
||||
mergedValidateTrigger,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
|
@ -182,7 +180,7 @@ export default defineComponent({
|
|||
validator: {},
|
||||
helpShow: false,
|
||||
errors: [],
|
||||
initialValue: undefined
|
||||
initialValue: undefined,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -386,7 +384,9 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
renderWrapper(prefixCls: string, children: VueNode) {
|
||||
const { wrapperCol: contextWrapperCol } = (this.isFormItemChildren ? {} : this.FormContext) as any;
|
||||
const { wrapperCol: contextWrapperCol } = (this.isFormItemChildren
|
||||
? {}
|
||||
: this.FormContext) as any;
|
||||
const { wrapperCol } = this;
|
||||
const mergedWrapperCol = wrapperCol || contextWrapperCol || {};
|
||||
const { style, id, ...restProps } = mergedWrapperCol;
|
||||
|
|
|
@ -16,7 +16,7 @@ export function fixControlledValue(value) {
|
|||
|
||||
export function resolveOnChange(target, e, onChange) {
|
||||
if (onChange) {
|
||||
let event = e;
|
||||
const event = e;
|
||||
if (e.type === 'click') {
|
||||
// click clear icon
|
||||
//event = Object.create(e);
|
||||
|
@ -59,7 +59,7 @@ export default defineComponent({
|
|||
configProvider: inject('configProvider', defaultConfigProvider),
|
||||
removePasswordTimeout: undefined,
|
||||
input: null,
|
||||
clearableInput: null
|
||||
clearableInput: null,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
|
@ -165,7 +165,7 @@ export default defineComponent({
|
|||
if (!inputProps.autofocus) {
|
||||
delete inputProps.autofocus;
|
||||
}
|
||||
const inputNode = <input {...inputProps} />
|
||||
const inputNode = <input {...inputProps} />;
|
||||
return withDirectives(inputNode as VNode, [[antInputDirective]]);
|
||||
},
|
||||
clearPasswordValueAttribute() {
|
||||
|
|
|
@ -27,7 +27,7 @@ export default defineComponent({
|
|||
setup() {
|
||||
return {
|
||||
input: null,
|
||||
}
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {PropType, VNode} from 'vue';
|
||||
import { PropType, VNode } from 'vue';
|
||||
import ResizeObserver from '../vc-resize-observer';
|
||||
import omit from 'omit.js';
|
||||
import classNames from '../_util/classNames';
|
||||
|
@ -23,8 +23,8 @@ export interface AutoSizeType {
|
|||
|
||||
const TextAreaProps = {
|
||||
...inputProps,
|
||||
autosize: { type: [Boolean, Object] as PropType<AutoSizeType>, default: undefined},
|
||||
autoSize: {type: [Boolean, Object] as PropType<AutoSizeType>, default: undefined},
|
||||
autosize: { type: [Boolean, Object] as PropType<AutoSizeType>, default: undefined },
|
||||
autoSize: { type: [Boolean, Object] as PropType<AutoSizeType>, default: undefined },
|
||||
onResize: PropTypes.func,
|
||||
};
|
||||
|
||||
|
@ -51,7 +51,7 @@ const ResizableTextArea = defineComponent({
|
|||
nextFrameActionId: undefined,
|
||||
textArea: null,
|
||||
resizeFrameId: undefined,
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value() {
|
||||
|
@ -155,7 +155,9 @@ const ResizableTextArea = defineComponent({
|
|||
}
|
||||
return (
|
||||
<ResizeObserver onResize={this.handleResize} disabled={!(autoSize || autosize)}>
|
||||
{withDirectives(<textarea {...textareaProps} ref={this.saveTextArea} /> as VNode, [[antInput]])}
|
||||
{withDirectives((<textarea {...textareaProps} ref={this.saveTextArea} />) as VNode, [
|
||||
[antInput],
|
||||
])}
|
||||
</ResizeObserver>
|
||||
);
|
||||
},
|
||||
|
|
|
@ -28,7 +28,7 @@ function loadingFilterOption() {
|
|||
return true;
|
||||
}
|
||||
|
||||
function getMentions(value: string = '', config: MentionsConfig) {
|
||||
function getMentions(value = '', config: MentionsConfig) {
|
||||
const { prefix = '@', split = ' ' } = config || {};
|
||||
const prefixList = Array.isArray(prefix) ? prefix : [prefix];
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import RcSelect, { Option, OptGroup, SelectProps as RcSelectProps, BaseProps } f
|
|||
import { OptionProps as OptionPropsType } from '../vc-select2/Option';
|
||||
import { defaultConfigProvider } from '../config-provider';
|
||||
import getIcons from './utils/iconUtil';
|
||||
import { computed, defineComponent, inject, ref, VNodeChild, App, PropType, reactive } from 'vue';
|
||||
import { computed, defineComponent, inject, ref, VNodeChild, App, PropType } from 'vue';
|
||||
import PropTypes from '../_util/vue-types';
|
||||
import { tuple } from '../_util/type';
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import DownOutlined from '@ant-design/icons-vue/DownOutlined';
|
||||
import LoadingOutlined from '@ant-design/icons-vue/LoadingOutlined';
|
||||
import CheckOutlined from '@ant-design/icons-vue/CheckOutlined';
|
||||
|
@ -7,15 +6,12 @@ import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled';
|
|||
import SearchOutlined from '@ant-design/icons-vue/SearchOutlined';
|
||||
|
||||
export default function getIcons(props: any, slots: any = {}) {
|
||||
const {
|
||||
loading,
|
||||
multiple,
|
||||
prefixCls,
|
||||
} = props;
|
||||
const suffixIcon = props.suffixIcon || slots.suffixIcon && slots.suffixIcon();
|
||||
const clearIcon = props.clearIcon || slots.clearIcon && slots.clearIcon();
|
||||
const menuItemSelectedIcon = props.menuItemSelectedIcon || slots.menuItemSelectedIcon && slots.menuItemSelectedIcon();
|
||||
const removeIcon = props.removeIcon || slots.removeIcon && slots.removeIcon();
|
||||
const { loading, multiple, prefixCls } = props;
|
||||
const suffixIcon = props.suffixIcon || (slots.suffixIcon && slots.suffixIcon());
|
||||
const clearIcon = props.clearIcon || (slots.clearIcon && slots.clearIcon());
|
||||
const menuItemSelectedIcon =
|
||||
props.menuItemSelectedIcon || (slots.menuItemSelectedIcon && slots.menuItemSelectedIcon());
|
||||
const removeIcon = props.removeIcon || (slots.removeIcon && slots.removeIcon());
|
||||
// Clear Icon
|
||||
let mergedClearIcon = clearIcon;
|
||||
if (!clearIcon) {
|
||||
|
|
|
@ -43,8 +43,8 @@ export default defineComponent({
|
|||
const prefixCls = getPrefixCls('statistic', customizePrefixCls);
|
||||
|
||||
const title = getComponent(this, 'title');
|
||||
let prefix = getComponent(this, 'prefix');
|
||||
let suffix = getComponent(this, 'suffix');
|
||||
const prefix = getComponent(this, 'prefix');
|
||||
const suffix = getComponent(this, 'suffix');
|
||||
const formatter = getComponent(this, 'formatter', {}, false);
|
||||
const props = {
|
||||
...this.$props,
|
||||
|
|
|
@ -35,6 +35,6 @@ export default () => ({
|
|||
destroyTooltipOnHide: PropTypes.looseBool.def(false),
|
||||
align: PropTypes.object.def(() => ({})),
|
||||
builtinPlacements: PropTypes.object,
|
||||
children: PropTypes.VNodeChild,
|
||||
children: PropTypes.array,
|
||||
onVisibleChange: PropTypes.func,
|
||||
});
|
||||
|
|
|
@ -39,7 +39,7 @@ const Combobox = {
|
|||
console.log('onSelect', v, option);
|
||||
},
|
||||
|
||||
onSearch(text: string) {
|
||||
onSearch(text) {
|
||||
console.log('onSearch:', text);
|
||||
},
|
||||
|
|
@ -3,12 +3,6 @@
|
|||
import Select, { Option } from '..';
|
||||
import '../assets/index.less';
|
||||
|
||||
interface ControlledState {
|
||||
destroy: boolean;
|
||||
value: string | number;
|
||||
open: boolean;
|
||||
}
|
||||
|
||||
const Controlled = {
|
||||
data: () => ({
|
||||
destroy: false,
|
|
@ -1087,8 +1087,8 @@ export default function generateSelector<
|
|||
inputValue,
|
||||
searchValue,
|
||||
filterOption,
|
||||
optionFilterProp = 'value',
|
||||
autoClearSearchValue = true,
|
||||
optionFilterProp,
|
||||
autoClearSearchValue,
|
||||
onSearch,
|
||||
|
||||
// Icons
|
||||
|
@ -1119,7 +1119,7 @@ export default function generateSelector<
|
|||
dropdownMatchSelectWidth,
|
||||
dropdownRender,
|
||||
dropdownAlign,
|
||||
showAction = [],
|
||||
showAction,
|
||||
direction,
|
||||
|
||||
// Tags
|
||||
|
|
18
package.json
18
package.json
|
@ -18,14 +18,12 @@
|
|||
],
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
"typings": "types/index.d.ts",
|
||||
"unpkg": "dist/antd.min.js",
|
||||
"typings": "lib/index.d.ts",
|
||||
"files": [
|
||||
"components",
|
||||
"dist",
|
||||
"lib",
|
||||
"es",
|
||||
"types",
|
||||
"scripts"
|
||||
"es"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "webpack-dev-server",
|
||||
|
@ -55,6 +53,10 @@
|
|||
"url": "git+https://github.com/vueComponent/ant-design-vue.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/ant-design-vue"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/vueComponent/ant-design-vue/issues"
|
||||
},
|
||||
|
@ -76,6 +78,7 @@
|
|||
"@babel/plugin-transform-property-literals": "^7.8.3",
|
||||
"@babel/plugin-transform-runtime": "^7.10.5",
|
||||
"@babel/plugin-transform-template-literals": "^7.8.3",
|
||||
"@babel/plugin-transform-typescript": "^7.12.1",
|
||||
"@babel/polyfill": "^7.8.7",
|
||||
"@babel/preset-env": "^7.9.6",
|
||||
"@babel/preset-typescript": "^7.10.4",
|
||||
|
@ -127,7 +130,8 @@
|
|||
"gulp": "^4.0.1",
|
||||
"gulp-babel": "^8.0.0",
|
||||
"gulp-strip-code": "^0.1.4",
|
||||
"html-webpack-plugin": "^4.0.0",
|
||||
"gulp-typescript": "^6.0.0-alpha.1",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"husky": "^4.0.0",
|
||||
"istanbul-instrumenter-loader": "^3.0.0",
|
||||
"jest": "^26.0.0",
|
||||
|
@ -188,7 +192,7 @@
|
|||
"vue-style-loader": "^4.1.2",
|
||||
"vue-virtual-scroller": "^1.0.0",
|
||||
"vuex": "^4.0.0-beta.2",
|
||||
"webpack": "^5.0.0",
|
||||
"webpack": "^4.28.4",
|
||||
"webpack-bundle-analyzer": "^3.8.0",
|
||||
"webpack-cli": "^3.2.1",
|
||||
"webpack-dev-server": "^3.1.14",
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"ant-design-vue": ["components/index.tsx"]
|
||||
"ant-design-vue": ["components/index.tsx"],
|
||||
"ant-design-vue/es/*": ["components/*"]
|
||||
},
|
||||
"strictNullChecks": false,
|
||||
"strict": true,
|
||||
|
@ -18,5 +19,5 @@
|
|||
"skipLibCheck": true,
|
||||
"allowJs": true
|
||||
},
|
||||
"exclude": ["node_modules", "lib", "es"]
|
||||
"exclude": ["node_modules", "lib", "es", "antd-tools", "dist"]
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
|
||||
export declare class Affix extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* Pixels to offset from top when calculating position of scroll
|
||||
* @default 0
|
||||
* @type number
|
||||
*/
|
||||
offsetTop?: number;
|
||||
|
||||
/**
|
||||
* Pixels to offset from bottom when calculating position of scroll
|
||||
* @type number
|
||||
*/
|
||||
offsetBottom?: number;
|
||||
|
||||
/**
|
||||
* specifies the scrollable area dom node
|
||||
* @default () => window
|
||||
* @type Function
|
||||
*/
|
||||
target?: () => HTMLElement;
|
||||
};
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
export declare class Alert extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* Called when close animation is finished
|
||||
* @type Function
|
||||
*/
|
||||
afterClose?: () => void;
|
||||
|
||||
/**
|
||||
* Whether to show as banner
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
banner?: boolean;
|
||||
|
||||
/**
|
||||
* Whether Alert can be closed
|
||||
* @type boolean
|
||||
*/
|
||||
closable?: boolean;
|
||||
|
||||
/**
|
||||
* Close text to show
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
closeText?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* additional content of Alert
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
description?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Custom icon, effective when showIcon is true
|
||||
* @type any (VNode | slot)
|
||||
*/
|
||||
icon?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Content of Alert
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
message?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Whether to show icon
|
||||
* @default false, in banner mode default is true
|
||||
* @type boolean
|
||||
*/
|
||||
showIcon?: boolean;
|
||||
|
||||
/**
|
||||
* Type of Alert styles, options: success, info, warning, error
|
||||
* @default info, in banner mode default is warning
|
||||
* @type string
|
||||
*/
|
||||
type?: 'success' | 'info' | 'warning' | 'error';
|
||||
};
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { VNodeChild } from 'vue';
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export declare class AnchorLink extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* target of hyperlink
|
||||
* @type string
|
||||
*/
|
||||
href?: string;
|
||||
|
||||
/**
|
||||
* content of hyperlink
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
title?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Specifies where to display the linked URL
|
||||
* @version 1.5.0
|
||||
*/
|
||||
target?: string;
|
||||
};
|
||||
}
|
|
@ -1,95 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { CSSProperties } from 'vue';
|
||||
import { AnchorLink } from './anchor-link';
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export declare class Anchor extends AntdComponent {
|
||||
static Link: typeof AnchorLink;
|
||||
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* Fixed mode of Anchor
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
affix?: boolean;
|
||||
|
||||
/**
|
||||
* Bounding distance of anchor area
|
||||
* @default 5
|
||||
* @type number
|
||||
*/
|
||||
bounds?: number;
|
||||
|
||||
/**
|
||||
* Scrolling container
|
||||
* @default () => window
|
||||
* @type Function
|
||||
*/
|
||||
getContainer?: () => HTMLElement;
|
||||
|
||||
/**
|
||||
* Pixels to offset from bottom when calculating position of scroll
|
||||
* @type number
|
||||
*/
|
||||
offsetBottom?: number;
|
||||
|
||||
/**
|
||||
* Pixels to offset from top when calculating position of scroll
|
||||
* @default 0
|
||||
* @type number
|
||||
*/
|
||||
offsetTop?: number;
|
||||
|
||||
/**
|
||||
* Whether show ink-balls in Fixed mode
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
showInkInFixed?: boolean;
|
||||
|
||||
/**
|
||||
* The class name of the container
|
||||
* @type string
|
||||
*/
|
||||
wrapperClass?: string;
|
||||
|
||||
/**
|
||||
* The style of the container
|
||||
* @type object
|
||||
*/
|
||||
wrapperStyle?: CSSProperties | string;
|
||||
|
||||
/**
|
||||
* Customize the anchor highlight
|
||||
* @version 1.5.0
|
||||
* @type function
|
||||
* @return string
|
||||
*/
|
||||
getCurrentAnchor?: () => string;
|
||||
|
||||
/**
|
||||
* Anchor scroll offset, default as `offsetTop`
|
||||
* e.g. https://antdv.com/components/anchor/#components-anchor-demo-targetOffset
|
||||
* @version 1.5.0
|
||||
* @type number
|
||||
*/
|
||||
targetOffset?: number;
|
||||
|
||||
/**
|
||||
* set the handler to handle click event
|
||||
* @param e
|
||||
* @param link
|
||||
*/
|
||||
onClick?: (e?: Event, link?: { [key: string]: any }) => void;
|
||||
|
||||
/**
|
||||
* Listening for anchor link change
|
||||
* @param currentActiveLink
|
||||
*/
|
||||
onChange?: (currentActiveLink?: string) => void;
|
||||
};
|
||||
}
|
|
@ -1,141 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { App } from 'vue';
|
||||
|
||||
import { Affix } from './affix';
|
||||
import { Anchor } from './anchor/anchor';
|
||||
import { AutoComplete } from './auto-complete';
|
||||
import { Alert } from './alert';
|
||||
import { Avatar } from './avatar';
|
||||
import { BackTop } from './back-top';
|
||||
import { Badge } from './badge';
|
||||
import { Breadcrumb } from './breadcrumb/breadcrumb';
|
||||
import { Button } from './button/button';
|
||||
import { Calendar } from './calendar';
|
||||
import { Card } from './card';
|
||||
import { Collapse } from './collapse/collapse';
|
||||
import { Comment } from './comment';
|
||||
import { Carousel } from './carousel';
|
||||
import { Cascader } from './cascader';
|
||||
import { Checkbox } from './checkbox/checkbox';
|
||||
import { Col } from './grid/col';
|
||||
import { ConfigProvider } from './config-provider';
|
||||
import { DatePicker } from './date-picker/date-picker';
|
||||
import { Divider } from './divider';
|
||||
import { Drawer } from './drawer';
|
||||
import { Dropdown } from './dropdown/dropdown';
|
||||
import { Empty } from './empty';
|
||||
import { Form } from './form/form';
|
||||
import { Input } from './input/input';
|
||||
import { InputNumber } from './input-number';
|
||||
import { Layout } from './layout/layout';
|
||||
import { List } from './list/list';
|
||||
import { Space } from './space';
|
||||
import { Message } from './message';
|
||||
import { Mentions } from './mentions/mentions';
|
||||
import { Menu } from './menu/menu';
|
||||
import { Modal } from './modal';
|
||||
import { Notification } from './notification';
|
||||
import { Pagination } from './pagination';
|
||||
import { Popconfirm } from './popconfirm';
|
||||
import { Popover } from './popover';
|
||||
import { Progress } from './progress';
|
||||
import { Radio } from './radio/radio';
|
||||
import { Rate } from './rate';
|
||||
import { Row } from './grid/row';
|
||||
import { Select } from './select/select';
|
||||
import { Skeleton } from './skeleton';
|
||||
import { Slider } from './slider';
|
||||
import { Spin } from './spin';
|
||||
import { Statistic } from './statistic/statistic';
|
||||
import { Steps } from './steps/steps';
|
||||
import { Switch } from './switch';
|
||||
import { Table } from './table/table';
|
||||
import { Transfer } from './transfer';
|
||||
import { Tree } from './tree/tree';
|
||||
import { TreeSelect } from './tree-select';
|
||||
import { Tabs } from './tabs/tabs';
|
||||
import { Tag } from './tag/tag';
|
||||
import { TimePicker } from './time-picker';
|
||||
import { Timeline } from './timeline/timeline';
|
||||
import { Tooltip } from './tootip/tooltip';
|
||||
import { Upload } from './upload';
|
||||
import { Result } from './result';
|
||||
import { Descriptions } from './descriptions/descriptions';
|
||||
import { PageHeader } from './page-header';
|
||||
|
||||
/**
|
||||
* Install all ant-design-vue components into Vue.
|
||||
* Please do not invoke this method directly.
|
||||
* Call `Vue.use(Antd)` to install.
|
||||
*/
|
||||
export function install(app: App): void;
|
||||
|
||||
declare const message: Message;
|
||||
declare const notification: Notification;
|
||||
|
||||
export {
|
||||
Affix,
|
||||
Anchor,
|
||||
AutoComplete,
|
||||
Alert,
|
||||
Avatar,
|
||||
BackTop,
|
||||
Badge,
|
||||
Breadcrumb,
|
||||
Button,
|
||||
Calendar,
|
||||
Card,
|
||||
Collapse,
|
||||
Comment,
|
||||
Carousel,
|
||||
Cascader,
|
||||
Checkbox,
|
||||
Col,
|
||||
ConfigProvider,
|
||||
DatePicker,
|
||||
Divider,
|
||||
Dropdown,
|
||||
Empty,
|
||||
Form,
|
||||
Input,
|
||||
InputNumber,
|
||||
Layout,
|
||||
List,
|
||||
Space,
|
||||
message,
|
||||
Menu,
|
||||
Mentions,
|
||||
Modal,
|
||||
notification,
|
||||
Pagination,
|
||||
Popconfirm,
|
||||
Popover,
|
||||
Progress,
|
||||
Radio,
|
||||
Rate,
|
||||
Row,
|
||||
Select,
|
||||
Slider,
|
||||
Spin,
|
||||
Statistic,
|
||||
Steps,
|
||||
Switch,
|
||||
Table,
|
||||
Transfer,
|
||||
Tree,
|
||||
TreeSelect,
|
||||
Tabs,
|
||||
Tag,
|
||||
TimePicker,
|
||||
Timeline,
|
||||
Tooltip,
|
||||
Upload,
|
||||
Drawer,
|
||||
Skeleton,
|
||||
Result,
|
||||
Descriptions,
|
||||
PageHeader,
|
||||
};
|
|
@ -1,111 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
import { CSSProperties } from 'vue';
|
||||
|
||||
export declare type Value = { key: string };
|
||||
|
||||
export declare type SelectValue = string | number | Value | Array<Value | string | number>;
|
||||
|
||||
export declare class AutoComplete extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
dropdownMenuStyle: CSSProperties;
|
||||
/**
|
||||
* Show clear button, effective in multiple mode only.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
allowClear: boolean;
|
||||
|
||||
/**
|
||||
* get focus when component mounted
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
autofocus: boolean;
|
||||
|
||||
/**
|
||||
* backfill selected item the input when using keyboard
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
backfill: boolean;
|
||||
|
||||
/**
|
||||
* Data source for autocomplete
|
||||
* @type slot | Array<{ value: String, text: String }>
|
||||
*/
|
||||
dataSource: any;
|
||||
|
||||
/**
|
||||
* Whether active first option by default
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
defaultActiveFirstOption: boolean;
|
||||
|
||||
/**
|
||||
* Initial selected option.
|
||||
* @type SelectValue
|
||||
*/
|
||||
defaultValue: SelectValue;
|
||||
|
||||
/**
|
||||
* Whether disabled select
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled: boolean;
|
||||
|
||||
/**
|
||||
* If true, filter options by input, if function, filter options against it.
|
||||
* The function will receive two arguments, inputValue and option,
|
||||
* if the function returns true, the option will be included in the filtered set; Otherwise, it will be excluded.
|
||||
* @default true
|
||||
* @type boolean | Function
|
||||
*/
|
||||
filterOption: boolean | Function;
|
||||
|
||||
/**
|
||||
* Which prop value of option will render as content of select.
|
||||
* @default 'children'
|
||||
* @type string
|
||||
*/
|
||||
optionLabelProp: string;
|
||||
|
||||
/**
|
||||
* placeholder of input
|
||||
* @type string
|
||||
*/
|
||||
placeholder: string;
|
||||
|
||||
/**
|
||||
* selected option
|
||||
* @type SelectValue
|
||||
*/
|
||||
value: SelectValue;
|
||||
|
||||
/**
|
||||
* Initial open state of dropdown
|
||||
* @type boolean
|
||||
*/
|
||||
defaultOpen: boolean;
|
||||
|
||||
/**
|
||||
* Controlled open state of dropdown
|
||||
* @type boolean
|
||||
*/
|
||||
open: boolean;
|
||||
};
|
||||
/**
|
||||
* remove focus
|
||||
*/
|
||||
blur(): void;
|
||||
|
||||
/**
|
||||
* get focus
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { VNodeChild } from 'vue';
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
|
||||
export declare class Avatar extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* the Icon type for an icon avatar, see Icon Component
|
||||
* @type any (VNode | slot)
|
||||
*/
|
||||
icon?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* the shape of avatar
|
||||
* @default 'circle'
|
||||
* @type string
|
||||
*/
|
||||
shape?: 'circle' | 'square';
|
||||
|
||||
/**
|
||||
* the size of the avatar
|
||||
* @default 'default'
|
||||
* @type number | string
|
||||
*/
|
||||
size?: 'small' | 'large' | 'default' | number;
|
||||
|
||||
/**
|
||||
* the address of the image for an image avatar
|
||||
* @type string
|
||||
*/
|
||||
src?: string;
|
||||
|
||||
/**
|
||||
* a list of sources to use for different screen resolutions
|
||||
* @type string
|
||||
*/
|
||||
srcSet?: string;
|
||||
|
||||
/**
|
||||
* This attribute defines the alternative text describing the image
|
||||
* @type string
|
||||
*/
|
||||
alt?: string;
|
||||
|
||||
/**
|
||||
* handler when img load error,return false to prevent default fallback behavior
|
||||
* @type
|
||||
*/
|
||||
loadError?: () => boolean;
|
||||
};
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
|
||||
export declare class BackTop extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* specifies the scrollable area dom node
|
||||
* @default () => window
|
||||
* @type Function
|
||||
*/
|
||||
target?: () => HTMLElement;
|
||||
|
||||
/**
|
||||
* the BackTop button will not show until the scroll height reaches this value
|
||||
* @default 400
|
||||
* @type number
|
||||
*/
|
||||
visibilityHeight?: number;
|
||||
};
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
import { VNodeChild, CSSProperties } from 'vue';
|
||||
|
||||
export declare class Badge extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
color?: string;
|
||||
|
||||
/**
|
||||
* Number to show in badge, support slot
|
||||
* @type number | string | VNode
|
||||
*/
|
||||
count?: number | VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* to display a red dot instead of count
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
dot?: boolean;
|
||||
|
||||
/**
|
||||
* set offset of the badge dot, like [x, y]
|
||||
* @type Array<number | string>
|
||||
*/
|
||||
offset?: Array<number | string>;
|
||||
|
||||
/**
|
||||
* Max count to show
|
||||
* @default 99
|
||||
* @type number
|
||||
*/
|
||||
overflowCount?: number;
|
||||
|
||||
/**
|
||||
* Whether to show badge when count is zero
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
showZero?: boolean;
|
||||
|
||||
/**
|
||||
* Set Badge as a status dot
|
||||
* @type string
|
||||
*/
|
||||
status?: 'success' | 'processing' | 'default' | 'error' | 'warning';
|
||||
|
||||
/**
|
||||
* If status is set, text sets the display text of the status dot
|
||||
* @type string
|
||||
*/
|
||||
text?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* sets the display style of the status dot
|
||||
* @type
|
||||
*/
|
||||
numberStyle?: CSSProperties | string;
|
||||
|
||||
/**
|
||||
* Text to show when hovering over the badge
|
||||
* @default 'count'
|
||||
* @type string
|
||||
*/
|
||||
title?: string;
|
||||
};
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
export declare class BreadcrumbItem extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* add navigation
|
||||
* @default ''
|
||||
* @type string
|
||||
*/
|
||||
href?: string;
|
||||
overlay?: any;
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
export declare class BreadcrumbSeparator {}
|
|
@ -1,56 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { VNode } from 'vue';
|
||||
import { BreadcrumbItem } from './breadcrumb-item';
|
||||
import { BreadcrumbSeparator } from './breadcrumb-separator';
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export interface Route {
|
||||
path?: string;
|
||||
breadcrumbName?: string;
|
||||
children?: Route[];
|
||||
}
|
||||
|
||||
export declare class Breadcrumb extends AntdComponent {
|
||||
static Item: typeof BreadcrumbItem;
|
||||
static Separator: typeof BreadcrumbSeparator;
|
||||
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* The routing stack information of router
|
||||
* @type Route[]
|
||||
*/
|
||||
routes?: Route[];
|
||||
|
||||
/**
|
||||
* Routing parameters
|
||||
* @type object
|
||||
*/
|
||||
params?: object;
|
||||
|
||||
/**
|
||||
* Custom separator
|
||||
* @default '/'
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
separator?: string | VNode | VNode[];
|
||||
|
||||
/**
|
||||
* Custom item renderer, slot="itemRender" and slot-scope="{route, params, routes, paths}"
|
||||
* @type Function
|
||||
*/
|
||||
itemRender?: ({
|
||||
route,
|
||||
params,
|
||||
routes,
|
||||
paths,
|
||||
}: {
|
||||
route: any;
|
||||
params: any;
|
||||
routes: any;
|
||||
paths: any;
|
||||
}) => VNode;
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export declare class ButtonGroup extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* can be set to small large or omitted
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size?: 'small' | 'large' | 'default';
|
||||
};
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { ButtonGroup } from './button-group';
|
||||
import { VNodeChild } from 'vue';
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export interface ButtonProps extends AntdProps {
|
||||
/**
|
||||
* can be set to primary ghost dashed danger(added in 2.7) or omitted (meaning default)
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
type?: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default' | 'link';
|
||||
|
||||
/**
|
||||
* set the original html type of button
|
||||
* @default 'button'
|
||||
* @type string
|
||||
*/
|
||||
htmlType?: 'button' | 'submit' | 'reset' | 'menu';
|
||||
|
||||
/**
|
||||
* set the icon of button
|
||||
* @type string
|
||||
*/
|
||||
icon?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* can be set to circle or circle-outline or omitted
|
||||
* @type string
|
||||
*/
|
||||
shape?: 'circle' | 'circle-outline';
|
||||
|
||||
/**
|
||||
* can be set to small large or omitted
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size?: 'small' | 'large' | 'default';
|
||||
|
||||
/**
|
||||
* set the loading status of button
|
||||
* @default false
|
||||
* @type boolean | { delay: number }
|
||||
*/
|
||||
loading?: boolean | { delay: number };
|
||||
|
||||
/**
|
||||
* disabled state of button
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* make background transparent and invert text and border colors, added in 2.7
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
ghost?: boolean;
|
||||
|
||||
/**
|
||||
* option to fit button width to its parent width
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
block?: boolean;
|
||||
|
||||
onClick?: (e?: Event) => void;
|
||||
}
|
||||
|
||||
export declare class Button extends AntdComponent {
|
||||
static Group: typeof ButtonGroup;
|
||||
$props: ButtonProps;
|
||||
}
|
|
@ -1,123 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
import { Moment } from 'moment';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
export interface RenderHeader {
|
||||
value: Moment;
|
||||
onChange?: (value: Moment) => void;
|
||||
type: string;
|
||||
onTypeChange?: (type: string) => void;
|
||||
}
|
||||
|
||||
export declare class Calendar extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* render custom header in panel
|
||||
* @param headerRender
|
||||
* @version 1.5.0
|
||||
*/
|
||||
headerRender?: (headerRender: RenderHeader) => VNodeChild | JSX.Element;
|
||||
/**
|
||||
* Customize the display of the date cell by setting a scoped slot,
|
||||
* the returned content will be appended to the cell
|
||||
* @type Function
|
||||
*/
|
||||
dateCellRender?: (date: Moment) => VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Customize the display of the date cell by setting a scoped slot,
|
||||
* the returned content will override the cell
|
||||
* @type Function
|
||||
*/
|
||||
dateFullCellRender?: (date: Moment) => VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* The date selected by default
|
||||
* @default default date
|
||||
* @type Moment
|
||||
*/
|
||||
defaultValue?: Moment | string;
|
||||
|
||||
/**
|
||||
* Function that specifies the dates that cannot be selected
|
||||
* @type Function
|
||||
*/
|
||||
disabledDate?: (currentDate: Moment) => boolean;
|
||||
|
||||
/**
|
||||
* Whether to display in full-screen
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
fullscreen?: boolean;
|
||||
|
||||
/**
|
||||
* The calendar's locale
|
||||
* @default [default]
|
||||
* @type object
|
||||
* @see https://github.com/vueComponent/ant-design-vue/blob/master/components/date-picker/locale/example.json
|
||||
*/
|
||||
locale?: object;
|
||||
|
||||
/**
|
||||
* The display mode of the calendar
|
||||
* @default 'month'
|
||||
* @type string
|
||||
*/
|
||||
mode?: 'month' | 'year';
|
||||
|
||||
/**
|
||||
* Customize the display of the month cell by setting a scoped slot, the returned content will be appended to the cell
|
||||
* @type Function
|
||||
*/
|
||||
monthCellRender?: (date: Moment) => VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Customize the display of the month cell by setting a scoped slot, the returned content will override the cell
|
||||
* @type Function
|
||||
*/
|
||||
monthFullCellRender?: (date: Moment) => VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* to set valid range
|
||||
* @type [Moment, Moment]
|
||||
*/
|
||||
validRange?: [Moment, Moment];
|
||||
|
||||
/**
|
||||
* The current selected date
|
||||
* @default current date
|
||||
* @type Moment
|
||||
*/
|
||||
value?: Moment | string;
|
||||
/**
|
||||
* optional, format of binding value. If not specified,
|
||||
* the binding value will be a Date object
|
||||
* @version 1.5.4
|
||||
*/
|
||||
valueFormat?: string;
|
||||
|
||||
/**
|
||||
* Callback for when panel changes
|
||||
* @param date
|
||||
* @param mode
|
||||
*/
|
||||
onPanelChange?: (date?: Moment | string, mode?: string) => void;
|
||||
|
||||
/**
|
||||
* Callback for when a date is selected
|
||||
* @param date
|
||||
*/
|
||||
onSelect?: (date?: Moment | string) => void;
|
||||
|
||||
/**
|
||||
* Callback for when value change
|
||||
* @param date
|
||||
*/
|
||||
onChange?: (date?: Moment | string) => void;
|
||||
};
|
||||
}
|
|
@ -1,105 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { VNodeChild, CSSProperties } from 'vue';
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
import { Meta } from './meta';
|
||||
|
||||
export type CardSize = 'default' | 'small';
|
||||
|
||||
export declare class Card extends AntdComponent {
|
||||
static Grid: any;
|
||||
static Meta: typeof Meta;
|
||||
|
||||
$props: AntdProps & {
|
||||
tabBarExtraContent?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* The action list, shows at the bottom of the Card.
|
||||
* @type any (slots)
|
||||
*/
|
||||
actions?: VNodeChild[] | JSX.Element[];
|
||||
|
||||
/**
|
||||
* Current TabPane's key
|
||||
* @type string
|
||||
*/
|
||||
activeTabKey?: string;
|
||||
|
||||
/**
|
||||
* Inline style to apply to the card head
|
||||
* @type object
|
||||
*/
|
||||
headStyle?: CSSProperties;
|
||||
|
||||
/**
|
||||
* Inline style to apply to the card content
|
||||
* @type object
|
||||
*/
|
||||
bodyStyle?: CSSProperties;
|
||||
|
||||
/**
|
||||
* Toggles rendering of the border around the card
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
bordered?: boolean;
|
||||
|
||||
/**
|
||||
* Card cover
|
||||
* @type any (slot)
|
||||
*/
|
||||
cover?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Initial active TabPane's key, if activeTabKey is not set.
|
||||
* @type string
|
||||
*/
|
||||
defaultActiveTabKey?: string;
|
||||
|
||||
/**
|
||||
* Content to render in the top-right corner of the card
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
extra?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Lift up when hovering card
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
hoverable?: boolean;
|
||||
|
||||
/**
|
||||
* Shows a loading indicator while the contents of the card are being fetched
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
loading?: boolean;
|
||||
|
||||
/**
|
||||
* List of TabPane's head, Custom tabs can be created with the scopedSlots property
|
||||
* @type Array<{key: string, tab: any, scopedSlots: {tab: string}}>
|
||||
*/
|
||||
tabList?: Array<{ key: string; tab: any; slots: { tab: string } }>;
|
||||
|
||||
/**
|
||||
* Card title
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
title?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Card style type, can be set to inner or not set
|
||||
* @type string
|
||||
*/
|
||||
type?: 'inner';
|
||||
|
||||
/**
|
||||
* Size of card
|
||||
* @type string
|
||||
*/
|
||||
size?: CardSize;
|
||||
};
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
|
||||
export type DotPosition = 'top' | 'bottom' | 'left' | 'right';
|
||||
export interface Settings {
|
||||
accessibility?: boolean;
|
||||
adaptiveHeight?: boolean;
|
||||
arrows?: boolean;
|
||||
autoplaySpeed?: number;
|
||||
autoplay?: boolean;
|
||||
centerMode?: boolean;
|
||||
centerPadding?: string;
|
||||
cssEase?: string;
|
||||
dotsClass?: string;
|
||||
dots?: boolean;
|
||||
draggable?: boolean;
|
||||
easing?: string;
|
||||
edgeFriction?: number;
|
||||
fade?: boolean;
|
||||
focusOnSelect?: boolean;
|
||||
infinite?: boolean;
|
||||
initialSlide?: number;
|
||||
pauseOnDotsHover?: boolean;
|
||||
pauseOnFocus?: boolean;
|
||||
pauseOnHover?: boolean;
|
||||
responsive?: ResponsiveObject[];
|
||||
rows?: number;
|
||||
rtl?: boolean;
|
||||
slide?: string;
|
||||
slidesPerRow?: number;
|
||||
slidesToScroll?: number;
|
||||
slidesToShow?: number;
|
||||
speed?: number;
|
||||
swipeToSlide?: boolean;
|
||||
swipe?: boolean;
|
||||
touchMove?: boolean;
|
||||
touchThreshold?: number;
|
||||
useCSS?: boolean;
|
||||
useTransform?: boolean;
|
||||
variableWidth?: boolean;
|
||||
vertical?: boolean;
|
||||
verticalSwiping?: boolean;
|
||||
waitForAnimate?: boolean;
|
||||
dotPosition?: DotPosition;
|
||||
}
|
||||
export interface ResponsiveObject {
|
||||
breakpoint: number;
|
||||
settings: 'unslick' | Settings;
|
||||
}
|
||||
export declare class Carousel extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
accessibility?: boolean;
|
||||
adaptiveHeight?: boolean;
|
||||
arrows?: boolean;
|
||||
autoplaySpeed?: number;
|
||||
/**
|
||||
* Whether to scroll automatically
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
autoplay?: boolean;
|
||||
centerMode?: boolean;
|
||||
centerPadding?: string;
|
||||
cssEase?: string;
|
||||
dotsClass?: string;
|
||||
/**
|
||||
* Whether to show the dots at the bottom of the gallery
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
dots?: boolean;
|
||||
draggable?: boolean;
|
||||
/**
|
||||
* Transition interpolation function name
|
||||
* @default 'linear'
|
||||
* @type string
|
||||
*/
|
||||
easing?: string;
|
||||
edgeFriction?: number;
|
||||
fade?: boolean;
|
||||
focusOnSelect?: boolean;
|
||||
infinite?: boolean;
|
||||
initialSlide?: number;
|
||||
pauseOnDotsHover?: boolean;
|
||||
pauseOnFocus?: boolean;
|
||||
pauseOnHover?: boolean;
|
||||
responsive?: ResponsiveObject[] | undefined;
|
||||
rows?: number;
|
||||
rtl?: boolean;
|
||||
slide?: string;
|
||||
slidesPerRow?: number;
|
||||
slidesToScroll?: number;
|
||||
slidesToShow?: number;
|
||||
speed?: number;
|
||||
swipeToSlide?: boolean;
|
||||
swipe?: boolean;
|
||||
touchMove?: boolean;
|
||||
touchThreshold?: number;
|
||||
useCSS?: boolean;
|
||||
useTransform?: boolean;
|
||||
variableWidth?: boolean;
|
||||
/**
|
||||
* Whether to use a vertical display
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
vertical?: boolean;
|
||||
verticalSwiping?: boolean;
|
||||
waitForAnimate?: boolean;
|
||||
dotPosition?: DotPosition;
|
||||
/**
|
||||
* Callback function called after the current index changes
|
||||
* @type Function
|
||||
*/
|
||||
afterChange?: (current: number) => void;
|
||||
|
||||
/**
|
||||
* Callback function called before the current index changes
|
||||
* @type Function
|
||||
*/
|
||||
beforeChange?: (from?: number, to?: number) => void;
|
||||
|
||||
/**
|
||||
* Transition effect
|
||||
* @default 'scrollx'
|
||||
* @type string
|
||||
*/
|
||||
effect?: 'scrollx' | 'fade';
|
||||
};
|
||||
|
||||
/**
|
||||
* Go to slide index, if dontAnimate=true, it happens without animation
|
||||
* @param slideNumber slide number to go
|
||||
* @param dontAnimate animate or not
|
||||
*/
|
||||
goTo(slideNumber: number, dontAnimate: boolean): void;
|
||||
|
||||
/**
|
||||
* Next
|
||||
* @description Change current slide to next slide
|
||||
*/
|
||||
next(): void;
|
||||
|
||||
/**
|
||||
* Previous
|
||||
* @description Change current slide to previous slide
|
||||
*/
|
||||
prev(): void;
|
||||
}
|
|
@ -1,211 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
import { VNode, VNodeChild, CSSProperties } from 'vue';
|
||||
|
||||
export interface CascaderOptionType {
|
||||
value?: string | number;
|
||||
label?: any;
|
||||
disabled?: boolean;
|
||||
children?: any;
|
||||
key?: string | number;
|
||||
}
|
||||
|
||||
export interface ShowSearchType {
|
||||
/**
|
||||
* The function will receive two arguments, inputValue and option,
|
||||
* if the function returns true, the option will be included in the filtered set; Otherwise, it will be excluded.
|
||||
* @type Function
|
||||
*/
|
||||
filter?: (inputValue: any, path: any) => boolean;
|
||||
|
||||
/**
|
||||
* Used to render filtered options, you can use slot="showSearchRender" and slot-scope="{inputValue, path}"
|
||||
* @type Function
|
||||
*/
|
||||
render?: ({ inputValue, path }: { inputValue: any; path: any }) => VNode;
|
||||
|
||||
/**
|
||||
* Used to sort filtered options.
|
||||
* @type Function
|
||||
*/
|
||||
sort?: (a: any, b: any, inputValue: any) => any;
|
||||
|
||||
/**
|
||||
* Whether the width of result list equals to input's
|
||||
* @type boolean
|
||||
*/
|
||||
matchInputWidth?: boolean;
|
||||
|
||||
/**
|
||||
* Set the count of filtered items
|
||||
* @default 50
|
||||
* @type number | false
|
||||
*/
|
||||
limit?: number | false;
|
||||
}
|
||||
|
||||
export declare class Cascader extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* whether allow clear
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
allowClear?: boolean;
|
||||
|
||||
/**
|
||||
* get focus when component mounted
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
autofocus?: boolean;
|
||||
|
||||
/**
|
||||
* change value on each selection if set to true.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
changeOnSelect?: boolean;
|
||||
|
||||
/**
|
||||
* initial selected value
|
||||
* @type Array<string | number>
|
||||
*/
|
||||
defaultValue?: Array<string | number>;
|
||||
|
||||
/**
|
||||
* Whether disabled select
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* render function of displaying selected options, you can use slot="displayRender" and slot-scope="{labels, selectedOptions}"
|
||||
* @default labels => labels.join(' / ')
|
||||
* @type Function
|
||||
*/
|
||||
displayRender?: ({
|
||||
labels,
|
||||
selectedOptions,
|
||||
}: {
|
||||
labels: string[];
|
||||
selectedOptions: CascaderOptionType[];
|
||||
}) => VNodeChild;
|
||||
|
||||
/**
|
||||
* expand current item when click or hover, one of 'click' 'hover'
|
||||
* @default 'click'
|
||||
* @type string
|
||||
*/
|
||||
expandTrigger?: 'click' | 'hover';
|
||||
|
||||
/**
|
||||
* custom field name for label and value and children
|
||||
* @default { label: 'label', value: 'value', children: 'children' }
|
||||
* @type { value: string; label: string; children?: string; }
|
||||
*/
|
||||
fieldNames?: {
|
||||
value: string;
|
||||
label: string;
|
||||
children?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parent Node which the selector should be rendered to. Default to body.
|
||||
* When position issues happen, try to modify it into scrollable content and position it relative.
|
||||
* @default () => document.body
|
||||
* @type Function
|
||||
*/
|
||||
getPopupContainer?: (triggerNode: any) => HTMLElement;
|
||||
|
||||
/**
|
||||
* To load option lazily, and it cannot work with showSearch
|
||||
* @type Function
|
||||
*/
|
||||
loadData?: (selectedOptions: CascaderOptionType[]) => void;
|
||||
|
||||
/**
|
||||
* Specify content to show when no result matches.
|
||||
* @default 'Not Found'
|
||||
* @type string
|
||||
*/
|
||||
notFoundContent?: string;
|
||||
|
||||
/**
|
||||
* data options of cascade
|
||||
* @type CascaderOptionType
|
||||
*/
|
||||
options?: CascaderOptionType;
|
||||
|
||||
/**
|
||||
* input placeholder
|
||||
* @default 'Please select'
|
||||
* @type string
|
||||
*/
|
||||
placeholder?: string;
|
||||
|
||||
/**
|
||||
* additional className of popup overlay
|
||||
* @type string
|
||||
*/
|
||||
popupClassName?: string;
|
||||
|
||||
/**
|
||||
* additional style of popup overlay
|
||||
* @type object
|
||||
*/
|
||||
popupStyle?: CSSProperties;
|
||||
|
||||
/**
|
||||
* use preset popup align config from builtinPlacements:bottomLeft bottomRight topLeft topRight
|
||||
* @default 'bottomLeft'
|
||||
* @type string
|
||||
*/
|
||||
popupPlacement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';
|
||||
|
||||
/**
|
||||
* set visible of cascader popup
|
||||
* @type boolean
|
||||
*/
|
||||
popupVisible?: boolean;
|
||||
|
||||
/**
|
||||
* Whether show search input in single mode.
|
||||
* @default false
|
||||
* @type boolean | ShowSearchType
|
||||
*/
|
||||
showSearch?: boolean | ShowSearchType;
|
||||
|
||||
/**
|
||||
* input size, one of large default small
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size?: 'large' | 'default' | 'small';
|
||||
|
||||
/**
|
||||
* The custom suffix icon
|
||||
* @type String | VNode | slot
|
||||
*/
|
||||
suffixIcon?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* selected value
|
||||
* @type Array<string | number>
|
||||
*/
|
||||
value?: Array<string | number>;
|
||||
};
|
||||
/**
|
||||
* remove focus
|
||||
*/
|
||||
blur(): void;
|
||||
|
||||
/**
|
||||
* get focus
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
export declare class CheckboxGroup extends AntdComponent {
|
||||
$props: Omit<AntdProps, 'onChange'> & {
|
||||
/**
|
||||
* Default selected value
|
||||
* @type string[]
|
||||
*/
|
||||
defaultValue?: string[];
|
||||
|
||||
/**
|
||||
* Disable all checkboxes
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* Specifies options, you can customize `label` with slot = "label" slot-scope = "option"
|
||||
* @type Array<string | { label: string, value: string, disabled?: boolean, onChange?: Function }>
|
||||
*/
|
||||
options?: Array<
|
||||
string | { label: string; value: string; disabled?: boolean; onChange?: Function }
|
||||
>;
|
||||
|
||||
/**
|
||||
* Used for setting the currently selected value.
|
||||
* @type string[]
|
||||
*/
|
||||
value?: string[];
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The callback function that is triggered when the state changes.
|
||||
* @param {string[]} checkedValue
|
||||
*/
|
||||
onChange?: (checkedValue?: string[]) => void;
|
||||
};
|
||||
}
|
|
@ -1,81 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { CheckboxGroup } from './checkbox-group';
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export interface CheckboxChangeEvent {
|
||||
target: CheckboxProps & { checked: boolean };
|
||||
stopPropagation: () => void;
|
||||
preventDefault: () => void;
|
||||
nativeEvent: MouseEvent;
|
||||
}
|
||||
|
||||
export interface CheckboxProps {
|
||||
prefixCls?: string;
|
||||
name?: string;
|
||||
id?: string;
|
||||
type?: string;
|
||||
|
||||
/**
|
||||
* Specifies the initial state: whether or not the checkbox is selected.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
defaultChecked?: boolean;
|
||||
|
||||
/**
|
||||
* Specifies whether the checkbox is selected.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
checked?: boolean;
|
||||
|
||||
/**
|
||||
* Disable checkbox
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
tabindex?: string | number;
|
||||
readonly?: boolean;
|
||||
|
||||
/**
|
||||
* get focus when component mounted
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
autofocus?: boolean;
|
||||
value?: any;
|
||||
}
|
||||
|
||||
export declare class Checkbox extends AntdComponent {
|
||||
static Group: typeof CheckboxGroup;
|
||||
|
||||
$props: Omit<AntdProps, 'onChange'> &
|
||||
CheckboxProps & {
|
||||
/**
|
||||
* indeterminate checked state of checkbox
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
indeterminate?: boolean;
|
||||
|
||||
/**
|
||||
* remove focus
|
||||
*/
|
||||
onBlur?: (e: FocusEvent) => void;
|
||||
|
||||
/**
|
||||
* get focus
|
||||
*/
|
||||
onFocus?: (e: FocusEvent) => void;
|
||||
|
||||
/**
|
||||
* The callback function that is triggered when the state changes.
|
||||
* @param event
|
||||
*/
|
||||
onChange?: (e: CheckboxChangeEvent) => void;
|
||||
};
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export declare class CollapsePanel extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* If true, panel cannot be opened or closed
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* Forced render of content on panel, instead of lazy rending after clicking on header
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
forceRender?: boolean;
|
||||
|
||||
/**
|
||||
* Title of the panel
|
||||
* @type string
|
||||
*/
|
||||
header?: string;
|
||||
|
||||
/**
|
||||
* Unique key identifying the panel from among its siblings
|
||||
* @type string
|
||||
*/
|
||||
key?: string;
|
||||
|
||||
/**
|
||||
* If false, panel will not show arrow icon
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
showArrow?: boolean;
|
||||
|
||||
extra?: any;
|
||||
};
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
import { CollapsePanel } from './collapse-panel';
|
||||
export type ExpandIconPosition = 'left' | 'right';
|
||||
export declare class Collapse extends AntdComponent {
|
||||
static Panel: typeof CollapsePanel;
|
||||
$props: AntdProps & {
|
||||
expandIconPosition?: ExpandIconPosition;
|
||||
/**
|
||||
* If true, Collapse renders as Accordion
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
accordion?: boolean;
|
||||
|
||||
/**
|
||||
* Key of the active panel
|
||||
* @default No default value. In accordion mode, it's the key of the first panel.
|
||||
* @type string | string[]
|
||||
*/
|
||||
activeKey?: string | string[];
|
||||
|
||||
/**
|
||||
* Toggles rendering of the border around the collapse block
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
bordered?: boolean;
|
||||
|
||||
/**
|
||||
* Key of the initial active panel
|
||||
* @type string
|
||||
*/
|
||||
defaultActiveKey?: string | string[];
|
||||
|
||||
/**
|
||||
* Destroy Inactive Panel
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
destroyInactivePanel?: boolean;
|
||||
|
||||
/**
|
||||
* allow to customize collapse icon.
|
||||
* @type any (function | slot-scope)
|
||||
*/
|
||||
expandIcon?: any;
|
||||
};
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue Definitions by:
|
||||
// https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
import Pickr from '@simonwep/pickr';
|
||||
|
||||
export declare class ColorPicker extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/** simonwep/pickr's options */
|
||||
config?: Pickr.Options;
|
||||
/**prefix class name */
|
||||
prefixCls?: string;
|
||||
/** default color value */
|
||||
defaultValue?: string;
|
||||
/** color value */
|
||||
value?: string;
|
||||
/**
|
||||
* language package setting
|
||||
* @type object
|
||||
*/
|
||||
locale: object;
|
||||
/**
|
||||
* precision of color value
|
||||
* @default 0
|
||||
* @type number
|
||||
* */
|
||||
colorRounded?: number;
|
||||
/**
|
||||
* descriptions size type
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size: 'large' | 'default' | 'small';
|
||||
/**
|
||||
* Parent Node which the selector should be rendered to. Default to body.
|
||||
* When position issues happen, try to modify it into scrollable content and position it relative.
|
||||
* @default () => document.body
|
||||
* @type Function
|
||||
*/
|
||||
getPopupContainer: (triggerNode: any) => HTMLElement;
|
||||
/**
|
||||
* Disabled or not
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled: boolean;
|
||||
/**
|
||||
* to set the color format
|
||||
* @default "HEXA"
|
||||
*/
|
||||
format: Pickr.Representation;
|
||||
};
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { VNodeChild } from 'vue';
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
|
||||
export declare class Comment extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/** List of action items rendered below the comment content
|
||||
* any ( array | slot )
|
||||
*/
|
||||
actions?: VNodeChild | JSX.Element;
|
||||
|
||||
/** The element to display as the comment author
|
||||
* @type any ( string | slot)
|
||||
*/
|
||||
author?: VNodeChild | JSX.Element;
|
||||
|
||||
/** The element to display as the comment avatar - generally an antd Avatar
|
||||
* @type any ( string | slot)
|
||||
*/
|
||||
avatar?: VNodeChild | JSX.Element;
|
||||
|
||||
/** The main content of the comment
|
||||
* @type any ( string | slot)
|
||||
*/
|
||||
content?: VNodeChild | JSX.Element;
|
||||
|
||||
/** Comment prefix defaults to '.ant-comment'
|
||||
* @type string
|
||||
*/
|
||||
prefixCls?: string;
|
||||
|
||||
/** A datetime element containing the time to be displayed
|
||||
* @type any ( string | slot)
|
||||
*/
|
||||
datetime?: VNodeChild | JSX.Element;
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { App, HTMLAttributes } from 'vue';
|
||||
|
||||
export declare class AntdComponent {
|
||||
static install(app: App): void;
|
||||
}
|
||||
|
||||
export type AntdProps = HTMLAttributes;
|
|
@ -1,20 +0,0 @@
|
|||
import { AntdComponent, AntdProps } from './component';
|
||||
import { App, VNodeChild } from 'vue';
|
||||
|
||||
import { Locale } from './locale-provider';
|
||||
|
||||
export interface CSPConfig {
|
||||
nonce?: string;
|
||||
}
|
||||
|
||||
export declare class ConfigProvider extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
getPopupContainer?: (triggerNode: HTMLElement, dialogContext?: App | null) => HTMLElement;
|
||||
getPrefixCls?: (suffixCls: string, customizePrefixCls?: string) => string;
|
||||
renderEmpty?: Function | VNodeChild | JSX.Element;
|
||||
csp?: CSPConfig;
|
||||
autoInsertSpaceInButton?: boolean;
|
||||
transformCellText?: Function | VNodeChild | JSX.Element;
|
||||
locale: Locale | object;
|
||||
};
|
||||
}
|
|
@ -1,137 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { Moment } from 'moment';
|
||||
import { VNodeChild } from 'vue';
|
||||
import { AntdComponent } from '../component';
|
||||
|
||||
export declare class DatepickerProps {
|
||||
/**
|
||||
* Whether to show clear button
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
allowClear?: boolean;
|
||||
|
||||
/**
|
||||
* get focus when component mounted
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
autofocus?: boolean;
|
||||
|
||||
/**
|
||||
* custom rendering function for date cells by setting a scoped slot
|
||||
* @type VNodeChild | JSX.Element (slot="dateRender" slot-scope="current, today")
|
||||
*/
|
||||
dateRender?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* determine whether the DatePicker is disabled
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* specify the date that cannot be selected
|
||||
* @type Function
|
||||
*/
|
||||
disabledDate?: (currentDate?: Moment) => boolean;
|
||||
|
||||
/**
|
||||
* to set the container of the floating layer, while the default is to create a div element in body
|
||||
* @type Function
|
||||
*/
|
||||
getCalendarContainer?: (trigger?: any) => HTMLElement;
|
||||
|
||||
/**
|
||||
* localization configuration
|
||||
* @type any
|
||||
*/
|
||||
locale?: object;
|
||||
|
||||
/**
|
||||
* picker panel mode *(Cannot select year or month anymore?
|
||||
* @see https://antdv.com/docs/vue/faq#When-set-mode-to-DatePicker/RangePicker,-cannot-select-year-or-month-anymore?
|
||||
*/
|
||||
mode?: 'time' | 'date' | 'month' | 'year' | 'decade';
|
||||
|
||||
/**
|
||||
* open state of picker
|
||||
* @type boolean
|
||||
*/
|
||||
open?: boolean;
|
||||
|
||||
/**
|
||||
* placeholder of date input
|
||||
* @type string | string[]
|
||||
*/
|
||||
placeholder?: string | string[];
|
||||
|
||||
/**
|
||||
* to customize the style of the popup calendar
|
||||
* @type object
|
||||
*/
|
||||
popupStyle?: object;
|
||||
|
||||
/**
|
||||
* to customize the className of the popup calendar
|
||||
* @type string
|
||||
*/
|
||||
dropdownClassName?: string;
|
||||
|
||||
/**
|
||||
* determine the size of the input box, the height of large and small, are 40px and 24px respectively, while default size is 32px
|
||||
* @type string
|
||||
*/
|
||||
size?: 'large' | 'small' | 'default';
|
||||
|
||||
/**
|
||||
* The custom suffix icon
|
||||
* @type any (VNode | slot)
|
||||
*/
|
||||
suffixIcon?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Set the readonly attribute of the input tag (avoids virtual keyboard on touch devices)
|
||||
* @version 1.5.4
|
||||
*/
|
||||
inputReadOnly?: boolean;
|
||||
|
||||
/**
|
||||
* this value will be merged into placement's config, please refer to the settings
|
||||
* @see https://github.com/yiminghe/dom-align
|
||||
* @version 1.5.4
|
||||
*/
|
||||
align?: object;
|
||||
|
||||
/**
|
||||
* optional, format of binding value. If not specified, the binding value will be a Date object
|
||||
* @version 1.5.4
|
||||
*/
|
||||
valueFormat?: string;
|
||||
|
||||
/**
|
||||
* a callback function, can be executed whether the popup calendar is popped up or closed
|
||||
*/
|
||||
onOpenChange?: (status?: any) => void;
|
||||
|
||||
/**
|
||||
* callback when picker panel mode is changed
|
||||
*/
|
||||
onPanelChange?: (value?: any, mode?: any) => void;
|
||||
}
|
||||
|
||||
export declare class DatepickerMethod extends AntdComponent {
|
||||
/**
|
||||
* remove focus
|
||||
*/
|
||||
blur(): void;
|
||||
|
||||
/**
|
||||
* get focus
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
|
@ -1,96 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { DatepickerProps, DatepickerMethod } from './common';
|
||||
import { Moment } from 'moment';
|
||||
import { RangePicker } from './range-picker';
|
||||
import { MonthPicker } from './month-picker';
|
||||
import { WeekPicker } from './week-picker';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
declare class DatePickerProps extends DatepickerProps {
|
||||
/**
|
||||
* Defualt Value
|
||||
* @description to set default date
|
||||
* @default undefined
|
||||
* @type Moment
|
||||
*/
|
||||
defaultValue?: Moment | string;
|
||||
|
||||
/**
|
||||
* Default Picker Value
|
||||
* @description to set default picker date
|
||||
* @default undefined
|
||||
* @type Moment
|
||||
*/
|
||||
defaultPickerValue?: Moment | string;
|
||||
|
||||
/**
|
||||
* Disabled Time
|
||||
* @description to specify the time that cannot be selected
|
||||
* @default undefined
|
||||
* @type Function (function(date))
|
||||
*/
|
||||
disabledTime?: Function;
|
||||
|
||||
/**
|
||||
* Format
|
||||
* @description to set the date format, refer to moment.js http://momentjs.com
|
||||
* @default 'YYYY-MM-DD'
|
||||
* @type string
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* Render Extra Footer
|
||||
* @description render extra footer in panel by setting a scoped slot
|
||||
* @default undefined
|
||||
* @type any (slot="renderExtraFooter")
|
||||
*/
|
||||
renderExtraFooter?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Show Time
|
||||
* @description to provide an additional time selection
|
||||
* showTime.defaultValue to set default time of selected date - type Moment
|
||||
* --
|
||||
* @default TimePicker Options
|
||||
* @type object | boolean
|
||||
*/
|
||||
showTime?: object | boolean;
|
||||
|
||||
/**
|
||||
* Show Today
|
||||
* @description whether to show "Today" button
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
showToday?: boolean;
|
||||
|
||||
/**
|
||||
* Value
|
||||
* @description to set date
|
||||
* @default undefined
|
||||
* @type Moment
|
||||
*/
|
||||
value?: Moment | string;
|
||||
|
||||
/**
|
||||
* a callback function, can be executed when the selected time is changing
|
||||
*/
|
||||
onChange?: (date?: Moment | string, dateString?: string) => void;
|
||||
|
||||
/**
|
||||
* callback when click ok button
|
||||
*/
|
||||
onOk?: () => void;
|
||||
}
|
||||
|
||||
export declare class DatePicker extends DatepickerMethod {
|
||||
static RangePicker: typeof RangePicker;
|
||||
static MonthPicker: typeof MonthPicker;
|
||||
static WeekPicker: typeof WeekPicker;
|
||||
|
||||
$props: DatePickerProps;
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { DatepickerMethod, DatepickerProps } from './common';
|
||||
import { Moment } from 'moment';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
declare class MonthPickerProps extends DatepickerProps {
|
||||
/**
|
||||
* to set default date
|
||||
* @type Moment
|
||||
*/
|
||||
defaultValue?: Moment | string;
|
||||
|
||||
/**
|
||||
* to set default picker date
|
||||
* @type Moment
|
||||
*/
|
||||
defaultPickerValue?: Moment | string;
|
||||
|
||||
/**
|
||||
* to set the date format, When an array is provided, all values are used for parsing and first value for display. refer to moment.js
|
||||
* @default 'YYYY-MM'
|
||||
* @type string | string[]
|
||||
* @see http://momentjs.com
|
||||
*/
|
||||
format?: string | string[];
|
||||
|
||||
/**
|
||||
* Custom month cell content render method by setting a scoped slot
|
||||
* @type Function (slot="monthCellContentRender", slot-scope="date, locale")
|
||||
*/
|
||||
monthCellContentRender?: Function | VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* render extra footer in panel by setting a scoped slot
|
||||
* @type any (slot="renderExtraFooter")
|
||||
*/
|
||||
renderExtraFooter?: Function | VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* to set date
|
||||
* @type Moment
|
||||
*/
|
||||
value?: Moment | string;
|
||||
|
||||
/**
|
||||
* a callback function, can be executed when the selected time is changing
|
||||
*/
|
||||
onChange?: (date?: Moment | string, dateString?: string) => void;
|
||||
}
|
||||
|
||||
export declare class MonthPicker extends DatepickerMethod {
|
||||
$props: MonthPickerProps;
|
||||
}
|
|
@ -1,90 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { DatepickerMethod, DatepickerProps } from './common';
|
||||
import { Moment } from 'moment';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
declare class RangePickerProps extends DatepickerProps {
|
||||
/**
|
||||
* to set default date
|
||||
* @type [Moment, Moment]
|
||||
*/
|
||||
defaultValue?: [Moment, Moment] | [string, string];
|
||||
|
||||
/**
|
||||
* to set default picker date
|
||||
* @type [Moment, Moment]
|
||||
*/
|
||||
defaultPickerValue?: [Moment, Moment] | [string, string];
|
||||
|
||||
/**
|
||||
* to specify the time that cannot be selected
|
||||
* @type Function
|
||||
*/
|
||||
disabledTime?: (dates: [Moment, Moment], partial: 'start' | 'end') => any;
|
||||
|
||||
/**
|
||||
* to set the date format, refer to moment.js
|
||||
* @default 'YYYY-MM-DD HH:mm:ss'
|
||||
* @type string
|
||||
* @see http://momentjs.com
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* preseted ranges for quick selection
|
||||
* @type object
|
||||
*/
|
||||
ranges?: { [range: string]: Moment[] } | { [range: string]: () => Moment[] };
|
||||
|
||||
/**
|
||||
* render extra footer in panel by setting a scoped slot
|
||||
* @type any (slot="renderExtraFooter")
|
||||
*/
|
||||
renderExtraFooter?: Function | VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* set separator between inputs
|
||||
* @default '~'
|
||||
* @version 1.5.0
|
||||
*/
|
||||
separator?: string;
|
||||
|
||||
/**
|
||||
* to provide an additional time selection
|
||||
* showTime.defaultValue to set default time of selected date - type Moment[]
|
||||
* @default TimePicker Options
|
||||
* @type object | boolean
|
||||
*/
|
||||
showTime?: object | boolean;
|
||||
|
||||
/**
|
||||
* to set date
|
||||
* @type [Moment, Moment]
|
||||
*/
|
||||
value?: [Moment, Moment] | [string, string];
|
||||
|
||||
/**
|
||||
* a callback function, can be executed when the start time or the end time of the range is changing
|
||||
*/
|
||||
onCalendarChange?: (
|
||||
dates?: [Moment, Moment] | [string, string],
|
||||
dateStrings?: [string, string],
|
||||
) => void;
|
||||
|
||||
/**
|
||||
* a callback function, can be executed when the selected time is changing
|
||||
*/
|
||||
onChange?: (dates?: [Moment, Moment] | [string, string], dateStrings?: [string, string]) => void;
|
||||
|
||||
/**
|
||||
* callback when click ok button
|
||||
*/
|
||||
onOk?: (dates?: [Moment, Moment] | [string, string]) => void;
|
||||
}
|
||||
|
||||
export declare class RangePicker extends DatepickerMethod {
|
||||
$props: RangePickerProps;
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { DatepickerMethod, DatepickerProps } from './common';
|
||||
import { Moment } from 'moment';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
declare class WeekPickerProps extends DatepickerProps {
|
||||
/**
|
||||
* to set default date
|
||||
* @type Moment
|
||||
*/
|
||||
defaultValue?: Moment | string;
|
||||
|
||||
/**
|
||||
* to set default picker date
|
||||
* @type Moment
|
||||
*/
|
||||
defaultPickerValue?: Moment | string;
|
||||
|
||||
/**
|
||||
* to set the date format, refer to moment.js
|
||||
* @default 'YYYY-wos'
|
||||
* @type string
|
||||
* @see http://momentjs.com
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* to set date
|
||||
* @type Moment
|
||||
*/
|
||||
value?: Moment | string;
|
||||
|
||||
/**
|
||||
* render extra footer in panel by setting a slot
|
||||
* v-slot:renderExtraFooter="mode"
|
||||
*/
|
||||
renderExtraFooter?: Function | VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* a callback function, can be executed when the selected time is changing
|
||||
*/
|
||||
onChange?: (date?: Moment | string, dateString?: string) => void;
|
||||
}
|
||||
|
||||
export declare class WeekPicker extends DatepickerMethod {
|
||||
$props: WeekPickerProps;
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { VNodeChild } from 'vue';
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export declare class DescriptionsItem extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* the label of descriptions item
|
||||
* @type any
|
||||
*/
|
||||
label?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* can be set to small large or omitted
|
||||
* @default 1
|
||||
* @type number
|
||||
*/
|
||||
span?: number;
|
||||
};
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { VNodeChild } from 'vue';
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
import { DescriptionsItem } from './descriptions-item';
|
||||
|
||||
import { Breakpoint } from '../pub';
|
||||
|
||||
export declare class Descriptions extends AntdComponent {
|
||||
static Item: typeof DescriptionsItem;
|
||||
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* descriptions size type
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size?: 'default' | 'middle' | 'small';
|
||||
|
||||
/**
|
||||
* custom prefixCls
|
||||
* @type string
|
||||
*/
|
||||
prefixCls?: string;
|
||||
|
||||
/**
|
||||
* whether descriptions have border
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
bordered?: boolean;
|
||||
|
||||
/**
|
||||
* custom title
|
||||
* @type any
|
||||
*/
|
||||
title?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* the number of descriptionsitem in one line
|
||||
* @default 3
|
||||
* @type number | object
|
||||
*/
|
||||
column?: number | Partial<Breakpoint>;
|
||||
|
||||
/**
|
||||
* descriptions layout
|
||||
* @default 'horizontal'
|
||||
* @type string
|
||||
*/
|
||||
layout?: 'horizontal' | 'vertical';
|
||||
|
||||
/**
|
||||
* whether have colon in descriptionsitem
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
colon?: boolean;
|
||||
};
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
|
||||
export declare class Divider extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* whether line is dashed
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
dashed?: boolean;
|
||||
|
||||
/**
|
||||
* position of title inside divider
|
||||
* @default 'center'
|
||||
* @type string
|
||||
*/
|
||||
orientation?: 'left' | 'right' | 'center';
|
||||
|
||||
/**
|
||||
* direction type of divider
|
||||
* @default 'horizontal'
|
||||
* @type string
|
||||
*/
|
||||
type?: 'horizontal' | 'vertical';
|
||||
};
|
||||
}
|
|
@ -1,124 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { VNodeChild, CSSProperties } from 'vue';
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
|
||||
export declare class Drawer extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* Whether a close (x) button is visible on top right of the Drawer dialog or not.
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
closable?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to unmount child components on closing drawer or not.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
destroyOnClose?: boolean;
|
||||
|
||||
/**
|
||||
* Return the mounted node for Drawer.
|
||||
* @default 'body'
|
||||
* @type any ( HTMLElement| () => HTMLElement | string)
|
||||
*/
|
||||
getContainer?: () => HTMLElement | string;
|
||||
|
||||
/**
|
||||
* Whether to show mask or not.
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
mask?: boolean;
|
||||
|
||||
/**
|
||||
* Clicking on the mask (area outside the Drawer) to close the Drawer or not.
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
maskClosable?: boolean;
|
||||
|
||||
/**
|
||||
* Style for Drawer's mask element.
|
||||
* @default {}
|
||||
* @type object
|
||||
*/
|
||||
maskStyle?: CSSProperties;
|
||||
|
||||
/**
|
||||
* The title for Drawer.
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
title?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Whether the Drawer dialog is visible or not.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
visible?: boolean;
|
||||
|
||||
/**
|
||||
* The class name of the container of the Drawer dialog.
|
||||
* @type string
|
||||
*/
|
||||
wrapClassName?: string;
|
||||
|
||||
/**
|
||||
* Style of wrapper element which **contains mask** compare to `drawerStyle`
|
||||
* @type object
|
||||
*/
|
||||
wrapStyle?: CSSProperties;
|
||||
|
||||
/**
|
||||
* Style of the popup layer element
|
||||
* @type object
|
||||
*/
|
||||
drawerStyle?: CSSProperties;
|
||||
|
||||
/**
|
||||
* Style of floating layer, typically used for adjusting its position.
|
||||
* @type object
|
||||
*/
|
||||
bodyStyle?: CSSProperties;
|
||||
headerStyle?: CSSProperties;
|
||||
|
||||
/**
|
||||
* Width of the Drawer dialog.
|
||||
* @default 256
|
||||
* @type string | number
|
||||
*/
|
||||
width?: string | number;
|
||||
|
||||
/**
|
||||
* placement is top or bottom, height of the Drawer dialog.
|
||||
* @type string | number
|
||||
*/
|
||||
height?: string | number;
|
||||
|
||||
/**
|
||||
* The z-index of the Drawer.
|
||||
* @default 1000
|
||||
* @type number
|
||||
*/
|
||||
zIndex?: number;
|
||||
|
||||
/**
|
||||
* The placement of the Drawer.
|
||||
* @default 'right'
|
||||
* @type string
|
||||
*/
|
||||
placement?: 'top' | 'right' | 'bottom' | 'left';
|
||||
afterVisibleChange?: (visible?: boolean) => void;
|
||||
keyboard?: boolean;
|
||||
|
||||
/**
|
||||
* Specify a callback that will be called when a user clicks mask, close button or Cancel button.
|
||||
*/
|
||||
onClose?: (e?: Event) => void;
|
||||
};
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
import { Menu } from '../menu/menu';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
export declare class DropdownButton extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* whether the dropdown menu is disabled
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* the dropdown menu
|
||||
* @type () => Menu
|
||||
*/
|
||||
overlay?: () => Menu;
|
||||
|
||||
/**
|
||||
* placement of pop menu: bottomLeft bottomCenter bottomRight topLeft topCenter topRight
|
||||
* @default 'bottomLeft'
|
||||
* @type string
|
||||
*/
|
||||
placement?:
|
||||
| 'topLeft'
|
||||
| 'topCenter'
|
||||
| 'topRight'
|
||||
| 'bottomLeft'
|
||||
| 'bottomCenter'
|
||||
| 'bottomRight';
|
||||
|
||||
/**
|
||||
* size of the button, the same as Button
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size?: 'small' | 'large' | 'default';
|
||||
|
||||
/**
|
||||
* the trigger mode which executes the drop-down action
|
||||
* @default ['hover']
|
||||
* @type string[]
|
||||
*/
|
||||
trigger?: Array<'click' | 'hover' | 'contextmenu'>;
|
||||
|
||||
/**
|
||||
* type of the button, the same as Button
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
type?: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default';
|
||||
|
||||
/**
|
||||
* whether the dropdown menu is visible
|
||||
* @type boolean
|
||||
*/
|
||||
visible?: boolean;
|
||||
/**
|
||||
* Icon (appears on the right) (1.5.0)
|
||||
*/
|
||||
icon?: VNodeChild | JSX.Element;
|
||||
};
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
import { Menu } from '../menu/menu';
|
||||
import { DropdownButton } from './dropdown-button';
|
||||
import { CSSProperties } from 'vue';
|
||||
|
||||
export declare class Dropdown extends AntdComponent {
|
||||
static Button: typeof DropdownButton;
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* the trigger mode which executes the drop-down action
|
||||
* @default ['hover']
|
||||
* @type string[]
|
||||
*/
|
||||
trigger?: Array<'click' | 'hover' | 'contextmenu'>;
|
||||
|
||||
/**
|
||||
* the dropdown menu
|
||||
* @type () => Menu
|
||||
*/
|
||||
overlay?: () => Menu;
|
||||
|
||||
/**
|
||||
* Class name of the dropdown root element
|
||||
* @type string
|
||||
*/
|
||||
overlayClassName?: string;
|
||||
|
||||
/**
|
||||
* Style of the dropdown root element
|
||||
* @type object
|
||||
*/
|
||||
overlayStyle?: CSSProperties;
|
||||
|
||||
/**
|
||||
* whether the dropdown menu is visible
|
||||
* @type boolean
|
||||
*/
|
||||
visible?: boolean;
|
||||
|
||||
/**
|
||||
* whether the dropdown menu is disabled
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* to set the ontainer of the dropdown menu. The default is to create a div element in body, you can reset it to the scrolling area and make a relative reposition.
|
||||
* @default () => document.body
|
||||
* @type Function
|
||||
*/
|
||||
getPopupContainer?: (triggerNode?: any) => HTMLElement;
|
||||
|
||||
/**
|
||||
* placement of pop menu: bottomLeft bottomCenter bottomRight topLeft topCenter topRight
|
||||
* @default 'bottomLeft'
|
||||
* @type string
|
||||
*/
|
||||
placement?:
|
||||
| 'topLeft'
|
||||
| 'topCenter'
|
||||
| 'topRight'
|
||||
| 'bottomLeft'
|
||||
| 'bottomCenter'
|
||||
| 'bottomRight';
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: Svreber <https://github.com/Svreber>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
import { VNodeChild, CSSProperties } from 'vue';
|
||||
|
||||
export declare class Empty extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* customize description
|
||||
* @type string | VNode
|
||||
*/
|
||||
description?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* customize image. Will tread as image url when string provided
|
||||
* @default false
|
||||
* @type string | VNode
|
||||
*/
|
||||
image?: VNodeChild | JSX.Element;
|
||||
|
||||
imageStyle?: CSSProperties | string;
|
||||
};
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
import { Col } from '../grid/col';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
export declare type InternalNamePath = (string | number)[];
|
||||
export declare type NamePath = string | number | InternalNamePath;
|
||||
|
||||
export declare class FormItem extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* Used with label, whether to display : after label text.
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
colon?: boolean;
|
||||
|
||||
/**
|
||||
* The extra prompt message. It is similar to help. Usage example: to display error message and prompt message at the same time.
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
extra?: string | VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Used with validateStatus, this option specifies the validation status icon. Recommended to be used only with Input.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
hasFeedback?: boolean;
|
||||
|
||||
/**
|
||||
* The prompt message. If not provided, the prompt message will be generated by the validation rule.
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
help?: string | VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Label test
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
label?: string | VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* The layout of label. You can set span offset to something like {span: 3, offset: 12} or sm: {span: 3, offset: 12} same as with <Col>
|
||||
* @type Col
|
||||
*/
|
||||
labelCol?: Col;
|
||||
|
||||
/**
|
||||
* Whether provided or not, it will be generated by the validation rule.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
required?: boolean;
|
||||
|
||||
/**
|
||||
* The validation status. If not provided, it will be generated by validation rule. options: 'success' 'warning' 'error' 'validating'
|
||||
* @type string
|
||||
*/
|
||||
validateStatus?: '' | 'success' | 'warning' | 'error' | 'validating';
|
||||
|
||||
/**
|
||||
* The layout for input controls, same as labelCol
|
||||
* @type Col
|
||||
*/
|
||||
wrapperCol?: Col;
|
||||
/**
|
||||
* Set sub label htmlFor.
|
||||
*/
|
||||
htmlFor?: string;
|
||||
/**
|
||||
* text align of label
|
||||
*/
|
||||
labelAlign?: 'left' | 'right';
|
||||
/**
|
||||
* a key of model. In the use of validate and resetFields method, the attribute is required
|
||||
*/
|
||||
name?: NamePath;
|
||||
/**
|
||||
* validation rules of form
|
||||
*/
|
||||
rules?: object | object[];
|
||||
/**
|
||||
* Whether to automatically associate form fields. In most cases, you can use automatic association.
|
||||
* If the conditions for automatic association are not met, you can manually associate them. See the notes below.
|
||||
*/
|
||||
autoLink?: boolean;
|
||||
/**
|
||||
* Whether stop validate on first rule of error for this field.
|
||||
*/
|
||||
validateFirst?: boolean;
|
||||
/**
|
||||
* When to validate the value of children node
|
||||
*/
|
||||
validateTrigger?: string | string[] | false;
|
||||
};
|
||||
}
|
|
@ -1,264 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
import { Col } from '../grid/col';
|
||||
import { FormItem } from './form-item';
|
||||
|
||||
export declare type InternalNamePath = (string | number)[];
|
||||
export declare type NamePath = string | number | InternalNamePath;
|
||||
export interface ValidateErrorEntity {
|
||||
values: object;
|
||||
errorFields: {
|
||||
name: InternalNamePath;
|
||||
errors: string[];
|
||||
}[];
|
||||
outOfDate: boolean;
|
||||
}
|
||||
|
||||
export declare type ValidateFields = (nameList?: NamePath[]) => Promise<object>;
|
||||
|
||||
declare type ValidateMessage = string | (() => string);
|
||||
export interface ValidateMessages {
|
||||
default?: ValidateMessage;
|
||||
required?: ValidateMessage;
|
||||
enum?: ValidateMessage;
|
||||
whitespace?: ValidateMessage;
|
||||
date?: {
|
||||
format?: ValidateMessage;
|
||||
parse?: ValidateMessage;
|
||||
invalid?: ValidateMessage;
|
||||
};
|
||||
types?: {
|
||||
string?: ValidateMessage;
|
||||
method?: ValidateMessage;
|
||||
array?: ValidateMessage;
|
||||
object?: ValidateMessage;
|
||||
number?: ValidateMessage;
|
||||
date?: ValidateMessage;
|
||||
boolean?: ValidateMessage;
|
||||
integer?: ValidateMessage;
|
||||
float?: ValidateMessage;
|
||||
regexp?: ValidateMessage;
|
||||
email?: ValidateMessage;
|
||||
url?: ValidateMessage;
|
||||
hex?: ValidateMessage;
|
||||
};
|
||||
string?: {
|
||||
len?: ValidateMessage;
|
||||
min?: ValidateMessage;
|
||||
max?: ValidateMessage;
|
||||
range?: ValidateMessage;
|
||||
};
|
||||
number?: {
|
||||
len?: ValidateMessage;
|
||||
min?: ValidateMessage;
|
||||
max?: ValidateMessage;
|
||||
range?: ValidateMessage;
|
||||
};
|
||||
array?: {
|
||||
len?: ValidateMessage;
|
||||
min?: ValidateMessage;
|
||||
max?: ValidateMessage;
|
||||
range?: ValidateMessage;
|
||||
};
|
||||
pattern?: {
|
||||
mismatch?: ValidateMessage;
|
||||
};
|
||||
}
|
||||
export declare type RuleType =
|
||||
| 'string'
|
||||
| 'number'
|
||||
| 'boolean'
|
||||
| 'method'
|
||||
| 'regexp'
|
||||
| 'integer'
|
||||
| 'float'
|
||||
| 'object'
|
||||
| 'enum'
|
||||
| 'date'
|
||||
| 'url'
|
||||
| 'hex'
|
||||
| 'email';
|
||||
|
||||
declare type Validator = (
|
||||
rule: any,
|
||||
value: any,
|
||||
callback: (error?: string) => void,
|
||||
) => Promise<void> | void;
|
||||
|
||||
declare interface ValidationRule {
|
||||
trigger?: string;
|
||||
/**
|
||||
* validation error message
|
||||
* @type string
|
||||
*/
|
||||
message?: string;
|
||||
|
||||
/**
|
||||
* built-in validation type, available options: https://github.com/yiminghe/async-validator#type
|
||||
* @default 'string'
|
||||
* @type string
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
/**
|
||||
* indicates whether field is required
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
required?: boolean;
|
||||
|
||||
/**
|
||||
* treat required fields that only contain whitespace as errors
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
whitespace?: boolean;
|
||||
|
||||
/**
|
||||
* validate the exact length of a field
|
||||
* @type number
|
||||
*/
|
||||
len?: number;
|
||||
|
||||
/**
|
||||
* validate the min length of a field
|
||||
* @type number
|
||||
*/
|
||||
min?: number;
|
||||
|
||||
/**
|
||||
* validate the max length of a field
|
||||
* @type number
|
||||
*/
|
||||
max?: number;
|
||||
|
||||
/**
|
||||
* validate the value from a list of possible values
|
||||
* @type string | string[]
|
||||
*/
|
||||
enum?: string | string[];
|
||||
|
||||
/**
|
||||
* validate from a regular expression
|
||||
* @type boolean
|
||||
*/
|
||||
pattern?: RegExp;
|
||||
|
||||
/**
|
||||
* transform a value before validation
|
||||
* @type Function
|
||||
*/
|
||||
transform?: (value: any) => any;
|
||||
|
||||
/**
|
||||
* custom validate function (Note: callback must be called)
|
||||
* @type Function
|
||||
*/
|
||||
validator?: Validator;
|
||||
}
|
||||
|
||||
export declare class Form extends AntdComponent {
|
||||
static Item: typeof FormItem;
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* Hide required mark of all form items
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
hideRequiredMark?: boolean;
|
||||
|
||||
/**
|
||||
* The layout of label. You can set span offset to something like {span: 3, offset: 12} or sm: {span: 3, offset: 12} same as with <Col>
|
||||
* @type Col
|
||||
*/
|
||||
labelCol?: Col;
|
||||
|
||||
/**
|
||||
* Define form layout
|
||||
* @default 'horizontal'
|
||||
* @type string
|
||||
*/
|
||||
layout?: 'horizontal' | 'inline' | 'vertical';
|
||||
|
||||
/**
|
||||
* The layout for input controls, same as labelCol
|
||||
* @type Col
|
||||
*/
|
||||
wrapperCol?: Col;
|
||||
|
||||
/**
|
||||
* change default props colon value of Form.Item (only effective when prop layout is horizontal)
|
||||
* @type boolean
|
||||
* @default true
|
||||
*/
|
||||
colon?: boolean;
|
||||
|
||||
/**
|
||||
* text align of label of all items
|
||||
* @type 'left' | 'right'
|
||||
* @default 'left'
|
||||
*/
|
||||
labelAlign?: 'left' | 'right';
|
||||
|
||||
/**
|
||||
* data of form component
|
||||
* @type object
|
||||
*/
|
||||
model?: object;
|
||||
|
||||
/**
|
||||
* validation rules of form
|
||||
* @type object
|
||||
*/
|
||||
rules?: object;
|
||||
|
||||
/**
|
||||
* Default validate message. And its format is similar with newMessages's returned value
|
||||
* @type any
|
||||
*/
|
||||
validateMessages?: ValidateMessages;
|
||||
|
||||
/**
|
||||
* whether to trigger validation when the rules prop is changed
|
||||
* @type Boolean
|
||||
* @default true
|
||||
*/
|
||||
validateOnRuleChange?: boolean;
|
||||
|
||||
scrollToFirstError?: boolean;
|
||||
|
||||
validateTrigger?: string | string[] | false;
|
||||
/**
|
||||
* Defines a function will be called if form data validation.
|
||||
* @param e
|
||||
*/
|
||||
onSubmit?: (e?: Event) => void;
|
||||
/**
|
||||
* Trigger after submitting the form and verifying data successfully
|
||||
* @param values
|
||||
*/
|
||||
onFinish?: (values?: object) => void;
|
||||
/**
|
||||
* Trigger after submitting the form and verifying data failed
|
||||
* @param errorInfo
|
||||
*/
|
||||
onFinishFailed?: (errorInfo?: ValidateErrorEntity) => void;
|
||||
};
|
||||
/**
|
||||
* clear validation message for certain fields.
|
||||
* The parameter is prop name or an array of prop names of the form items whose validation messages will be removed.
|
||||
* When omitted, all fields' validation messages will be cleared
|
||||
* @type string[] | string
|
||||
*/
|
||||
clearValidate: (name: string[] | string) => void;
|
||||
/**
|
||||
* reset all the fields and remove validation result
|
||||
*/
|
||||
resetFields: (fields?: NamePath[]) => void;
|
||||
validateFields: ValidateFields;
|
||||
validate: ValidateFields;
|
||||
scrollToField: (name: NamePath, options?: ScrollOptions) => void;
|
||||
}
|
|
@ -1,87 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
type ColSpanType = number | string;
|
||||
export declare class Col extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* raster number of cells to occupy, 0 corresponds to display: none
|
||||
* @default none (0)
|
||||
* @type ColSpanType
|
||||
*/
|
||||
span?: ColSpanType;
|
||||
|
||||
/**
|
||||
* raster order, used in flex layout mode
|
||||
* @default 0
|
||||
* @type ColSpanType
|
||||
*/
|
||||
order?: ColSpanType;
|
||||
|
||||
/**
|
||||
* the layout fill of flex
|
||||
* @default none
|
||||
* @type ColSpanType
|
||||
*/
|
||||
flex?: ColSpanType;
|
||||
|
||||
/**
|
||||
* the number of cells to offset Col from the left
|
||||
* @default 0
|
||||
* @type ColSpanType
|
||||
*/
|
||||
offset?: ColSpanType;
|
||||
|
||||
/**
|
||||
* the number of cells that raster is moved to the right
|
||||
* @default 0
|
||||
* @type ColSpanType
|
||||
*/
|
||||
push?: ColSpanType;
|
||||
|
||||
/**
|
||||
* the number of cells that raster is moved to the left
|
||||
* @default 0
|
||||
* @type ColSpanType
|
||||
*/
|
||||
pull?: ColSpanType;
|
||||
|
||||
/**
|
||||
* <576px and also default setting, could be a span value or an object containing above props
|
||||
* @type { span: ColSpanType, offset: ColSpanType } | ColSpanType
|
||||
*/
|
||||
xs?: { span: ColSpanType; offset: ColSpanType } | ColSpanType;
|
||||
|
||||
/**
|
||||
* ≥576px, could be a span value or an object containing above props
|
||||
* @type { span: ColSpanType, offset: ColSpanType } | ColSpanType
|
||||
*/
|
||||
sm?: { span: ColSpanType; offset: ColSpanType } | ColSpanType;
|
||||
|
||||
/**
|
||||
* ≥768px, could be a span value or an object containing above props
|
||||
* @type { span: ColSpanType, offset: ColSpanType } | ColSpanType
|
||||
*/
|
||||
md?: { span: ColSpanType; offset: ColSpanType } | ColSpanType;
|
||||
|
||||
/**
|
||||
* ≥992px, could be a span value or an object containing above props
|
||||
* @type { span: ColSpanType, offset: ColSpanType } | ColSpanType
|
||||
*/
|
||||
lg?: { span: ColSpanType; offset: ColSpanType } | ColSpanType;
|
||||
|
||||
/**
|
||||
* ≥1200px, could be a span value or an object containing above props
|
||||
* @type { span: ColSpanType, offset: ColSpanType } | ColSpanType
|
||||
*/
|
||||
xl?: { span: ColSpanType; offset: ColSpanType } | ColSpanType;
|
||||
|
||||
/**
|
||||
* ≥1600px, could be a span value or an object containing above props
|
||||
* @type { span: ColSpanType, offset: ColSpanType } | ColSpanType
|
||||
*/
|
||||
xxl?: { span: ColSpanType; offset: ColSpanType } | ColSpanType;
|
||||
};
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
type Gutter =
|
||||
| number
|
||||
| {
|
||||
xs: number;
|
||||
sm: number;
|
||||
md: number;
|
||||
lg: number;
|
||||
xl: number;
|
||||
xxl: number;
|
||||
};
|
||||
export declare class Row extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* spacing between grids, could be a number or a object like { xs: 8, sm: 16, md: 24}
|
||||
* @default 0
|
||||
* @type numner | object
|
||||
*/
|
||||
gutter?: Gutter | [Gutter, Gutter];
|
||||
|
||||
/**
|
||||
* layout mode, optional flex
|
||||
* @type string
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
/**
|
||||
* the vertical alignment of the flex layout: top middle bottom
|
||||
* @default 'top'
|
||||
* @type string
|
||||
*/
|
||||
align?: 'top' | 'middle' | 'bottom';
|
||||
|
||||
/**
|
||||
* horizontal arrangement of the flex layout: start end center space-around space-between
|
||||
* @default 'start'
|
||||
* @type string
|
||||
*/
|
||||
justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between';
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
export * from './ant-design-vue';
|
||||
|
||||
import * as Antd from './ant-design-vue';
|
||||
export default Antd;
|
|
@ -1,87 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from './component';
|
||||
|
||||
export declare class InputNumber extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* get focus when component mounted
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
autofocus?: boolean;
|
||||
|
||||
/**
|
||||
* initial value
|
||||
* @type number | string
|
||||
*/
|
||||
defaultValue?: number | string;
|
||||
|
||||
/**
|
||||
* disable the input
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* Specifies the format of the value presented
|
||||
* @type Function
|
||||
*/
|
||||
formatter?: (value: number | string) => string;
|
||||
|
||||
/**
|
||||
* max value
|
||||
* @default Infinity
|
||||
* @type number
|
||||
*/
|
||||
max?: number;
|
||||
|
||||
/**
|
||||
* mix value
|
||||
* @default -Infinity
|
||||
* @type number
|
||||
*/
|
||||
min?: number;
|
||||
|
||||
/**
|
||||
* Specifies the value extracted from formatter
|
||||
* @type Function
|
||||
*/
|
||||
parser?: (string: string) => number;
|
||||
|
||||
/**
|
||||
* precision of input value
|
||||
* @type number
|
||||
*/
|
||||
precision?: number;
|
||||
|
||||
/**
|
||||
* decimal separator
|
||||
* @type string
|
||||
*/
|
||||
decimalSeparator?: string;
|
||||
|
||||
/**
|
||||
* width of input box
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size?: 'large' | 'small' | 'default';
|
||||
|
||||
/**
|
||||
* The number to which the current value is increased or decreased. It can be an integer or decimal.
|
||||
* @default 1
|
||||
* @type number | string
|
||||
*/
|
||||
step?: number | string;
|
||||
|
||||
/**
|
||||
* current value
|
||||
* @type number | string
|
||||
*/
|
||||
value?: number | string;
|
||||
};
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export declare class InputGroup extends AntdComponent {
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* Whether use compact style
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
compact?: boolean;
|
||||
|
||||
/**
|
||||
* The size of Input.Group specifies the size of the included Input fields. Available: large default small
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size?: 'small' | 'large' | 'default';
|
||||
};
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent } from '../component';
|
||||
import { VNodeChild } from 'vue';
|
||||
import { InputProps } from './input';
|
||||
|
||||
export declare class InputSearch extends AntdComponent {
|
||||
$props: InputProps & {
|
||||
/**
|
||||
* to show an enter button after input
|
||||
* @default false
|
||||
* @type any (boolean | slot)
|
||||
*/
|
||||
enterButton?: boolean | VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* Callback when search is clicked or enter is pressed
|
||||
* @type Function
|
||||
*/
|
||||
onSearch?: (value: string | number, event: Event) => void;
|
||||
};
|
||||
}
|
|
@ -1,87 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
import { InputGroup } from './input-group';
|
||||
import { InputSearch } from './input-search';
|
||||
import { TextArea } from './textarea';
|
||||
import { Password } from './password';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
export type InputProps = Omit<AntdProps, 'prefix'> & {
|
||||
/**
|
||||
* The label text displayed after (on the right side of) the input field.
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
addonAfter?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* The label text displayed before (on the left side of) the input field.
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
addonBefore?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* The initial input content
|
||||
* @type string | number
|
||||
*/
|
||||
defaultValue?: string | number;
|
||||
|
||||
/**
|
||||
* Whether the input is disabled.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* The ID for input
|
||||
* @type string
|
||||
*/
|
||||
id?: string;
|
||||
|
||||
/**
|
||||
* The prefix icon for the Input.
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
prefix?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* The size of the input box. Note: in the context of a form, the large size is used. Available: large default small
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size?: 'small' | 'large' | 'default';
|
||||
|
||||
/**
|
||||
* The suffix icon for the Input.
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
suffix?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* The type of input, see: MDN (use Input.TextArea instead of type="textarea")
|
||||
* @default 'text'
|
||||
* @type string
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
/**
|
||||
* The input content value
|
||||
* @type string | number
|
||||
*/
|
||||
value?: string | number;
|
||||
/**
|
||||
* allow to remove input content with clear icon
|
||||
*/
|
||||
allowClear?: boolean;
|
||||
};
|
||||
|
||||
export declare class Input extends AntdComponent {
|
||||
static Group: typeof InputGroup;
|
||||
static Search: typeof InputSearch;
|
||||
static TextArea: typeof TextArea;
|
||||
static Password: typeof Password;
|
||||
$props: InputProps;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent } from '../component';
|
||||
import { InputProps } from './input';
|
||||
|
||||
export declare class Password extends AntdComponent {
|
||||
$props: Omit<InputProps, 'type' | 'suffix'> & {
|
||||
/**
|
||||
* Whether show toggle button
|
||||
* @default true
|
||||
*/
|
||||
visibilityToggle?: boolean;
|
||||
};
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
import { TextareaHTMLAttributes } from 'vue';
|
||||
|
||||
export declare class TextArea extends AntdComponent {
|
||||
$props: AntdProps &
|
||||
TextareaHTMLAttributes & {
|
||||
/**
|
||||
* Height autosize feature, can be set to true|false or an object { minRows: 2, maxRows: 6 }
|
||||
* @default false
|
||||
* @type boolean | object
|
||||
*/
|
||||
autoSize?: boolean | { minRows: number; maxRows: number };
|
||||
|
||||
/**
|
||||
* The initial input content
|
||||
* @type string | number
|
||||
*/
|
||||
defaultValue?: string | number;
|
||||
|
||||
/**
|
||||
* The input content value
|
||||
* @type string | number
|
||||
*/
|
||||
value?: string | number;
|
||||
/**
|
||||
*allow to remove input content with clear icon (1.5.0)
|
||||
* @type boolean
|
||||
*/
|
||||
allowClear?: boolean;
|
||||
};
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
import { CSSProperties } from 'vue';
|
||||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: Pythonfo <https://github.com/Pythonfo>
|
||||
// Copy from: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export interface LayoutContentProps {
|
||||
/**
|
||||
* container className
|
||||
* @default undefined
|
||||
* @type string
|
||||
*/
|
||||
class?: string;
|
||||
|
||||
/**
|
||||
* to customize the styles
|
||||
* @type CSSProperties
|
||||
*/
|
||||
style?: CSSProperties;
|
||||
|
||||
/**
|
||||
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
|
||||
* @type boolean
|
||||
*/
|
||||
hasSider?: boolean;
|
||||
}
|
||||
|
||||
export default class LayoutContent extends AntdComponent {
|
||||
$props: AntdProps & LayoutContentProps;
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: Pythonfo <https://github.com/Pythonfo>
|
||||
// Copy from: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export interface LayoutFooterProps {
|
||||
/**
|
||||
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
|
||||
* @type boolean
|
||||
*/
|
||||
hasSider?: boolean;
|
||||
}
|
||||
|
||||
export default class LayoutFooter extends AntdComponent {
|
||||
$props: AntdProps & LayoutFooterProps;
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: Pythonfo <https://github.com/Pythonfo>
|
||||
// Copy from: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export interface LayoutHeaderProps {
|
||||
/**
|
||||
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
|
||||
* @type boolean
|
||||
*/
|
||||
hasSider?: boolean;
|
||||
}
|
||||
|
||||
export default class LayoutHeader extends AntdComponent {
|
||||
$props: AntdProps & LayoutHeaderProps;
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
import { VNodeChild } from 'vue';
|
||||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
|
||||
export interface LayoutSiderProps {
|
||||
/**
|
||||
* whether can be collapsed
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
collapsible?: boolean;
|
||||
|
||||
/**
|
||||
* to set the current status
|
||||
* @type boolean
|
||||
*/
|
||||
collapsed?: boolean;
|
||||
|
||||
/**
|
||||
* to set the initial status
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
defaultCollapsed?: boolean;
|
||||
|
||||
/**
|
||||
* reverse direction of arrow, for a sider that expands from the right
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
reverseArrow?: boolean;
|
||||
|
||||
/**
|
||||
* specify the customized trigger, set to null to hide the trigger
|
||||
* @type string | | VNodeChild | JSX.Element
|
||||
*/
|
||||
trigger?: string | VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* width of the sidebar
|
||||
* @default 200
|
||||
* @type number | string
|
||||
*/
|
||||
width?: number | string;
|
||||
|
||||
/**
|
||||
* width of the collapsed sidebar, by setting to 0 a special trigger will appear
|
||||
* @default 80
|
||||
* @type number
|
||||
*/
|
||||
collapsedWidth?: number;
|
||||
|
||||
/**
|
||||
* breakpoints of the responsive layout
|
||||
* @type string
|
||||
*/
|
||||
breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
||||
|
||||
/**
|
||||
* color theme of the sidebar
|
||||
* @default 'dark'
|
||||
* @type string
|
||||
*/
|
||||
theme?: 'light' | 'dark';
|
||||
}
|
||||
|
||||
export declare class LayoutSider extends AntdComponent {
|
||||
$props: AntdProps & LayoutSiderProps;
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
import { LayoutSider } from './layout-sider';
|
||||
import LayoutHeader from './layout-header';
|
||||
import LayoutContent from './layout-content';
|
||||
import LayoutFooter from './layout-footer';
|
||||
|
||||
export interface LayoutProps {
|
||||
/**
|
||||
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
|
||||
* @type boolean
|
||||
*/
|
||||
hasSider?: boolean;
|
||||
}
|
||||
|
||||
export declare class Layout extends AntdComponent {
|
||||
static Header: typeof LayoutHeader;
|
||||
static Content: typeof LayoutContent;
|
||||
static Footer: typeof LayoutFooter;
|
||||
static Sider: typeof LayoutSider;
|
||||
|
||||
$props: AntdProps & LayoutProps;
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
// Project: https://github.com/vueComponent/ant-design-vue
|
||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent, AntdProps } from '../component';
|
||||
import { Meta } from '../meta';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
export declare class ListItem extends AntdComponent {
|
||||
static Meta: typeof Meta;
|
||||
|
||||
$props: AntdProps & {
|
||||
/**
|
||||
* The actions content of list item. If itemLayout is vertical, shows the content on bottom,
|
||||
* otherwise shows content on the far right.
|
||||
* @type any (VNode[] | slot)
|
||||
*/
|
||||
actions?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* The extra content of list item. If itemLayout is vertical, shows the content on right,
|
||||
* otherwise shows content on the far right.
|
||||
* @type any (string | slot)
|
||||
*/
|
||||
extra?: VNodeChild | JSX.Element;
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue