解决 WebStorm 2022.3.x 无法识别 Element UI 2.15.11 新版本中的 el-xxx 标签问题

问题解读

如题,其实2.15.11这个版本的Element UI新增了功能,改进WebStorm IDE和其他JetBrains IDE中的代码帮助。本义是想很好的支持IDE软件,代码提示更加方便,但作者发布时候少打包了一个文件,这就导致Webstorm不认识所有的el-xxx标签!!!

解决(方案一)

既然知道了这个版本有点小问题,那就简单粗暴,暂时降级到2.15.10版本,提示就有了。等过段时间官方修复了BUG,再改回最新版即可。

注意,由于我们是指定具体版本,所以在版本号前边不能有~或者^符号。简单解释一下,加了前边这任意一个符号,npm会自动去找你定义的版本的最新版,有可能不是你后边写的那个版本号。
举个例子:假如,我说的是假如,现在饿了么已经发布了最新版2.15.15,那么,你依赖如果这样写:~2.15.10,那么他实际会去找2.15.xx版本,xx代表当前这个时间点的最新版,也就实际给你安装了2.15.15版本;
类似的,若为:^2.15.10,他会去找2.xx.xx版本,同样,x代表当前最新版,仔细体会这两个符号的含义;
当然了,如果写出具体的版本号2.15.10,毫无疑问,那他就一定下载的是你指定的版本,将来有新版发布也不会自动更新。

其次注意,版本号修改后建议先把package-lock.jsonnode_modules都删除一下,在执行npm install全新安装,不会出现修改不成功的问题。

解决(方案二)

你不就是少打包了一个文件吗,我现在手动给你添加上,不就可以正常识别到提示了吗,不用降版本号了,还能体验一波新特性。

首先,打开官方网址
https://github.com/ElemeFE/element/blob/dev/web-types.json
桌面创建一个web-types.json文件,将代码粘贴进去,然后把文件放到你vue2项目的node_modules目录下的element-ui文件夹下,代码提示就好使了。由于本身版本做了优化,代码提示比以前更加舒服了,可以实际上手体验下。


教程讲完了,考虑到有的同学打开github网址较慢,所以我把json代码粘贴到下方,有需要的同学可以展开进行粘贴。

温馨提示:下边代码非常多,共4195行,直接点代码右上方复制按钮即可,不要展开代码,以免带来不好的阅读体验。

