Compare commits

...

56 Commits

Author SHA1 Message Date
ajaxzheng 5e02624fd9
Sync release 3.16.0 (#1671)
* fix(grid): fix right fixed table header gutter style (#1542)

* fix(grid): [grid] fix grid no emit filter-change bug (#1536)

* fix(grid): [grid] fix grid not emit filter-change bug

* fix(grid): [grid] fix grid not emit filter-change bug

* docs: add v3.15.0 changelog (#1544)

* fix(tree): remove leaf node's padding-left (#1546)

* fix(action-menu): [action-menu] fix no divided bug (#1538)

* fix(action-menu): [action-menu] fix no divided bug

* fix(action-menu): [action-menu] fix no divided bug

* refactor(unplugin): rewrite unplugin for autoimport Vue components (#1553)

* fix(tabs): [tabs] Fixed issue with default slot and template/v-if/v-for usage in vue2 and vue3 (#1558)

* fix(tabs): [tabs] Fix the bug where the name is empty caused by using v-if in tabstem

* fix(tabs): [tabs] update renderless version

* fix(tabs): [tabs] Fix the issue with rendering in the default slot of Vue3

* fix(tabs): [tabs] Fix the issue of inconsistent highlighting when multiple V-ifs are used

* fix(tabs): [tabs] update opentiny/vue-tabs version

* fix(theme-saas): update theme saas dependencies (#1582)

* Update package.json

* feat(unplugin-tiny-vue): add TinyVueResolver (#1585)

* docs: add breaking changes to changelog (#1562)

* fix(chart): delete chart duplicate key (#1624)

* fix(select): [select] add showAllTextTag prop for select (#1627)

* fix(select): add showAllTextTag prop for select

* fix(select): update select  version in  package.json

* fix: [chart]fix chart height error and area chart empty data error (#1631)

* fix: 修复面积图空数据报错问题

* fix: 修复图表高度设置为100%的高度异常问题

* fix: 修改boxplot图表案例引入

* fix(drop-times): [drop-times] modify style (#1635)

* feat(theme): update theme version

* fix(chart): fix chart extend bugs (#1638)

* fix: 修复chart图表的extend未生效问题

* fix: 优化图表extend逻辑

* fix: 优化图表extend逻辑

* docs: optimize component category (#1626) (#1641)

* docs: update changelog v3.16.0 (#1642)

* feat(version): add npmmirror cdn link (#1646)

* feat(version): update docs version

* feat(alert): [alert] add type title text color css var (#1653)

* feat(alert): [alert] add type title text color css var

* feat(alert): [alert] add type title text color css var

* fix(select): [select] Fix the issue of invalid select component click events and remove inheritAttrs (#1657)

* fix(theme): [grid] fix tree node text overflow (#1661)

* fix(vue): [grid] fix multi toolbar can not get tableColumns config (#1656)

* fix(vue): [grid] fix multi toolbar can not get tableColumns config

* fix(vue): [grid] fix multi toolbar can not get tableColumns config

* fix(select,grid): fix select click event bug and grid toolbar bug

* fix(modal): adjust the title icon display of the modal (#1658)

* fix(modal): adjust the title icon display of the modal

* fix: update modal package.json

* fix(statistic): optimized the style, test, and example of the statistics component (#1660)

* fix: update style and demo statistic of component

* fix: update e2e-test

* fix: when num is equal to 0

---------

Co-authored-by: gimmyhehe <975402925@qq.com>
Co-authored-by: Kagol <kagol@sina.com>
Co-authored-by: 申君健 <40288193@qq.com>
Co-authored-by: chenxi-20 <76168465+chenxi-20@users.noreply.github.com>
Co-authored-by: Davont <davontz@icloud.com>
Co-authored-by: 李天佑 <66231260+You-Hw-Y@users.noreply.github.com>
Co-authored-by: MomoPoppy <125256456+MomoPoppy@users.noreply.github.com>
Co-authored-by: James <72028410+James-9696@users.noreply.github.com>
2024-06-11 10:05:34 +08:00
betavs e7d9dd9e04
feat(components): [drawer] enable open event (#1527)
* feat(drawer): enable open event

* docs(drawer): enable open event

* perf(drawer): enable open event

* style(drawer): enable open event

* perf(drawer): enable open event

* perf(drawer): enable open event
2024-06-11 09:20:52 +08:00
Kagol b72b21da0d
feat(base-select): [select,base-select] add panel slot (#1663)
* feat(base-select): add panel slot

* feat(base-select): add multiple tree demo

* docs(base-select): add filterable tree demo

* test(base-select): optimize slot panel e2e test
2024-06-07 11:40:31 +08:00
ajaxzheng de7adb69e5
build(runtime): update runtime playgroud (#1669) 2024-06-07 11:33:25 +08:00
ajaxzheng 90deb78ed6
ci(runtime): add runtime git action (#1667) 2024-06-07 11:32:51 +08:00
gimmyhehe bfeff2bed2
fix(theme): update scrollbar width to 8px (#1668) 2024-06-07 11:31:40 +08:00
zhangpaopao 3e15c0d991
fix: vue-test-uitls destory should be destroy (#1654) 2024-06-04 17:39:52 +08:00
ajaxzheng 336ef0a456
feat(runtime): add all、pc、mobile、mobile-first、simple runtime (#1662) 2024-06-04 17:24:58 +08:00
Davont 494bb14efb
fix: fix chart extend bug (#1664)
* fix: 【Charts】update charts snapshots

* fix: 修复图表height为100%时的高度问题

* fix: 优化图表extend逻辑

* fix: 修复图表extend失效问题

* fix: 删除注释
2024-06-04 17:19:20 +08:00
ajaxzheng a931e5fdc6
feat: sync release-3.16.0 to dev (#1648)
* fix(grid): fix right fixed table header gutter style (#1542)

* fix(grid): [grid] fix grid no emit filter-change bug (#1536)

* fix(grid): [grid] fix grid not emit filter-change bug

* fix(grid): [grid] fix grid not emit filter-change bug

* docs: add v3.15.0 changelog (#1544)

* fix(tree): remove leaf node's padding-left (#1546)

* fix(action-menu): [action-menu] fix no divided bug (#1538)

* fix(action-menu): [action-menu] fix no divided bug

* fix(action-menu): [action-menu] fix no divided bug

* refactor(unplugin): rewrite unplugin for autoimport Vue components (#1553)

* fix(tabs): [tabs] Fixed issue with default slot and template/v-if/v-for usage in vue2 and vue3 (#1558)

* fix(tabs): [tabs] Fix the bug where the name is empty caused by using v-if in tabstem

* fix(tabs): [tabs] update renderless version

* fix(tabs): [tabs] Fix the issue with rendering in the default slot of Vue3

* fix(tabs): [tabs] Fix the issue of inconsistent highlighting when multiple V-ifs are used

* fix(tabs): [tabs] update opentiny/vue-tabs version

* fix(theme-saas): update theme saas dependencies (#1582)

* Update package.json

* feat(unplugin-tiny-vue): add TinyVueResolver (#1585)

* docs: add breaking changes to changelog (#1562)

* fix(chart): delete chart duplicate key (#1624)

* fix(select): [select] add showAllTextTag prop for select (#1627)

* fix(select): add showAllTextTag prop for select

* fix(select): update select  version in  package.json

* fix: [chart]fix chart height error and area chart empty data error (#1631)

* fix: 修复面积图空数据报错问题

* fix: 修复图表高度设置为100%的高度异常问题

* fix: 修改boxplot图表案例引入

* fix(drop-times): [drop-times] modify style (#1635)

* feat(theme): update theme version

* fix(chart): fix chart extend bugs (#1638)

* fix: 修复chart图表的extend未生效问题

* fix: 优化图表extend逻辑

* fix: 优化图表extend逻辑

* docs: optimize component category (#1626) (#1641)

* docs: update changelog v3.16.0 (#1642)

* feat(version): add npmmirror cdn link (#1646)

* feat(version): update docs version

---------

Co-authored-by: gimmyhehe <975402925@qq.com>
Co-authored-by: Kagol <kagol@sina.com>
Co-authored-by: 申君健 <40288193@qq.com>
Co-authored-by: chenxi-20 <76168465+chenxi-20@users.noreply.github.com>
Co-authored-by: Davont <davontz@icloud.com>
Co-authored-by: 李天佑 <66231260+You-Hw-Y@users.noreply.github.com>
2024-05-28 11:44:20 +08:00
James 65eb13eabd
fix: add carousel component of demo (#1609)
* feat: add carousel of demo show

* fix: update carousel of demo show

* fix: update review code

* fix: add e2e-test
2024-05-28 10:29:03 +08:00
allcontributors[bot] 6cd6630bdf
docs: add trueLoving as a contributor for test (#1645)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-05-27 14:46:51 +08:00
allcontributors[bot] 302f68a2e7
docs: add Zcating as a contributor for code (#1644)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-05-27 14:45:59 +08:00
allcontributors[bot] a0450613f9
docs: add RanierYu as a contributor for code (#1643)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-05-27 14:45:00 +08:00
Kagol 0778e60d0b
feat(base-select): [base-select,select] add base-select (#1632)
* refactor(base-select): add base-select

* refactor(base-select): remove tree/grid and e2e tests

* refactor(base-select): remove tree/grid in the base-select/pc.vue

* refactor(base-select): remove tree/grid in the renderless/index.ts|vue.ts

* docs(base-select): remove tree/grid demos
2024-05-21 15:31:50 +08:00
Davont f3a912871a
fix: 【Charts】update charts snapshots (#1634) 2024-05-21 09:08:28 +08:00
Kagol 3f8001ac1d
docs: optimize component category (#1626) 2024-05-14 09:33:47 +08:00
黄怡林 340a4ad5c9
fix(docs): add scoped to style tags (#1620) 2024-05-11 14:49:02 +08:00
ajaxzheng 77247ff044
feat: update chart docs (#1623) 2024-05-11 14:40:08 +08:00
betavs 3d165a1d3c
chore(vscode): remove deprecated extension (#1603) 2024-05-10 14:35:27 +08:00
chenxi-20 e339a704a8
fix(file-upload): [file-upload] Fix the hidden feature bug in props.isHidden (#1617) 2024-05-10 14:30:04 +08:00
James d4faaacdad
fix: optimization statistic component (#1608)
* fix: update statistic componets

* fix: update demo of props

* fix: update statistic style

* docs: update demo
2024-05-09 17:48:41 +08:00
Davont e164688824
fix(chart): update chart test example (#1610)
* fix: delete the empty lines

* update: 更新api文档

* fix: 添加图表插槽,添加图表theme属性,默认图表样式更改为cloud,

* docs: 修改案例代码

* docs: 修改文档描述

* text: 修改playwright测试用例

* text: 修改wordcloud图playwright测试用例

* fix: 修改chart-core文件

* fix: 修改chart-core文件
2024-05-09 17:35:59 +08:00
Kagol f12c81c7c6
chore: add favicon (#1611) 2024-05-09 17:33:22 +08:00
chenxi-20 df0f9f2431
fix(test): [milestone] Fix e2e test cases (#1612) 2024-05-09 17:32:56 +08:00
chenxi-20 faf857c229
fix(test): [tabs] Fix e2e test cases (#1613) 2024-05-09 17:32:28 +08:00
chenxi-20 d4c2e6d1e5
fix(file-upload): [file-upload] Fix the hidden feature bug in props.isHidden (#1614) 2024-05-09 17:32:04 +08:00
chenxi-20 5b5ffcb8d2
fix(test): [pop-upload] Fix e2e test cases (#1615) 2024-05-09 17:31:22 +08:00
AcWrong02 551ea69212
docs[Carousel]: [carousel] improve the document of Carousel Component (#1571)
* docs(Carousel): [Carousel] unified code example and improve the carousel demo style

* docs(Carousel): [Carousel]improve the description of document
2024-04-30 14:04:42 +08:00
AcWrong02 f6bd22b973
feat(Drawer): [Drawer]support custom whether confirm event close the drawer and improve the type declaration (#1588)
* style(drawer): [drawer]improve the type declaration of drawer component

* feat(drawer): [drawer]Support customizing whether the drawer is closed after clicking the confirm button

* docs(drawer): [drawer]update the document of drawer component
2024-04-30 12:58:07 +08:00
AcWrong02 3ed478d26d
fix(button & button-grounp): [button, button-group]improve the accessibility (#1586)
* fix(button): [button]modify the button prop tabindex's default value to 0

* fix(button-grounp): [button-group]improve the tab select style
2024-04-30 12:09:38 +08:00
AcWrong02 538fb4925a
fix(checkbox): [checkbox,checkbutton] Improve Checkbox and CheckButton accessibility. (#1581)
* fix(Checkbox): [Checkbox] Improve component accessibility

* fix(checkbox-button): [checkbox-button] Improve component accessibility
2024-04-30 12:09:06 +08:00
wuyiping0628 869449a7ae
fix(cascader): [guide] add smb theme (#1584) 2024-04-30 11:43:54 +08:00
James cb5e98b02b
fix(modal): the modal prompt box is compatible with the position of titles and content icons (#1570)
* fix: the width of the modal box can be displayed in the center as the browser window size changes

* fix: the modal prompt box is compatible with the position of titles and content icons
2024-04-30 11:42:36 +08:00
AcWrong02 d4323a52fe
fix[DatePicker]: [DatePicker]fix the tabindex's default value to 0 (#1589) 2024-04-30 11:35:32 +08:00
Wind 30abcc4430
test(button-group): Supplement button-group component test case (#1596) 2024-04-30 11:34:07 +08:00
Davont 4e7435bf41
doc: [charts] 更新图表的 API 文档,增加 options 使用方法 (#1600)
* fix: delete the empty lines

* update: 更新api文档

* fix: 添加图表插槽,添加图表theme属性,默认图表样式更改为cloud,
2024-04-29 17:26:37 +08:00
gimmyhehe 0bd0d8b9e0
fix(grid): [grid] fix shadow-root does not have getAttribute function (#1593) 2024-04-26 16:03:58 +08:00
gimmyhehe 55e65a4464
fix(grid): [grid] fix tableWidth error when all column has min-width (#1595) 2024-04-26 16:03:10 +08:00
GaoNeng e0b595af1a
fix(rich-text-editor): code overflow (#1590) 2024-04-26 16:02:37 +08:00
黄怡林 1279d4a08c
test(loading): add E2E test cases for mobile component (#1591)
* test(loading): add E2E test  for mobile component

* fix(loading): solved global registry api docs SyntaxError
2024-04-26 16:02:04 +08:00
Kagol b4c1be5062
docs: add description and keywords for seo (#1592) 2024-04-26 16:00:26 +08:00
chenxi-20 147de7fdde
feat(tabs): [tabs] Add panel configuration function to adapt to the new SMB specifications (#1547) 2024-04-19 09:28:09 +08:00
gimmyhehe e7ab21759b
fix(grid): [grid] fix remote filter default value (#1574) 2024-04-19 09:26:57 +08:00
chenxi-20 826f9edf65
fix(anchor): [anchor] Correcting Ambiguity in Anchor Document Description #1303 (#1569) 2024-04-19 09:26:16 +08:00
黄怡林 9589ea5805
perf(theme-mobile): remove css vars from :root to root class of component (#1579) 2024-04-19 09:25:48 +08:00
gimmyhehe 5430eed386
fix(grid): [grid] fix simple custom setting selected value not match on reload window (#1580) 2024-04-19 09:25:03 +08:00
wuyiping0628 64149d35b4
fix(skeleton): [skeleton] update document (#1577) 2024-04-19 09:24:31 +08:00
gimmyhehe ce46b8a06f
fix(grid): [grid] fix nested grid context menu error (#1578) 2024-04-19 09:24:04 +08:00
Zcating f834ca7e05
fix(carousel): fix issue #1543 (#1548) 2024-04-12 14:33:50 +08:00
Ranier Yu cca1a5eab4
fix(dialog-box): fix issue #1242 (#1550)
Co-authored-by: RanierYu <whylost@aliyu.com>
2024-04-12 14:33:29 +08:00
James f42012cb1e
fix: the width of the modal box can be displayed in the center as the browser window size changes (#1554) 2024-04-12 00:03:55 +08:00
chenxi-20 c64c373b94
fix(tabs): [tabs] Fix the bug where the name is empty caused by using v-if in tabstem (#1549) 2024-04-12 00:02:42 +08:00
Kagol 5e3b90e45f
docs: update vue-docs version (#1541) 2024-04-10 15:09:54 +08:00
gimmyhehe e122ccfff4
fix(sites): change tinyui-design-common script link (#1539) 2024-04-08 20:30:25 +08:00
Kagol efb0aa75f7
docs: add v3.15.0 changelog (#1537) 2024-04-08 20:10:05 +08:00
2029 changed files with 42033 additions and 21246 deletions

View File

@ -573,6 +573,33 @@
"contributions": [
"code"
]
},
{
"login": "RanierYu",
"name": "Ranier Yu",
"avatar_url": "https://avatars.githubusercontent.com/u/62528887?v=4",
"profile": "https://github.com/RanierYu",
"contributions": [
"code"
]
},
{
"login": "Zcating",
"name": "Zcating",
"avatar_url": "https://avatars.githubusercontent.com/u/13329558?v=4",
"profile": "https://github.com/Zcating",
"contributions": [
"code"
]
},
{
"login": "trueLoving",
"name": "Aoi Kaze",
"avatar_url": "https://avatars.githubusercontent.com/u/44056372?v=4",
"profile": "https://github.com/trueLoving",
"contributions": [
"test"
]
}
],
"contributorsPerLine": 8,

View File

@ -7,7 +7,7 @@ on:
components:
description: |
输入需要打包的模块名称,多个以英文逗号分隔,
例如: `theme,renderless`
例如: `theme,renderless,runtime`
required: true
type: string
concurrency:
@ -80,6 +80,10 @@ jobs:
if: contains(inputs.components, 'theme-mobile') == true
run: pnpm build:themeMobile
- name: Run Build Runtime
if: contains(inputs.components, 'runtime') == true
run: pnpm build:runtime
- name: Publish
run: |
pnpm pub:all

11
.gitignore vendored
View File

@ -18,6 +18,12 @@ test-results
/packages/vue-icon-saas/src
/packages/vue-icon-saas/index.ts
/packages/vue-runtime/pc.ts
/packages/vue-runtime/mobile.ts
/packages/vue-runtime/mobile-first.ts
/packages/vue-runtime/all.ts
/packages/vue-runtime/simple.ts
/packages/react/index.ts
/packages/react/pc.ts
/packages/react/mobile.ts
@ -62,6 +68,11 @@ packages/theme/src/theme/*-theme/component.js
pnpm-lock.yaml
gulp/bundle.json
# 屏蔽测试用例报告相关文件
allure-report
allure-results
test-results
# 本地构建的saas相关资源文件
examples/sites/public/tiny-vue*.js
examples/sites/public/tiny-vue*.mjs

View File

@ -1,7 +1,6 @@
{
"recommendations": [
"vue.volar",
"vue.vscode-typescript-vue-plugin",
"bradlc.vscode-tailwindcss",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",

View File

@ -162,6 +162,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="12.5%"><a href="https://github.com/Floyd-bit"><img src="https://avatars.githubusercontent.com/u/59243597?v=4?s=100" width="100px;" alt="Floyd"/><br /><sub><b>Floyd</b></sub></a><br /><a href="https://github.com/opentiny/tiny-vue/commits?author=Floyd-bit" title="Code">💻</a></td>
<td align="center" valign="top" width="12.5%"><a href="https://github.com/Jevin0"><img src="https://avatars.githubusercontent.com/u/69580637?v=4?s=100" width="100px;" alt="Jevin"/><br /><sub><b>Jevin</b></sub></a><br /><a href="https://github.com/opentiny/tiny-vue/commits?author=Jevin0" title="Code">💻</a></td>
<td align="center" valign="top" width="12.5%"><a href="https://github.com/HAOUEHF"><img src="https://avatars.githubusercontent.com/u/107133502?v=4?s=100" width="100px;" alt="星河"/><br /><sub><b>星河</b></sub></a><br /><a href="https://github.com/opentiny/tiny-vue/commits?author=HAOUEHF" title="Code">💻</a></td>
<td align="center" valign="top" width="12.5%"><a href="https://github.com/RanierYu"><img src="https://avatars.githubusercontent.com/u/62528887?v=4?s=100" width="100px;" alt="Ranier Yu"/><br /><sub><b>Ranier Yu</b></sub></a><br /><a href="https://github.com/opentiny/tiny-vue/commits?author=RanierYu" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="12.5%"><a href="https://github.com/Zcating"><img src="https://avatars.githubusercontent.com/u/13329558?v=4?s=100" width="100px;" alt="Zcating"/><br /><sub><b>Zcating</b></sub></a><br /><a href="https://github.com/opentiny/tiny-vue/commits?author=Zcating" title="Code">💻</a></td>
<td align="center" valign="top" width="12.5%"><a href="https://github.com/trueLoving"><img src="https://avatars.githubusercontent.com/u/44056372?v=4?s=100" width="100px;" alt="Aoi Kaze"/><br /><sub><b>Aoi Kaze</b></sub></a><br /><a href="https://github.com/opentiny/tiny-vue/commits?author=trueLoving" title="Tests">⚠️</a></td>
</tr>
</tbody>
</table>

View File

@ -18,9 +18,9 @@
"sortablejs": "1.15.0"
},
"devDependencies": {
"@playwright/test": "^1.40.1"
"@playwright/test": "~1.42.0"
},
"files": [
"resources"
]
}
}

View File

@ -165,11 +165,11 @@ export default {
type: 'interface',
code: `
interface IItemData {
label: string // 菜单项文本
disabled: boolean // 是否禁用
divided: boolean // 是否显示分割线
children: IItemData[] // 菜单项子集
icon: Component // 菜单项图标
label?: string // 菜单项文本
disabled?: boolean // 是否禁用
divided?: boolean // 是否显示分割线
children?: IItemData[] // 菜单项子集
icon?: Component // 菜单项图标
}
`
},

View File

@ -0,0 +1,896 @@
export default {
mode: ['pc', 'mobile-first'],
apis: [
{
name: 'base-select',
type: 'component',
props: [
{
name: 'all-text',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '当下拉中显示全部时,自定义全部的显示文本。不指定时,则默认显示"全部"',
'en-US':
'When all is displayed in the drop-down list, you can customize the display text of all. If this parameter is not specified, All is displayed by default.'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'all-text',
mfDemo: 'all-text'
},
{
name: 'allow-copy',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否允许复制输入框的内容,适用单选可搜索场景',
'en-US':
'Is it allowed to copy the content of the input box, applicable to single choice searchable scenarios'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'copy-single',
mfDemo: 'copy-single'
},
{
name: 'allow-create',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否允许创建新条目,需配合 filterable 使用。若搜索字段不在选项列表中,可创建为新的选项',
'en-US':
'Is it allowed to create new entries? It needs to be used in conjunction with filterable. If the search field is not in the option list, it can be created as a new option'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'allow-create',
mfDemo: 'allow-create'
},
{
name: 'autocomplete',
type: 'string',
defaultValue: "'off'",
desc: {
'zh-CN': '输入框的原生 autocomplete 属性',
'en-US': 'The native autocomplete attribute of the input box'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'native-properties',
mfDemo: 'native-properties'
},
{
name: 'cache-op',
typeAnchorName: 'ICacheOp',
type: 'ICacheOp',
defaultValue:
"<pre>\n{\n key: '',\n sortBy: 'frequency',\n sort: 'desc',\n dataKey: 'value',\n highlightClass: \n 'memorize-highlight',\n highlightNum: Infinity,\n cacheNum: Infinity,\n serialize: JSON.stringify\n deserialize: JSON.parse\n}\n</pre>",
desc: {
'zh-CN': '启用本地缓存已选项的功能配置(根据用户点击选择的次数、最后时间继续存储排序)',
'en-US': 'Set the component type when Grid or Tree is embedded in the drop-down list box.'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'cache-usage',
mfDemo: 'cache-usage'
},
{
name: 'clear-no-match-value',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否自动清空无法在 options 中找到匹配项的值',
'en-US': 'Automatically clear values that cannot find matching items in options'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'clear-no-match-value',
mfDemo: 'clear-no-match-value'
},
{
name: 'clearable',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否启用一键清除的功能',
'en-US': 'Whether to display the one click clear button, only applicable to radio selection'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'clearable',
mfDemo: 'clearable'
},
{
name: 'click-expend',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '点击可展开或收起显示不全的选项。仅用于多选',
'en-US': 'Click to expand or collapse options. Only applicable to multiple selections'
}
},
{
name: 'collapse-tags',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否将多个标签折叠显示。仅适用多选',
'en-US': 'Whether to collapse multiple labels for display. Only applicable to multiple selections'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'collapse-tags',
mfDemo: 'collapse-tags'
},
{
name: 'copyable',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否启用一键复制的功能。点击复制按钮一键复制所有标签的文本内容并以逗号分隔,仅适用于多选',
'en-US':
'Is the one click copy function enabled. Click the copy button to copy the text content of all labels with one click, separated by commas, only applicable to multiple selections'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'copy-multi',
mfDemo: 'copy-multi'
},
{
name: 'default-first-option',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否启用按 Enter 键选择第一个匹配项的功能。需配合 filterable 或 remote 使用',
'en-US':
'Whether to enable the function of pressing the Enter key to select the first match. Must be used in conjunction with filterable or remote'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'allow-create',
mfDemo: 'allow-create'
},
{
name: 'disabled',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用',
'en-US': 'Is it disabled'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'disabled',
mfDemo: 'disabled'
},
{
name: 'dropdown-icon',
type: 'Component',
defaultValue: '',
desc: {
'zh-CN': '自定义下拉图标',
'en-US': 'Custom drop-down icon'
},
mode: ['pc'],
pcDemo: 'multiple'
},
{
name: 'dropdown-style',
type: 'String',
defaultValue: '',
desc: {
'zh-CN': '自定义下拉选项样式',
'en-US': 'Custom drop-down options style'
},
mode: ['pc'],
pcDemo: 'multiple'
},
{
name: 'filter-method',
type: '(query: string) => void',
defaultValue: '',
desc: {
'zh-CN': '自定义过滤方法',
'en-US': 'Custom filtering method'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'filter-method',
mfDemo: 'filter-method'
},
{
name: 'filterable',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否可搜索',
'en-US': 'Is it searchable'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'filter-method',
mfDemo: 'filter-method'
},
{
name: 'input-box-type',
type: "'input' | 'underline'",
defaultValue: "'input'",
desc: {
'zh-CN': '输入框的显示类型',
'en-US': 'Display type of input box'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'input-box-type',
mfDemo: 'input-box-type'
},
{
name: 'is-drop-inherit-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '下拉弹框的宽度是否跟输入框保持一致。默认超出输入框宽度时由内容撑开',
'en-US':
'Is the width of the dropdown box consistent with the input box. By default, when the width of the input box is exceeded, it is supported by the content'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'is-drop-inherit-width',
mfDemo: 'is-drop-inherit-width'
},
{
name: 'loading',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否加载中,适用于远程搜索场景',
'en-US': 'Loading or not, suitable for remote search scenarios'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'remote-method',
mfDemo: 'remote-method'
},
{
name: 'loading-text',
type: 'string',
defaultValue: "'加载中'",
desc: {
'zh-CN': '远程加载时显示的文本',
'en-US': 'Text displayed during remote loading'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'remote-method',
mfDemo: 'remote-method'
},
{
name: 'max-visible-rows',
type: 'number',
defaultValue: '1',
desc: {
'zh-CN': '多行默认最大显示行数,超出后选项自动隐藏',
'en-US':
'Default maximum display lines for multiple lines, with automatic hiding option for exceeding lines'
},
mode: ['pc'],
pcDemo: 'collapse-tags'
},
{
name: 'modelValue / v-model',
type: 'string | number | Array<string|number>',
defaultValue: '',
desc: {
'zh-CN': '绑定值',
'en-US': 'Bind value'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'multiple',
mfDemo: 'multiple'
},
{
name: 'multiple',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否允许选择多个选项',
'en-US': 'Allow multiple options to be selected'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'multiple',
mfDemo: 'multiple'
},
{
name: 'multiple-limit',
type: 'number',
defaultValue: '0',
desc: {
'zh-CN': '多选时最多可选择的个数,默认为 0 不限制',
'en-US':
'When selecting multiple options, the maximum number of options available is 0, with no limit by default'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'multiple-limit',
mfDemo: 'multiple-limit'
},
{
name: 'name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '输入框的原生 name 属性',
'en-US': 'The native name attribute of the input box'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'native-properties',
mfDemo: 'native-properties'
},
{
name: 'no-data-text',
type: 'string',
defaultValue: "'暂无相关数据'",
desc: {
'zh-CN': '选项列表为空时显示的文本,也可以使用 empty 插槽设置',
'en-US': 'The text displayed when the option list is empty can also be set using empty slots'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'no-data-text',
mfDemo: 'no-data-text'
},
{
name: 'no-match-text',
type: 'string',
defaultValue: "'无匹配数据'",
desc: {
'zh-CN': '搜索条件无匹配时显示的文本,也可以使用 empty 插槽设置',
'en-US':
'The text displayed when there is no match for the search criteria can also be set using empty slots'
},
mode: ['pc'],
pcDemo: 'filter-method'
},
{
name: 'options',
typeAnchorName: 'IOption',
type: 'IOption[]',
defaultValue: '',
desc: {
'zh-CN': '选项列表配置,使用后不需要再配置 tiny-option',
'en-US': 'Option list configuration, no need to configure tiny options after use'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'map-field',
mfDemo: 'map-field'
},
{
name: 'placeholder',
type: 'string',
defaultValue: "'请选择'",
desc: {
'zh-CN': '占位符',
'en-US': 'Placeholder'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'native-properties',
mfDemo: 'native-properties'
},
{
name: 'placement',
typeAnchorName: 'IPlacement',
type: 'IPlacement',
defaultValue: "'bottom-start'",
desc: {
'zh-CN': '下拉弹框相对于触发源的弹出位置',
'en-US': 'The pop-up position of the pull-down pop-up box relative to the trigger source'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'popup-style-position',
mfDemo: 'popup-style-position'
},
{
name: 'popper-append-to-body',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否将弹出框的 dom 元素插入至 body 元素',
'en-US': 'Whether to insert the dom element of the pop-up box into the body element'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'popup-style-position',
mfDemo: 'popup-style-position'
},
{
name: 'popper-class',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义下拉框的类名,用于自定义样式',
'en-US': 'The class name of the custom dropdown box, used for customizing styles'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'popup-style-position',
mfDemo: 'popup-style-position'
},
{
name: 'remote',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否为远程搜索',
'en-US': 'Is it a remote search'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'remote-method',
mfDemo: 'remote-method'
},
{
name: 'remote-method',
type: '(query:string) => void',
defaultValue: '',
desc: {
'zh-CN': '远程搜索的方法',
'en-US': 'Remote search methods'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'remote-method',
mfDemo: 'remote-method'
},
{
name: 'reserve-keyword',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '多选可搜索时,是否在选中一个选项后仍然保留当前的搜索关键词',
'en-US':
'When selecting multiple searchable options, do you still keep the current search keywords after selecting one option'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'remote-method',
mfDemo: 'remote-method'
},
{
name: 'searchable',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否启用下拉面板搜索',
'en-US': 'Whether to allow users to create new items. This parameter must be used together with filterable.'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'searchable',
mfDemo: 'searchable'
},
{
name: 'show-alloption',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否展示 “全选” 选项',
'en-US': 'Whether to display the "Select All" option'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'show-alloption',
mfDemo: 'show-alloption'
},
{
name: 'show-empty-image',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否显示空数据图片',
'en-US': 'Display empty data image'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'no-data-text',
mfDemo: 'no-data-text'
},
{
name: 'size',
type: "'medium' | 'small' | 'mini'",
defaultValue: '',
desc: {
'zh-CN': '输入框尺寸。',
'en-US': 'Text box size'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'size',
mfDemo: 'size'
},
{
name: 'tag-selectable',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '输入框中的标签是否可通过鼠标选中复制',
'en-US': 'Can the label in the input box be copied by selecting it with the mouse'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'copy-multi',
mfDemo: 'copy-multi'
},
{
name: 'tag-type',
type: "'success' | 'info' | 'warning' | 'danger'",
defaultValue: '',
desc: {
'zh-CN': '标签类型,仅多选适用。使用 aurora 主题时设置该属性为 info',
'en-US':
'Label type, only applicable for multiple choices. Set this property to info when using the aurora theme'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'tag-type',
mfDemo: 'tag-type'
},
{
name: 'text-field',
type: 'string',
defaultValue: "'label'",
desc: {
'zh-CN': '显示值字段',
'en-US': 'Show Value Fields'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'map-field',
mfDemo: 'map-field'
},
{
name: 'text-split',
type: 'string',
defaultValue: "','",
desc: {
'zh-CN': '自定义复制文本的分隔符,需结合 copyable 属性使用',
'en-US': 'The separator for custom copied text needs to be used in conjunction with the copyable attribute'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'copy-multi',
mfDemo: 'copy-multi'
},
{
name: 'top-create',
type: 'boolean',
defaultValue: '',
desc: {
'zh-CN': '是否显示下拉框顶部新增按钮,点击按钮会抛出一个 top-create-click 事件,可以在事件中自定义一些行为',
'en-US':
'Indicates whether to display a new button on the top of the drop-down list box. When a button is clicked, a top-create-click event is thrown. You can customize some behaviors in the event'
},
mode: ['pc'],
pcDemo: 'allow-create'
},
{
name: 'value-field',
type: 'string',
defaultValue: "'value'",
desc: {
'zh-CN': '绑定值字段',
'en-US': 'Bind Value Field'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'map-field',
mfDemo: 'map-field'
},
{
name: 'value-key',
type: 'string',
defaultValue: "'value'",
desc: {
'zh-CN': '作为 value 唯一标识的键名,绑定值为对象类型时必填',
'en-US':
'The key name that uniquely identifies the value must be filled in when the binding value is of object type'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'binding-obj',
mfDemo: 'binding-obj'
},
{
name: 'show-proportion',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否展示多选框选中条数和总条数的占比的文字提示',
'en-US':
'Display the proportion of the number of selected items and the total number of items in the multiple-choice box'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'collapse-tags',
mfDemo: 'collapse-tags'
},
{
name: 'show-limit-text',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN':
'是否展示多选框开启多选限制选择数量时,选中条数和限制总条数的占比的文字提示。 该属性的优先级大于<code>show-proportion</code> 属性,同时设置只',
'en-US':
'Display the proportion of the number of selected items and the total number of items in the multiple-choice box'
},
mode: ['pc'],
pcDemo: 'multiple'
}
],
events: [
{
name: 'blur',
type: '(event:MouseEvent) => void',
defaultValue: '',
desc: {
'zh-CN': '监听输入框失去焦点事件',
'en-US': 'Listening for input box lose focus event'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'events',
mfDemo: 'events'
},
{
name: 'change',
type: '(value:string|number|Array<string|number>, list:Array<IOption|ITreeNode>) => void',
defaultValue: '',
desc: {
'zh-CN': '监听绑定值变更事件',
'en-US': 'Listening for binding value change events'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'events',
mfDemo: 'events'
},
{
name: 'clear',
type: '() => void',
defaultValue: '',
desc: {
'zh-CN': '监听一键清除事件',
'en-US': 'Listening for one click clear events'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'events',
mfDemo: 'events'
},
{
name: 'focus',
type: '(event:MouseEvent) => void',
defaultValue: '',
desc: {
'zh-CN': '监听输入框获取焦点事件',
'en-US': 'Listening to input boxes to obtain focus events'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'events',
mfDemo: 'events'
},
{
name: 'remove-tag',
type: '(tag:string|number) => void',
defaultValue: '',
desc: {
'zh-CN': '监听多选时移除标签事件',
'en-US': 'Remove label events when listening for multiple selections'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'events',
mfDemo: 'events'
},
{
name: 'top-create-click',
type: '() => void',
defaultValue: '',
desc: {
'zh-CN': '监听顶部新增按钮点击事件,同 top-create 属性一起使用',
'en-US':
'Listens to the click event of a new button on the top. This parameter is used together with the top-create attribute'
},
mode: ['pc'],
pcDemo: 'events'
},
{
name: 'visible-change',
type: '(status:boolean) => void',
defaultValue: '',
desc: {
'zh-CN': '监听下拉弹框的显示隐藏状态',
'en-US': 'Monitor the display and hidden status of dropdown pop ups'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'events',
mfDemo: 'events'
}
],
methods: [
{
name: 'blur',
type: '() => void',
defaultValue: '',
desc: {
'zh-CN': '使输入框失去焦点',
'en-US': 'Causes the input box to lose focus'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'manual-focus-blur',
mfDemo: 'manual-focus-blur'
},
{
name: 'focus',
type: '() => void',
defaultValue: '',
desc: {
'zh-CN': '使输入框获取焦点',
'en-US': 'Bring the input box to focus'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'manual-focus-blur',
mfDemo: 'manual-focus-blur'
}
],
slots: [
{
name: 'default',
type: '',
defaultValue: '',
desc: {
'zh-CN': '选项默认插槽',
'en-US': 'Option default slot'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'slot-default',
mfDemo: 'slot-default'
},
{
name: 'empty',
type: '',
defaultValue: '',
desc: {
'zh-CN': '空数据插槽',
'en-US': 'Empty data slot'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'slot-empty',
mfDemo: 'slot-empty'
},
{
name: 'footer',
type: '',
defaultValue: '',
desc: {
'zh-CN': '下拉弹框底部插槽',
'en-US': 'Pull down the bottom slot of the pop-up box'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'slot-footer',
mfDemo: 'slot-footer'
},
{
name: 'prefix',
type: '',
defaultValue: '',
desc: {
'zh-CN': '输入框前缀插槽',
'en-US': 'Input box prefix slot'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'slot-prefix',
mfDemo: 'slot-prefix'
},
{
name: 'reference',
type: '',
defaultValue: '',
desc: {
'zh-CN': '触发源插槽',
'en-US': 'Trigger Source Slot'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'slot-reference',
mfDemo: 'slot-reference'
},
{
name: 'panel',
desc: {
'zh-CN': '下拉面板插槽',
'en-US': 'Panel slot'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'slot-panel',
mfDemo: 'slot-panel'
}
]
},
{
name: 'option',
type: 'component',
props: [
{
name: 'disabled',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '选项是否禁用',
'en-US': 'Is the option disabled'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'disabled',
mfDemo: 'disabled'
},
{
name: 'icon',
type: 'Component',
defaultValue: '',
desc: {
'zh-CN': '自定义选项的图标',
'en-US': 'Customize icons for options'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'basic-usage',
mfDemo: 'basic-usage'
},
{
name: 'label',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '选项的显示文本',
'en-US': 'Display text for option'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'basic-usage',
mfDemo: 'basic-usage'
},
{
name: 'required',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '选项是否必选',
'en-US': 'Is it mandatory to select an option'
},
mode: ['pc', 'mobile-first'],
pcDemo: '',
mfDemo: ''
},
{
name: 'value',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '选项的值',
'en-US': 'Value for option'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'basic-usage',
mfDemo: 'basic-usage'
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IOption',
type: 'interface',
code: `
interface IOption {
value?: string | number
label?: string
disabled?: boolean
icon?: Component
required?:boolean
}
`
},
{
name: 'ICacheOp',
type: 'interface',
code: `
interface ICacheItem {
frequency: number
key: string
time: number
}
interface ICacheOp {
key: string // 本地缓存的唯一 key 值
sortBy?: 'frequency' | 'time' // 排序的字段,默认 frequency (频次)
sort?: 'desc' | 'asc' // 排序方式,默认 desc (降序)
dataKey?: string // 数据中的唯一标识的 key 名称,默认 value
highlightClass?: string // 个性化高亮 class 名称默认memorize-highlight
highlightNum?: number // 高亮个性化的条数,默认Infinity
cacheNum?: number // 存储个性化的条数,默认Infinity
serialize?: ()=> string // 本地存储序列化方法,默认JSON.stringify
deserialize?: ()=> ICacheItem[] // 本地存储序反列化方法默认JSON.parse
}
`
},
{
name: 'IPlacement',
type: 'type',
code: `
type IPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'
`
}
]
}

View File

@ -8,7 +8,7 @@ export default {
{
name: 'arrow',
type: 'string',
defaultValue: "该属性的默认值为 'hover'",
defaultValue: "'hover'",
desc: {
'zh-CN': '切换箭头的显示效果,该属性的可选值为 always / hover / never',
'en-US': 'Switch the display effect of arrows,The optional values for this attribute are always/hover/never'
@ -31,7 +31,7 @@ export default {
{
name: 'autoplay',
type: 'boolean',
defaultValue: '该属性的默认值为 false',
defaultValue: 'false',
desc: {
'zh-CN': '是否自动切换',
'en-US': 'Whether to automatically switch'
@ -57,7 +57,7 @@ export default {
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '指示器的位置该属性的可选值为 outside / none',
'zh-CN': '指示器的位置该属性的可选值为 outside / none',
'en-US': 'The position of the indicator. The optional values for this attribute are outside/none'
},
mode: ['pc', 'mobile-first'],
@ -67,10 +67,10 @@ export default {
{
name: 'indicator-style',
type: 'String',
defaultValue: '该属性的可选值为 light/dark 默认为light。',
defaultValue: "'light'",
desc: {
'zh-CN': '指示器的样式',
'en-US': 'The style of the indicator.'
'zh-CN': '指示器的样式,该属性的可选值为 light/dark',
'en-US': 'The style of the indicator, The optional values for this attribute are light/mark.'
},
mode: ['mobile-first'],
mfDemo: 'indicator-style'
@ -78,7 +78,7 @@ export default {
{
name: 'initial-index',
type: 'number',
defaultValue: '该属性的默认值为 0',
defaultValue: '0',
desc: {
'zh-CN': '初始状态激活的幻灯片的索引,从 0 开始',
'en-US': 'Index of slides activated in initial state, starting from 0'
@ -90,7 +90,7 @@ export default {
{
name: 'interval',
type: 'number',
defaultValue: '该属性的默认值为 3000',
defaultValue: '3000',
desc: {
'zh-CN': '自动切换的时间间隔,单位为毫秒',
'en-US': 'The time interval for automatic switching, in milliseconds'
@ -102,7 +102,7 @@ export default {
{
name: 'loop',
type: 'boolean',
defaultValue: '该属性的默认值为 true',
defaultValue: 'true',
desc: {
'zh-CN': '是否循环显示',
'en-US': 'Whether to display in a loop'
@ -114,7 +114,7 @@ export default {
{
name: 'show-title',
type: 'boolean',
defaultValue: '该属性的默认值为 false',
defaultValue: 'false',
desc: {
'zh-CN': '是否显示标题',
'en-US': 'Is the title displayed'
@ -126,11 +126,10 @@ export default {
{
name: 'trigger',
type: 'string',
defaultValue: "该属性的默认值为 'hover'",
defaultValue: "'hover'",
desc: {
'zh-CN': '指示器的触发方式,默认为 hover。该属性的可选值为 click',
'en-US':
'The triggering method of the indicator is hover by default. The optional value for this attribute is click'
'zh-CN': '指示器的触发方式,该属性的可选值为 hover / click',
'en-US': 'The triggering method of the indicator. The optional value for this attribute is click'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'indicator-trigger',
@ -139,7 +138,7 @@ export default {
{
name: 'type',
type: 'string',
defaultValue: "该属性的默认值为 'horizontal'",
defaultValue: "'horizontal'",
desc: {
'zh-CN': '走马灯的类型,该属性的可选值为 horizontal / vertical / card',
'en-US': 'The type of horse lantern,The optional values for this attribute are horizontal/vertical/card'
@ -152,11 +151,12 @@ export default {
events: [
{
name: 'change',
type: '',
type: '(curIndex: number, preIndex: number) => void',
defaultValue: '',
desc: {
'zh-CN': '幻灯片切换时触发',
'en-US': 'Trigger during slide transition'
'zh-CN': '幻灯片切换时触发,第一个参数为当前幻灯片索引,第二个参数为上一张幻灯片索引',
'en-US':
'Trigger during slide transition, The first parameter is the current slide index, and the second parameter is the index of the previous slide'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'carousel-events',
@ -193,8 +193,9 @@ export default {
type: '',
defaultValue: '',
desc: {
'zh-CN': '手动切换幻灯片',
'en-US': 'Manually switch slides'
'zh-CN': '手动切换幻灯片,参数为需要切换的幻灯片的索引,从 0 开始',
'en-US':
'Manually switch slides,the parameter is the index of the slides that need to be switched, starting from 0'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'manual-play',
@ -254,7 +255,7 @@ export default {
'en-US': 'Default slot'
},
mode: ['pc'],
pcDemo: 'manual-play'
pcDemo: 'card-show'
}
]
}

View File

@ -0,0 +1,297 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
}
]
}

View File

@ -0,0 +1,309 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
key: string // 高德地图密钥
url: string // 高德地图密钥
v: string // 高德地图版本,默认值: 1.4.3
amap: object // 高德地图配置项 默认不触发
series: object // 高德地图插件配置项
}`
}
]
}

View File

@ -0,0 +1,309 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
key: string // 百度地图密钥
url: string // 百度地图密钥
v: string // 百度地图版本,默认值: 1.4.3
bmap: object // 百度地图配置项 默认不触发
series: object // 百度地图插件配置项
}`
}
]
}

View File

@ -0,0 +1,326 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: cloud-light
legend: object // 图例配置, 默认显示
xAxis: string | object // 配置x轴, 默认值: 图表数据data数据中data[0]对象的第一个key值
yAxis: array | object // 配置y轴, 默认值: [50,20,50,20]
padding: array // 图表内边距值, 默认值: [50,20,50,20]
color: array | string // 颜色
tipHtml: function // 悬浮提示框内容配置, 默认显示
tipHtmlStyle: object // 悬浮提示框样式配置, 默认值: { padding: [14,16] }
dataZoom: object // 区域缩放轴配置, 默认不显示
linearGradient: object // 线性渐变
event: object // 图表事件, 默认不触发
data: array // 图表数据(必填)
type: string // 配置柱状图类型, 默认值: bar
stepGradient: array // 柱体分段渐变
axisPointer: object // 坐标指示器(数据背景区域样式),(支持 rgb 颜色、英文单词颜色、十六进制颜色), 默认值: rgba(25,25,25,0.08)
topTipHtml: function // 顶部位置悬浮提示框, 默认不显示
itemStyle: object // 图表数据点文本样式, 默认值: {barWidth: 8, barGap: '60%'}
direction: string // 柱体方向, 默认值: vertical
label: object | array // 柱体文本, 默认不显示
lineDataName: array // 柱状图更改为折线图的数据名
markline: object // 阈值线配置, 默认不显示
}`
}
]
}

View File

@ -0,0 +1,314 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: cloud-light
color: array | string // 颜色
tipHtml: function // 悬浮提示框内容配置, 默认显示
tipHtmlStyle: object // 悬浮提示框样式配置, 默认值: { padding: [14,16] }
event: object // 图表事件, 默认不触发
data: array // 图表数据(必填)
series: array // 自定义图表series
dataset: array // 自定义图表dataset
}`
}
]
}

View File

@ -0,0 +1,314 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: light
color: array | string // 颜色
legend: object // 图例配置, 默认显示
dataZoom: object // 区域缩放轴配置, 默认不显示
event: object // 图表事件, 默认不触发
MA: array // k线图的MA数据均线
data: array // 图表数据(必填)
upColor: string // 上行数据颜色
downColor: string // 下行数据颜色
}`
}
]
}

View File

@ -0,0 +1,297 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
}
]
}

View File

@ -0,0 +1,297 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
}
]
}

View File

@ -0,0 +1,316 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: light
color: array | string // 颜色
tipHtml: function // 悬浮提示框内容配置, 默认值: { padding: [14,16] }
event: object // 图表事件, 默认不触发
legend: object // 图例配置, 默认显示
gap: number // 数据图形间距, 默认值: 1
sort: string // 图表排序方式, 默认值: descending
size: object // 图表大小, 默认不显示
position: object // 图标位置, 默认显示
label: object // 图表文本, 默认显示
data: array // 图表数据(必填)
series: object // 图表series
}`
}
]
}

View File

@ -0,0 +1,327 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: light
color: array | string // 颜色
tipHtml: function // 悬浮提示框内容配置, 默认值: { padding: [14,16] }
event: object // 图表事件, 默认不触发
data: array // 图表数据(必填), 默认值: { value: 90, name: 'Utilization rate' }
position: object // 图表位置及大小, 默认值: {center: ['50%','50%'], radius: '70%'}
pointer: boolean // 刻度指针是否显示, 默认值: false
min: number // 仪表盘最小刻度, 默认值: 0
max: number // 仪表盘最大刻度, 默认值: 100
text: object // 中心文本配置, 默认值: 显示data中的value和name值
startAngle: number // 仪表盘起始角度, 默认值: 225
endAngle: number // 仪表盘结束角度, 默认值: -45
splitColor: array // 配置分割区间及颜色
splitNumber: number // 刻度线数量配置, 默认值: 4
splitLine: object // 刻度线及文本配置, 默认显示
markLine: number // 阈值线配置
gradientColor: array // 线性配置
itemStyle: object // 进度条样式配置
axisLabelStyle: object // 调整指针样式
pointerStyle: object // 调整指针样式
mask: object // 外层光晕蒙层配置
orbitalColor: string // 仪表盘的轨道颜色
silent: boolean // 是否关闭hover动效, 默认值: false
}`
}
]
}

View File

@ -0,0 +1,305 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
// 使用方法目前仅支持 eCharts 原生属性配置, 使用方法和 echarts 一致。 详细配置请参考https://echarts.apache.org/examples/zh/index.html#chart-type-graph
}`
}
]
}

View File

@ -0,0 +1,324 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: light
color: array | string // 颜色
padding: array // 图表内边距值, 默认值: [50,20,50,20]
tipHtml: function // 悬浮提示框内容配置, 默认值: { padding: [14,16] }
event: object // 图表事件, 默认不触发
data: array // 图表数据(必填)
type: string // 配置热力图类型
borderColor: string // 日历热力图举行边框色, 默认值: #1F55B5
showLabel: boolean // 日历热力图矩形文本显示, 默认值: true
rectangleSize: number // 矩形热力图矩形矩形大小, 默认值: 8
handle: object // 日历热力图手柄相关配置
quantity: number // 蜂窝热力图单行排列数量设置, 默认值: 40
changeProperty: string // 日历热力图热力的变化设置, 默认值: opacity
xAxis: object // 配置x轴坐标数据, 默认显示
yAxis: object // 配置y轴, 默认显示
xAxisName: string // 配置x轴文本(建议使用xAxis.name)
yAxisName: string // 配置y轴文本(建议使用yAxis.name)
xAxisLine: object // 设置x轴样式(建议使用xAxis.line), 默认显示
xAxisLabelRotate: number // x轴label旋转角度(建议使用xAxis.labelRotate)
xAixsInterval:number | function // 配置x轴label间距(建议使用xAxis.interval),默认值: 0
}`
}
]
}

View File

@ -0,0 +1,326 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: light
legend: object // 图例配置, 默认显示
xAxis: string | object // 配置x轴, 默认值: 图表数据data数据中data[0]对象的第一个key值
yAxis: array | object // 配置y轴, 默认值: [50,20,50,20]
padding: array // 图表内边距值, 默认值: [50,20,50,20]
color: array | string // 颜色
tipHtml: function // 悬浮提示框内容配置, 默认值: { padding: [14,16] }
tipHtmlStyle: object // 悬浮提示框样式配置, 默认值: { padding: [14,16] }
dataZoom: object // 区域缩放轴配置, 默认不显示
linearGradient: object // 线性渐变
event: object // 图表事件, 默认不触发
data: array // 图表数据(必填)
type: string // 配置柱状图类型, 默认值: bar
stepGradient: array // 柱体分段渐变
axisPointer: object // 坐标指示器(数据背景区域样式),(支持 rgb 颜色、英文单词颜色、十六进制颜色), 默认值: rgba(25,25,25,0.08)
topTipHtml: function // 顶部位置悬浮提示框, 默认不显示
itemStyle: object // 图表数据点文本样式, 默认值: {barWidth: 8, barGap: '60%'}
direction: string // 柱体方向, 默认值: vertical
label: object | array // 柱体文本, 默认不显示
lineDataName: array // 柱状图更改为折线图的数据名
markline: object // 阈值线配置, 默认不显示
}`
}
]
}

View File

@ -0,0 +1,323 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: light
color: array | string // 颜色
padding: array // 图表内边距值, 默认值: [50,20,50,20]
legend: object // 图例配置, 默认显示
smooth: boolean // 是否关闭hover动效, 默认值: false
silent: boolean // 是否关闭hover动效, 默认值: false
data: array // 图表数据(必填)
itemStyle: object // 折线是否更改为阶梯线, 默认值: false
step: boolean // 折线图是否更改为阶梯线, 默认值: false
predict: string // 折线是否更改为预测线的数据名
tipHtml: function // 悬浮提示框内容配置, 默认值: { padding: [14,16] }
tipHtmlStyle: object // 悬浮提示框样式配置, 默认值: { padding: [14,16] }
xAxis: string | object // 配置x轴, 默认值: 图表数据data数据中data[0]对象的第一个key值
yAxis: array | object // 配置y轴, 默认值: [50,20,50,20]
dataZoom: object // 区域缩放轴配置, 默认不显示
linearGradient: object // 线性渐变
event: object // 图表事件, 默认不触发
markline: object // 阈值线配置, 默认不显示
markPoint: object // 峰值标记, 默认值: markPoint: {max:false, min:false}
}`
}
]
}

View File

@ -0,0 +1,314 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: light
color: array | string // 颜色
tipHtml: function // 悬浮提示框内容配置, 默认值: { padding: [14,16] }
waveAnimation: boolean // 图表动画, 默认值: true
backgroundstyle: object // 图表背景配置, 默认显示
shape: string // 图表形状, 默认显示
outline: object // 图表外框配置, 默认显示
label: object // 图标文本, 默认显示
data: array // 图表数据(必填)
series: object // 图表series
}`
}
]
}

View File

@ -0,0 +1,305 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
// 使用方法目前仅支持 eCharts 原生属性配置, 使用方法和 echarts 一致。 详细配置请参考https://echarts.apache.org/examples/zh/index.html#chart-type-map
}`
}
]
}

View File

@ -0,0 +1,321 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: cloud-light
color: array | string // 颜色
title: object // 中心文本配置
legend: object // 图例配置, 默认显示
tipHtml: function // 悬浮提示框内容配置, 默认显示
tipHtmlStyle: object // 悬浮提示框样式配置, 默认值: { padding: [14,16] }
event: object // 图表事件, 默认不触发
data: array // 图表数据(必填)
type: string // 圆盘图类型, 默认值: circle
position: object // 图标位置及大小, 默认值: { center: ['50%','45%'], radius: ['44%', '50%'] }
minAngle: number // 最小扇区角度
silent: boolean // 是否关闭hover动效, 默认值: false
label: object // 外侧文本配置, 默认显示
itemStyle: object // 图表数据点文本样式, 默认值: { borderColor: '#ffffff', borderWidth: 3, borderRadius: 0 }
stillShowZeroSum: boolean // 是否在数据和为0的时候仍显示扇区, 默认值: true
selectedMode: boolean // 扇区选中模式配置, 默认值: false
roseType: boolean // 是否展示成南丁格尔图, 默认值: false
}`
}
]
}

View File

@ -0,0 +1,49 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'options',
type: 'object',
defaultValue: '--',
desc: {
'zh-CN': '图表参数',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'options',
type: 'interface',
code: `
interface options {
theme: string // 主题
color: array | string // 颜色
padding: array // 图表内边距值
tipHtml: function // 悬浮提示框内容配置
event: object // 图表事件
data: array // 图表数据
name: string // 图表名称(必填)
unit: string // 进度图右侧文本单位
barWidth: number // 进度图柱形宽度
minWidth: string // 进度图单项数据的最小宽度
calibrationValue: number // 进度图标定值
label: object // 堆叠进度图图表图元文本样式
state: object // 根据状态设置颜色
title: object // 进度图图表标题样式
text: object // 进度图图表右侧文本样式
}`
}
]
}

View File

@ -0,0 +1,297 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
}
]
}

View File

@ -0,0 +1,319 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
data: array // 图表数据(必填)
theme: string // 主题, 默认值: cloud-light
color: array | string // 颜色
title: object // 中心文本配置
unit: string // 单组数据雷达图的数据单位, 默认值: %
legend: object // 图例配置, 默认显示
tipHtml: function // 悬浮提示框内容配置, 默认显示
markline: number | object // 阈值线配置
radarMax: number | array // 最外圈代表的数值, 默认值: 坐标系的最外圈为数据中的最大值
tipHtmlStyle: object // 悬浮提示框样式配置, 默认值: { padding: [14,16] }
event: object // 图表事件, 默认不触发
position: object // 图表位置, 默认不触发
radarMark: boolean // 底部坐标系刻度值显示, 默认值: true
radar: object // 雷达图的坐标系配置
}`
}
]
}

View File

@ -0,0 +1,321 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: cloud-light
color: array | string // 颜色
title: object // 中心文本配置
legend: object // 图例配置, 默认显示
tipHtml: function // 悬浮提示框内容配置, 默认显示
tipHtmlStyle: object // 悬浮提示框样式配置, 默认值: { padding: [14,16] }
event: object // 图表事件, 默认不触发
data: array // 图表数据(必填)
type: string // 圆盘图类型, 默认值: circle
position: object // 图标位置及大小, 默认值: { center: ['50%','45%'], radius: ['44%', '50%'] }
minAngle: number // 最小扇区角度
silent: boolean // 是否关闭hover动效, 默认值: false
label: object // 外侧文本配置, 默认显示
itemStyle: object // 图表数据点文本样式, 默认值: { borderColor: '#ffffff', borderWidth: 3, borderRadius: 0 }
stillShowZeroSum: boolean // 是否在数据和为0的时候仍显示扇区, 默认值: true
selectedMode: boolean // 扇区选中模式配置, 默认值: false
roseType: boolean // 是否展示成南丁格尔图, 默认值: false
}`
}
]
}

View File

@ -0,0 +1,322 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: cloud-light
color: array | string // 颜色
padding: array // 图表内边距值, 默认值: [50,20,50,20]
tipHtml: function // 悬浮提示框内容配置, 默认显示
data: array // 图表数据(必填)
dragggble: boolean // 页面节点是否可拖动, 默认值: true
widthSpace: array // 节点矩形样式配置, 默认值: [10,30]
nodeAlign: string // 桑基图中节点的对齐方式, 默认值: justify
label: object // 节点矩形中文本标签的样式
itemStyle: object // 节点矩形连接带的样式
sortType: string // 空节点的展示状态, 默认值: node
emptyStatus: string // 空节点的展示状态, 默认值: node
series: array // echarts原生属性
grid: object // echarts原生属性
xAxis: array // echarts原生属性
yAxis: object // echarts原生属性
tooltip: object // echarts原生属性
title: object // echarts原生属性
}`
}
]
}

View File

@ -0,0 +1,327 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: cloud-light
color: array | string // 颜色
padding: array // 图表内边距值, 默认值: [50,20,50,20]
tipHtml: function // 悬浮提示框内容配置, 默认显示
event: object // 图表事件, 默认不触发
data: array // 图表数据(必填)
bubbleSize: array // 气泡大小范围, 默认值: [10,70]
trendLineConfig: object // 配置趋势线
xAxis: object // 配置x轴坐标数据, 默认显示
xAxisLine: object // 设置x轴样式(建议使用xAxis.line), 默认显示
xAxisLabelRotate: number // x轴label旋转角度(建议使用xAxis.labelRotate)
xAixsInterval: number | function // 配置x轴label间距(建议使用xAxis.interval), 默认值: 0
xAxisFullGrid: boolean // x轴坐标是否顶格(建议使用xAxis.fullGrid), 默认值: false
xAxisName: string // 配置x轴文本(建议使用xAxis.name)
yAxisName: string // 配置y轴文本
xAxisType: string // x轴类型
symbol: string // 节点图形类型, 默认值: circle
symbolRotate: number // 节点图形旋转角度, 默认值: 0
symbolOffset: array // 节点图形偏移
cursor: string // 鼠标悬浮在节点图形的样式, 默认值: pointer
label: object // 节点图形的文本样式, 此属性配置和echarts一致
itemStyle: object // 节点图形的样式, 此属性配置和echarts一致
emphasis: object // 高亮的图形和标签样式, 此属性配置和echarts一致
}`
}
]
}

View File

@ -0,0 +1,311 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: cloud-light
color: array | string // 颜色
tipHtml: function // 悬浮提示框内容配置, 默认显示
tipHtmlStyle: object // 悬浮提示框样式配置, 默认值: { padding: [14,16] }
event: object // 图表事件, 默认不触发
data: array // 图表数据(必填)
series: object // 图表series
}`
}
]
}

View File

@ -0,0 +1,313 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: cloud-light
padding: array // 图表内边距值, 默认值: [50,20,50,20]
tipHtml: function // 悬浮提示框内容配置, 默认显示
data: array // 图表数据(必填)
type: string // 树图类型
direction: string // 线性树图起点方向, 默认值: left
symbolSize: number // 树图树元大小, 默认值: 10
lineType: string // 线性树图连线形状, 默认值: curve
initialTreeDepth: number // 树图初始展开层级, 默认值: 1
}`
}
]
}

View File

@ -0,0 +1,326 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: cloud-light
legend: object // 图例配置, 默认显示
xAxis: string | object // 配置x轴, 默认值: 图表数据data数据中data[0]对象的第一个key值
yAxis: array | object // 配置y轴, 默认值: [50,20,50,20]
padding: array // 图表内边距值, 默认值: [50,20,50,20]
color: array | string // 颜色
tipHtml: function // 悬浮提示框内容配置, 默认显示
tipHtmlStyle: object // 悬浮提示框样式配置, 默认值: { padding: [14,16] }
dataZoom: object // 区域缩放轴配置, 默认不显示
linearGradient: object // 线性渐变
event: object // 图表事件, 默认不触发
data: array // 图表数据(必填)
type: string // 配置柱状图类型, 默认值: bar
stepGradient: array // 柱体分段渐变
axisPointer: object // 坐标指示器(数据背景区域样式),(支持 rgb 颜色、英文单词颜色、十六进制颜色), 默认值: rgba(25,25,25,0.08)
topTipHtml: function // 顶部位置悬浮提示框, 默认不显示
itemStyle: object // 图表数据点文本样式, 默认值: {barWidth: 8, barGap: '60%'}
direction: string // 柱体方向, 默认值: vertical
label: object | array // 柱体文本, 默认不显示
lineDataName: array // 柱状图更改为折线图的数据名
markline: object // 阈值线配置, 默认不显示
}`
}
]
}

View File

@ -0,0 +1,317 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'cancel-resize-check',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否禁用 resize 时的容器检测',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'change-delay',
type: 'number',
defaultValue: "'0'",
desc: {
'zh-CN': '属性修改触发图表重绘回调的延迟',
'en-US': 'Delay for triggering chart redrawing callback after attribute modification'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'data',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '数据由指标和维度组成,“维度” 指的是数据的属性,“指标” 是量化衡量标准',
'en-US':
'Data consists of indicators and dimensions. Dimension refers to data attributes, and indicator refers to quantitative measurement standards.'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'events',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '事件绑定',
'en-US': 'Event binding'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'extend',
typeAnchorName: 'chart#IChartProps',
type: 'IChartProps',
defaultValue: '',
desc: {
'zh-CN': 'echarts 的配置项',
'en-US': 'Configuration items of echarts'
},
mode: ['pc'],
pcDemo: 'chart'
},
{
name: 'height',
type: 'string',
defaultValue: "'400px'",
desc: {
'zh-CN': '设置图表容器的高度。',
'en-US': 'Set the height of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'init-options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': 'init 附加参数',
'en-US': 'Init Additional Parameters'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'judge-width',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否处理生成图表时的宽度问题',
'en-US': 'Do you want to process the width issue when generating charts?'
},
mode: ['pc'],
pcDemo: 'chart-events'
},
{
name: 'legend-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示图例',
'en-US': 'Display legend'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'not-set-unchange',
type: 'array',
defaultValue: '',
desc: {
'zh-CN': '未发生变化时不参加 setOption 的属性',
'en-US': 'The setOption attribute does not change.'
},
mode: ['pc'],
pcDemo: ''
},
{
name: 'resize-delay',
type: 'number',
defaultValue: "'200'",
desc: {
'zh-CN': '窗口 resize 事件回调的延迟',
'en-US': 'Delay of the window resize event callback'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'resizeable',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否处理窗口 resize 事件',
'en-US': 'Whether to process the window resize event'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'set-option-opts',
type: 'boolean | object',
defaultValue: 'true',
desc: {
'zh-CN': 'echarts setOption 的第二个参数',
'en-US': 'Echarts setOption second parameter'
},
mode: ['pc'],
pcDemo: ''
},
{
mode: []
},
{
name: 'theme',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称。;自定义主题对象。',
'en-US': 'User-defined theme name. ;User-defined theme object.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'theme-name',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '自定义主题名称,如果设置了 theme-name, 则 theme 无效',
'en-US': 'User-defined theme name. If theme-name is set, the theme is invalid.'
},
mode: ['pc'],
pcDemo: 'chart#base'
},
{
name: 'tooltip-visible',
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '是否显示提示框',
'en-US': 'Display dialog box'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width',
type: 'string',
defaultValue: "'auto'",
desc: {
'zh-CN': '设置图表容器的宽度。',
'en-US': 'Set the width of the chart container.'
},
mode: ['pc'],
pcDemo: 'chart/attributes-demo#props-demo10'
},
{
name: 'width-change-delay',
type: 'number',
defaultValue: "'300'",
desc: {
'zh-CN': '容器宽度变化的延迟',
'en-US': 'Container width change delay'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
},
{
name: 'options',
type: 'object',
defaultValue: '',
desc: {
'zh-CN': '图表配置项(无法与settings混用)',
'en-US': 'Chart Configuration item (cannot be used together with settings)'
},
mode: ['pc'],
pcDemo: ''
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'IChartProps',
type: 'interface',
code: `
interface IChartProps {
afterConfig: () => void
afterSetOption: () => void
afterSetOptionOnce: () => void
animation: object
axisPointer: object | array
backgroundColor: object | string
beforeConfig: () => void
brush: object | array
cancelResizeCheck: boolean
changeDelay: number // 默认值 0
colorMode: string
colors: array
data: object | array
dataEmpty: boolean
dataZoom: object | array
events: object
extend: object
geo: object | array
graphic: object | array
grid: object | array
height: string // 默认值 '400px'
initOptions: object
judgeWidth: boolean // 默认值 false
legend: object | array
legendPosition: string
legendVisible: boolean // 默认值 true
loading: boolean
markArea: object
markLine: object
markPoint: object
notSetUnchange: array
radar: object
resizeDelay: number // 默认值 200
resizeable: boolean // 默认值 true
series: object | array
setOptionOpts: boolean | object // 默认值 true
settings: object
textStyle: object | array
theme: object
themeName: object | string
timeline: object | array
title: object | array
toolbox: object | array
tooltip: object
tooltipFormatter: () => void
tooltipVisible: boolean // 默认值 true
visualMap: object | array
width: string // 默认值 'auto'
widthChangeDelay: number // 默认值 300
xAxis: object | array
yAxis: object | array
}`
},
{
name: 'IChartSettings',
type: 'interface',
code: `
interface IChartSettings {
type: string // 图表类型,可选值' bar '' histogram '' line ',' pie '' ring '' funnel '' radar '' waterfall '
}`
},
{
name: 'Options',
type: 'interface',
code: `
interface Options {
theme: string // 主题, 默认值: cloud-light
color: array | string // 颜色
tipHtml: function // 悬浮提示框内容配置, 默认显示
data: array // 图表数据(必填)
gridSize: number // 词云图文本间距, 默认值: 16
sizeRange: array // 字体范围, 默认值: [14,60]
rotationRange: array // 文字旋转范围, 默认值: [0,0]
rotationStep: number // 文字旋转步值, 默认值: 0
shape: string // 词云图形状, 默认值: circle
width: string // 词云图宽度, 默认值: 75%
height: string // 词云图高度, 默认值: 80%
maskImage: string // 词云图形状图片配置
textColor: function // 词云图文本颜色
}`
}
]
}

View File

@ -161,10 +161,10 @@ export default {
{
name: 'resize',
type: 'boolean',
defaultValue: 'true',
defaultValue: 'false',
desc: {
'zh-CN': '实现窗口最大化',
'en-US': 'Maximize windows'
'zh-CN': '弹窗是否能切换全屏',
'en-US': 'Whether the pop-up window can be switched to full screen'
},
mode: ['pc'],
pcDemo: 'form-in-dialog'
@ -245,6 +245,17 @@ export default {
},
mode: ['pc'],
pcDemo: 'dialog-width'
},
{
name: 'dialog-transition',
type: 'string',
defaultValue: ``,
desc: {
'zh-CN': '启动弹出动效由小变大',
'en-US': 'Startup pop-up effect from small to large'
},
mode: ['pc'],
pcDemo: 'transition-effect'
}
],
events: [
@ -335,6 +346,18 @@ export default {
},
mode: ['pc'],
pcDemo: 'open-close-events'
},
{
name: 'resize',
typeAnchorName: 'IResizeEvent',
type: '(ev: IResizeEvent) => void',
defaultValue: '',
desc: {
'zh-CN': '弹窗大小变化时的事件,比如切换全屏状态时',
'en-US': 'Event when the pop-up window size changes, for example, when the full-screen mode is switched.'
},
mode: ['pc'],
pcDemo: 'fullscreen'
}
],
methods: [],
@ -343,7 +366,7 @@ export default {
name: 'default',
defaultValue: '',
desc: {
'zh-CN': 'Dialog 的内容',
'zh-CN': 'Dialog 的内容插槽',
'en-US': 'Dialog content'
},
mode: ['pc'],
@ -353,7 +376,7 @@ export default {
name: 'footer',
defaultValue: '',
desc: {
'zh-CN': 'Dialog 按钮操作区的内容',
'zh-CN': 'Dialog 按钮操作区的内容插槽',
'en-US': 'Dialog button operation area content'
},
mode: ['pc'],
@ -363,7 +386,7 @@ export default {
name: 'title',
defaultValue: '',
desc: {
'zh-CN': 'Dialog 标题区的内容',
'zh-CN': 'Dialog 标题区的内容插槽',
'en-US': 'Dialog content in the title area'
},
mode: ['pc'],
@ -371,5 +394,19 @@ export default {
}
]
}
],
types: [
{
name: 'IResizeEvent',
type: 'interface',
code: `
interface IResizeEvent {
// 当前的全屏状态
fullscreen: boolean
// 弹窗的元素
dialog: HTMLElement
}
`
}
]
}

View File

@ -362,6 +362,18 @@ export default {
},
mode: ['pc'],
pcDemo: 'nest-grid-multi'
},
{
name: 'resize',
typeAnchorName: 'IResizeEvent',
type: '(ev: IResizeEvent) => void',
defaultValue: '',
desc: {
'zh-CN': '弹窗大小变化时的事件,比如切换全屏状态时',
'en-US': 'Event when the pop-up window size changes, for example, when the full-screen mode is switched.'
},
mode: ['pc'],
pcDemo: ''
}
],
methods: [
@ -637,6 +649,18 @@ newPageSize: number // 变更后分页大小
currentPage: number // 当前所在页
currentPageSize: number // 当前分页大小
}`
},
{
name: 'IResizeEvent',
type: 'interface',
code: `
interface IResizeEvent {
// 当前的全屏状态
fullscreen: boolean
// 弹窗的元素
dialog: HTMLElement
}
`
}
]
}

View File

@ -1,145 +0,0 @@
export default {
mode: ['mobile'],
apis: [
{
name: 'Dialogbox',
type: 'component',
props: [
{
mode: []
},
{
name: 'close-on-click-modal',
type: 'Boolean',
defaultValue: '',
desc: {
'zh-CN':
'<p>是否可以通过点击遮罩层关闭弹窗,默认为 true ,可以在标签上设置:close-on-click-modal="false"不能通过点击遮罩层关闭弹窗。</p>',
'en-US': 'Is show left arrow'
},
mode: ['mobile'],
mobileDemo: 'close-on-click-modal'
},
{
name: 'lock-scroll',
type: 'Boolean',
defaultValue: '',
desc: {
'zh-CN': '<p>Dialog弹出时是否禁用滚动条,该属性默认为true</p>',
'en-US': 'Is show right arrow'
},
mode: ['mobile'],
mobileDemo: 'lock-scroll'
},
{
name: 'modal-append-to-body',
type: 'Boolean',
defaultValue: '',
desc: {
'zh-CN':
'<p>遮罩层是否应用到 body 上,为 false 时遮罩层会应用到 DialogBox 的父元素上该属性默认为true</p>',
'en-US': 'Is show right text'
},
mode: ['mobile'],
mobileDemo: 'slot-title'
},
{
name: 'show-header',
type: 'Boolean',
defaultValue: '',
desc: {
'zh-CN': '<p>是否显示弹窗头部 header默认值为 true 。</p>',
'en-US': 'Is show left text'
},
mode: ['mobile'],
mobileDemo: 'show-header'
},
{
mode: []
},
{
name: 'visible',
type: 'String',
defaultValue: '',
desc: {
'zh-CN': '<p>控制弹出框显示与关闭</p>',
'en-US': 'set main-title'
},
mode: ['mobile'],
mobileDemo: 'with-input'
}
],
events: [
{
mode: []
},
{
name: 'close',
type: 'Function()',
defaultValue: '',
desc: {
'zh-CN': '<p>Dialog 关闭的回调</p>',
'en-US': 'Click'
},
mode: ['mobile'],
mobileDemo: 'events-open-close'
},
{
name: 'confirm',
type: 'Function()',
defaultValue: '',
desc: {
'zh-CN': '<p>Dialog 确定按钮的的回调</p>',
'en-US': 'Click'
},
mode: ['mobile'],
mobileDemo: 'cancel-confirm'
},
{
name: 'open',
type: 'Function()',
defaultValue: '',
desc: {
'zh-CN': '<p>Dialog 打开的回调</p>',
'en-US': 'Click'
},
mode: ['mobile'],
mobileDemo: 'events-open-close'
}
],
methods: [],
slots: [
{
name: 'default',
defaultValue: '',
desc: {
'zh-CN': '<p>Dialog 的内容</p>',
'en-US': 'Click'
},
mode: ['mobile'],
mobileDemo: 'slot-title'
},
{
name: 'footer',
defaultValue: '',
desc: {
'zh-CN': '<p>Dialog 按钮操作区的内容</p>',
'en-US': 'Click'
},
mode: ['mobile'],
mobileDemo: 'slot-footer'
},
{
name: 'title',
defaultValue: '',
desc: {
'zh-CN': '<p>Dialog 标题区的内容</p>',
'en-US': 'Click'
},
mode: ['mobile'],
mobileDemo: 'slot-title'
}
]
}
]
}

View File

@ -11,7 +11,7 @@ export default {
defaultValue: '',
desc: {
'zh-CN': '弹窗关闭前的回调,返回 false 会阻止弹窗关闭',
'en-US': 'hook before close the drawer, and block close when return false'
'en-US': 'Hook before close the drawer, and block close when return false'
},
mode: ['pc'],
pcDemo: 'before-close'
@ -22,7 +22,7 @@ export default {
defaultValue: '',
desc: {
'zh-CN': '自定义 class 样式',
'en-US': ''
'en-US': 'Custom class style'
},
mode: ['mobile-first'],
mfDemo: ''
@ -32,8 +32,8 @@ export default {
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '控制抽屉开启或关闭宽度拖拽功能',
'en-US': ''
'zh-CN': '是否开启抽屉的宽度拖拽功能',
'en-US': 'Whether to enable the drawer width drag function'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'dragable',
@ -45,7 +45,8 @@ export default {
defaultValue: '',
desc: {
'zh-CN': '是否开启 flex 盒子布局,开启后内容区域元素自适应撑开高度,默认值为 false',
'en-US': ''
'en-US':
'Whether to enable the flex box layout. The content area element adaptively expands its height when enabled. The default value is false'
},
mode: ['mobile-first'],
mfDemo: ''
@ -56,7 +57,7 @@ export default {
defaultValue: '',
desc: {
'zh-CN': '弹出面板是否锁定浏览器滚动条,默认值为 true',
'en-US': ''
'en-US': 'Whether the pop-up panel locks the browser scroll bar. The default value is true'
},
mode: ['mobile-first'],
mfDemo: ''
@ -66,8 +67,8 @@ export default {
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '控制遮罩层显示隐藏 ',
'en-US': ''
'zh-CN': '是否显示遮罩层',
'en-US': 'Whether the mask layer is displayed'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'mask',
@ -78,8 +79,9 @@ export default {
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '默认弹窗打开后,可以单击遮罩层关闭弹窗,设置 mask-closable 为 false 后将禁用该功能',
'en-US': ''
'zh-CN': '默认情况下,弹窗打开后,可以单击遮罩层关闭弹窗,设置 mask-closable 为 false 后将禁用该功能',
'en-US':
'By default, when the popup is open, you can close the popup by clicking the mask layer. Setting mask-closable to false disables this feature'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'mask-closable',
@ -90,8 +92,8 @@ export default {
type: "'left' | 'right' | 'top' | 'bottom' ",
defaultValue: "'right'",
desc: {
'zh-CN': '添加 placement 属性设置抽屉的方向',
'en-US': ''
'zh-CN': '设置抽屉的方向',
'en-US': 'Set the drawer orientation'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'placement',
@ -102,8 +104,8 @@ export default {
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '控制关闭图标显示',
'en-US': ''
'zh-CN': '是否显示关闭图标',
'en-US': 'Whether to display the close icon'
},
mode: ['pc'],
pcDemo: 'show-close'
@ -113,11 +115,11 @@ export default {
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '控制底部显示',
'zh-CN': '是否显示底部',
'en-US': ''
},
mode: ['pc', 'mobile-first'],
pcDemo: 'show-footer',
pcDemo: 'Show bottom or not',
mfDemo: ''
},
{
@ -125,8 +127,8 @@ export default {
type: 'boolean',
defaultValue: 'true',
desc: {
'zh-CN': '控制头部显示',
'en-US': ''
'zh-CN': '是否显示头部',
'en-US': 'Show headers or not'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'show-header',
@ -138,7 +140,7 @@ export default {
defaultValue: '',
desc: {
'zh-CN': '面板标题',
'en-US': ''
'en-US': 'Panel title'
},
mode: ['mobile-first'],
mfDemo: ''
@ -148,8 +150,8 @@ export default {
type: 'boolean',
defaultValue: '',
desc: {
'zh-CN': '控制抽屉显示与关闭',
'en-US': ''
'zh-CN': '控制抽屉显示与关闭',
'en-US': 'Control drawer display and close'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'basic-usage',
@ -161,7 +163,7 @@ export default {
defaultValue: "'500px'",
desc: {
'zh-CN': '设置抽屉的宽度',
'en-US': ''
'en-US': 'Set the width of the drawer'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'width',
@ -173,20 +175,32 @@ export default {
defaultValue: '2000',
desc: {
'zh-CN': '自定义堆叠顺序(对于某些特殊场景,比如被遮挡时可能会用到)',
'en-US': ''
'en-US': 'Custom stacking order (may be used in special scenarios, such as when occluded)'
},
mode: ['pc'],
pcDemo: 'z-index'
}
],
events: [
{
name: 'open',
type: '() => void',
defaultValue: '',
desc: {
'zh-CN': '打开抽屉事件',
'en-US': ''
},
mode: ['pc', 'mobile-first'],
pcDemo: 'open-event',
mfDemo: ''
},
{
name: 'close',
type: '()=> void',
type: '() => void',
defaultValue: '',
desc: {
'zh-CN': '关闭抽屉事件',
'en-US': ''
'en-US': 'Close drawer event'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'close-event',
@ -194,11 +208,11 @@ export default {
},
{
name: 'confirm',
type: '()=> void',
type: '() => void',
defaultValue: '',
desc: {
'zh-CN': '确认事件,设置 :show-footer="true" 时有效',
'en-US': ''
'en-US': 'Confirm event. This event is emit only when show-footer="true" is set'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'confirm-event',
@ -209,8 +223,8 @@ export default {
type: '',
defaultValue: '',
desc: {
'zh-CN': '面板显隐时触发',
'en-US': ''
'zh-CN': '抽屉显隐时触发',
'en-US': 'Triggered when the drawer is displayed and hidden'
},
mode: ['mobile-first'],
mfDemo: ''
@ -222,8 +236,8 @@ export default {
type: '',
defaultValue: '',
desc: {
'zh-CN': '关闭面板',
'en-US': ''
'zh-CN': '关闭抽屉',
'en-US': 'Close Drawer'
},
mode: ['mobile-first'],
mfDemo: ''
@ -233,8 +247,8 @@ export default {
type: '',
defaultValue: '',
desc: {
'zh-CN': '确认并关闭面板',
'en-US': ''
'zh-CN': '确认并关闭抽屉',
'en-US': 'Confirm and close the drawer'
},
mode: ['mobile-first'],
mfDemo: ''
@ -243,11 +257,9 @@ export default {
slots: [
{
name: 'default',
type: '--',
defaultValue: '',
desc: {
'zh-CN': '默认插槽',
'en-US': ''
'en-US': 'Default slot'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'default-slot',
@ -255,11 +267,9 @@ export default {
},
{
name: 'footer',
type: '--',
defaultValue: '',
desc: {
'zh-CN': '底部插槽',
'en-US': ''
'en-US': 'Footer slot'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'footer-slot',
@ -267,11 +277,9 @@ export default {
},
{
name: 'header',
type: '--',
defaultValue: '',
desc: {
'zh-CN': '头部插槽',
'en-US': ''
'en-US': 'header Slot'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'header-slot',
@ -279,11 +287,9 @@ export default {
},
{
name: 'header-right',
type: '--',
defaultValue: '',
desc: {
'zh-CN': '头部右侧插槽',
'en-US': ''
'en-US': 'header-right slot'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'header-right-slot',

View File

@ -327,6 +327,18 @@ export default {
mode: ['mobile-first'],
mfDemo: ''
},
{
name: 'image-bg-color',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '配置 `list-type` 等于 `picture-single` 或 `picture-card` 模式下图片的背景色。',
'en-US':
'Configure the background color of the image when `list-type` is set to `picture-single` or `picture-card`.'
},
mode: ['mobile-first'],
mfDemo: ''
},
{
name: 'is-folder-title',
type: 'Boolean',
@ -1067,7 +1079,7 @@ interface IHeaders {
name: 'IListType',
type: 'type',
code: `
type IListType = 'text' | 'picture' | 'picture-card' | 'thumb' | 'saas'
type IListType = 'text' | 'picture' | 'picture-card' | 'thumb' | 'saas' // saas为3.14.0版本新增
`
},
{

View File

@ -602,6 +602,16 @@ export default {
},
mode: ['pc'],
pcDemo: 'error-label'
},
{
name: 'prompt',
defaultValue: '',
desc: {
'zh-CN': '强提示插槽',
'en-US': 'Prompt slot'
},
mode: ['mobile-first'],
mfDemo: 'prompt-slot'
}
]
}

View File

@ -1,49 +0,0 @@
export default {
mode: ['pc'],
apis: [
{
name: 'chart',
type: 'component',
props: [
{
name: 'options',
type: 'object',
defaultValue: '--',
desc: {
'zh-CN': '图表参数',
'en-US': 'Whether to disable container detection during resize'
},
mode: ['pc'],
pcDemo: 'chart/question#question-base'
}
],
events: [],
methods: [],
slots: []
}
],
types: [
{
name: 'options',
type: 'interface',
code: `
interface options {
theme: string // 主题
color: array | string // 颜色
padding: array // 图表内边距值
tipHtml: function // 悬浮提示框内容配置
event: object // 图表事件
data: array // 图表数据
name: string // 图表名称(必填)
unit: string // 进度图右侧文本单位
barWidth: number // 进度图柱形宽度
minWidth: string // 进度图单项数据的最小宽度
calibrationValue: number // 进度图标定值
label: object // 堆叠进度图图表图元文本样式
state: object // 根据状态设置颜色
title: object // 进度图图表标题样式
text: object // 进度图图表右侧文本样式
}`
}
]
}

View File

@ -443,8 +443,9 @@ export default {
type: 'number | string',
defaultValue: '',
desc: {
'zh-CN': '窗口的宽度',
'en-US': 'window width'
'zh-CN': '窗口的宽度(设置宽度像素或者百分比,浏览器窗口大小改变可居中显示)',
'en-US':
'The width of the window(Set the width in pixels or percentages, and the browser window size can be changed to display in the center)'
},
mode: ['pc', 'mobile', 'mobile-first'],
pcDemo: 'resize',

View File

@ -374,6 +374,8 @@ interface IPopperOption {
bubbling: boolean // 是否监听元素所有上级有滚动元素的scroll事件监听到则更新popper的位置。用于解决某些弹出层位置在页面滚动时位置不正确的场景默认false
followReferenceHide: boolean // 当触发源隐藏时自动隐藏弹出层默认true
removeOnDestroy: boolean // 弹出层消失后是否移除弹出层的DOM元素布尔false
updateHiddenPopperOnScroll: boolean // 滚动过程中是否更新隐藏的弹出层位置
boundariesElement: 'viewport' | 'body' | HTMLElement // 滚动过程中,弹出层的碰撞边界。 默认值为: 'viewport'
}
`
},

View File

@ -5,6 +5,19 @@ export default {
name: 'select',
type: 'component',
props: [
{
name: 'all-text',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '当下拉中显示全部时,自定义全部的显示文本。不指定时,则默认显示"全部"',
'en-US':
'When all is displayed in the drop-down list, you can customize the display text of all. If this parameter is not specified, All is displayed by default.'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'all-text',
mfDemo: 'all-text'
},
{
name: 'allow-copy',
type: 'boolean',
@ -598,13 +611,26 @@ export default {
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否展示多选框选中条数和总条数的占比',
'zh-CN': '是否展示多选框选中条数和总条数的占比的文字提示',
'en-US':
'Display the proportion of the number of selected items and the total number of items in the multiple-choice box'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'collapse-tags',
mfDemo: 'collapse-tags'
},
{
name: 'show-limit-text',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN':
'是否展示多选框开启多选限制选择数量时,选中条数和限制总条数的占比的文字提示。 该属性的优先级大于<code>show-proportion</code> 属性,同时设置只',
'en-US':
'Display the proportion of the number of selected items and the total number of items in the multiple-choice box'
},
mode: ['pc'],
pcDemo: 'multiple'
}
],
events: [

View File

@ -15,7 +15,7 @@ export default {
'Customized interface. A Promise object is returned. This parameter is mandatory when the framework service is not used.'
},
mode: ['pc'],
pcDemo: 'fine-grained-mode'
pcDemo: 'animation'
},
{
name: 'avatar',
@ -39,7 +39,7 @@ export default {
'Customized interface. A Promise object is returned. This parameter is mandatory when the framework service is not used.'
},
mode: ['pc'],
pcDemo: 'custom-layout'
pcDemo: 'loading-completed'
},
{
name: 'rows',
@ -77,7 +77,7 @@ export default {
'en-US': 'Content displayed after the loading is complete'
},
mode: ['pc'],
pcDemo: 'custom-layout'
pcDemo: 'loading-completed'
},
{
name: 'placeholder',
@ -106,7 +106,7 @@ export default {
'Customized interface. A Promise object is returned. This parameter is mandatory when the framework service is not used.'
},
mode: ['pc'],
pcDemo: 'fine-grained-mode'
pcDemo: 'size'
},
{
name: 'variant',

View File

@ -31,7 +31,8 @@ export default {
},
{
name: 'title',
type: 'string | array',
type: 'string | ITitleType',
typeAnchorName: 'ITitleType',
defaultValue: '',
desc: {
'zh-CN': '设置数字内容标题',
@ -41,18 +42,6 @@ export default {
pcDemo: 'basic-usage',
mfDemo: ''
},
{
name: 'group-separator',
type: 'string',
defaultValue: ',',
desc: {
'zh-CN': '设置千分位标志符',
'en-US': 'Set Millennial Flag'
},
mode: ['pc'],
pcDemo: 'basic-usage',
mfDemo: ''
},
{
name: 'prefix',
type: 'string',
@ -77,28 +66,16 @@ export default {
pcDemo: 'basic-usage',
mfDemo: ''
},
{
name: 'formatter',
type: '(value) => {}',
defaultValue: '',
desc: {
'zh-CN': '设置自定义数字格式化',
'en-US': 'Set custom number formatting'
},
mode: ['pc'],
pcDemo: 'basic-usage',
mfDemo: ''
},
{
name: 'value-style',
type: 'string | object | array',
type: 'object | array',
defaultValue: '',
desc: {
'zh-CN': '设置数字样式',
'en-US': 'Set Number Style'
},
mode: ['pc'],
pcDemo: 'basic-usage',
pcDemo: 'prefix-suffix-slot',
mfDemo: ''
}
],
@ -114,6 +91,7 @@ export default {
'en-US': 'Digital content front slot'
},
mode: ['pc'],
pcDemo: 'prefix-suffix-slot',
mfDemo: ''
},
{
@ -125,6 +103,7 @@ export default {
'en-US': 'Digital content rear slot'
},
mode: ['pc'],
pcDemo: 'prefix-suffix-slot',
mfDemo: ''
},
{
@ -136,9 +115,22 @@ export default {
'en-US': 'Digital content title slot'
},
mode: ['pc'],
pcDemo: 'statistic-slot',
mfDemo: ''
}
]
}
],
types: [
{
name: 'ITitleType',
type: '',
code: `
interface ITitleType {
value?: string // 标题文本
position?: string // 标题位置取值top | bottom
}
`
}
]
}

View File

@ -7,7 +7,7 @@ export default {
props: [
{
name: 'active-color',
type: 'String',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '当前页签的字体颜色',
@ -237,7 +237,7 @@ export default {
},
{
name: 'v-model',
type: 'String',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '绑定值,选中选项卡的 name',
@ -248,7 +248,7 @@ export default {
},
{
name: 'v-model / modelValue',
type: 'String',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': '选中选项卡的 name',
@ -284,8 +284,8 @@ export default {
mfDemo: ''
},
{
name: 'beforeClose',
type: 'Function',
name: 'before-close',
type: '(name: string)=> boolean | Promise<boolean>',
defaultValue: '',
desc: {
'zh-CN': '关闭页签前的回调函数入参为页签名。如果函数返回false 或 拒绝的Promise则不关闭页签',
@ -296,22 +296,57 @@ export default {
pcDemo: 'tabs-events-close',
mfDemo: ''
},
{
name: 'more-show-all',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': `'更多'按钮触发的下拉面板是否展示全部页签项,适用于超大数据量的情况`,
'en-US':
'Indicates whether to display all tab items in the drop-down panel triggered by the More button. This parameter applies to the scenario where the data volume is large.'
},
mode: ['pc'],
pcDemo: 'more-show-all'
},
{
name: 'overflow-title',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '页签是否在超过 title-width 省略显示',
'zh-CN': '页签是否在超过 title-width 省略显示,优先级低于 tooltip-config',
'en-US':
'Callback function before closing a tab. The input parameter is the tab name. If the function returns false or a rejected Promise, the tab is not closed.'
'Indicates whether to display the tab when the title width is exceeded. The priority is lower than tooltip-config.'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'overflow-title',
mfDemo: ''
},
{
name: 'panel-max-height',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': `'更多'按钮触发的下拉面板最大高度,超出则显示滚动条,适用于超大数据量的情况`,
'en-US':
'Maximum height of the drop-down panel triggered by the More button. If the height is exceeded, a scroll bar is displayed. This applies to the scenario where the data volume is large'
},
mode: ['pc'],
pcDemo: 'more-show-all'
},
{
name: 'panel-width',
type: 'string',
defaultValue: '',
desc: {
'zh-CN': `'更多'按钮触发的下拉面板的宽度`,
'en-US': 'Width of the drop-down panel triggered by the More button'
},
mode: ['pc'],
pcDemo: 'more-show-all'
},
{
name: 'title-width',
type: 'String',
type: 'string',
defaultValue: '256px',
desc: {
'zh-CN': '当 overflow-title 为 true 时,指定页签标题的最大宽度',

View File

@ -319,6 +319,8 @@ interface IPopperOption {
bubbling: boolean // 是否监听元素所有上级有滚动元素的scroll事件监听到则更新popper的位置。用于解决某些弹出层位置在页面滚动时位置不正确的场景默认false
followReferenceHide: boolean // 当触发源隐藏时自动隐藏弹出层默认true
removeOnDestroy: boolean // 弹出层消失后是否移除弹出层的DOM元素布尔false
updateHiddenPopperOnScroll: boolean // 滚动过程中是否更新隐藏的弹出层位置
boundariesElement: 'viewport' | 'body' | HTMLElement // 滚动过程中,弹出层的碰撞边界。 默认值为: 'viewport'
}
`
},

View File

@ -1,6 +1,12 @@
<template>
<div>
<tiny-file-upload :action="action" list-type="picture-single" :file-list="fileList1" @preview="handlePreview">
<tiny-file-upload
:action="action"
list-type="picture-single"
:file-list="fileList1"
@preview="handlePreview"
image-bg-color="red"
>
</tiny-file-upload>
<br />
<br />
@ -10,12 +16,11 @@
</template>
<script>
import { FileUpload, Button } from '@opentiny/vue'
import { FileUpload } from '@opentiny/vue'
export default {
components: {
TinyFileUpload: FileUpload,
TinyButton: Button
TinyFileUpload: FileUpload
},
data() {
return {
@ -23,7 +28,7 @@ export default {
fileList1: [
{
name: 'Snipaste_2022-12-02_18-05-51.png',
url: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/ld.png`
url: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/hae-logo.png`
}
],
fileList2: [
@ -46,8 +51,8 @@ export default {
}
},
methods: {
handlePreview() {
console.log(...arguments)
handlePreview(...args) {
console.log(...args)
}
}
}

View File

@ -0,0 +1,90 @@
<template>
<tiny-file-upload
ref="upload"
:action="action"
:file-list="fileList"
list-type="saas"
@download-file="handleDownloadFile"
></tiny-file-upload>
</template>
<script>
import { FileUpload, Modal } from '@opentiny/vue'
export default {
components: {
TinyFileUpload: FileUpload
},
data() {
return {
action: 'http://localhost:3000/api/upload',
fileList: [
{
docId: 'M1T2A1N548572512085860351',
path: 'edm/one/',
docVersion: 'V1',
name: 'test1.png',
docSize: 100 * 1024,
size: 100 * 1024,
serverName: 'ShenZhen'
},
{
docId: 'M1T2A1N548572512085860352',
path: 'edm/one/',
docVersion: 'V1',
name: 'test1.png',
docSize: 100 * 1024,
size: 100 * 1024,
serverName: 'ShenZhen'
}
]
}
},
methods: {
handleDownloadFile(file) {
//
if (file.docId === 'M1T2A1N548572512085860351') {
file.showDownloadBar = true
// downloadPercentagevue2
this.$set(file, 'downloadPercentage', 0)
// downloadPercentagevue3
// file.downloadPercentage = 0
const timer = setInterval(() => {
if (file.downloadPercentage >= 100) {
clearInterval(timer)
// 1s
setTimeout(() => {
file.showDownloadBar = false
}, 1000)
Modal.message({ message: '下载成功', status: 'success' })
return
}
file.downloadPercentage += 10
}, 300)
} else {
//
file.showDownloadBar = true
// downloadPercentagevue2
this.$set(file, 'downloadPercentage', 0)
// downloadPercentagevue3
// file.downloadPercentage = 0
const timer = setInterval(() => {
if (file.downloadPercentage >= 50) {
clearInterval(timer)
// file.showDownloadBar = false
file.downloadStatus = 'exception'
Modal.message({ message: '下载失败', status: 'error' })
return
}
file.downloadPercentage += 10
}, 300)
}
}
}
}
</script>

View File

@ -96,7 +96,7 @@ export default {
},
desc: {
'zh-CN':
'<p>文件上传模式,配置 `download-all` 事件,会显示下载全部按钮,点击下载全部按钮会触发 `download-all` 事件<p>',
'<p>文件上传模式,配置 `download-all` 事件,会显示下载全部按钮,点击下载全部按钮会触发 `download-all` 事件<p>',
'en-US': '<p>button click</p>'
},
codeFiles: ['download-all.vue']
@ -109,11 +109,25 @@ export default {
},
desc: {
'zh-CN':
'<p>文件上传模式,配置 `download-file` 事件,已上传的文件会显示下载按钮,点击下载按钮会触发 `download-file` 事件<p>',
'<p>文件上传模式,配置 `download-file` 事件,已上传的文件会显示下载按钮,点击下载按钮会触发 `download-file` 事件<p>',
'en-US': '<p>button click</p>'
},
codeFiles: ['download.vue']
},
{
demoId: 'show-download-bar',
name: {
'zh-CN': '下载进度条',
'en-US': 'Download progress bar'
},
desc: {
'zh-CN':
'<p>通过给 file 对象设置 `showDownloadBar:true` 可以显示下载进度条,`downloadPercentage` 属性传入下载进度,`downloadStatus` 设置下载状态。<p>',
'en-US':
'<p>You can set the `showDownloadBar:true` attribute of the file object to display the download progress bar, set the`downloadPercentage` attribute to transfer the download progress, and set the`downloadStatus` to set the download status.</p>'
},
codeFiles: ['show-download-bar.vue']
},
{
demoId: 'download-picture',
name: {
@ -122,7 +136,7 @@ export default {
},
desc: {
'zh-CN':
'<p>图片上传模式,配置 `download-file` 事件,已上传的文件会显示下载图标,点击下载按钮会触发 `download-file` 事件<p>',
'<p>图片上传模式,配置 `download-file` 事件,已上传的文件会显示下载图标,点击下载按钮会触发 `download-file` 事件<p>',
'en-US': '<p>button click</p>'
},
codeFiles: ['download-picture.vue']
@ -135,7 +149,7 @@ export default {
},
desc: {
'zh-CN':
'<p>文件上传模式,配置 `re-upload` 事件,上传失败的文件会显示重新上传按钮,点击重新上传按钮会触发 `re-upload` 事件<p>',
'<p>文件上传模式,配置 `re-upload` 事件,上传失败的文件会显示重新上传按钮,点击重新上传按钮会触发 `re-upload` 事件<p>',
'en-US': '<p>button click</p>'
},
codeFiles: ['re-upload.vue']
@ -148,7 +162,7 @@ export default {
},
desc: {
'zh-CN':
'<p>图片上传模式,配置 `re-upload` 事件,上传失败的文件会显示重新上传图标,点击重新上传按钮会触发 `re-upload` 事件<p>',
'<p>图片上传模式,配置 `re-upload` 事件,上传失败的文件会显示重新上传图标,点击重新上传按钮会触发 `re-upload` 事件<p>',
'en-US': '<p>button click</p>'
},
codeFiles: ['re-upload-picture.vue']
@ -308,7 +322,7 @@ export default {
'en-US': 'events'
},
desc: {
'zh-CN': '<p>可配置 `file-list` 属性展示对应的文件<p>',
'zh-CN': '<p>可配置 `file-list` 属性展示对应的文件<p>',
'en-US': '<p>button click</p>'
},
codeFiles: ['drag-file-list.vue']
@ -321,7 +335,7 @@ export default {
},
desc: {
'zh-CN':
'<p>`trigger-click` 点击文件上传时触发的事件<br>`preview` 点击预览时触发的事件<br> `download-file` 点击下载时触发的事件<br>`download-all` 点击全部下载时触发的事件<br>`re-upload` 点击重新上传时触发的事件<br>`click-file-list` 点击上传的文件列表时触发的事件<p>',
'<p>`trigger-click` 点击文件上传时触发的事件<br>`preview` 点击预览时触发的事件<br> `download-file` 点击下载时触发的事件<br>`download-all` 点击全部下载时触发的事件<br>`re-upload` 点击重新上传时触发的事件<br>`click-file-list` 点击上传的文件列表时触发的事件<p>',
'en-US': '<p>button click</p>'
},
codeFiles: ['event-trigger-click.vue']

View File

@ -0,0 +1,55 @@
<template>
<div class="w-96">
<tiny-form ref="ruleForm" :model="createData" :rules="rules" label-width="96px" show-message>
<tiny-form-item label="必填项" prop="users" required>
<template #prompt>
<div class="relative sm:absolute text-xs leading-normal text-color-alert" title="强提示插槽">强提示插槽</div>
</template>
<tiny-input v-model="createData.users"></tiny-input>
</tiny-form-item>
<tiny-form-item label="URL" prop="url">
<tiny-input v-model="createData.url"></tiny-input>
</tiny-form-item>
<tiny-form-item>
<tiny-button type="primary" @click="handleSubmit('ruleForm')" class="ml-24"> 提交 </tiny-button>
</tiny-form-item>
</tiny-form>
</div>
</template>
<script>
import { Form, FormItem, Input, Button, Modal } from '@opentiny/vue'
export default {
components: {
TinyForm: Form,
TinyFormItem: FormItem,
TinyInput: Input,
TinyButton: Button
},
data() {
return {
createData: {
users: '',
url: ''
},
rules: {
users: [
{ required: true, message: '必填', trigger: 'blur' },
{ min: 2, max: 11, message: '长度必须不小于2', trigger: 'change' }
],
url: { type: 'url' }
}
}
},
methods: {
handleSubmit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
Modal.alert('提交成功')
}
})
}
}
}
</script>

View File

@ -215,6 +215,18 @@ export default {
'<p>Set the `validate-debounce` attribute of FormItem to `true` to enable the verification anti-jitter function. In the case of continuous input, the verification starts when the last input ends. The default value is `false`.</p>'
},
codeFiles: ['validate-debounce.vue']
},
{
demoId: 'prompt-slot',
name: {
'zh-CN': '强提示插槽',
'en-US': 'Prompt slot'
},
desc: {
'zh-CN': '<p>通过 `prompt` 插槽,自定义强提示插槽的内容。</p>',
'en-US': '<p>Customize the content of the strong prompt slot in the `prompt` slot. </p>'
},
codeFiles: ['prompt-slot.vue']
}
]
}

View File

@ -59,7 +59,7 @@ export default {
}
</script>
<style>
<style scoped>
/* 文本超出两行显示...IE下不支持 */
.multi-line {
display: -webkit-box;

View File

@ -1,5 +1,5 @@
<template>
<tiny-tabs v-model="activeName" tab-style="card" :with-close="true" @close="close">
<tiny-tabs v-model="activeName" tab-style="card" :with-close="true" :before-close="beforeClose" @close="close">
<tiny-tab-item :key="item.name" v-for="item in Tabs" :title="item.title" :name="item.name">
{{ item.content }}
</tiny-tab-item>
@ -47,6 +47,10 @@ export default {
}
},
methods: {
beforeClose(name) {
//
return name === 'fifth'
},
close(name) {
this.$message({
title: 'close 事件',

View File

@ -0,0 +1,35 @@
import { test, expect } from '@playwright/test'
test('基本用法', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('button#base')
const buttons = page.locator('.button-wrap .tiny-mobile-button')
// 主要按钮
await expect(buttons.first()).toHaveClass(/tiny-mobile-button--primary/)
await expect(buttons.first()).toHaveCSS('background-color', 'rgb(25, 25, 25)')
await expect(buttons.first()).toHaveCSS('color', 'rgb(255, 255, 255)')
// 次要按钮
await expect(buttons.nth(1)).toHaveClass(/tiny-mobile-button--secondary/)
await expect(buttons.nth(1)).toHaveCSS('background-color', 'rgb(255, 255, 255)')
await expect(buttons.nth(1)).toHaveCSS('color', 'rgb(25, 25, 25)')
// 危险按钮
await expect(buttons.nth(2)).toHaveClass(/tiny-mobile-button--danger/)
await expect(buttons.nth(2)).toHaveCSS('border-color', 'rgb(242, 48, 48)')
await expect(buttons.nth(2)).toHaveCSS('color', 'rgb(242, 48, 48)')
// 文字按钮
await expect(buttons.nth(3)).toHaveClass(/tiny-mobile-button--text/)
await expect(buttons.nth(3)).toHaveCSS('border-style', 'none')
// 纯图标按钮
await expect(buttons.nth(4)).toHaveClass(/tiny-mobile-button--icon/)
await expect(buttons.nth(4).locator('span')).toBeEmpty()
// 图标按钮
await expect(buttons.nth(5)).toHaveClass(/tiny-mobile-button--icon/)
await expect(buttons.nth(5)).toContainText('图标按钮')
})

View File

@ -0,0 +1,13 @@
import { test, expect } from '@playwright/test'
test('禁用', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('button#disabled')
const button = page.locator('#disabled .tiny-mobile-button').first()
await expect(button).toHaveClass(/is-disabled/)
await expect(button).toHaveCSS('background-color', 'rgb(240, 240, 240)')
await expect(button).toHaveCSS('color', 'rgb(194, 194, 194)')
await expect(button).toHaveCSS('cursor', 'not-allowed')
})

View File

@ -0,0 +1,13 @@
import { test, expect } from '@playwright/test'
test('事件', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('button#event')
const button = page.locator('#event .tiny-mobile-button')
await button.click()
await expect(button).toHaveClass(/is-loading/)
await page.waitForTimeout(2000)
await expect(button).not.toHaveClass(/is-loading/)
})

View File

@ -0,0 +1,15 @@
import { test, expect } from '@playwright/test'
test('自定义图标', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('button#icon')
const buttons = page.locator('#icon .tiny-mobile-button')
await expect(buttons.first()).toHaveClass(/tiny-mobile-button--icon/)
await expect(buttons.first().locator('.is-icon')).toBeVisible()
await expect(buttons.nth(1)).toHaveClass(/tiny-mobile-button--icon/)
await expect(buttons.nth(1).locator('.is-icon')).toBeVisible()
await expect(buttons.nth(1).locator('span')).toBeVisible()
})

View File

@ -0,0 +1,11 @@
import { test, expect } from '@playwright/test'
test('加载中状态', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('button#loading')
const buttons = page.locator('.button-wrap .tiny-mobile-button')
await expect(buttons.first()).toHaveClass(/is-loading/)
await expect(buttons.first().locator('.tiny-mobile-button-loading-white')).toBeVisible()
})

View File

@ -0,0 +1,13 @@
import { test, expect } from '@playwright/test'
test('重置时间', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('button#reset-time')
const button = page.locator('.button-wrap .tiny-mobile-button')
await button.click()
await expect(button).toHaveClass(/is-disabled/)
await page.waitForTimeout(500)
await expect(button).not.toHaveClass(/is-disabled/)
})

View File

@ -0,0 +1,25 @@
import { test, expect } from '@playwright/test'
test('尺寸', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('button#size')
const buttons = page.locator('.button-wrap .tiny-mobile-button')
// 主要按钮
const smallPrimaryBtn = buttons.first()
const size = await smallPrimaryBtn.boundingBox()
await expect(smallPrimaryBtn).toHaveClass(/tiny-mobile-button--small/)
expect(size?.height).toBeCloseTo(28, 1)
expect(smallPrimaryBtn).toHaveCSS('font-size', '12px')
// 文字按钮
const smallTextBtn = buttons.nth(3)
await expect(smallTextBtn).toHaveClass(/tiny-mobile-button--small/)
expect(smallTextBtn).toHaveCSS('font-size', '12px')
// 图标按钮
const smallIconBtn = buttons.nth(4)
const iconSize = await smallIconBtn.locator('.tiny-icon').boundingBox()
expect(iconSize?.width).toBeCloseTo(16, 1)
})

View File

@ -19,7 +19,7 @@ test.describe('文本域可缩放', () => {
const textarea = page.locator('.demo-input .tiny-mobile-textarea textarea')
await expect(textarea.nth(4)).toHaveClass(/is-autosize/)
await expect(textarea.nth(5)).toHaveClass(/is-autosize/)
await expect(textarea.nth(6)).toHaveClass(/is-autosize/)
})
})

View File

@ -0,0 +1,9 @@
import { test, expect } from '@playwright/test'
test('自定义遮罩背景色', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('loading#background')
const loading = page.locator('#background .tiny-mobile-loading')
await expect(loading).toHaveCSS('background-color', 'rgba(25, 25, 25, 0.376)')
})

View File

@ -0,0 +1,19 @@
import { test, expect } from '@playwright/test'
test('基本用法', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('loading#base')
const loading = page.locator('#base .tiny-mobile-loading')
const loadingIcon = loading.locator('.tiny-mobile-loading__icon')
await expect(loading).toBeVisible()
await expect(loading).toHaveCSS('background-color', 'rgba(0, 0, 0, 0.294)')
await expect(loadingIcon).toBeVisible()
await expect(loadingIcon).toHaveCSS('width', '24px')
await expect(loadingIcon).toHaveCSS('height', '24px')
// 可关闭
await page.getByRole('button', { name: '关闭 Loading' }).click()
await expect(loading).not.toBeVisible()
})

View File

@ -0,0 +1,13 @@
import { test, expect } from '@playwright/test'
test('自定义样式', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('loading#custom-class')
const loading = page.locator('#custom-class .tiny-mobile-loading')
const loadingText = loading.locator('.tiny-mobile-loading__text')
await expect(loading).toHaveCSS('background-color', 'rgba(0, 0, 0, 0.5)')
await expect(loadingText).toBeVisible()
await expect(loadingText).toHaveCSS('color', 'rgb(255, 255, 255)')
})

View File

@ -0,0 +1,28 @@
import { test, expect } from '@playwright/test'
test.describe('全局加载', () => {
test('指令方式加载', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('loading#global-registry')
const loading = page.locator('.tiny-mobile-loading')
await page.getByRole('button', { name: '指令方式加载全屏Loading' }).click()
await expect(loading).toBeVisible()
await expect(loading).toHaveClass(/is-fullscreen/)
await page.waitForTimeout(3000)
await expect(loading).not.toBeVisible()
})
test('静态方法加载', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('loading#global-registry')
const loading = page.locator('.tiny-mobile-loading')
await page.getByRole('button', { name: '静态方法加载全屏Loading' }).click()
await expect(loading).toBeVisible()
await page.waitForTimeout(3000)
await expect(loading).not.toBeVisible()
})
})

View File

@ -0,0 +1,36 @@
import { test, expect } from '@playwright/test'
test('尺寸', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('loading#size')
const loadings = page.locator('#size .tiny-mobile-loading')
// mini
const miniLoading = loadings.first()
await expect(miniLoading.locator('.tiny-mobile-loading__body')).toHaveClass(/tiny-mobile-loading-mini/)
await expect(miniLoading.locator('.tiny-mobile-loading__body')).toHaveCSS('flex-direction', 'row')
await expect(miniLoading.locator('.tiny-mobile-loading__icon')).toHaveCSS('width', '14px')
await expect(miniLoading.locator('.tiny-mobile-loading__icon')).toHaveCSS('height', '14px')
// small
const smallLoading = loadings.nth(1)
await expect(smallLoading.locator('.tiny-mobile-loading__body')).toHaveClass(/tiny-mobile-loading-small/)
await expect(smallLoading.locator('.tiny-mobile-loading__body')).toHaveCSS('flex-direction', 'column')
await expect(smallLoading.locator('.tiny-mobile-loading__icon')).toHaveCSS('width', '24px')
await expect(smallLoading.locator('.tiny-mobile-loading__icon')).toHaveCSS('height', '24px')
// medium
const mediumLoading = loadings.nth(2)
await expect(mediumLoading.locator('.tiny-mobile-loading__body')).toHaveClass(/.tiny-mobile-loading-medium/)
await expect(mediumLoading.locator('.tiny-mobile-loading__body')).toHaveCSS('flex-direction', 'column')
await expect(mediumLoading.locator('.tiny-mobile-loading__icon')).toHaveCSS('width', '40px')
await expect(mediumLoading.locator('.tiny-mobile-loading__icon')).toHaveCSS('height', '40px')
// large
const largeLoading = loadings.nth(3)
await expect(largeLoading.locator('.tiny-mobile-loading__body')).toHaveClass(/tiny-mobile-loading-large/)
await expect(largeLoading.locator('.tiny-mobile-loading__body')).toHaveCSS('flex-direction', 'column')
await expect(largeLoading.locator('.tiny-mobile-loading__icon')).toHaveCSS('width', '96px')
await expect(largeLoading.locator('.tiny-mobile-loading__icon')).toHaveCSS('height', '96px')
})

View File

@ -0,0 +1,13 @@
import { test, expect } from '@playwright/test'
test('自定义加载图标', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('loading#spinner')
const loading = page.locator('#spinner .tiny-mobile-loading')
const loadingText = loading.locator('.tiny-mobile-loading__text')
const svg = loading.locator('.tiny-mobile-loading__spinner')
await expect(loadingText).toContainText('自定义 loading 图标')
await expect(svg).toBeVisible()
})

View File

@ -10,7 +10,7 @@ export default {
mounted() {
Loading.service({
spinner: iconLoading(),
text: '自定义loading图标',
text: '自定义 loading 图标',
target: document.getElementById('demo-loading'),
background: '#fff',
tiny_mode: 'mobile'

View File

@ -0,0 +1,10 @@
import { test, expect } from '@playwright/test'
test('自定义加载提示文本', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('loading#tip-text')
const loading = page.locator('#tip-text .tiny-mobile-loading')
const loadingText = loading.locator('.tiny-mobile-loading__text')
await expect(loadingText).toContainText('加载中...')
})

View File

@ -78,7 +78,7 @@ export default {
codeFiles: ['size.vue']
},
{
demoId: 'global-registry.',
demoId: 'global-registry',
name: {
'zh-CN': '全局加载',
'en-US': 'Global Registry'

View File

@ -17,7 +17,8 @@ const options = ref([
label: '关机'
},
{
label: '重启'
label: '重启',
divided: true
},
{
label: '网络设置',

View File

@ -22,7 +22,8 @@ export default {
label: '关机'
},
{
label: '重启'
label: '重启',
divided: true
},
{
label: '网络设置',

View File

@ -1,7 +1,7 @@
---
title: ActionMenu 菜单按钮
title: ActionMenu 动作菜单
---
# ActionMenu 菜单按钮
# ActionMenu 动作菜单
提供一组操作按钮的组件,当按钮数量太多,自动将超出部分的按钮放置在一个下拉弹框中。

View File

@ -2,7 +2,7 @@
<div class="wrap">
<div class="demo-top mb10">
<tiny-switch v-model="isAffix"></tiny-switch>
<span>{{ isAffix ? '打开固定模式' : '关闭固定模式' }}</span>
<span>{{ isAffix ? '固定模式' : '非固定模式' }}</span>
</div>
<tiny-anchor :links="links" :is-affix="isAffix"></tiny-anchor>
</div>

View File

@ -2,7 +2,7 @@
<div class="wrap">
<div class="demo-top mb10">
<tiny-switch v-model="isAffix"></tiny-switch>
<span>{{ isAffix ? '打开固定模式' : '关闭固定模式' }}</span>
<span>{{ isAffix ? '固定模式' : '非固定模式' }}</span>
</div>
<tiny-anchor :links="links" :is-affix="isAffix"></tiny-anchor>
</div>

View File

@ -1,7 +1,7 @@
---
title: Autocomplete 自动完成
title: AutoComplete 自动完成
---
# Autocomplete 自动完成
# AutoComplete 自动完成
<div>根据输入内容提供对应的输入建议。</div>

View File

@ -1,7 +1,7 @@
---
title: Autocomplete
title: AutoComplete
---
# Autocomplete
# AutoComplete
<div>Provide input suggestions based on the input content.</div>

View File

@ -0,0 +1,28 @@
<template>
<div>
<tiny-base-select v-model="value" multiple all-text="全部小吃">
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { BaseSelect as TinyBaseSelect, Option as TinyOption } from '@opentiny/vue'
const options = ref([
{ value: '选项1', label: '黄金糕' },
{ value: '选项2', label: '双皮奶' },
{ value: '选项3', label: '蚵仔煎' },
{ value: '选项4', label: '龙须面' },
{ value: '选项6', label: '螺蛳粉' }
])
const value = ref([])
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
</style>

View File

@ -0,0 +1,13 @@
import { expect, test } from '@playwright/test'
test('多选时自定义全部的文本', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('base-select#all-text')
const wrap = page.locator('#all-text')
const select = wrap.locator('.tiny-base-select').nth(0)
const dropdown = page.locator('body > .tiny-select-dropdown')
const option = dropdown.locator('.tiny-option')
await select.locator('.tiny-input__suffix').click()
await expect(option.filter({ hasText: '全部小吃' })).toHaveCount(1)
})

View File

@ -0,0 +1,36 @@
<template>
<div>
<tiny-base-select v-model="value" multiple all-text="全部小吃">
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
</div>
</template>
<script>
import { BaseSelect, Option } from '@opentiny/vue'
export default {
components: {
TinyBaseSelect: BaseSelect,
TinyOption: Option
},
data() {
return {
value: [],
options: [
{ value: '选项1', label: '黄金糕' },
{ value: '选项2', label: '双皮奶' },
{ value: '选项3', label: '蚵仔煎' },
{ value: '选项4', label: '龙须面' },
{ value: '选项6', label: '螺蛳粉' }
]
}
}
}
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
</style>

View File

@ -0,0 +1,102 @@
<template>
<div>
<div>场景1allow-create + filterable点击创建条目</div>
<br />
<tiny-base-select v-model="value" allow-create filterable>
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
<br />
<br />
<div>场景2allow-create + filterable + default-first-optionEnter 键创建条目</div>
<br />
<tiny-base-select v-model="value" allow-create filterable default-first-option>
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
<br />
<br />
<div>场景3下拉框显示新增按钮</div>
<br />
<tiny-base-select
v-model="value"
placeholder="请选择"
@top-create-click="handleAddOption"
automatic-dropdown
top-create
ref="selectDom"
>
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
<tiny-dialog-box :visible="boxVisibility" @update:visible="boxVisibility = $event" title="新建" width="30%">
<div>
<div>
<span>label</span>
<br />
<br />
<tiny-input v-model="optionLabel"></tiny-input>
</div>
<br />
<div>
<span>value</span>
<br />
<br />
<tiny-input v-model="optionValue"></tiny-input>
</div>
</div>
<template #footer>
<tiny-button @click="boxVisibility = false">取消</tiny-button>
<tiny-button type="primary" @click="handleConfirm"> 确定 </tiny-button>
</template>
</tiny-dialog-box>
</div>
</template>
<script setup>
import { ref } from 'vue'
import {
BaseSelect as TinyBaseSelect,
Option as TinyOption,
Input as TinyInput,
Button as TinyButton,
DialogBox as TinyDialogBox,
Modal
} from '@opentiny/vue'
const options = ref([
{ value: '选项1', label: '北京' },
{ value: '选项2', label: '上海' },
{ value: '选项3', label: '天津' },
{ value: '选项4', label: '重庆' },
{ value: '选项5', label: '深圳' }
])
const selectDom = ref(null)
const value = ref('')
const boxVisibility = ref(false)
const optionLabel = ref('')
const optionValue = ref('')
const handleAddOption = () => {
optionValue.value = ''
optionLabel.value = ''
boxVisibility.value = true
}
const handleConfirm = () => {
if (!optionLabel.value || !optionValue.value) {
Modal.message({ message: '选项不能为空!', status: 'warning' })
return
}
boxVisibility.value = false
options.value.unshift({
value: optionValue,
label: optionLabel
})
selectDom.value.focus()
}
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
</style>

View File

@ -0,0 +1,50 @@
import { test, expect } from '@playwright/test'
test('点击选中', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.waitForTimeout(300)
await page.goto('base-select#allow-create')
const wrap = page.locator('#allow-create')
const select = wrap.locator('.tiny-base-select').nth(0)
const dropdown = page.locator('body > .tiny-select-dropdown')
const input = select.locator('.tiny-input__inner')
await input.click()
await input.fill('测试allow-create')
const KeyboardEvent = await page.evaluateHandle(() => new KeyboardEvent('keyup'))
await input.dispatchEvent('keyup', { KeyboardEvent })
await expect(input).toHaveValue('测试allow-create')
await dropdown.getByRole('listitem').filter({ hasText: '测试allow-create' }).click()
await expect(input).toHaveValue('测试allow-create')
await input.click()
await expect(input).toHaveValue('')
await expect(dropdown.getByRole('listitem').filter({ hasText: '测试allow-create' })).toHaveClass(/selected/)
})
test('enter 选中', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.waitForTimeout(300)
await page.goto('base-select#allow-create')
const wrap = page.locator('#allow-create')
const select = wrap.locator('.tiny-base-select').nth(1)
const dropdown = page.locator('body > .tiny-select-dropdown')
const input = select.locator('.tiny-input__inner')
await input.click()
await input.press('a')
await input.press('b')
await page.waitForTimeout(300)
await input.press('Enter')
await expect(dropdown).toBeHidden()
await expect(input).toHaveValue('ab')
await input.click()
await expect(input).toHaveValue('')
await expect(dropdown.getByRole('listitem').filter({ hasText: 'ab' })).toHaveClass(/selected/)
})

View File

@ -0,0 +1,105 @@
<template>
<div>
<div>场景1allow-create + filterable点击创建条目</div>
<br />
<tiny-base-select v-model="value" allow-create filterable>
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
<br />
<br />
<div>场景2allow-create + filterable + default-first-optionEnter 键创建条目</div>
<br />
<tiny-base-select v-model="value" allow-create filterable default-first-option>
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
<br />
<br />
<div>场景3下拉框显示新增按钮</div>
<br />
<tiny-base-select
v-model="value"
placeholder="请选择"
@top-create-click="handleAddOption"
automatic-dropdown
top-create
ref="selectDom"
>
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
<tiny-dialog-box :visible="boxVisibility" @update:visible="boxVisibility = $event" title="新建" width="30%">
<div>
<div>
<span>label</span>
<br />
<br />
<tiny-input v-model="optionLabel"></tiny-input>
</div>
<br />
<div>
<span>value</span>
<br />
<br />
<tiny-input v-model="optionValue"></tiny-input>
</div>
</div>
<template #footer>
<tiny-button @click="boxVisibility = false">取消</tiny-button>
<tiny-button type="primary" @click="handleConfirm"> 确定 </tiny-button>
</template>
</tiny-dialog-box>
</div>
</template>
<script>
import { BaseSelect, Option, Input, Button, DialogBox, Modal } from '@opentiny/vue'
export default {
components: {
TinyBaseSelect: BaseSelect,
TinyOption: Option,
TinyInput: Input,
TinyButton: Button,
TinyDialogBox: DialogBox
},
data() {
return {
options: [
{ value: '选项1', label: '北京' },
{ value: '选项2', label: '上海' },
{ value: '选项3', label: '天津' },
{ value: '选项4', label: '重庆' },
{ value: '选项5', label: '深圳' }
],
value: '',
boxVisibility: false,
optionLabel: '',
optionValue: ''
}
},
methods: {
handleAddOption() {
this.optionValue = ''
this.optionLabel = ''
this.boxVisibility = true
},
handleConfirm() {
if (!this.optionLabel || !this.optionValue) {
Modal.message({ message: '选项不能为空!', status: 'warning' })
return
}
this.boxVisibility = false
this.options.unshift({
value: this.optionValue,
label: this.optionLabel
})
this.$refs.selectDom.focus()
}
}
}
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
</style>

View File

@ -0,0 +1,51 @@
<template>
<div>
<p>场景1默认不可搜索时获取焦点不下拉</p>
<tiny-button @click="handleFocus1"> 点击获取焦点 </tiny-button>
<tiny-base-select v-model="value" ref="selectOnlyFocusRef">
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
<p>场景2设置不可搜索时获取焦点并自动下拉</p>
<tiny-button @click="handleFocus2"> 点击获取焦点 </tiny-button>
<tiny-base-select v-model="value" ref="selectAutoDropRef" automatic-dropdown>
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { BaseSelect as TinyBaseSelect, Option as TinyOption, Button as TinyButton } from '@opentiny/vue'
const options = ref([
{ value: '选项1', label: '北京' },
{ value: '选项2', label: '上海' },
{ value: '选项3', label: '天津' },
{ value: '选项4', label: '重庆' },
{ value: '选项5', label: '深圳' }
])
const value = ref('')
const selectOnlyFocusRef = ref()
const selectAutoDropRef = ref()
const handleFocus1 = () => {
selectOnlyFocusRef.value.focus()
}
const handleFocus2 = () => {
selectAutoDropRef.value.focus()
}
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
p {
font-size: 14px;
line-height: 1.5;
}
.tiny-button {
margin-right: 10px;
}
</style>

View File

@ -0,0 +1,31 @@
import { test, expect } from '@playwright/test'
test('不可搜索时,获取焦点不下拉', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('base-select#automatic-dropdown')
const wrap = page.locator('#automatic-dropdown')
const input = wrap.locator('.tiny-input__inner').first()
const dropdown = page.locator('.tiny-select-dropdown').first()
await wrap.getByRole('button').first().click()
// 聚焦高亮
await expect(input).toHaveCSS('border-color', 'rgb(94, 124, 224)')
// 不下拉
await expect(dropdown).toBeHidden()
})
test('可搜索时,获取焦点自动下拉', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('base-select#automatic-dropdown')
const wrap = page.locator('#automatic-dropdown')
const input = wrap.locator('.tiny-input__inner').nth(1)
const dropdown = page.locator('.tiny-select-dropdown').nth(1)
await wrap.getByRole('button').nth(1).click()
// 聚焦下拉
await dropdown.getByRole('listitem').filter({ hasText: '上海' }).click()
await expect(input).toHaveValue('上海')
// 验证选中
await input.click()
await expect(page.getByRole('listitem').filter({ hasText: '上海' })).toHaveClass(/selected/)
})

View File

@ -0,0 +1,59 @@
<template>
<div>
<p>场景1默认不可搜索时获取焦点不下拉</p>
<tiny-button @click="handleFocus1"> 点击获取焦点 </tiny-button>
<tiny-base-select v-model="value" ref="selectOnlyFocusRef">
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
<p>场景2设置不可搜索时获取焦点并自动下拉</p>
<tiny-button @click="handleFocus2"> 点击获取焦点 </tiny-button>
<tiny-base-select v-model="value" ref="selectAutoDropRef" automatic-dropdown>
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
</div>
</template>
<script>
import { BaseSelect, Option, Button } from '@opentiny/vue'
export default {
components: {
TinyBaseSelect: BaseSelect,
TinyOption: Option,
TinyButton: Button
},
data() {
return {
options: [
{ value: '选项1', label: '北京' },
{ value: '选项2', label: '上海' },
{ value: '选项3', label: '天津' },
{ value: '选项4', label: '重庆' },
{ value: '选项5', label: '深圳' }
],
value: ''
}
},
methods: {
handleFocus1() {
this.$refs.selectOnlyFocusRef.focus()
},
handleFocus2() {
this.$refs.selectAutoDropRef.focus()
}
}
}
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
p {
font-size: 14px;
line-height: 1.5;
}
.tiny-button {
margin-right: 10px;
}
</style>

View File

@ -0,0 +1,38 @@
<template>
<div>
<div>选中的值为 {{ value }}</div>
<br />
<div>场景1标签式</div>
<br />
<tiny-base-select v-model="value">
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" :icon="item.icon">
</tiny-option>
</tiny-base-select>
<br />
<br />
<div>场景2配置式</div>
<br />
<tiny-base-select v-model="value" :options="options"> </tiny-base-select>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { BaseSelect as TinyBaseSelect, Option as TinyOption } from '@opentiny/vue'
import { iconFile } from '@opentiny/vue-icon'
const options = ref([
{ value: '选项1', label: '北京', icon: iconFile() },
{ value: '选项2', label: '上海', icon: iconFile() },
{ value: '选项3', label: '天津', icon: iconFile() },
{ value: '选项4', label: '重庆', icon: iconFile() },
{ value: '选项5', label: '深圳', icon: iconFile() }
])
const value = ref('')
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
</style>

View File

@ -0,0 +1,47 @@
import { test, expect } from '@playwright/test'
test('基础用法标签式', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('base-select#basic-usage')
const wrap = page.locator('#basic-usage')
const select = wrap.locator('.tiny-base-select').nth(0)
const input = select.locator('.tiny-input__inner')
const dropdown = page.locator('body > .tiny-select-dropdown')
const option = dropdown.locator('.tiny-option')
await input.click()
await option.filter({ hasText: '天津' }).click()
await expect(input).toHaveValue('天津')
await select.locator('.tiny-input__suffix svg').click()
await expect(page.getByRole('listitem').filter({ hasText: '天津' })).toHaveClass(/selected/)
await option.filter({ hasText: '深圳' }).click()
await expect(input).toHaveValue('深圳')
await input.click()
await expect(option.filter({ hasText: '深圳' })).toHaveClass(/selected/)
await expect(option.locator('.tiny-option__icon')).toHaveCount(5)
await option.nth(0).click()
await expect(dropdown).toBeHidden()
})
test('基础用法配置式', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('base-select#basic-usage')
const wrap = page.locator('#basic-usage')
const select = wrap.locator('.tiny-base-select').nth(1)
const input = select.locator('.tiny-input__inner')
const dropdown = page.locator('body > .tiny-select-dropdown')
const option = dropdown.locator('.tiny-option')
await input.click()
await option.filter({ hasText: '天津' }).click()
await expect(input).toHaveValue('天津')
await select.locator('.tiny-input__suffix svg').click()
await expect(page.getByRole('listitem').filter({ hasText: '天津' })).toHaveClass(/selected/)
await option.filter({ hasText: '深圳' }).click()
await expect(input).toHaveValue('深圳')
await input.click()
await expect(option.filter({ hasText: '深圳' })).toHaveClass(/selected/)
await expect(option.locator('.tiny-option__icon')).toHaveCount(5)
await option.nth(0).click()
await expect(dropdown).toBeHidden()
})

View File

@ -0,0 +1,47 @@
<template>
<div>
<div>选中的值为 {{ value }}</div>
<br />
<div>场景1标签式</div>
<br />
<tiny-base-select v-model="value">
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" :icon="item.icon">
</tiny-option>
</tiny-base-select>
<br />
<br />
<div>场景2配置式</div>
<br />
<tiny-base-select v-model="value" :options="options"> </tiny-base-select>
</div>
</template>
<script>
import { BaseSelect, Option } from '@opentiny/vue'
import { iconFile } from '@opentiny/vue-icon'
export default {
components: {
TinyBaseSelect: BaseSelect,
TinyOption: Option
},
data() {
return {
options: [
{ value: '选项1', label: '北京', icon: iconFile() },
{ value: '选项2', label: '上海', icon: iconFile() },
{ value: '选项3', label: '天津', icon: iconFile() },
{ value: '选项4', label: '重庆', icon: iconFile() },
{ value: '选项5', label: '深圳', icon: iconFile() }
],
value: ''
}
}
}
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
</style>

View File

@ -0,0 +1,34 @@
<template>
<div>
<tiny-base-select v-model="value" value-key="val">
<tiny-option v-for="(item, index) in options" :key="index" :label="item.text" :value="item.obj"> </tiny-option>
</tiny-base-select>
<p class="value">
{{ value }}
</p>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { BaseSelect as TinyBaseSelect, Option as TinyOption } from '@opentiny/vue'
const options = ref([
{ obj: { val: '选项1', id: 1 }, text: '北京' },
{ obj: { val: '选项2', id: 2 }, text: '上海' },
{ obj: { val: '选项3', id: 3 }, text: '天津' },
{ obj: { val: '选项4', id: 4 }, text: '重庆' },
{ obj: { val: '选项5', id: 5 }, text: '深圳' }
])
const value = ref({ val: '选项3', id: 3 })
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
p {
font-size: 14px;
line-height: 1.5;
}
</style>

View File

@ -0,0 +1,21 @@
import { test, expect } from '@playwright/test'
test('binding-obj', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('base-select#binding-obj')
const wrap = page.locator('#binding-obj')
const input = wrap.locator('.tiny-input__inner')
const dropdown = page.locator('.tiny-select-dropdown')
const valueLocator = wrap.locator('.value')
await input.click()
await dropdown.getByRole('listitem').filter({ hasText: '重庆' }).click()
await expect(input).toHaveValue('重庆')
await expect(valueLocator).toHaveText('{ "val": "选项4", "id": 4 }')
await input.click()
await dropdown.getByRole('listitem').filter({ hasText: '天津' }).click()
await expect(input).toHaveValue('天津')
await expect(valueLocator).toHaveText('{ "val": "选项3", "id": 3 }')
})

View File

@ -0,0 +1,43 @@
<template>
<div>
<tiny-base-select v-model="value" value-key="val">
<tiny-option v-for="(item, index) in options" :key="index" :label="item.text" :value="item.obj"> </tiny-option>
</tiny-base-select>
<p class="value">
{{ value }}
</p>
</div>
</template>
<script>
import { BaseSelect, Option } from '@opentiny/vue'
export default {
components: {
TinyBaseSelect: BaseSelect,
TinyOption: Option
},
data() {
return {
options: [
{ obj: { val: '选项1', id: 1 }, text: '北京' },
{ obj: { val: '选项2', id: 2 }, text: '上海' },
{ obj: { val: '选项3', id: 3 }, text: '天津' },
{ obj: { val: '选项4', id: 4 }, text: '重庆' },
{ obj: { val: '选项5', id: 5 }, text: '深圳' }
],
value: { val: '选项3', id: 3 }
}
}
}
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
p {
font-size: 14px;
line-height: 1.5;
}
</style>

View File

@ -0,0 +1,45 @@
<template>
<div>
<tiny-base-select
v-model="value"
clearable
:options="options"
:cache-op="cacheOp"
@change="cacheChange"
></tiny-base-select>
<p class="cache-value">
{{ cacheValue }}
</p>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { BaseSelect as TinyBaseSelect } from '@opentiny/vue'
const cacheOp = ref({
key: 'test'
})
const cacheValue = ref('')
const options = ref([
{ value: '选项1', label: '北京' },
{ value: '选项2', label: '上海' },
{ value: '选项3', label: '天津' },
{ value: '选项4', label: '重庆' },
{ value: '选项5', label: '深圳' }
])
const value = ref('选项3')
const cacheChange = () => {
cacheValue.value = window.localStorage.getItem(`tiny_memorize_${cacheOp.value.key}`)
}
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
p {
font-size: 14px;
line-height: 1.5;
}
</style>

View File

@ -0,0 +1,19 @@
import { expect, test } from '@playwright/test'
test('cache-op', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('base-select#cache-usage')
const wrap = page.locator('#cache-usage')
const dropdown = page.locator('.tiny-select-dropdown')
const input = wrap.locator('.tiny-input__inner')
const cacheValue = wrap.locator('.cache-value')
await input.click()
await dropdown.getByRole('listitem').filter({ hasText: '北京' }).click()
await expect(cacheValue).toContainText(['选项1'])
await input.click()
await dropdown.getByRole('listitem').filter({ hasText: '上海' }).click()
await expect(cacheValue).toContainText(['选项2'])
})

View File

@ -0,0 +1,55 @@
<template>
<div>
<tiny-base-select
v-model="value"
clearable
:options="options"
:cache-op="cacheOp"
@change="cacheChange"
></tiny-base-select>
<p class="cache-value">
{{ cacheValue }}
</p>
</div>
</template>
<script>
import { BaseSelect } from '@opentiny/vue'
export default {
components: {
TinyBaseSelect: BaseSelect
},
data() {
return {
cacheOp: {
key: 'test'
},
cacheValue: '',
options: [
{ value: '选项1', label: '北京' },
{ value: '选项2', label: '上海' },
{ value: '选项3', label: '天津' },
{ value: '选项4', label: '重庆' },
{ value: '选项5', label: '深圳' }
],
value: '选项3'
}
},
methods: {
cacheChange() {
this.cacheValue = window.localStorage.getItem(`tiny_memorize_${this.cacheOp.key}`)
}
}
}
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
p {
font-size: 14px;
line-height: 1.5;
}
</style>

View File

@ -0,0 +1,43 @@
<template>
<div>
<p>
场景1单选val 找不到匹配值val为 ,<span class="val">{{ val }}</span>
</p>
<tiny-base-select v-model="val" :clear-no-match-value="true">
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
<p>
场景2多选multiVal 找不到匹配值multiVal <span class="multi-val">{{ multiVal }}</span>
</p>
<tiny-base-select v-model="multiVal" :clear-no-match-value="true" multiple>
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
</tiny-base-select>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { BaseSelect as TinyBaseSelect, Option as TinyOption } from '@opentiny/vue'
const options = ref([
{ value: '选项1', label: '北京' },
{ value: '选项2', label: '上海' },
{ value: '选项3', label: '天津' },
{ value: '选项4', label: '重庆' },
{ value: '选项5', label: '深圳' }
])
const val = ref('11')
const multiVal = ref(['选项2', '11'])
</script>
<style lang="less" scoped>
.tiny-base-select {
width: 280px;
}
p {
font-size: 14px;
line-height: 1.5;
}
</style>

Some files were not shown because too many files have changed in this diff Show More