├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .prettierrc.js
├── .travis.yml
├── .vscode
├── extensions.json
├── launch.json
├── settings.json
└── tasks.json
├── .vscodeignore
├── .yarnrc
├── CHANGELOG.md
├── LICENSE.MD
├── README.md
├── element.png
├── package.json
├── rollup.config.js
├── src
├── completion
│ └── element-completion-item-povider.ts
├── document
│ ├── document-builder.js
│ ├── en-US
│ │ ├── el-alert.ts
│ │ ├── el-aside.ts
│ │ ├── el-autocomplete.ts
│ │ ├── el-avatar.ts
│ │ ├── el-backtop.ts
│ │ ├── el-badge.ts
│ │ ├── el-breadcrumb-item.ts
│ │ ├── el-breadcrumb.ts
│ │ ├── el-button.ts
│ │ ├── el-calendar.ts
│ │ ├── el-card.ts
│ │ ├── el-carousel-item.ts
│ │ ├── el-carousel.ts
│ │ ├── el-cascader-panel.ts
│ │ ├── el-cascader.ts
│ │ ├── el-checkbox-button.ts
│ │ ├── el-checkbox-group.ts
│ │ ├── el-checkbox.ts
│ │ ├── el-col.ts
│ │ ├── el-collapse-item.ts
│ │ ├── el-collapse.ts
│ │ ├── el-color-picker.ts
│ │ ├── el-container.ts
│ │ ├── el-date-picker.ts
│ │ ├── el-datetime-picker.ts
│ │ ├── el-dialog.ts
│ │ ├── el-divider.ts
│ │ ├── el-drawer.ts
│ │ ├── el-dropdown-menu-item.ts
│ │ ├── el-dropdown.ts
│ │ ├── el-footer.ts
│ │ ├── el-form-item.ts
│ │ ├── el-form.ts
│ │ ├── el-header.ts
│ │ ├── el-image.ts
│ │ ├── el-infinite-scroll.ts
│ │ ├── el-input-number.ts
│ │ ├── el-input.ts
│ │ ├── el-link.ts
│ │ ├── el-menu-item-group.ts
│ │ ├── el-menu-item.ts
│ │ ├── el-menu.ts
│ │ ├── el-message.ts
│ │ ├── el-notification.ts
│ │ ├── el-option-group.ts
│ │ ├── el-option.ts
│ │ ├── el-page-header.ts
│ │ ├── el-pagination.ts
│ │ ├── el-popconfirm.ts
│ │ ├── el-popover.ts
│ │ ├── el-progress.ts
│ │ ├── el-radio-button.ts
│ │ ├── el-radio-group.ts
│ │ ├── el-radio.ts
│ │ ├── el-rate.ts
│ │ ├── el-row.ts
│ │ ├── el-select.ts
│ │ ├── el-slider.ts
│ │ ├── el-step.ts
│ │ ├── el-steps.ts
│ │ ├── el-submenu.ts
│ │ ├── el-switch.ts
│ │ ├── el-tab-pane.ts
│ │ ├── el-table-column.ts
│ │ ├── el-table.ts
│ │ ├── el-tabs.ts
│ │ ├── el-tag.ts
│ │ ├── el-time-picker.ts
│ │ ├── el-time-select.ts
│ │ ├── el-timeline-item.ts
│ │ ├── el-timeline.ts
│ │ ├── el-tooltip.ts
│ │ ├── el-transfer.ts
│ │ ├── el-tree.ts
│ │ ├── el-upload.ts
│ │ └── index.ts
│ ├── index.ts
│ └── zh-CN
│ │ ├── el-alert.ts
│ │ ├── el-aside.ts
│ │ ├── el-autocomplete.ts
│ │ ├── el-avatar.ts
│ │ ├── el-backtop.ts
│ │ ├── el-badge.ts
│ │ ├── el-breadcrumb-item.ts
│ │ ├── el-breadcrumb.ts
│ │ ├── el-button.ts
│ │ ├── el-calendar.ts
│ │ ├── el-card.ts
│ │ ├── el-carousel-item.ts
│ │ ├── el-carousel.ts
│ │ ├── el-cascader-panel.ts
│ │ ├── el-cascader.ts
│ │ ├── el-checkbox-button.ts
│ │ ├── el-checkbox-group.ts
│ │ ├── el-checkbox.ts
│ │ ├── el-col.ts
│ │ ├── el-collapse-item.ts
│ │ ├── el-collapse.ts
│ │ ├── el-color-picker.ts
│ │ ├── el-container.ts
│ │ ├── el-date-picker.ts
│ │ ├── el-datetime-picker.ts
│ │ ├── el-descriptions-item.ts
│ │ ├── el-descriptions.ts
│ │ ├── el-dialog.ts
│ │ ├── el-divider.ts
│ │ ├── el-drawer.ts
│ │ ├── el-dropdown-menu-item.ts
│ │ ├── el-dropdown.ts
│ │ ├── el-empty.ts
│ │ ├── el-footer.ts
│ │ ├── el-form-item.ts
│ │ ├── el-form.ts
│ │ ├── el-header.ts
│ │ ├── el-image.ts
│ │ ├── el-infinite-scroll.ts
│ │ ├── el-input-number.ts
│ │ ├── el-input.ts
│ │ ├── el-link.ts
│ │ ├── el-menu-item-group.ts
│ │ ├── el-menu-item.ts
│ │ ├── el-menu.ts
│ │ ├── el-option-group.ts
│ │ ├── el-option.ts
│ │ ├── el-page-header.ts
│ │ ├── el-pagination.ts
│ │ ├── el-popconfirm.ts
│ │ ├── el-popover.ts
│ │ ├── el-progress.ts
│ │ ├── el-radio-button.ts
│ │ ├── el-radio-group.ts
│ │ ├── el-radio.ts
│ │ ├── el-rate.ts
│ │ ├── el-result.ts
│ │ ├── el-row.ts
│ │ ├── el-select.ts
│ │ ├── el-skeleton-item.ts
│ │ ├── el-skeleton.ts
│ │ ├── el-slider.ts
│ │ ├── el-step.ts
│ │ ├── el-steps.ts
│ │ ├── el-submenu.ts
│ │ ├── el-switch.ts
│ │ ├── el-tab-pane.ts
│ │ ├── el-table-column.ts
│ │ ├── el-table.ts
│ │ ├── el-tabs.ts
│ │ ├── el-tag.ts
│ │ ├── el-time-picker.ts
│ │ ├── el-time-select.ts
│ │ ├── el-timeline-item.ts
│ │ ├── el-timeline.ts
│ │ ├── el-tooltip.ts
│ │ ├── el-transfer.ts
│ │ ├── el-tree.ts
│ │ ├── el-upload.ts
│ │ └── index.ts
├── extension.ts
├── hover-tips
│ ├── element-hover-provider.ts
│ └── index.ts
├── index.ts
├── test
│ ├── runTest.ts
│ └── suite
│ │ ├── extension.test.ts
│ │ └── index.ts
└── utils
│ ├── document-generator.ts
│ └── index.ts
└── tsconfig.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | insert_final_newline = false
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | .eslintrc.js
2 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: 'eslint:recommended',
4 | env: {
5 | node: true
6 | },
7 | parser: '@typescript-eslint/parser',
8 | parserOptions: {
9 | ecmaVersion: 6,
10 | sourceType: 'module'
11 | },
12 | plugins: ['@typescript-eslint'],
13 | rules: {
14 | '@typescript-eslint/naming-convention': 'warn',
15 | '@typescript-eslint/semi': 'off',
16 | curly: 'warn',
17 | eqeqeq: 'warn',
18 | 'no-throw-literal': 'warn',
19 | semi: 'off',
20 | 'no-unused-vars': ['error', { vars: 'all', args: 'none', ignoreRestSiblings: false }]
21 | },
22 | ignorePatterns: ['**/*.d.ts']
23 | }
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | out
2 | dist
3 | node_modules
4 | .vscode-test/
5 | *.vsix
6 | *.lock
7 |
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | arrowParens: 'always', // (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号
3 | endOfLine: 'lf', // 结尾是 \n \r \n\r lf
4 | semi: false, // 句尾添加分号 (不添加)
5 | singleQuote: true, // 使用单引号代替双引号
6 | trailingComma: 'none', // 在对象或数组最后一个元素后面是否加逗号(不添加)
7 | printWidth: 200, // 换行宽度
8 | htmlWhitespaceSensitivity: 'css' // 根据css样式决定是否换行
9 | }
10 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | dist: xenial
3 | os: linux
4 | node_js:
5 | - '12'
6 | before_install:
7 | - npm install yarn -g
8 | install:
9 | - yarn
10 | before_script:
11 | - export TRAVIS_DIST=element-ui-helper-$TRAVIS_TAG.vsix
12 | script:
13 | - yarn pretest
14 | - yarn package
15 | before_deploy:
16 | - yarn package -o $TRAVIS_DIST
17 | deploy:
18 | provider: releases
19 | token: $GITHUB_TOKEN
20 | file: $TRAVIS_DIST
21 | cleanup: false
22 | on:
23 | tags: true
24 | after_deploy:
25 | - yarn changelog
26 | - yarn vsce publish --packagePath $TRAVIS_DIST
27 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846
3 | // for the documentation about the extensions.json format
4 | "recommendations": [
5 | "dbaeumer.vscode-eslint"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | // A launch configuration that compiles the extension and then opens it inside a new window
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | {
6 | "version": "0.2.0",
7 | "configurations": [
8 | {
9 | "name": "Run Extension",
10 | "type": "extensionHost",
11 | "request": "launch",
12 | "args": [
13 | "--extensionDevelopmentPath=${workspaceFolder}"
14 | ],
15 | "outFiles": [
16 | "${workspaceFolder}/out/**/*.js"
17 | ],
18 | "preLaunchTask": "${defaultBuildTask}"
19 | },
20 | {
21 | "name": "Extension Tests",
22 | "type": "extensionHost",
23 | "request": "launch",
24 | "args": [
25 | "--extensionDevelopmentPath=${workspaceFolder}",
26 | "--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
27 | ],
28 | "outFiles": [
29 | "${workspaceFolder}/out/test/**/*.js"
30 | ],
31 | "preLaunchTask": "${defaultBuildTask}"
32 | }
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | // Place your settings in this file to overwrite default and user settings.
2 | {
3 | "files.exclude": {
4 | "out": false // set this to true to hide the "out" folder with the compiled JS files
5 | },
6 | "search.exclude": {
7 | "out": true // set this to false to include "out" folder in search results
8 | },
9 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10 | "typescript.tsc.autoDetect": "off"
11 | }
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | // See https://go.microsoft.com/fwlink/?LinkId=733558
2 | // for the documentation about the tasks.json format
3 | {
4 | "version": "2.0.0",
5 | "tasks": [
6 | {
7 | "label": "npm: build",
8 | "type": "npm",
9 | "script": "build",
10 | "group": {
11 | "kind": "build",
12 | "isDefault": true
13 | },
14 | "problemMatcher": "$tsc-watch",
15 | "isBackground": true,
16 | "presentation": {
17 | "reveal": "never"
18 | },
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/.vscodeignore:
--------------------------------------------------------------------------------
1 | .vscode/**
2 | .vscode-test/**
3 | out/test/**
4 | src/**
5 | .gitignore
6 | .yarnrc
7 | vsc-extension-quickstart.md
8 | **/tsconfig.json
9 | **/.eslintrc.json
10 | **/*.map
11 | **/*.ts
12 |
--------------------------------------------------------------------------------
/.yarnrc:
--------------------------------------------------------------------------------
1 | --ignore-engines true
--------------------------------------------------------------------------------
/LICENSE.MD:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2020-present HULANG-BTB
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
Element UI Helper
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | > Element-UI-Helper is a VS Code extension for Element-UI.
36 |
37 | Element-UI is a great library. More and more projects use it. So, For helping developer write more efficient by Element-UI, Element-UI-Helper is born.This is not an official project, but all the documents are from the official website.
38 |
39 | ## Features
40 |
41 | ### Document Hover Tips
42 |
43 | The only step to use this extension is moving your cursor to Element-UI tag or prop.
44 |
45 | [](https://imgtu.com/i/gkk7IH)
46 |
47 | ### Autocomplete
48 |
49 | [](https://imgtu.com/i/gkkTde)
50 |
51 | ## Support
52 |
53 | - Vue
54 |
55 | ## Contribution
56 |
57 | If you want to help improve this project, Please fork and initiate. a pull request after you fix some bugs or finished some new features. Your pull request will make Element-UI-Helper better.
58 |
59 | ## LICENSE
60 |
61 | 
62 |
63 | ## **Enjoy yourself!**
64 |
--------------------------------------------------------------------------------
/element.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HULANG-BTB/element-ui-helper/9857316de6686fc0cfb902b18a78da7ba3e555c5/element.png
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "element-ui-helper",
3 | "displayName": "element-ui-helper",
4 | "version": "1.4.1",
5 | "description": "Document Hover Tips And Autocomplete Tools.",
6 | "author": {
7 | "name": "AloneH",
8 | "email": "admin@oibit.cn",
9 | "url": "https://oibit.cn"
10 | },
11 | "publisher": "oibit",
12 | "license": "MIT",
13 | "icon": "element.png",
14 | "repository": {
15 | "type": "git",
16 | "url": "https://github.com/HULANG-BTB/element-ui-helper.git"
17 | },
18 | "engines": {
19 | "vscode": "^1.50.0"
20 | },
21 | "categories": [
22 | "Snippets",
23 | "Other"
24 | ],
25 | "activationEvents": [
26 | "onLanguage:vue"
27 | ],
28 | "main": "./dist/extension.js",
29 | "contributes": {
30 | "configuration": {
31 | "type": "object",
32 | "title": "Element UI Helper Config",
33 | "properties": {
34 | "element-ui-helper.language": {
35 | "type": "string",
36 | "default": "zh-CN",
37 | "description": "Document Language of Element UI",
38 | "enum": [
39 | "zh-CN",
40 | "en-US"
41 | ]
42 | }
43 | }
44 | }
45 | },
46 | "scripts": {
47 | "vscode:prepublish": "yarn run build",
48 | "watch": "yarn rollup --config ./rollup.config.js -w",
49 | "pretest": "yarn lint",
50 | "lint": "eslint src",
51 | "test": "node ./out/test/runTest.js",
52 | "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
53 | "commit": "git-cz",
54 | "docs": "node ./src/document/document-builder.js",
55 | "package": "vsce package",
56 | "build": "yarn rollup --config ./rollup.config.js"
57 | },
58 | "devDependencies": {
59 | "@rollup/plugin-node-resolve": "^13.0.4",
60 | "@types/glob": "^7.1.3",
61 | "@types/mocha": "^8.0.4",
62 | "@types/node": "^12.11.7",
63 | "@types/vscode": "1.50.0",
64 | "@typescript-eslint/eslint-plugin": "^4.14.1",
65 | "@typescript-eslint/parser": "^4.14.1",
66 | "commitizen": "^4.2.3",
67 | "conventional-changelog": "^3.1.24",
68 | "conventional-changelog-cli": "^2.1.1",
69 | "eslint": "^7.19.0",
70 | "glob": "^7.1.6",
71 | "lint-staged": "^11.1.1",
72 | "mocha": "^8.2.1",
73 | "prettier": "^2.2.1",
74 | "rollup": "^2.56.0",
75 | "rollup-plugin-terser": "^7.0.2",
76 | "rollup-plugin-typescript2": "^0.30.0",
77 | "typescript": "^4.1.3",
78 | "vsce": "^1.96.1",
79 | "vscode-test": "^1.5.0",
80 | "yorkie": "^2.0.0"
81 | },
82 | "config": {
83 | "commitizen": {
84 | "path": "./node_modules/cz-conventional-changelog"
85 | }
86 | },
87 | "gitHooks": {
88 | "pre-commit": "lint-staged"
89 | },
90 | "lint-staged": {
91 | "*.{ts,js}": [
92 | "prettier --write",
93 | "eslint"
94 | ]
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/rollup.config.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import path from 'path'
3 | import pkg from './package.json'
4 | import { terser } from 'rollup-plugin-terser'
5 | import { nodeResolve } from '@rollup/plugin-node-resolve'
6 | import typescript from 'rollup-plugin-typescript2'
7 |
8 | const deps = Object.keys(pkg.dependencies || {})
9 |
10 | export default [
11 | {
12 | input: path.resolve(__dirname, `./src/extension.ts`), //入口
13 | output: {
14 | format: 'cjs', // umd格式
15 | file: 'dist/extension.js', // 输出文件
16 | name: pkg.name // 指定name
17 | },
18 | sourcemap: true,
19 | plugins: [
20 | terser(),
21 | nodeResolve(),
22 | typescript({
23 | tsconfigOverride: {
24 | compilerOptions: {
25 | declaration: true,
26 | sourceMap: true
27 | },
28 | include: ['src/**/*'],
29 | exclude: ['node_modules']
30 | },
31 | abortOnError: false
32 | })
33 | ], // 插件
34 | external(id) {
35 | return deps.some((k) => new RegExp('^' + k).test(id))
36 | }
37 | }
38 | ]
39 |
--------------------------------------------------------------------------------
/src/document/en-US/el-alert.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 | import { DocumentEvent } from '@/document'
4 | import { DocumentSlot } from '@/document'
5 |
6 | export const attributes: DocumentAttribute[] = [
7 | { name: 'title', description: 'title', type: 'string', value: '—', default: '—' },
8 | { name: 'type', description: 'Component type', type: 'string', value: 'success/warning/info/error', default: 'info' },
9 | { name: 'description', description: 'Descriptive text. Can also be passed with the default slot', type: 'string', value: '—', default: '—' },
10 | { name: 'closable', description: 'If closable or not', type: 'boolean', value: '—', default: 'true' },
11 | { name: 'center', description: 'Whether to center the text', type: 'boolean', value: '—', default: 'false' },
12 | { name: 'close-text', description: 'Customized close button text', type: 'string', value: '—', default: '—' },
13 | { name: 'show-icon', description: 'If a type icon is displayed', type: 'boolean', value: '—', default: 'false' },
14 | { name: 'effect', description: 'Choose theme', type: 'string', value: 'light/dark', default: 'light' }
15 | ]
16 |
17 | export const events: DocumentEvent[] = [{ name: 'close', description: 'fires when alert is closed', parameter: '—' }]
18 |
19 | export const slots: DocumentSlot[] = [
20 | { name: '—', description: 'description' },
21 | { name: 'title', description: 'content of the Alert title' }
22 | ]
23 |
24 | export const document: ElDocument = { attributes, events, slots }
25 |
26 | export default document
27 |
--------------------------------------------------------------------------------
/src/document/en-US/el-aside.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [{ name: 'width', description: 'width of the side section', type: 'string', value: '—', default: '300px' }]
5 |
6 | export const document: ElDocument = { attributes }
7 |
8 | export default document
9 |
--------------------------------------------------------------------------------
/src/document/en-US/el-avatar.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 | import { DocumentEvent } from '@/document'
4 |
5 | export const attributes: DocumentAttribute[] = [
6 | { name: 'icon', description: 'set representation type to Icon, more info on Icon Component', type: 'string', value: '', default: '' },
7 | { name: 'size', description: 'set avatar size', type: 'number/string', value: 'number / large / medium / small', default: 'large' },
8 | { name: 'shape', description: 'set avatar shape', type: 'string', value: 'circle / square', default: 'circle' },
9 | { name: 'src', description: 'the address of the image for an image avatar', type: 'string', value: '', default: '' },
10 | { name: 'srcSet', description: 'A list of one or more strings separated by commas indicating a set of possible image sources for the user agent to use', type: 'string', value: '', default: '' },
11 | { name: 'alt', description: 'This attribute defines an alternative text description of the image', type: 'string', value: '', default: '' },
12 | { name: 'fit', description: 'set how the image fit its container for an image avatar', type: 'string', value: 'fill / contain / cover / none / scale-down', default: 'cover' }
13 | ]
14 |
15 | export const events: DocumentEvent[] = [{ name: 'error', description: 'handler when img load error, return false to prevent default fallback behavior', parameter: '(e: Event)' }]
16 |
17 | export const document: ElDocument = { attributes, events }
18 |
19 | export default document
20 |
--------------------------------------------------------------------------------
/src/document/en-US/el-backtop.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 | import { DocumentEvent } from '@/document'
4 |
5 | export const attributes: DocumentAttribute[] = [
6 | { name: 'target', description: 'the target to trigger scroll', type: 'string', value: '', default: '' },
7 | { name: 'visibility-height', description: 'the button will not show until the scroll height reaches this value', type: 'number', value: '', default: '200' },
8 | { name: 'right', description: 'right distance', type: 'number', value: '', default: '40' },
9 | { name: 'bottom', description: 'bottom distance', type: 'number', value: '', default: '40' }
10 | ]
11 |
12 | export const events: DocumentEvent[] = [{ name: 'click', description: 'triggers when click', parameter: 'click event' }]
13 |
14 | export const document: ElDocument = { attributes, events }
15 |
16 | export default document
17 |
--------------------------------------------------------------------------------
/src/document/en-US/el-badge.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | { name: 'value', description: 'display value', type: 'string, number', value: '—', default: '—' },
6 | { name: 'max', description: "maximum value, shows '{max}+' when exceeded. Only works if `value` is a `Number`", type: 'number', value: '—', default: '—' },
7 | { name: 'is-dot', description: 'if a little dot is displayed', type: 'boolean', value: '—', default: 'false' },
8 | { name: 'hidden', description: 'hidden badge', type: 'boolean', value: '—', default: 'false' },
9 | { name: 'type', description: 'button type', type: 'string', value: 'primary / success / warning / danger / info', default: '—' }
10 | ]
11 |
12 | export const document: ElDocument = { attributes }
13 |
14 | export default document
15 |
--------------------------------------------------------------------------------
/src/document/en-US/el-breadcrumb-item.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | { name: 'to', description: 'target route of the link, same as `to` of `vue-router`', type: 'string/object', value: '—', default: '—' },
6 | { name: 'replace', description: 'if `true`, the navigation will not leave a history record', type: 'boolean', value: '—', default: 'false' }
7 | ]
8 |
9 | export const document: ElDocument = { attributes }
10 |
11 | export default document
12 |
--------------------------------------------------------------------------------
/src/document/en-US/el-breadcrumb.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | { name: 'separator', description: 'separator character', type: 'string', value: '—', default: '/' },
6 | { name: 'separator-class', description: 'class name of icon separator', type: 'string', value: '—', default: '-' }
7 | ]
8 |
9 | export const document: ElDocument = { attributes }
10 |
11 | export default document
12 |
--------------------------------------------------------------------------------
/src/document/en-US/el-button.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | { name: 'size', description: 'button size', type: 'string', value: 'medium / small / mini', default: '—' },
6 | { name: 'type', description: 'button type', type: 'string', value: 'primary / success / warning / danger / info / text', default: '—' },
7 | { name: 'plain', description: "determine whether it's a plain button", type: 'boolean', value: '—', default: 'false' },
8 | { name: 'round', description: "determine whether it's a round button", type: 'boolean', value: '—', default: 'false' },
9 | { name: 'circle', description: "determine whether it's a circle button", type: 'boolean', value: '—', default: 'false' },
10 | { name: 'loading', description: "determine whether it's loading", type: 'boolean', value: '—', default: 'false' },
11 | { name: 'disabled', description: 'disable the button', type: 'boolean', value: '—', default: 'false' },
12 | { name: 'icon', description: 'icon class name', type: 'string', value: '—', default: '—' },
13 | { name: 'autofocus', description: "same as native button's `autofocus`", type: 'boolean', value: '—', default: 'false' },
14 | { name: 'native-type', description: "same as native button's `type`", type: 'string', value: 'button / submit / reset', default: 'button' }
15 | ]
16 |
17 | export const document: ElDocument = { attributes }
18 |
19 | export default document
20 |
--------------------------------------------------------------------------------
/src/document/en-US/el-calendar.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | { name: 'value/v-model', description: 'binding value', type: 'Date/string/number', value: '—', default: '—' },
6 | {
7 | name: 'range',
8 | 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.',
9 | type: 'Array',
10 | value: '—',
11 | default: '—'
12 | },
13 | { name: 'first-day-of-week', description: 'fisrt day of week', type: 'Number', value: '1 to 7', default: '1' }
14 | ]
15 |
16 | export const document: ElDocument = { attributes }
17 |
18 | export default document
19 |
--------------------------------------------------------------------------------
/src/document/en-US/el-card.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | { name: 'header', description: 'title of the card. Also accepts a DOM passed by `slot#header`', type: 'string', value: '—', default: '—' },
6 | { name: 'body-style', description: 'CSS style of body', type: 'object', value: '—', default: "{ padding: '20px' }" },
7 | { name: 'shadow', description: 'when to show card shadows', type: 'string', value: 'always / hover / never', default: 'always' }
8 | ]
9 |
10 | export const document: ElDocument = { attributes }
11 |
12 | export default document
13 |
--------------------------------------------------------------------------------
/src/document/en-US/el-carousel-item.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | { name: 'name', description: 'name of the item, can be used in `setActiveItem`', type: 'string', value: '—', default: '—' },
6 | { name: 'label', description: 'text content for the corresponding indicator', type: 'string', value: '—', default: '—' }
7 | ]
8 |
9 | export const document: ElDocument = { attributes }
10 |
11 | export default document
12 |
--------------------------------------------------------------------------------
/src/document/en-US/el-carousel.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 | import { DocumentMethod } from '@/document'
4 | import { DocumentEvent } from '@/document'
5 |
6 | export const attributes: DocumentAttribute[] = [
7 | { name: 'height', description: 'height of the carousel', type: 'string', value: '—', default: '—' },
8 | { name: 'initial-index', description: 'index of the initially active slide (starting from 0)', type: 'number', value: '—', default: '0' },
9 | { name: 'trigger', description: 'how indicators are triggered', type: 'string', value: 'hover/click', default: 'hover' },
10 | { name: 'autoplay', description: 'whether automatically loop the slides', type: 'boolean', value: '—', default: 'true' },
11 | { name: 'interval', description: 'interval of the auto loop, in milliseconds', type: 'number', value: '—', default: '3000' },
12 | { name: 'indicator-position', description: 'position of the indicators', type: 'string', value: 'outside/none', default: '—' },
13 | { name: 'arrow', description: 'when arrows are shown', type: 'string', value: 'always/hover/never', default: 'hover' },
14 | { name: 'type', description: 'type of the Carousel', type: 'string', value: 'card', default: '—' },
15 | { name: 'loop', description: 'display the items in loop', type: 'boolean', value: '-', default: 'true' },
16 | { name: 'direction', description: 'display direction', type: 'string', value: 'horizontal/vertical', default: 'horizontal' }
17 | ]
18 |
19 | export const methods: DocumentMethod[] = [
20 | { name: 'setActiveItem', description: 'manually switch slide', parameter: 'index of the slide to be switched to, starting from 0; or the `name` of corresponding `el-carousel-item`' },
21 | { name: 'prev', description: 'switch to the previous slide', parameter: '—' },
22 | { name: 'next', description: 'switch to the next slide', parameter: '—' }
23 | ]
24 |
25 | export const events: DocumentEvent[] = [{ name: 'change', description: 'triggers when the active slide switches', parameter: 'index of the new active slide, index of the old active slide' }]
26 |
27 | export const document: ElDocument = { attributes, methods, events }
28 |
29 | export default document
30 |
--------------------------------------------------------------------------------
/src/document/en-US/el-cascader-panel.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 | import { DocumentMethod } from '@/document'
4 | import { DocumentEvent } from '@/document'
5 | import { DocumentSlot } from '@/document'
6 |
7 | export const attributes: DocumentAttribute[] = [
8 | { name: 'value/v-model', description: 'binding value', type: '-', value: '—', default: '—' },
9 | { name: 'options', description: 'data of the options,the key of `value` and `label` can be customize by `Props`.', type: 'array', value: '—', default: '—' },
10 | { name: 'props', description: 'configuration options, see the following table.', type: 'object', value: '—', default: '—' }
11 | ]
12 |
13 | export const methods: DocumentMethod[] = [
14 | { name: 'getCheckedNodes', description: 'get an array of currently selected node', parameter: '(leafOnly) whether only return the leaf checked nodes, default is `false`' },
15 | { name: 'clearCheckedNodes', description: 'clear checked nodes', parameter: '-' }
16 | ]
17 |
18 | export const events: DocumentEvent[] = [
19 | { name: 'change', description: 'triggers when the binding value changes', parameter: 'value' },
20 | { name: 'expand-change', description: 'triggers when expand option changes', parameter: "an array of the expanding node's parent nodes" }
21 | ]
22 |
23 | export const slots: DocumentSlot[] = [{ name: '-', description: 'the custom content of cascader node, the parameter is { node, data }, which are current Node object and node data respectively.' }]
24 |
25 | export const props = [
26 | { name: 'Attribute', description: 'Description' },
27 | { name: 'expandTrigger', description: 'trigger mode of expanding options' },
28 | { name: 'multiple', description: 'whether multiple selection is enabled' },
29 | { name: 'checkStrictly', description: 'whether checked state of a node not affects its parent and child nodes' },
30 | { name: 'emitPath', description: "when checked nodes change, whether to emit an array of node's path, if false, only emit the value of node." },
31 | { name: 'lazy', description: 'whether to dynamic load child nodes, use with `lazyload` attribute' },
32 | { name: 'lazyLoad', description: 'method for loading child nodes data, only works when `lazy` is true' },
33 | { name: 'value', description: "specify which key of node object is used as the node's value" },
34 | { name: 'label', description: "specify which key of node object is used as the node's label" },
35 | { name: 'children', description: "specify which key of node object is used as the node's children" },
36 | { name: 'disabled', description: "specify which key of node object is used as the node's disabled" },
37 | { name: 'leaf', description: "specify which key of node object is used as the node's leaf field" }
38 | ]
39 |
40 | export const document: ElDocument = { attributes, methods, events, slots }
41 |
42 | export default document
43 |
--------------------------------------------------------------------------------
/src/document/en-US/el-checkbox-button.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | { name: 'label', description: 'value of the checkbox when used inside a `checkbox-group`', type: 'string / number / boolean', value: '—', default: '—' },
6 | { name: 'true-label', description: "value of the checkbox if it's checked", type: 'string / number', value: '—', default: '—' },
7 | { name: 'false-label', description: "value of the checkbox if it's not checked", type: 'string / number', value: '—', default: '—' },
8 | { name: 'disabled', description: 'whether the checkbox is disabled', type: 'boolean', value: '—', default: 'false' },
9 | { name: 'name', description: "native 'name' attribute", type: 'string', value: '—', default: '—' },
10 | { name: 'checked', description: 'if the checkbox is checked', type: 'boolean', value: '—', default: 'false' }
11 | ]
12 |
13 | export const document: ElDocument = { attributes }
14 |
15 | export default document
16 |
--------------------------------------------------------------------------------
/src/document/en-US/el-checkbox-group.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 | import { DocumentEvent } from '@/document'
4 |
5 | export const attributes: DocumentAttribute[] = [
6 | { name: 'value/v-model', description: 'binding value', type: 'array', value: '—', default: '—' },
7 | { name: 'size', description: 'size of checkbox buttons or bordered checkboxes', type: 'string', value: 'medium / small / mini', default: '—' },
8 | { name: 'disabled', description: 'whether the nesting checkboxes are disabled', type: 'boolean', value: '—', default: 'false' },
9 | { name: 'min', description: 'minimum number of checkbox checked', type: 'number', value: '—', default: '—' },
10 | { name: 'max', description: 'maximum number of checkbox checked', type: 'number', value: '—', default: '—' },
11 | { name: 'text-color', description: 'font color when button is active', type: 'string', value: '—', default: '#ffffff' },
12 | { name: 'fill', description: 'border and background color when button is active', type: 'string', value: '—', default: '#409EFF' }
13 | ]
14 |
15 | export const events: DocumentEvent[] = [{ name: 'change', description: 'triggers when the binding value changes', parameter: 'the updated value' }]
16 |
17 | export const document: ElDocument = { attributes, events }
18 |
19 | export default document
20 |
--------------------------------------------------------------------------------
/src/document/en-US/el-checkbox.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 | import { DocumentEvent } from '@/document'
4 |
5 | export const attributes: DocumentAttribute[] = [
6 | { name: 'value/v-model', description: 'binding value', type: 'string / number / boolean', value: '—', default: '—' },
7 | { name: 'label', description: 'value of the Checkbox when used inside a `checkbox-group`', type: 'string / number / boolean', value: '—', default: '—' },
8 | { name: 'true-label', description: "value of the Checkbox if it's checked", type: 'string / number', value: '—', default: '—' },
9 | { name: 'false-label', description: "value of the Checkbox if it's not checked", type: 'string / number', value: '—', default: '—' },
10 | { name: 'disabled', description: 'whether the Checkbox is disabled', type: 'boolean', value: '—', default: 'false' },
11 | { name: 'border', description: 'whether to add a border around Checkbox', type: 'boolean', value: '—', default: 'false' },
12 | { name: 'size', description: 'size of the Checkbox, only works when `border` is true', type: 'string', value: 'medium / small / mini', default: '—' },
13 | { name: 'name', description: "native 'name' attribute", type: 'string', value: '—', default: '—' },
14 | { name: 'checked', description: 'if the Checkbox is checked', type: 'boolean', value: '—', default: 'false' },
15 | { name: 'indeterminate', description: 'same as `indeterminate` in native checkbox', type: 'boolean', value: '—', default: 'false' }
16 | ]
17 |
18 | export const events: DocumentEvent[] = [{ name: 'change', description: 'triggers when the binding value changes', parameter: 'the updated value' }]
19 |
20 | export const document: ElDocument = { attributes, events }
21 |
22 | export default document
23 |
--------------------------------------------------------------------------------
/src/document/en-US/el-col.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | { name: 'span', description: 'number of column the grid spans', type: 'number', value: '—', default: '24' },
6 | { name: 'offset', description: 'number of spacing on the left side of the grid', type: 'number', value: '—', default: '0' },
7 | { name: 'push', description: 'number of columns that grid moves to the right', type: 'number', value: '—', default: '0' },
8 | { name: 'pull', description: 'number of columns that grid moves to the left', type: 'number', value: '—', default: '0' },
9 | { name: 'xs', description: '`<768px` Responsive columns or column props object', type: 'number/object (e.g. {span: 4, offset: 4})', value: '—', default: '—' },
10 | { name: 'sm', description: '`≥768px` Responsive columns or column props object', type: 'number/object (e.g. {span: 4, offset: 4})', value: '—', default: '—' },
11 | { name: 'md', description: '`≥992px` Responsive columns or column props object', type: 'number/object (e.g. {span: 4, offset: 4})', value: '—', default: '—' },
12 | { name: 'lg', description: '`≥1200px` Responsive columns or column props object', type: 'number/object (e.g. {span: 4, offset: 4})', value: '—', default: '—' },
13 | { name: 'xl', description: '`≥1920px` Responsive columns or column props object', type: 'number/object (e.g. {span: 4, offset: 4})', value: '—', default: '—' },
14 | { name: 'tag', description: 'custom element tag', type: 'string', value: '*', default: 'div' }
15 | ]
16 |
17 | export const document: ElDocument = { attributes }
18 |
19 | export default document
20 |
--------------------------------------------------------------------------------
/src/document/en-US/el-collapse-item.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | { name: 'name', description: 'unique identification of the panel', type: 'string/number', value: '—', default: '—' },
6 | { name: 'title', description: 'title of the panel', type: 'string', value: '—', default: '—' },
7 | { name: 'disabled', description: 'disable the collapse item', type: 'boolean', value: '—', default: '—' }
8 | ]
9 |
10 | export const document: ElDocument = { attributes }
11 |
12 | export default document
13 |
--------------------------------------------------------------------------------
/src/document/en-US/el-collapse.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 | import { DocumentEvent } from '@/document'
4 |
5 | export const attributes: DocumentAttribute[] = [
6 | { name: 'value/v-model', description: 'currently active panel', type: 'string (accordion mode) / array (non-accordion mode)', value: '—', default: '—' },
7 | { name: 'accordion', description: 'whether to activate accordion mode', type: 'boolean', value: '—', default: 'false' }
8 | ]
9 |
10 | export const events: DocumentEvent[] = [{ name: 'change', description: 'triggers when active panels change', parameter: '(activeNames: array (non-accordion mode) / string (accordion mode))' }]
11 |
12 | export const document: ElDocument = { attributes, events }
13 |
14 | export default document
15 |
--------------------------------------------------------------------------------
/src/document/en-US/el-color-picker.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 | import { DocumentEvent } from '@/document'
4 |
5 | export const attributes: DocumentAttribute[] = [
6 | { name: 'value/v-model', description: 'binding value', type: 'string', value: '—', default: '—' },
7 | { name: 'disabled', description: 'whether to disable the ColorPicker', type: 'boolean', value: '—', default: 'false' },
8 | { name: 'size', description: 'size of ColorPicker', type: 'string', value: '—', default: 'medium / small / mini' },
9 | { name: 'show-alpha', description: 'whether to display the alpha slider', type: 'boolean', value: '—', default: 'false' },
10 | { name: 'color-format', description: 'color format of v-model', type: 'string', value: 'hsl / hsv / hex / rgb', default: 'hex (when show-alpha is false)/ rgb (when show-alpha is true)' },
11 | { name: 'popper-class', description: "custom class name for ColorPicker's dropdown", type: 'string', value: '—', default: '—' },
12 | { name: 'predefine', description: 'predefined color options', type: 'array', value: '—', default: '—' }
13 | ]
14 |
15 | export const events: DocumentEvent[] = [
16 | { name: 'change', description: 'triggers when input value changes', parameter: 'color value' },
17 | { name: 'active-change', description: 'triggers when the current active color changes', parameter: 'active color value' }
18 | ]
19 |
20 | export const document: ElDocument = { attributes, events }
21 |
22 | export default document
23 |
--------------------------------------------------------------------------------
/src/document/en-US/el-container.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | {
6 | name: 'direction',
7 | description: 'layout direction for child elements',
8 | type: 'string',
9 | value: 'horizontal / vertical',
10 | default: 'vertical when nested with `el-header` or `el-footer`; horizontal otherwise'
11 | }
12 | ]
13 |
14 | export const document: ElDocument = { attributes }
15 |
16 | export default document
17 |
--------------------------------------------------------------------------------
/src/document/en-US/el-dialog.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 | import { DocumentEvent } from '@/document'
4 | import { DocumentSlot } from '@/document'
5 |
6 | export const attributes: DocumentAttribute[] = [
7 | { name: 'visible', description: 'visibility of Dialog, supports the .sync modifier', type: 'boolean', value: '—', default: 'false' },
8 | { name: 'title', description: 'title of Dialog. Can also be passed with a named slot (see the following table)', type: 'string', value: '—', default: '—' },
9 | { name: 'width', description: 'width of Dialog', type: 'string', value: '—', default: '50%' },
10 | { name: 'fullscreen', description: 'whether the Dialog takes up full screen', type: 'boolean', value: '—', default: 'false' },
11 | { name: 'top', description: 'value for `margin-top` of Dialog CSS', type: 'string', value: '—', default: '15vh' },
12 | { name: 'modal', description: 'whether a mask is displayed', type: 'boolean', value: '—', default: 'true' },
13 | {
14 | name: 'modal-append-to-body',
15 | description: "whether to append modal to body element. If false, the modal will be appended to Dialog's parent element",
16 | type: 'boolean',
17 | value: '—',
18 | default: 'true'
19 | },
20 | { name: 'append-to-body', description: 'whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true`', type: 'boolean', value: '—', default: 'false' },
21 | { name: 'lock-scroll', description: 'whether scroll of body is disabled while Dialog is displayed', type: 'boolean', value: '—', default: 'true' },
22 | { name: 'custom-class', description: 'custom class names for Dialog', type: 'string', value: '—', default: '—' },
23 | { name: 'close-on-click-modal', description: 'whether the Dialog can be closed by clicking the mask', type: 'boolean', value: '—', default: 'true' },
24 | { name: 'close-on-press-escape', description: 'whether the Dialog can be closed by pressing ESC', type: 'boolean', value: '—', default: 'true' },
25 | { name: 'show-close', description: 'whether to show a close button', type: 'boolean', value: '—', default: 'true' },
26 | { name: 'before-close', description: 'callback before Dialog closes, and it will prevent Dialog from closing', type: 'function(done),done is used to close the Dialog', value: '—', default: '—' },
27 | { name: 'center', description: 'whether to align the header and footer in center', type: 'boolean', value: '—', default: 'false' },
28 | { name: 'destroy-on-close', description: 'Destroy elements in Dialog when closed', type: 'boolean', value: '—', default: 'false' }
29 | ]
30 |
31 | export const events: DocumentEvent[] = [
32 | { name: 'open', description: 'triggers when the Dialog opens', parameter: '—' },
33 | { name: 'opened', description: 'triggers when the Dialog opening animation ends', parameter: '—' },
34 | { name: 'close', description: 'triggers when the Dialog closes', parameter: '—' },
35 | { name: 'closed', description: 'triggers when the Dialog closing animation ends', parameter: '—' }
36 | ]
37 |
38 | export const slots: DocumentSlot[] = [
39 | { name: '—', description: 'content of Dialog' },
40 | { name: 'title', description: 'content of the Dialog title' },
41 | { name: 'footer', description: 'content of the Dialog footer' }
42 | ]
43 |
44 | export const document: ElDocument = { attributes, events, slots }
45 |
46 | export default document
47 |
--------------------------------------------------------------------------------
/src/document/en-US/el-divider.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | { name: 'direction', description: "Set divider's direction", type: 'string', value: 'horizontal / vertical', default: 'horizontal' },
6 | { name: 'content-position', description: 'customize the content on the divider line', type: 'String', value: 'left / right / center', default: 'center' }
7 | ]
8 |
9 | export const document: ElDocument = { attributes }
10 |
11 | export default document
12 |
--------------------------------------------------------------------------------
/src/document/en-US/el-dropdown-menu-item.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 |
4 | export const attributes: DocumentAttribute[] = [
5 | { name: 'command', description: "a command to be dispatched to Dropdown's `command` callback", type: 'string/number/object', value: '—', default: '—' },
6 | { name: 'disabled', description: 'whether the item is disabled', type: 'boolean', value: '—', default: 'false' },
7 | { name: 'divided', description: 'whether a divider is displayed', type: 'boolean', value: '—', default: 'false' },
8 | { name: 'icon', description: 'icon class name', type: 'string', value: '—', default: '—' }
9 | ]
10 |
11 | export const document: ElDocument = { attributes }
12 |
13 | export default document
14 |
--------------------------------------------------------------------------------
/src/document/en-US/el-dropdown.ts:
--------------------------------------------------------------------------------
1 | import { ElDocument } from '@/document'
2 | import { DocumentAttribute } from '@/document'
3 | import { DocumentEvent } from '@/document'
4 | import { DocumentSlot } from '@/document'
5 |
6 | export const attributes: DocumentAttribute[] = [
7 | { name: 'type', description: 'menu button type, refer to `Button` Component, only works when `split-button` is true', type: 'string', value: '—', default: '—' },
8 | { name: 'size', description: 'menu size, also works on the split button', type: 'string', value: 'medium / small / mini', default: '—' },
9 | { name: 'split-button', description: 'whether a button group is displayed', type: 'boolean', value: '—', default: 'false' },
10 | { name: 'placement', description: 'placement of pop menu', type: 'string', value: 'top/top-start/top-end/bottom/bottom-start/bottom-end', default: 'bottom-end' },
11 | { name: 'trigger', description: 'how to trigger', type: 'string', value: 'hover/click', default: 'hover' },
12 | { name: 'hide-on-click', description: 'whether to hide menu after clicking menu-item', type: 'boolean', value: '—', default: 'true' },
13 | { name: 'show-timeout', description: 'Delay time before show a dropdown (only works when trigger is `hover`)', type: 'number', value: '—', default: '250' },
14 | { name: 'hide-timeout', description: 'Delay time before hide a dropdown (only works when trigger is `hover`)', type: 'number', value: '—', default: '150' },
15 | { name: 'tabindex', description: '[tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of Dropdown', type: 'number', value: '—', default: '0' }
16 | ]
17 |
18 | export const events: DocumentEvent[] = [
19 | { name: 'click', description: 'if `split-button` is `true`, triggers when left button is clicked', parameter: '—' },
20 | { name: 'command', description: 'triggers when a dropdown item is clicked', parameter: 'the command dispatched from the dropdown item' },
21 | { name: 'visible-change', description: 'triggers when the dropdown appears/disappears', parameter: 'true when it appears, and false otherwise' }
22 | ]
23 |
24 | export const slots: DocumentSlot[] = [
25 | { name: '—', description: 'content of Dropdown. Notice: Must be a valid html dom element (ex. `,