{
  "framework": "vue",
  "name": "element-ui",
  "version": "2.15.9",
  "description-markup": "markdown",
  "contributions": {
    "html": {
      "vue-components": [
        {
          "name": "ElAlert",
          "description": "Displays important alert messages.",
          "doc-url": "https://element.eleme.io/#/en-US/component/alert",
          "props": [
            {
              "name": "type",
              "description": "Component type",
              "type": "AlertType",
              "default": "'info'"
            },
            {
              "name": "effect",
              "description": "Choose theme",
              "type": "AlertEffect",
              "default": "'light'"
            },
            {
              "name": "closable",
              "description": "If closable or not",
              "type": "boolean",
              "default": "true"
            },
            {
              "name": "description",
              "description": "Descriptive text. Can also be passed with the default slot",
              "type": "string"
            },
            {
              "name": "title",
              "description": "Title",
              "type": "string"
            },
            {
              "name": "showIcon",
              "description": "If a type icon is displayed",
              "type": "boolean",
              "default": "false"
            },
            {
              "name": "center",
              "description": "whether to center the text",
              "type": "boolean",
              "default": "false"
            },
            {
              "name": "closeText",
              "description": "Customized close button text",
              "type": "string"
            }
          ],
          "slots": [
            {
              "name": "default",
              "description": "description"
            },
            {
              "name": "title",
              "description": "content of the Alert title"
            }
          ],
          "js": {
            "events": [
              {
                "name": "close",
                "description": "fires when alert is closed"
              }
            ]
          }
        },
        {
          "name": "ElAside",
          "description": "Container for side sections (usually a side nav).",
          "doc-url": "https://element.eleme.io/#/en-US/component/container",
          "props": [
            {
              "name": "width",
              "description": "Width of the side section",
              "type": "string",
              "default": "300px"
            }
          ]
        },
        {
          "name": "ElAutocomplete",
          "doc-url": "https://element.eleme.io/#/en-US/component/input#autocomplete-attributes",
          "props": [
            {
              "name": "focus",
              "description": "Focus the Input component",
              "type": "function(): void"
            },
            {
              "name": "selectWhenUnmatched",
              "description": "Whether to emit select event on enter when there is no autocomplete match",
              "type": "boolean"
            },
            {
              "name": "debounce",
              "description": "Debounce delay when typing",
              "type": "number"
            },
            {
              "name": "popperClass",
              "description": "Custom class name for autocomplete's dropdown",
              "type": "string"
            },
            {
              "name": "name",
              "description": "Name for the inner native input",
              "type": "string"
            },
            {
              "name": "triggerOnFocus",
              "description": "Whether show suggestions when input focus",
              "type": "boolean"
            },
            {
              "name": "placement",
              "description": "Placement of the popup menu",
              "type": "SuggestionPlacement"
            },
            {
              "name": "prefixIcon",
              "description": "Prefix icon class",
              "type": "string"
            },
            {
              "name": "suffixIcon",
              "description": "Suffix icon class",
              "type": "string"
            },
            {
              "name": "fetchSuggestions",
              "description": "A method to fetch input suggestions. When suggestions are ready, invoke callback(data:[]) to return them to Autocomplete",
              "type": "FetchSuggestions"
            },
            {
              "name": "disabled",
              "description": "Whether Autocomplete is disabled",
              "type": "boolean"
            },
            {
              "name": "placeholder",
              "description": "The placeholder of Autocomplete",
              "type": "string"
            },
            {
              "name": "valueKey",
              "description": "Key name of the input suggestion object for display",
              "type": "string"
            },
            {
              "name": "value",
              "description": "Binding value",
              "type": "string"
            },
            {
              "name": "clearable",
              "description": "Whether to show clear button",
              "type": "boolean"
            },
            {
              "name": "popperAppendToBody",
              "description": "Whether to append the dropdown to body",
              "type": "boolean"
            },
            {
              "name": "hideLoading",
              "description": "Whether to hide the loading icon in remote search",
              "type": "boolean"
            }
          ],
          "slots": [
            {
              "name": "default",
              "description": "Custom content for input suggestions.",
              "type": "{ item: any }"
            },
            {
              "name": "prefix",
              "description": "Content as Input prefix"
            },
            {
              "name": "suffix",
              "description": "Content as Input suffix"
            },
            {
              "name": "prepend",
              "description": "Content to prepend before Input"
            },
            {
              "name": "append",
              "description": "Content to append after Input"
            }
          ]
        },
        {
          "name": "ElAvatar",
          "description": "Avatars can be used to represent people or objects. It supports images, Icons, or characters.",
          "doc-url": "https://element.eleme.io/#/en-US/component/avatar",
          "props": [
            {
              "name": "fit",
              "type": "'fill' | 'contain' | 'cover' | 'none' | 'scale-down'",
              "description": "Set how the image fit its container for an image avatar",
              "default": "'cover'"
            },
            {
              "name": "shape",
              "type": "'circle' | 'square'",
              "description": "Avatar shape",
              "default": "'circle'"
            },
            {
              "name": "alt",
              "type": "string",
              "description": "This attribute defines an alternative text description of the image"
            },
            {
              "name": "size",
              "type": "'large'|'medium'|'small'|number",
              "description": "Avatar size",
              "default": "'large'"
            },
            {
              "name": "icon",
              "type": "string",
              "description": "Representation type to Icon, more info on Icon Component"
            },
            {
              "name": "src",
              "type": "string",
              "description": "The address of the image for an image avatar"
            },
            {
              "name": "srcSet",
              "type": "string",
              "description": "A list of one or more strings separated by commas indicating a set of possible image sources for the user agent to use"
            }
          ],
          "js": {
            "events": [
              {
                "name": "error",
                "description": "handler when img load error, return false to prevent default fallback behavior"
              }
            ]
          }
        },
        {
          "name": "ElBacktop",
          "description": "A button to back to top",
          "doc-url": "https://element.eleme.io/#/en-US/component/backtop",
          "props": [
            {
              "name": "bottom",
              "description": "Backtop bottom position",
              "type": "string|number"
            },
            {
              "name": "visibilityHeight",
              "description": "Backtop visibility height",
              "type": "string|number",
              "default": "200"
            },
            {
              "name": "right",
              "description": "Backtop right position",
              "type": "string|number",
              "default": "40"
            },
            {
              "name": "target",
              "description": "Backtop target",
              "type": "string",
              "default": "40"
            }
          ],
          "js": {
            "events": [
              {
                "name": "click",
                "description": "Triggers when click"
              }
            ]
          }
        },
        {
          "name": "ElBadge",
          "description": "A number or status mark on buttons and icons.",
          "doc-url": "https://element.eleme.io/#/en-US/component/badge",
          "props": [
            {
              "name": "isDot",
              "description": "If a little dot is displayed",
              "type": "boolean",
              "default": "false"
            },
            {
              "name": "hidden",
              "description": "Hidden badge",
              "type": "boolean",
              "default": "false"
            },
            {
              "name": "value",
              "description": "Display value",
              "type": "string|number"
            },
            {
              "name": "max",
              "description": "Maximum value, shows '{max}+' when exceeded. Only works if `value` is a `Number`",
              "type": "number"
            },
            {
              "name": "type",
              "description": "button type",
              "type": "'primary' | 'success' | 'warning' | 'danger' | 'info'"
            }
          ]
        },
        {
          "name": "ElBreadcrumb",
          "description": "Displays the location of the current page, making it easier to browser back.",
          "doc-url": "https://element.eleme.io/#/en-US/component/breadcrumb",
          "props": [
            {
              "name": "separatorClass",
              "description": "Class name of the icon separator",
              "type": "string"
            },
            {
              "name": "separator",
              "description": "Separator character",
              "type": "string",
              "default": "'/'"
            }
          ]
        },
        {
          "name": "ElBreadcrumbItem",
          "doc-url": "https://element.eleme.io/#/en-US/component/breadcrumb",
          "props": [
            {
              "name": "replace",
              "description": "If `true`, the navigation will not leave a history record",
              "type": "boolean",
              "default": "false"
            },
            {
              "name": "to",
              "description": "Target route of the link, same as `to` of `vue-router`",
              "type": "string|object"
            }
          ]
        },
        {
          "name": "ElButton",
          "description": "Commonly used button.",
          "doc-url": "https://element.eleme.io/#/en-US/component/button",
          "props": [
            {
              "name": "type",
              "description": "Button type",
              "type": "'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text"
            },
            {
              "name": "plain",
              "description": "Determine whether it's a plain button",
              "type": "boolean",
              "default": "false"
            },
            {
              "name": "loading",
              "description": "Determine whether it's loading",
              "type": "boolean",
              "default": "false"
            },
            {
              "name": "size",
              "description": "Button size",
              "type": "'medium' | 'small' | 'mini'"
            },
            {
              "name": "icon",
              "description": "icon class name",
              "type": "string"
            },
            {
              "name": "disabled",
              "description": "Disable the button",
              "type": "boolean",
              "default": "false"
            },
            {
              "name": "autofocus",
              "description": "Same as native button's `autofocus`",
              "type": "boolean",
              "default": "false"
            },
            {
              "name": "round",
              "description": "Determine whether it's a round button",
              "type": "boolean",
              "default": "false"
            },
            {
              "name": "circle",
              "description": "Determine whether it's a circle button",
              "type": "boolean",
              "default": "false"
            },
            {
              "name": "nativeType",
              "description": "Same as native button's `type`",
              "type": "'button' | 'submit' | 'reset'",
              "default": "'button'"
            }
          ]
        },
        {
          "name": "ElButtonGroup",
          "description": "Displayed as a button group, can be used to group a series of similar operations.",
          "doc-url": "https://element.eleme.io/#/en-US/component/button"
        },
        {
          "name": "ElCalendar",
          "description": "Display date.",
          "doc-url": "https://element.eleme.io/#/en-US/component/calendar",
          "props": [
            {
              "name": "range",
              "description": "time range, including start time and end time. Start time must be start day of week, end time must be end day of week, the time span cannot exceed two months.",
              "type": "(Date | string | number)[]"
            },
            {
              "name": "value",
              "description": "Binding value",
              "type": "Date | string | number"
            },
            {
              "name": "firstDayOfWeek",
              "description": "First day of week",
              "type": "number",
              "default": "1"
            }
          ],
          "slots": [
            {
              "name": "dateCell",
              "type": "{date: Date, data: {type: 'prev-month' | 'current-month' | 'next-month', isSelected: boolean, day: string}}"
            }
          ]
        },
        {
          "name": "ElCard",
          "description": "Integrate information in a card container.",
          "doc-url": "https://element.eleme.io/#/en-US/component/card",
          "props": [
            {
              "name": "shadow",
              "description": "When to show card shadows",
              "type": "'always'| 'hover' | 'never'",
              "default": "'always'"
            },
            {
              "name": "bodyStyle",
              "description": "CSS style of body",
              "type": "object",
              "default": "{ padding: '20px' }"
            },
            {
              "name": "header",
              "description": "Title of the card",
              "type": "string"
            }
          ],
          "slots": [
            {
              "name": "default",
              "description": "Content of the card"
            },
            {
              "name": "header",
              "description": "Title of the card"
            }
          ]
        },
        {
          "name": "ElCarousel",
          "description": "Loop a series of images or texts in a limited space",
          "doc-url": "https://element.eleme.io/#/en-US/component/carousel",
          "props": [
            {
              "name": "arrow",
              "description": "When arrows are shown",
              "type": "'always'|'hover'|'never'",
              "default": "'hover'"
            },
            {
              "name": "type",
              "description": "Type of the Carousel",
              "type": "'card'"
            },
            {
              "name": "height",
              "description": "Height of the carousel",
              "type": "number"
            },
            {
              "name": "autoplay",
              "description": "Whether automatically loop the slides",
              "type": "boolean",
              "default": "true"
            },
            {
              "name": "initialIndex",
              "description": "Index of the initially active slide (starting from 0)",
              "type": "number"
            },
            {
              "name": "indicatorPosition",
              "description": "Position of the indicators",
              "type": "'outside' | 'none'"
            },
            {
              "name": "interval",
              "description": "Interval of the auto loop, in milliseconds",
              "type": "number",
              "default": "3000"
            },
            {
              "name": "direction",
              "description": "Display direction",
              "type": "'horizontal' | 'vertical'",
              "default": "'horizontal'"
            },
            {
              "name": "trigger",
              "description": "How indicators are triggered",
              "type": "'hover' | 'click'",
              "default": "'hover'"
            },
            {
              "name": "loop",
              "description": "display the items in loop",
              "type": "boolean",
              "default": "true"
            }
          ],
          "js": {
            "events": [
              {
                "name": "change",
                "description": "triggers when the active slide switches",
                "doc-url": "https://element.eleme.io/#/en-US/component/carousel#carousel-events"
              }
            ]
          }
        },
        {
          "name": "ElCarouselItem",
          "doc-url": "https://element.eleme.io/#/en-US/component/carousel#carousel-item-attributes",
          "props": [
            {
              "name": "name",
              "description": "Name of the item, can be used in `setActiveItem`",
              "type": "string"
            },
            {
              "name": "label",
              "description": "Text content for the corresponding indicator",
              "type": "string"
            }
          ]
        },
        {
          "name": "ElCascader",
          "description": "If the options have a clear hierarchical structure, Cascader can be used to view and select them.",
          "doc-url": "https://element.eleme.io/#/en-US/component/cascader",
          "props": [
            {
              "name": "debounce",
              "description": "Debounce delay when typing filter keyword, in millisecond",
              "type": "number"
            },
            {
              "name": "options",
              "description": "Data of the options",
              "type": "CascaderOption[]"
            },
            {
              "name": "filterable",
              "description": "Whether the options can be searched",
              "type": "boolean"
            },
            {
              "name": "separator",
              "description": "Separator of option labels",
              "type": "string"
            },
            {
              "name": "props",
              "description": "Configuration options",
              "type": "CascaderProps"
            },
            {
              "name": "size",
              "description": "Size of Input",
              "type": "ElementUIComponentSize"
            },
            {
              "name": "popperClass",
              "description": "Custom class name for Cascader's dropdown",
              "type": "string"
            },
            {
              "name": "showAllLevels",
              "description": "Whether to display all levels of the selected value in the input",
              "type": "boolean"
            },
            {
              "name": "collapseTags",
              "description": "Whether to collapse selected tags in multiple selection mode",
              "type": "boolean"
            },
            {
              "name": "disabled",
              "description": "Whether Cascader is disabled",
              "type": "boolean"
            },
            {
              "name": "placeholder",
              "description": "Input placeholder",
              "type": "string"
            },
            {
              "name": "value",
              "description": "Selected value",
              "type": "any"
            },
            {
              "name": "clearable",
              "description": "Whether selected value can be cleared",
              "type": "boolean"
            }
          ],
          "slots": [
            {
              "name": "default",
              "description": "Custom label content"
            },
            {
              "name": "empty",
              "description": "Empty content when no option matches"
            }
          ]
        },
        {
          "name": "ElCascaderPanel",
          "doc-url": "https://element.eleme.io/#/en-US/component/cascader#cascaderpanel-attributes",
          "props": [
            {
              "name": "options",
              "description": "Data of the options",
              "type": "CascaderOption[]"
            },
            {
              "name": "border",
              "description": "Whether to add border",
              "type": "boolean"
            },
            {
              "name": "props",
              "description": "Configuration options",
              "type": "CascaderProps"
            },
            {
              "name": "value",
              "description": "Selected value",
              "type": "any"
            }
          ],
          "slots": [
            {
              "name": "default",
              "description": "Custom label content"
            }
          ]
        },
        {
          "name": "ElCheckbox",
          "description": "A group of options for multiple choices.",
          "doc-url": "https://element.eleme.io/#/en-US/component/checkbox",
          "props": [
            {
              "name": "indeterminate",
              "description": "Same as indeterminate in native checkbox",
              "type": "boolean"
            },
            {
              "name": "checked",
              "description": "If the checkbox is checked",
              "type": "boolean"
            },
            {
              "name": "border",
              "description": "Whether to add a border around Checkbox",
              "type": "boolean"
            },
            {
              "name": "trueLabel",
              "description": "Value of the checkbox if it's checked",
              "type": "string|number"
            },
            {
              "name": "size",
              "description": "Size of the Checkbox, only works when border is true",
              "type": "ElementUIComponentSize"
            },
            {
              "name": "name",
              "description": "Native 'name' attribute",
              "type": "string"
            },
            {
              "name": "falseLabel",
              "description": "Value of the checkbox if it's not checked",
              "type": "string|number"
            },
            {
              "name": "disabled",
              "description": "If the checkbox is disabled",
              "type": "boolean"
            },
            {
              "name": "value",
              "description": "The form input value",
              "type": "string|string[]"
            },
            {
              "name": "label",
              "description": "Value of the checkbox when used inside a checkbox-group",
              "type": "string|number|boolean"
            }
          ]
        },
        {
          "name": "ElCheckboxButton",
          "doc-url": "https://element.eleme.io/#/en-US/component/checkbox#checkbox-group-attributes",
          "props": [
            {
              "name": "checked",
              "description": "If the checkbox is checked",
              "type": "boolean"
            },
            {
              "name": "trueLabel",
              "description": "Value of the checkbox if it's checked",
              "type": "string|number"
            },
            {
              "name": "name",
              "description": "Native 'name' attribute",
              "type": "string"
            },
            {
              "name": "falseLabel",
              "description": "Value of the checkbox if it's not checked",
              "type": "string|number"
            },
            {
              "name": "disabled",
              "description": "If the checkbox is disabled",
              "type": "boolean"
            },
            {
              "name": "label",
              "description": "Value of the checkbox when used inside a checkbox-group",
              "type": "string|number|boolean"
            }
          ]
        },
        {
          "name": "ElCheckboxGroup",
          "doc-url": "https://element.eleme.io/#/en-US/component/checkbox#checkbox-group-attributes",
          "props": [
            {
              "name": "fill",
              "description": "Border and background color when button is active",
              "type": "string"
            },
            {
              "name": "textColor",
              "description": "Font color when button is active",
              "type": "string"
            },
            {
              "name": "size",
              "description": "Size of checkbox buttons or bordered checkboxes",
              "type": "ElementUIComponentSize"
            },
            {
              "name": "min",
              "description": "Minimum number of checkbox checked",
              "type": "number"
            },
            {
              "name": "disabled",
              "description": "Whether the nesting checkboxes are disabled",
              "type": "boolean"
            },
            {
              "name": "max",
              "description": "Maximum number of checkbox checked",
              "type": "number"
            }
          ]
        },
        {
          "name": "ElCol",
          "props": [
            {
              "name": "md",
              "description": "≥992px Responsive columns or column props object",
              "type": "ResponsiveColumn"
            },
            {
              "name": "tag",
              "description": "custom element tag",
              "type": "string"
            },
            {
              "name": "offset",
              "description": "Number of spacing on the left side of the grid",
              "type": "number"
            },
            {
              "name": "push",
              "description": "Number of columns that grid moves to the right",
              "type": "number"
            },
            {
              "name": "sm",
              "description": "≥768px Responsive columns or column props object",
              "type": "ResponsiveColumn"
            },
            {
              "name": "pull",
              "description": "Number of columns that grid moves to the left",
              "type": "number"
            },
            {
              "name": "xl",
              "description": "≥1920px Responsive columns or column props object",
              "type": "ResponsiveColumn"
            },
            {
              "name": "xs",
              "description": "<768px Responsive columns or column props object",
              "type": "ResponsiveColumn"
            },
            {
              "name": "lg",
              "description": "≥1200px Responsive columns or column props object",
              "type": "ResponsiveColumn"
            },
            {
              "name": "span",
              "description": "Number of column the grid spans",
              "type": "number"
            }
          ]
        },
        {
          "name": "ElCollapse",
          "description": "Use Collapse to store contents.",
          "doc-url": "https://element.eleme.io/#/en-US/component/collapse",
          "props": [
            {
              "name": "accordion",
              "description": "Whether to activate accordion mode",
              "type": "boolean"
            },
            {
              "name": "value",
              "description": "Currently active panel",
              "type": "string|number|string[]|number[]"
            }
          ]
        },
        {
          "name": "ElCollapseItem",
          "doc-url": "https://element.eleme.io/#/en-US/component/collapse#collapse-item-attributes",
          "props": [
            {
              "name": "name",
              "description": "Unique identification of the panel",
              "type": "string|number"
            },
            {
              "name": "title",
              "description": "Title of the panel",
              "type": "string"
            },
            {
              "name": "disabled",
              "description": "Disable the collapse item",
              "type": "boolean"
            }
          ],
          "slots": [
            {
              "name": "default",
              "description": "Content of the collapse item"
            },
            {
              "name": "title",
              "description": "Title of the collapse item"
            }
          ]
        },
        {
          "name": "ElColorPicker",
          "description": "ColorPicker is a color selector supporting multiple color formats.",
          "doc-url": "https://element.eleme.io/#/en-US/component/color-picker",
          "props": [
            {
              "name": "showAlpha",
              "description": "Whether to display the alpha slider",
              "type": "boolean"
            },
            {
              "name": "colorFormat",
              "description": "Custom class name for ColorPicker's dropdown",
              "type": "ColorFormat"
            },
            {
              "name": "size",
              "description": "Size of ColorPicker",
              "type": "ElementUIComponentSize"
            },
            {
              "name": "popperClass",
              "description": "Whether to display the alpha slider",
              "type": "string"
            },
            {
              "name": "disabled",
              "description": "Whether to disable the ColorPicker",
              "type": "boolean"
            }
          ]
        },
        {
          "name": "ElComponent",
          "props": []
        },
        {
          "name": "ElContainer",
          "description": "Wrapper container. When nested with a `` or ``, all its child elements will be vertically arranged. Otherwise horizontally.",
          "doc-url": "https://element.eleme.io/#/en-US/component/container",
          "props": [
            {
              "name": "direction",
              "description": "Layout direction for child elements",
              "type": "\"horizontal\"|\"vertical\""
            }
          ]
        },
        {
          "name": "ElDatePicker",
          "description": "Use Date Picker for date input.",
          "doc-url": "https://element.eleme.io/#/en-US/component/date-picker",
          "props": [
            {
              "name": "defaultValue",
              "description": "Default date of the calendar",
              "type": "Date|number|string"
            },
            {
              "name": "type",
              "description": "Type of the picker",
              "type": "DatePickerType"
            },
            {
              "name": "align",
              "description": "Alignment",
              "type": "ElementUIHorizontalAlignment"
            },
            {
              "name": "readonly",
              "description": "Whether DatePicker is read only",
              "type": "boolean"
            },
            {
              "name": "format",
              "description": "Format of the picker",
              "type": "string"
            },
            {
              "name": "size",
              "description": "Size of Input",
              "type": "ElementUIComponentSize"
            },
            {
              "name": "popperClass",
              "description": "Custom class name for DatePicker's dropdown",
              "type": "string"
            },
            {
              "name": "name",
              "description": "name for the inner native input",
              "type": "string"
            },
            {
              "name": "startPlaceholder",
              "description": "Placeholder for the start date in range mode",
              "type": "string"
            },
            {
              "name": "disabled",
              "description": "Whether DatePicker is disabled",
              "type": "boolean"
            },
            {
              "name": "placeholder",
              "description": "Placeholder",
              "type": "string"
            },
            {
              "name": "endPlaceholder",
              "description": "Placeholder for the end date in range mode",
              "type": "string"
            },
            {
              "name": "value",
              "description": "The value of the date picker",
              "type": "Date|string|Date[]|string[]"
            },
            {
              "name": "rangeSeparator",
              "description": "Range separator",
              "type": "string"
            },
            {
              "name": "clearable",
              "description": "Whether to show clear button",
              "type": "boolean"
            },
            {
              "name": "editable",
              "description": "Whether the input is editable",
              "type": "boolean"
            },
            {
              "name": "pickerOptions",
              "description": "Additional options, check the table below",
              "type": "DatePickerOptions"
            },
            {
              "name": "valueFormat",
              "description": "Format of binding value. If not specified, the binding value will be a Date object",
              "type": "string"
            }
          ],
          "slots": [
            {
              "name": "range-separator",
              "description": "Custom range separator content"
            }
          ]
        },
        {
          "name": "ElDescriptions",
          "description": "Display multiple fields in list form.",
          "doc-url": "https://element.eleme.io/#/en-US/component/descriptions",
          "props": [
            {
              "name": "labelStyle",
              "description": "custom label style",
              "type": "object"
            },
            {
              "name": "contentClassName",
              "description": "custom content class name",
              "type": "string"
            },
            {
              "name": "border",
              "description": "with or without border",
              "type": "boolean"
            },
            {
              "name": "size",
              "description": "size of list",
              "type": "\"medium\"|\"small\"|\"mini\""
            },
            {
              "name": "labelClassName",
              "description": "custom label class name",
              "type": "string"
            },
            {
              "name": "title",
              "description": "title text, display on the top left",
              "type": "string"
            },
            {
              "name": "contentStyle",
              "description": "custom content style",
              "type": "object"
            },
            {
              "name": "extra",
              "description": "extra text, display on the top right",
              "type": "string"
            },
            {
              "name": "direction",
              "description": "direction of list",
              "type": "\"vertical\"|\"horizontal\""
            },
            {
              "name": "column",
              "description": "numbers of Descriptions Item in one line",
              "type": "number"
            },
            {
              "name": "colon",
              "description": "change default props colon value of Descriptions Item",
              "type": "boolean"
            }
          ],
          "slots": [
            {
              "name": "extra",
              "description": "title slot: custom extra area, display on the top right"
            },
            {
              "name": "title",
              "description": "title slot: custom title, display on the top left"
            }
          ]
        },
        {
          "name": "ElDescriptionsItem",
          "doc-url": "https://element.eleme.io/#/en-US/component/descriptions#descriptions-item-attributes",
          "props": [
            {
              "name": "labelStyle",
              "description": "custom label style",
              "type": "object"
            },
            {
              "name": "contentClassName",
              "description": "custom content class name",
              "type": "string"
            },
            {
              "name": "labelClassName",
              "description": "custom label class name",
              "type": "string"
            },
            {
              "name": "contentStyle",
              "description": "custom content style",
              "type": "object"
            },
            {
              "name": "label",
              "description": "label text",
              "type": "string"
            },
            {
              "name": "span",
              "description": "the number of columns included",
              "type": "number"
            }
          ],
          "slots": [
            {
              "name": "default",
              "description": "default slot: custom content"
            },
            {
              "name": "label",
              "description": "label slot: custom label"
            }
          ]
        },
        {
          "name": "ElDialog",
          "description": "Informs users while preserving the current page state.",
          "doc-url": "https://element.eleme.io/#/en-US/component/dialog",
          "props": [
            {
              "name": "closeOnPressEscape",
              "description": "Whether the Dialog can be closed by pressing ESC",
              "type": "boolean"
            },
            {
              "name": "showClose",
              "description": "Whether to show a close button",
              "type": "boolean"
            },
            {
              "name": "closeOnClickModal",
              "description": "Whether the Dialog can be closed by clicking the mask",
              "type": "boolean"
            },
            {
              "name": "lockScroll",
              "description": "Whether scroll of body is disabled while Dialog is displayed",
              "type": "boolean"
            },
            {
              "name": "modal",
              "description": "Whether a mask is displayed",
              "type": "boolean"
            },
            {
              "name": "fullscreen",
              "description": "Whether the Dialog takes up full screen",
              "type": "boolean"
            },
            {
              "name": "destroyOnClose",
              "description": "Whether to destroy elements in Dialog when closed",
              "type": "boolean"
            },
            {
              "name": "title",
              "description": "Title of Dialog",
              "type": "string"
            },
            {
              "name": "top",
              "description": "Value for margin-top of Dialog CSS",
              "type": "string"
            },
            {
              "name": "modalAppendToBody",
              "description": "Whether to append modal to body element. If false, the modal will be appended to Dialog's parent element",
              "type": "boolean"
            },
            {
              "name": "center",
              "description": "Whether to align the header and footer in center",
              "type": "boolean"
            },
            {
              "name": "width",
              "description": "Width of Dialog",
              "type": "string"
            },
            {
              "name": "customClass",
              "description": "Custom class names for Dialog",
              "type": "string"
            }
          ],
          "slots": [
            {
              "name": "default",
              "description": "Content of the Dialog"
            },
            {
              "name": "footer",
              "description": "Content of the Dialog footer"
            },
            {
              "name": "title",
              "description": "Content of the Dialog title"
            }
          ]
        },
        {
          "name": "ElDivider",
          "description": "The dividing line that separates the content.",
          "doc-url": "https://element.eleme.io/#/en-US/component/divider",
          "props": [
            {
              "name": "vertical",
              "description": "enable vertical divider",
              "type": "boolean"
            },
            {
              "name": "posiiton",
              "description": "customize the content on the divider line",
              "type": "ContentPosition"
            }
          ]
        },
        {
          "name": "ElDrawer",
          "description": "Sometimes, `Dialog` does not always satisfy our requirements, let's say you have a massive form, or you need space to display something like `terms & conditions`, `Drawer` has almost identical API with `Dialog`, but it introduces different user experience.",
          "doc-url": "https://element.eleme.io/#/en-US/component/drawer",
          "props": [
            {
              "name": "closeOnPressEscape",
              "description": "Whether the Drawer can be closed by pressing ESC",
              "type": "boolean"
            },
            {
              "name": "showClose",
              "description": "Whether the close button should be rendered to control the drawer's visible state",
              "type": "boolean"
            },
            {
              "name": "wrapperClosable",
              "description": "Flag attribute whi",
              "type": "boolean"
            },
            {
              "name": "modal",
              "description": "Equivalent to `Dialog`'s modal attribute, determines whether the dark shadowing background should show",
              "type": "boolean"
            },
            {
              "name": "visible",
              "description": "Whether the drawer component should show, also can be decorated by `.sync`",
              "type": "boolean"
            },
            {
              "name": "size",
              "description": "The size of the drawer component, supporting number with unit of pixel, string by percentage e.g. 30%",
              "type": "number|string"
            },
            {
              "name": "appendToBody",
              "description": "Equivalent to `Dialog`'s append to body attribute, when applying nested drawer, make sure this one is set to true",
              "type": "boolean"
            },
            {
              "name": "position",
              "description": "Attributes that controls the drawer's direction of display",
              "type": "Direction"
            },
            {
              "name": "destroyOnClose",
              "description": "Determine whether the wrapped children should be destroyed, if true, children's destroyed life cycle method will be called all local state will be destroyed",
              "type": "boolean"
            },
            {
              "name": "title",
              "description": "The Drawer's title, also can be replaced by named slot `title`",
              "type": "string"
            },
            {
              "name": "modalAppendToBody",
              "description": "Equivalent to `Dialog`'s modal-append-to-body attribute, determines whether the shadowing background should be inserted direct to DocumentBody element",
              "type": "boolean"
            },
            {
              "name": "customClass",
              "description": "Custom class names for Dialog",
              "type": "string"
            }
          ],
          "slots": [
            {
              "name": "default",
              "description": "Main Content Slots"
            },
            {
              "name": "title",
              "description": "Title Slots"
            }
          ]
        },
        {
          "name": "ElDropdown",
          "description": "Toggleable menu for displaying lists of links and actions.",
          "doc-url": "https://element.eleme.io/#/en-US/component/dropdown",
          "props": [
            {
              "name": "type",
              "description": "Menu button type. only works when split-button is true",
              "type": "ButtonType"
            },
            {
              "name": "tabindex",
              "description": "Dropdown tabindex",
              "type": "number"
            },
            {
              "name": "size",
              "description": "menu size, also works on the split button",
              "type": "ElementUIComponentSize"
            },
            {
              "name": "placement",
              "description": "Placement of the menu",
              "type": "DropdownMenuAlignment"
            },
            {
              "name": "hideTimeout",
              "description": "Delay time before hide a dropdown",
              "type": "number"
            },
            {
              "name": "disabled",
              "description": "Whether Dropdown is disabled",
              "type": "boolean"
            },
            {
              "name": "splitButton",
              "description": "Whether a button group is displayed",
              "type": "boolean"
            },
            {
              "name": "trigger",
              "description": "How to trigger",
              "type": "DropdownMenuTrigger"
            },
            {
              "name": "showTimeout",
              "description": "Delay time before show a dropdown",
              "type": "number"
            },
            {
              "name": "hideOnClick",
              "description": "Whether to hide menu after clicking menu-item",
              "type": "boolean"
            }
          ],
          "slots": [
            {
              "name": "default",
              "description": "Content of Dropdown. Notice: Must be a valid html dom element (ex. ``, `

你可能感兴趣的:(webstorm,ui,vue.js,elementui,前端)