chore: update type mentions (#2716)
							parent
							
								
									ec024c8371
								
							
						
					
					
						commit
						5d14259e7a
					
				| 
						 | 
				
			
			@ -3,70 +3,73 @@
 | 
			
		|||
 | 
			
		||||
import { AntdComponent } from '../component';
 | 
			
		||||
import { Option } from './option';
 | 
			
		||||
import { VNodeChild } from 'vue';
 | 
			
		||||
 | 
			
		||||
export declare class Mentions extends AntdComponent {
 | 
			
		||||
  static Option: typeof Option;
 | 
			
		||||
  /**
 | 
			
		||||
   * Auto get focus when component mounted
 | 
			
		||||
   * @default false
 | 
			
		||||
   * @type boolean
 | 
			
		||||
   */
 | 
			
		||||
  autofocus: boolean;
 | 
			
		||||
  $props: {
 | 
			
		||||
    /**
 | 
			
		||||
     * Auto get focus when component mounted
 | 
			
		||||
     * @default false
 | 
			
		||||
     * @type boolean
 | 
			
		||||
     */
 | 
			
		||||
    autofocus?: boolean;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Default value
 | 
			
		||||
   * @type string
 | 
			
		||||
   */
 | 
			
		||||
  defaultValue: string;
 | 
			
		||||
    /**
 | 
			
		||||
     * Default value
 | 
			
		||||
     * @type string
 | 
			
		||||
     */
 | 
			
		||||
    defaultValue?: string;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Customize filter option logic
 | 
			
		||||
   * @type false | (input: string, option: OptionProps) => boolean
 | 
			
		||||
   */
 | 
			
		||||
  filterOption: false | ((input: string, option: Option) => boolean);
 | 
			
		||||
    /**
 | 
			
		||||
     * Customize filter option logic
 | 
			
		||||
     * @type false | (input: string, option: OptionProps) => boolean
 | 
			
		||||
     */
 | 
			
		||||
    filterOption?: false | ((input: string, option: Option) => boolean);
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Set mentions content when not match
 | 
			
		||||
   * @type any (string | slot)
 | 
			
		||||
   */
 | 
			
		||||
  notFoundContent: any;
 | 
			
		||||
    /**
 | 
			
		||||
     * Set mentions content when not match
 | 
			
		||||
     * @type any (string | slot)
 | 
			
		||||
     */
 | 
			
		||||
    notFoundContent?: VNodeChild | JSX.Element;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Set popup placement
 | 
			
		||||
   * @default 'top'
 | 
			
		||||
   * @type string
 | 
			
		||||
   */
 | 
			
		||||
  placement: 'top' | 'bottom';
 | 
			
		||||
    /**
 | 
			
		||||
     * Set popup placement
 | 
			
		||||
     * @default 'top'
 | 
			
		||||
     * @type string
 | 
			
		||||
     */
 | 
			
		||||
    placement?: 'top' | 'bottom';
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Set trigger prefix keyword
 | 
			
		||||
   * @default '@'
 | 
			
		||||
   * @type string | string[]
 | 
			
		||||
   */
 | 
			
		||||
  prefix: string | string[];
 | 
			
		||||
    /**
 | 
			
		||||
     * Set trigger prefix keyword
 | 
			
		||||
     * @default '@'
 | 
			
		||||
     * @type string | string[]
 | 
			
		||||
     */
 | 
			
		||||
    prefix?: string | string[];
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Set split string before and after selected mention
 | 
			
		||||
   * @default ' '
 | 
			
		||||
   * @type string
 | 
			
		||||
   */
 | 
			
		||||
  split: string;
 | 
			
		||||
    /**
 | 
			
		||||
     * Set split string before and after selected mention
 | 
			
		||||
     * @default ' '
 | 
			
		||||
     * @type string
 | 
			
		||||
     */
 | 
			
		||||
    split?: string;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Customize trigger search logic
 | 
			
		||||
   * @type (text: string, props: MentionsProps) => void
 | 
			
		||||
   */
 | 
			
		||||
  validateSearch: (text: string, props: Mentions) => void;
 | 
			
		||||
    /**
 | 
			
		||||
     * Customize trigger search logic
 | 
			
		||||
     * @type (text: string, props: MentionsProps) => void
 | 
			
		||||
     */
 | 
			
		||||
    validateSearch?: (text: string, props: Mentions) => void;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Set value of mentions
 | 
			
		||||
   * @type string
 | 
			
		||||
   */
 | 
			
		||||
  value: string;
 | 
			
		||||
    /**
 | 
			
		||||
     * Set value of mentions
 | 
			
		||||
     * @type string
 | 
			
		||||
     */
 | 
			
		||||
    value?: string;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Set the mount HTML node for suggestions
 | 
			
		||||
   * @default () => HTMLElement
 | 
			
		||||
   */
 | 
			
		||||
  getPopupContainer: (triggerNode: HTMLElement) => HTMLElement;
 | 
			
		||||
    /**
 | 
			
		||||
     * Set the mount HTML node for suggestions
 | 
			
		||||
     * @default () => HTMLElement
 | 
			
		||||
     */
 | 
			
		||||
    getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,10 +4,12 @@
 | 
			
		|||
import { AntdComponent } from '../component';
 | 
			
		||||
 | 
			
		||||
export declare class Option extends AntdComponent {
 | 
			
		||||
  /**
 | 
			
		||||
  $props: {
 | 
			
		||||
    /**
 | 
			
		||||
   * value of suggestion, the value will insert into input filed while selected
 | 
			
		||||
   * @default ''
 | 
			
		||||
   * @type string
 | 
			
		||||
   */
 | 
			
		||||
  value: string;
 | 
			
		||||
    value?: string;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@ export interface NotificationOptions extends NotificationConfigOptions {
 | 
			
		|||
   * The content of notification box (required)
 | 
			
		||||
   * @type string | VNode | Function
 | 
			
		||||
   */
 | 
			
		||||
  description: VNodeChild | JSX.Element | Function;
 | 
			
		||||
  description?: VNodeChild | JSX.Element | Function;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Customized icon
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue