x-next 1.17.0 → 1.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AI_USAGE/catalog.md +1 -1
- package/AI_USAGE/components/alert-api.md +1 -1
- package/AI_USAGE/components/alert.md +33 -1
- package/AI_USAGE/components/bar-chart-api.md +1 -1
- package/AI_USAGE/components/bar-chart.md +1 -1
- package/AI_USAGE/components/boxicons.md +1 -1
- package/AI_USAGE/components/button-api.md +13 -16
- package/AI_USAGE/components/button.md +245 -34
- package/AI_USAGE/components/charts.md +1 -1
- package/AI_USAGE/components/checkbox-api.md +1 -1
- package/AI_USAGE/components/checkbox.md +1 -1
- package/AI_USAGE/components/color-picker-api.md +1 -1
- package/AI_USAGE/components/color-picker.md +1 -1
- package/AI_USAGE/components/config-provider-api.md +1 -1
- package/AI_USAGE/components/config-provider.md +1 -1
- package/AI_USAGE/components/date-picker-api.md +44 -26
- package/AI_USAGE/components/date-picker.md +78 -3
- package/AI_USAGE/components/dialog-api.md +2 -2
- package/AI_USAGE/components/dialog.md +5 -1
- package/AI_USAGE/components/draggable-api.md +1 -1
- package/AI_USAGE/components/draggable.md +1 -1
- package/AI_USAGE/components/drawer-api.md +3 -3
- package/AI_USAGE/components/drawer.md +1 -1
- package/AI_USAGE/components/dropdown-api.md +8 -3
- package/AI_USAGE/components/dropdown.md +2 -2
- package/AI_USAGE/components/empty-api.md +1 -1
- package/AI_USAGE/components/empty.md +1 -1
- package/AI_USAGE/components/finicon.md +1 -1
- package/AI_USAGE/components/form-api.md +1 -1
- package/AI_USAGE/components/form.md +1 -1
- package/AI_USAGE/components/grid-api.md +1 -1
- package/AI_USAGE/components/grid.md +1 -1
- package/AI_USAGE/components/heatmap-api.md +1 -1
- package/AI_USAGE/components/heatmap.md +1 -1
- package/AI_USAGE/components/icon-api.md +1 -1
- package/AI_USAGE/components/icon.md +1 -1
- package/AI_USAGE/components/image-api.md +1 -1
- package/AI_USAGE/components/image.md +1 -1
- package/AI_USAGE/components/input-api.md +2 -2
- package/AI_USAGE/components/input-number-api.md +1 -1
- package/AI_USAGE/components/input-number.md +1 -1
- package/AI_USAGE/components/input-tag-api.md +1 -1
- package/AI_USAGE/components/input-tag.md +1 -1
- package/AI_USAGE/components/input.md +1 -1
- package/AI_USAGE/components/layout-api.md +1 -1
- package/AI_USAGE/components/layout.md +1 -1
- package/AI_USAGE/components/line-chart-api.md +1 -1
- package/AI_USAGE/components/line-chart.md +1 -1
- package/AI_USAGE/components/link-api.md +1 -1
- package/AI_USAGE/components/link.md +1 -1
- package/AI_USAGE/components/menu-api.md +1 -1
- package/AI_USAGE/components/menu.md +1 -1
- package/AI_USAGE/components/message-api.md +1 -1
- package/AI_USAGE/components/message-box-api.md +1 -1
- package/AI_USAGE/components/message-box.md +1 -1
- package/AI_USAGE/components/message.md +1 -1
- package/AI_USAGE/components/network-api.md +1 -1
- package/AI_USAGE/components/network.md +1 -1
- package/AI_USAGE/components/notification-api.md +1 -1
- package/AI_USAGE/components/notification.md +1 -1
- package/AI_USAGE/components/pagination-api.md +1 -1
- package/AI_USAGE/components/pagination.md +1 -1
- package/AI_USAGE/components/pie-chart-api.md +1 -1
- package/AI_USAGE/components/pie-chart.md +1 -1
- package/AI_USAGE/components/popconfirm-api.md +3 -3
- package/AI_USAGE/components/popconfirm.md +1 -1
- package/AI_USAGE/components/popover-api.md +1 -1
- package/AI_USAGE/components/popover.md +3 -1
- package/AI_USAGE/components/popup-api.md +1 -1
- package/AI_USAGE/components/popup.md +1 -1
- package/AI_USAGE/components/progress-api.md +1 -1
- package/AI_USAGE/components/progress.md +1 -1
- package/AI_USAGE/components/radio-api.md +1 -1
- package/AI_USAGE/components/radio.md +1 -1
- package/AI_USAGE/components/rate-api.md +1 -1
- package/AI_USAGE/components/rate.md +1 -1
- package/AI_USAGE/components/resize-box-api.md +1 -1
- package/AI_USAGE/components/resize-box.md +1 -1
- package/AI_USAGE/components/scrollbar-api.md +1 -1
- package/AI_USAGE/components/scrollbar.md +1 -1
- package/AI_USAGE/components/select-api.md +1 -1
- package/AI_USAGE/components/select.md +1 -1
- package/AI_USAGE/components/skeleton-api.md +1 -1
- package/AI_USAGE/components/skeleton.md +1 -1
- package/AI_USAGE/components/slider-api.md +1 -1
- package/AI_USAGE/components/slider.md +1 -1
- package/AI_USAGE/components/space-api.md +1 -1
- package/AI_USAGE/components/space.md +1 -1
- package/AI_USAGE/components/spin-api.md +1 -1
- package/AI_USAGE/components/spin.md +1 -1
- package/AI_USAGE/components/steps-api.md +1 -1
- package/AI_USAGE/components/steps.md +1 -1
- package/AI_USAGE/components/switch-api.md +1 -1
- package/AI_USAGE/components/switch.md +1 -1
- package/AI_USAGE/components/table-api.md +1 -1
- package/AI_USAGE/components/table.md +1 -1
- package/AI_USAGE/components/tabs-api.md +1 -1
- package/AI_USAGE/components/tabs.md +1 -1
- package/AI_USAGE/components/tag-api.md +1 -1
- package/AI_USAGE/components/tag.md +1 -1
- package/AI_USAGE/components/textarea-api.md +1 -1
- package/AI_USAGE/components/textarea.md +1 -1
- package/AI_USAGE/components/time-picker-api.md +1 -1
- package/AI_USAGE/components/time-picker.md +1 -1
- package/AI_USAGE/components/time-range-selector-api.md +1 -1
- package/AI_USAGE/components/time-range-selector.md +1 -1
- package/AI_USAGE/components/timeline-api.md +3 -3
- package/AI_USAGE/components/timeline.md +1 -1
- package/AI_USAGE/components/tooltip-api.md +1 -1
- package/AI_USAGE/components/tooltip.md +1 -1
- package/AI_USAGE/components/transfer-api.md +1 -1
- package/AI_USAGE/components/transfer.md +1 -1
- package/AI_USAGE/components/tree-select-api.md +1 -1
- package/AI_USAGE/components/tree-select.md +1 -1
- package/AI_USAGE/components/trend-chart-api.md +1 -1
- package/AI_USAGE/components/trend-chart.md +1 -1
- package/AI_USAGE/components/trigger-api.md +1 -1
- package/AI_USAGE/components/trigger.md +1 -1
- package/AI_USAGE/components/upload-api.md +1 -1
- package/AI_USAGE/components/upload.md +1 -1
- package/AI_USAGE/components/watermark-api.md +1 -1
- package/AI_USAGE/components/watermark.md +1 -1
- package/AI_USAGE/core.md +1 -1
- package/AI_USAGE/index.md +1 -1
- package/AI_USAGE/recipes/form-on-demand.md +1 -1
- package/AI_USAGE.md +432 -88
- package/CHANGELOG.md +36 -0
- package/dist/_container/render-function.d.ts +2 -2
- package/dist/_styles/palette-aliases.d.ts +1 -0
- package/dist/components/_components/picker/input-range.vue.d.ts +1 -1
- package/dist/components/button/Button.d.ts +0 -9
- package/dist/components/button/appearance.d.ts +7 -0
- package/dist/components/button/index.d.ts +0 -16
- package/dist/components/button/props.d.ts +2 -6
- package/dist/components/color-picker/panel.d.ts +0 -9
- package/dist/components/date-picker/DatePanel.vue.d.ts +10 -1
- package/dist/components/date-picker/DatePicker.vue.d.ts +22 -25
- package/dist/components/date-picker/index.d.ts +156 -84
- package/dist/components/date-picker/utils.d.ts +4 -4
- package/dist/components/drawer/index.d.ts +0 -30
- package/dist/components/drawer/src/Drawer.vue.d.ts +0 -15
- package/dist/components/dropdown/Dropdown.vue.d.ts +1 -0
- package/dist/components/dropdown/DropdownButton.vue.d.ts +1 -15
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +1 -0
- package/dist/components/dropdown/context.d.ts +1 -0
- package/dist/components/dropdown/index.d.ts +8 -30
- package/dist/components/dropdown/use-keyboard.d.ts +1 -0
- package/dist/components/menu/MenuItem.d.ts +2 -2
- package/dist/components/menu/context.d.ts +3 -3
- package/dist/components/menu/index.d.ts +6 -6
- package/dist/components/menu/sub-menu-pop.vue.d.ts +2 -2
- package/dist/components/popconfirm/src/popup.vue.d.ts +0 -15
- package/dist/components/time-picker/TimePanel.vue.d.ts +0 -15
- package/dist/components/time-picker/TimePicker.vue.d.ts +1 -16
- package/dist/components/time-picker/index.d.ts +2 -32
- package/dist/es/_styles/palette-aliases.js +102 -17
- package/dist/es/_utils/palette.js +54 -54
- package/dist/es/components/_components/picker/input-range.vue.js +12 -12
- package/dist/es/components/_components/picker/input-range.vue2.js +45 -45
- package/dist/es/components/_components/picker/input.vue2.js +24 -24
- package/dist/es/components/button/Button.js +77 -49
- package/dist/es/components/button/appearance.js +7 -0
- package/dist/es/components/button/props.js +0 -4
- package/dist/es/components/date-picker/DatePanel.vue.js +47 -47
- package/dist/es/components/date-picker/DatePanel.vue2.js +68 -59
- package/dist/es/components/date-picker/DatePicker.vue.js +65 -59
- package/dist/es/components/date-picker/DatePicker.vue2.js +387 -284
- package/dist/es/components/date-picker/index.js +57 -36
- package/dist/es/components/date-picker/utils.js +132 -122
- package/dist/es/components/dialog/Dialog.js +43 -40
- package/dist/es/components/dialog/props.js +1 -1
- package/dist/es/components/dropdown/Dropdown.vue2.js +66 -50
- package/dist/es/components/dropdown/dropdown-panel.vue2.js +48 -43
- package/dist/es/components/dropdown/use-keyboard.js +36 -28
- package/dist/es/components/popover/Popover.js +72 -32
- package/dist/es/directives/wave.js +14 -8
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/style/alert.css +1 -1
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/color-picker.css +1 -1
- package/dist/style/date-picker.css +1 -1
- package/dist/style/dialog.css +1 -1
- package/dist/style/link.css +1 -1
- package/dist/style/message-box.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
package/AI_USAGE.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
|
|
2
2
|
# x-next AI 使用手册
|
|
3
3
|
|
|
4
|
-
适用版本:**x-next@1.
|
|
4
|
+
适用版本:**x-next@1.18.1**。Vue:`^3.5.0`;Node:`>=20.19.0`。
|
|
5
5
|
|
|
6
|
-
来源指纹(AI 行为说明、docs 导入快照、映射、样式依赖、版本、公开类型和 API 参考):`
|
|
6
|
+
来源指纹(AI 行为说明、docs 导入快照、映射、样式依赖、版本、公开类型和 API 参考):`5a7a6ac6864f5c967d7414c6cb2bf7b0470f3208f35e8ece68ed34b3b2716d83`。
|
|
7
7
|
|
|
8
8
|
覆盖 59 个组件族与 106 个公开组件/服务导出。优先通过 [本地按需索引](./AI_USAGE/index.md) 读取组件页和 API,不为查本包用法默认搜索网络。
|
|
9
9
|
|
|
@@ -226,7 +226,7 @@ const pickerAttrs = { id: 'brand-color', 'aria-label': '品牌色' };
|
|
|
226
226
|
|
|
227
227
|
## Button
|
|
228
228
|
|
|
229
|
-
[组件文档与 live demo](https://x-next.yjmf.com/components/button)。`type`
|
|
229
|
+
[组件文档与 live demo](https://x-next.yjmf.com/components/button)。`type` 管形态,默认 `'default'`;实心用 `'solid'`、弱底用 `'subtle'`、透明用 `'outline'/'dashed'/'text'`。`status` 管颜色,默认中性 `'default'`,品牌色显式 `'primary'`。默认与中性 outline 是同一普通操作层级的弱底 / 透明表面差异;品牌描边显式使用 status=primary。兼容 `type='primary'` 解析品牌实心,其他语义 status 优先;`plain` 仅把填充形态转为 subtle,`border=false` 只隐藏边框;语义弱底不额外描边,中性默认保留细边,outline/dashed 需要边框。波纹颜色跟随状态;text、disabled/loading 无外部波纹。深灰实心是独立纯灰的高权重进阶组合,不代表次要或禁用。text 保留按钮点击区域,`type="text" narrow` 去掉水平内边距且保持按钮高度;URL 导航用 Link 的 href 或项目路由方案。Button 不提供 link 类型或布尔 link 属性。`htmlType` 默认 `'button'`,原生提交用 `'submit'`。尺寸优先级为显式 `size` → ButtonGroup → ConfigProvider → `'medium'`;Button 不通过 FormItem 继承尺寸。`disabled` / `loading` 默认关闭。
|
|
230
230
|
|
|
231
231
|
`click` 载荷为 `MouseEvent`,禁用或加载中不会触发。`default`、`prefix`、`suffix`、`icon` 插槽可组合内容;异步业务自行维护 `loading`。
|
|
232
232
|
|
|
@@ -534,6 +534,8 @@ function restore() { visible.value = true; feedback.value = '提示显示中'; }
|
|
|
534
534
|
|
|
535
535
|
[组件文档与 live demo](https://x-next.yjmf.com/components/dialog)。从根入口导入 `DialogComponent as XDialog`,普通 `v-model` 为布尔值且默认 `false`。`renderTo='body'`、`mask=true`、`maskToClose=true`、`escToClose=true`、`destroyOnClosed=true`;`width` 支持数字或 CSS 长度。
|
|
536
536
|
|
|
537
|
+
声明式组件默认 `center=false`、`top='100px'`,`top` 仅在非居中、非全屏时生效;命令式 `Dialog(options)` 保持默认居中,其服务默认 `top=0`。
|
|
538
|
+
|
|
537
539
|
`title`、默认正文、`footer` 是公开插槽,默认不生成业务按钮。`close(action, event?)` 的 action 为 `'cancel' | 'ok'`,`closed` 表示关闭动画结束;直接改模型不会调用业务取消逻辑。根入口服务 `Dialog(options)` 返回 `close()` / `update(options)` 句柄。
|
|
538
540
|
|
|
539
541
|
```vue
|
|
@@ -680,6 +682,8 @@ function cancel(_event: Event) { feedback.value = '已取消删除'; }
|
|
|
680
682
|
|
|
681
683
|
`popup-visible-change(visible)` 返回布尔值,`show` / `hide` 无参数。点击触发器或外部默认可以关闭;`popupContainer` 和 `renderToBody` 决定宿主,用于定位、滚动及裁剪。通过 ConfigProvider 配置的主题会由 Trigger 同步到浮层根,默认挂到 body 也生效;任意业务 CSS 变量或仅在局部 DOM 调用 applyThemeColor 不等于该注入协议,仍要核对实际继承。
|
|
682
684
|
|
|
685
|
+
Escape 从触发器、内容或鼠标打开后的 body 焦点关闭当前最上层 Popover,并归还触发器焦点;组合输入期间保留浮层。关闭和卸载会清理键盘监听,focus 触发模式不会因焦点归还重新打开。
|
|
686
|
+
|
|
683
687
|
```vue
|
|
684
688
|
<script setup lang="ts">
|
|
685
689
|
import { ref } from 'vue';
|
|
@@ -730,7 +734,7 @@ function advance() { percent.value = Math.min(1, percent.value + 0.25); }
|
|
|
730
734
|
|
|
731
735
|
[组件文档与 live demo](https://x-next.yjmf.com/components/dropdown)。使用 `v-model:popup-visible`,默认 `trigger='click'`、`position='bottom'`、`hideOnSelect=true`。根入口导出 `DropdownOption`、`DropdownGroup`、`DropdownSubmenu`;菜单内容放 `content` 插槽,另有 `empty` / `footer` 插槽。
|
|
732
736
|
|
|
733
|
-
`select(value, event)` 返回 `string | number | Record<string, any> | undefined` 和 `Event`,`popup-visible-change` 返回布尔值。选项支持 `disabled
|
|
737
|
+
`select(value, event)` 返回 `string | number | Record<string, any> | undefined` 和 `Event`,`popup-visible-change` 返回布尔值。选项支持 `disabled`;Tab / Shift+Tab 从触发器、菜单项或子菜单退出根菜单,并从根触发器继续浏览器默认顺序导航。字符搜索 typeahead、自定义控件的通用键盘代理仍有边界,不能据方向键导航推断这些能力已实现。
|
|
734
738
|
|
|
735
739
|
```vue
|
|
736
740
|
<script setup lang="ts">
|
|
@@ -1576,14 +1580,141 @@ import { Button } from 'x-next';
|
|
|
1576
1580
|
<template>
|
|
1577
1581
|
<Button>默认按钮</Button>
|
|
1578
1582
|
<Button type="primary">主要按钮</Button>
|
|
1579
|
-
<Button type="outline"
|
|
1583
|
+
<Button type="outline" status="primary">品牌描边</Button>
|
|
1580
1584
|
<Button type="text">文本按钮</Button>
|
|
1581
1585
|
</template>
|
|
1582
1586
|
```
|
|
1583
1587
|
|
|
1588
|
+
### 形态与颜色
|
|
1589
|
+
|
|
1590
|
+
通过 `type` 设置形态,通过 `status` 设置颜色。品牌色使用 `status="primary"`。
|
|
1591
|
+
|
|
1592
|
+
| 形态 | 表现 |
|
|
1593
|
+
| --- | --- |
|
|
1594
|
+
| default | 浅色背景;中性按钮有细边框,状态色按钮无边框 |
|
|
1595
|
+
| solid | 实心底、白字 |
|
|
1596
|
+
| subtle | 弱填充、无可见边框 |
|
|
1597
|
+
| outline / dashed | 透明底、实线 / 虚线边框 |
|
|
1598
|
+
| text | 透明文字,保留按钮尺寸与内边距 |
|
|
1599
|
+
|
|
1600
|
+
### 文本动作与跳转链接
|
|
1601
|
+
|
|
1602
|
+
`type="text"` 适合表格或工具栏操作,加上 `narrow` 可去掉水平内边距。跳转页面使用 `x-link` 的 `href`。
|
|
1603
|
+
|
|
1604
|
+
### 进阶组合:深灰实心
|
|
1605
|
+
|
|
1606
|
+
深灰实心适合黑白品牌或强调操作;次要操作可使用默认或文本按钮。
|
|
1607
|
+
|
|
1608
|
+
### 组合预览
|
|
1609
|
+
|
|
1610
|
+
```vue
|
|
1611
|
+
<script setup lang="ts">
|
|
1612
|
+
import 'x-next/style.css';
|
|
1613
|
+
import { Button } from 'x-next';
|
|
1614
|
+
|
|
1615
|
+
</script>
|
|
1616
|
+
<template>
|
|
1617
|
+
<Button type="solid" status="primary">品牌实心</Button>
|
|
1618
|
+
<Button type="subtle" status="primary">品牌弱底</Button>
|
|
1619
|
+
<Button type="outline" status="primary">品牌描边</Button>
|
|
1620
|
+
<Button type="text" status="primary">品牌文本</Button>
|
|
1621
|
+
</template>
|
|
1622
|
+
```
|
|
1623
|
+
|
|
1624
|
+
```vue
|
|
1625
|
+
<script setup lang="ts">
|
|
1626
|
+
import 'x-next/style.css';
|
|
1627
|
+
import { ref } from 'vue';
|
|
1628
|
+
import { Button as XButton, Link as XLink } from 'x-next';
|
|
1629
|
+
import 'x-next/style/button';
|
|
1630
|
+
import 'x-next/style/link';
|
|
1631
|
+
const textCount = ref(0);
|
|
1632
|
+
const compactCount = ref(0);
|
|
1633
|
+
</script>
|
|
1634
|
+
<template>
|
|
1635
|
+
<XButton type="text" status="primary" @click="textCount++">文本操作</XButton>
|
|
1636
|
+
<span>行内动作:<XButton type="text" narrow status="primary" @click="compactCount++">紧凑文本操作</XButton></span>
|
|
1637
|
+
<XLink href="/components/link" :hoverable="false">查看 Link 文档</XLink>
|
|
1638
|
+
<span role="status">文本操作 {{ textCount }} 次,紧凑操作 {{ compactCount }} 次</span>
|
|
1639
|
+
</template>
|
|
1640
|
+
```
|
|
1641
|
+
|
|
1642
|
+
```vue
|
|
1643
|
+
<script setup lang="ts">
|
|
1644
|
+
import 'x-next/style.css';
|
|
1645
|
+
import { Button } from 'x-next';
|
|
1646
|
+
|
|
1647
|
+
</script>
|
|
1648
|
+
<template>
|
|
1649
|
+
<Button type="solid">深灰实心</Button>
|
|
1650
|
+
</template>
|
|
1651
|
+
```
|
|
1652
|
+
|
|
1653
|
+
```vue
|
|
1654
|
+
<script setup lang="ts">
|
|
1655
|
+
import 'x-next/style.css';
|
|
1656
|
+
import { ref } from 'vue';
|
|
1657
|
+
import { Button as XButton, ButtonGroup as XButtonGroup, Select as XSelect, Checkbox as XCheckbox } from 'x-next';
|
|
1658
|
+
import type { ButtonTypes, ButtonStatus } from 'x-next';
|
|
1659
|
+
import 'x-next/style/button';
|
|
1660
|
+
import 'x-next/style/form-select';
|
|
1661
|
+
import 'x-next/style/form-checkbox';
|
|
1662
|
+
const types = ['default', 'solid', 'subtle', 'outline', 'dashed', 'text', 'primary'] as const;
|
|
1663
|
+
const statuses = ['default', 'primary', 'success', 'warning', 'strong', 'danger', 'info'] as const;
|
|
1664
|
+
const typeOptions = types.map(value => ({ label: value, value }));
|
|
1665
|
+
const statusOptions = statuses.map(value => ({ label: value, value }));
|
|
1666
|
+
const typeAttrs = { 'aria-label': '按钮形态' };
|
|
1667
|
+
const statusAttrs = { 'aria-label': '按钮颜色' };
|
|
1668
|
+
const type = ref<ButtonTypes>('outline');
|
|
1669
|
+
const status = ref<ButtonStatus>('default');
|
|
1670
|
+
const plain = ref(false), border = ref(true), count = ref(0);
|
|
1671
|
+
</script>
|
|
1672
|
+
<template>
|
|
1673
|
+
<div class="button-controls">
|
|
1674
|
+
<div class="button-field">
|
|
1675
|
+
<span>形态</span>
|
|
1676
|
+
<XSelect v-model="type" :options="typeOptions" v-bind="typeAttrs" class="button-select" />
|
|
1677
|
+
</div>
|
|
1678
|
+
<div class="button-field">
|
|
1679
|
+
<span>颜色</span>
|
|
1680
|
+
<XSelect v-model="status" :options="statusOptions" v-bind="statusAttrs" class="button-select" />
|
|
1681
|
+
</div>
|
|
1682
|
+
<XCheckbox v-model="plain">plain</XCheckbox>
|
|
1683
|
+
<XCheckbox v-model="border">border</XCheckbox>
|
|
1684
|
+
</div>
|
|
1685
|
+
<XButton :type="type" :status="status" :plain="plain" :border="border" @click="count++">组合按钮</XButton>
|
|
1686
|
+
<span role="status">已触发 {{ count }} 次</span>
|
|
1687
|
+
<XButtonGroup type="outline">
|
|
1688
|
+
<XButton :border="false">组内无边框一</XButton>
|
|
1689
|
+
<XButton :border="false">组内无边框二</XButton>
|
|
1690
|
+
</XButtonGroup>
|
|
1691
|
+
</template>
|
|
1692
|
+
<style scoped>
|
|
1693
|
+
.button-controls {
|
|
1694
|
+
display: flex;
|
|
1695
|
+
flex-wrap: wrap;
|
|
1696
|
+
align-items: center;
|
|
1697
|
+
gap: 12px;
|
|
1698
|
+
}
|
|
1699
|
+
.button-field {
|
|
1700
|
+
display: flex;
|
|
1701
|
+
align-items: center;
|
|
1702
|
+
gap: 8px;
|
|
1703
|
+
flex: none;
|
|
1704
|
+
}
|
|
1705
|
+
.button-field > span {
|
|
1706
|
+
white-space: nowrap;
|
|
1707
|
+
}
|
|
1708
|
+
.button-field :deep(.button-select) {
|
|
1709
|
+
width: 136px;
|
|
1710
|
+
flex: none;
|
|
1711
|
+
}
|
|
1712
|
+
</style>
|
|
1713
|
+
```
|
|
1714
|
+
|
|
1584
1715
|
### 外部水波纹
|
|
1585
1716
|
|
|
1586
|
-
|
|
1717
|
+
点击按钮查看反馈。禁用、加载或文本按钮不显示水波纹。
|
|
1587
1718
|
|
|
1588
1719
|
```vue
|
|
1589
1720
|
<script setup lang="ts">
|
|
@@ -1595,6 +1726,7 @@ import { Button } from 'x-next';
|
|
|
1595
1726
|
<Button>默认水波纹</Button>
|
|
1596
1727
|
<Button type="primary">主要水波纹</Button>
|
|
1597
1728
|
<Button status="danger">危险水波纹</Button>
|
|
1729
|
+
<Button type="outline" status="danger">危险描边水波纹</Button>
|
|
1598
1730
|
<Button loading>加载不触发</Button>
|
|
1599
1731
|
<Button disabled>禁用不触发</Button>
|
|
1600
1732
|
</template>
|
|
@@ -1602,6 +1734,8 @@ import { Button } from 'x-next';
|
|
|
1602
1734
|
|
|
1603
1735
|
### 状态
|
|
1604
1736
|
|
|
1737
|
+
通过 `status` 表达成功、警告、危险等状态。
|
|
1738
|
+
|
|
1605
1739
|
```vue
|
|
1606
1740
|
<script setup lang="ts">
|
|
1607
1741
|
import 'x-next/style.css';
|
|
@@ -1619,15 +1753,45 @@ import { Button } from 'x-next';
|
|
|
1619
1753
|
</template>
|
|
1620
1754
|
```
|
|
1621
1755
|
|
|
1622
|
-
###
|
|
1756
|
+
### 暗色状态按钮
|
|
1623
1757
|
|
|
1624
|
-
|
|
1758
|
+
通过 `ConfigProvider` 的 `dark` 属性设置局部暗色。
|
|
1759
|
+
|
|
1760
|
+
```vue
|
|
1761
|
+
<script setup lang="ts">
|
|
1762
|
+
import 'x-next/style.css';
|
|
1763
|
+
import { Button as XButton, ConfigProvider as XConfigProvider } from 'x-next';
|
|
1764
|
+
import 'x-next/style/base.css';
|
|
1765
|
+
import 'x-next/style/button.css';
|
|
1766
|
+
</script>
|
|
1767
|
+
<template>
|
|
1768
|
+
<XConfigProvider :dark="true" class="button-dark-example">
|
|
1769
|
+
<XButton>默认</XButton>
|
|
1770
|
+
<XButton status="success">成功</XButton>
|
|
1771
|
+
<XButton status="warning">警告</XButton>
|
|
1772
|
+
<XButton status="strong">强调</XButton>
|
|
1773
|
+
<XButton status="danger">危险</XButton>
|
|
1774
|
+
<XButton status="info">信息</XButton>
|
|
1775
|
+
<XButton disabled>禁用</XButton>
|
|
1776
|
+
</XConfigProvider>
|
|
1777
|
+
</template>
|
|
1778
|
+
<style scoped>
|
|
1779
|
+
.button-dark-example {
|
|
1780
|
+
display: flex;
|
|
1781
|
+
flex-wrap: wrap;
|
|
1782
|
+
gap: 12px;
|
|
1783
|
+
padding: 20px;
|
|
1784
|
+
border-radius: 8px;
|
|
1785
|
+
background: var(--x-color-bg-surface);
|
|
1786
|
+
}
|
|
1787
|
+
</style>
|
|
1788
|
+
```
|
|
1625
1789
|
|
|
1626
|
-
|
|
1790
|
+
### 状态色实心按钮
|
|
1627
1791
|
|
|
1628
|
-
|
|
1792
|
+
实心按钮适合强调操作,搭配 `status` 设置颜色。
|
|
1629
1793
|
|
|
1630
|
-
|
|
1794
|
+
黄色、橙色实心按钮的文字对比较弱,需要更高可读性时可选用描边或弱底形态。
|
|
1631
1795
|
|
|
1632
1796
|
```vue
|
|
1633
1797
|
<script setup lang="ts">
|
|
@@ -1646,25 +1810,11 @@ import { Button } from 'x-next';
|
|
|
1646
1810
|
|
|
1647
1811
|
### 类型与边框
|
|
1648
1812
|
|
|
1649
|
-
|
|
1813
|
+
`:border="false"` 只隐藏边框。需要弱底危险按钮时使用 `type="subtle" status="danger"`,实心危险按钮使用 `type="solid" status="danger"`。
|
|
1650
1814
|
|
|
1651
|
-
|
|
1815
|
+
### 交互状态
|
|
1652
1816
|
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
### 交互三态
|
|
1656
|
-
|
|
1657
|
-
按钮的常态、悬浮、按下按**渐深梯度**设计,每一级都可感知且保持轻盈(明度差 ≥ 0.025,由门禁守护):
|
|
1658
|
-
|
|
1659
|
-
| 形态 | 常态 | 悬浮 | 按下 |
|
|
1660
|
-
| --- | --- | --- | --- |
|
|
1661
|
-
| 默认 / 信息(灰色系) | `fill-2` | `neutral-3` | `neutral-4` |
|
|
1662
|
-
| 彩色弱底 / 描边 / 文本(除 warning) | 无色或同色浅底 | 同色浅底混入按钮文字色 10% | 同色浅底混入按钮文字色 16% |
|
|
1663
|
-
| warning 弱底 / 描边 / 文本 | 无色或同色浅底 | 同色浅底混入按钮文字色 25% | 同色浅底混入按钮文字色 40% |
|
|
1664
|
-
| 链接 | 透明背景、状态文字色 | 保持常态 | 保持常态 |
|
|
1665
|
-
| 实色 | 种子实底 | 混白 8%(更亮) | 混恒定深 10%(更深) |
|
|
1666
|
-
|
|
1667
|
-
默认按钮不用 `fill-2/3/4` 递进:全局 fill 灰阶在浅端被压缩,`fill-2` 与 `fill-3` 只差 3 个通道,悬浮态几乎看不出变化;改用 `neutral-3/4` 后与 Arco 的步进一致。
|
|
1817
|
+
悬浮或按住按钮查看状态变化,也可用 Tab 聚焦后按 Space / Enter 操作。第二组展示局部暗色。
|
|
1668
1818
|
|
|
1669
1819
|
```vue
|
|
1670
1820
|
<script setup lang="ts">
|
|
@@ -1678,15 +1828,52 @@ import { Button } from 'x-next';
|
|
|
1678
1828
|
<Button type="text">文本按钮</Button>
|
|
1679
1829
|
<Button plain status="success">朴素成功</Button>
|
|
1680
1830
|
<Button :border="false" status="danger">无边框危险</Button>
|
|
1681
|
-
<Button
|
|
1682
|
-
<Button
|
|
1683
|
-
<Button
|
|
1831
|
+
<Button type="text" narrow>紧凑文本</Button>
|
|
1832
|
+
<Button type="text" narrow status="danger">危险文本</Button>
|
|
1833
|
+
<Button type="text" narrow disabled>禁用文本</Button>
|
|
1684
1834
|
</template>
|
|
1685
1835
|
```
|
|
1686
1836
|
|
|
1687
|
-
|
|
1837
|
+
```vue
|
|
1838
|
+
<script setup lang="ts">
|
|
1839
|
+
import 'x-next/style.css';
|
|
1840
|
+
import { ref } from 'vue';
|
|
1841
|
+
import { Button as XButton, ConfigProvider as XConfigProvider } from 'x-next';
|
|
1842
|
+
import 'x-next/style/base.css';
|
|
1843
|
+
import 'x-next/style/button.css';
|
|
1688
1844
|
|
|
1689
|
-
|
|
1845
|
+
const count = ref(0);
|
|
1846
|
+
const statuses = ['default', 'primary', 'success', 'warning', 'strong', 'danger', 'info'] as const;
|
|
1847
|
+
</script>
|
|
1848
|
+
<template>
|
|
1849
|
+
<div v-for="status in statuses" :key="status">
|
|
1850
|
+
<XButton type="outline" :status="status" @click="count++">描边</XButton>
|
|
1851
|
+
<XButton type="dashed" :status="status" @click="count++">虚线</XButton>
|
|
1852
|
+
<XButton type="text" :status="status" @click="count++">文本</XButton>
|
|
1853
|
+
<XButton type="text" narrow :status="status" @click="count++">紧凑文本</XButton>
|
|
1854
|
+
</div>
|
|
1855
|
+
<XConfigProvider :dark="true" class="button-dark-example">
|
|
1856
|
+
<XButton type="outline" @click="count++">暗色描边</XButton>
|
|
1857
|
+
<XButton type="dashed" @click="count++">暗色虚线</XButton>
|
|
1858
|
+
<XButton type="text" @click="count++">暗色文本</XButton>
|
|
1859
|
+
<XButton type="text" narrow @click="count++">暗色紧凑文本</XButton>
|
|
1860
|
+
<XButton type="outline" disabled>禁用</XButton>
|
|
1861
|
+
<XButton type="text" loading>加载</XButton>
|
|
1862
|
+
</XConfigProvider>
|
|
1863
|
+
<span role="status">已触发 {{ count }} 次</span>
|
|
1864
|
+
</template>
|
|
1865
|
+
<style scoped>
|
|
1866
|
+
.button-dark-example {
|
|
1867
|
+
display: flex;
|
|
1868
|
+
flex-wrap: wrap;
|
|
1869
|
+
gap: 12px;
|
|
1870
|
+
padding: 20px;
|
|
1871
|
+
background: var(--x-color-bg-surface);
|
|
1872
|
+
}
|
|
1873
|
+
</style>
|
|
1874
|
+
```
|
|
1875
|
+
|
|
1876
|
+
### 状态矩阵
|
|
1690
1877
|
|
|
1691
1878
|
```vue
|
|
1692
1879
|
<script setup lang="ts">
|
|
@@ -1729,7 +1916,7 @@ const sizes = ['mini', 'small', 'medium', 'large', 'huge'] as const;
|
|
|
1729
1916
|
|
|
1730
1917
|
### 尺寸
|
|
1731
1918
|
|
|
1732
|
-
`mini`、`small`、`medium`、`large`、`huge` 的默认高度分别为 24、28、32、36、38px。
|
|
1919
|
+
`mini`、`small`、`medium`、`large`、`huge` 的默认高度分别为 24、28、32、36、38px,字号分别为 12、13、14、15、16px。
|
|
1733
1920
|
|
|
1734
1921
|
以下为默认主题中的尺寸规格;链接和形状选项会按对应规则调整布局。
|
|
1735
1922
|
|
|
@@ -1738,8 +1925,8 @@ const sizes = ['mini', 'small', 'medium', 'large', 'huge'] as const;
|
|
|
1738
1925
|
| `mini` | 24px | 12px | 500 | 8px | 4px |
|
|
1739
1926
|
| `small` | 28px | 13px | 500 | 10px | 4px |
|
|
1740
1927
|
| `medium` | 32px | 14px | 500 | 14px | 4px |
|
|
1741
|
-
| `large` | 36px |
|
|
1742
|
-
| `huge` | 38px | 16px | 500 |
|
|
1928
|
+
| `large` | 36px | 15px | 500 | 16px | 6px |
|
|
1929
|
+
| `huge` | 38px | 16px | 500 | 20px | 6px |
|
|
1743
1930
|
|
|
1744
1931
|
```vue
|
|
1745
1932
|
<script setup lang="ts">
|
|
@@ -1798,6 +1985,15 @@ const pushLog = (label: string) => {
|
|
|
1798
1985
|
|
|
1799
1986
|
`type` 控制视觉样式,`html-type` 控制原生按钮行为。默认 `html-type="button"`,不会因为放进表单而意外提交。
|
|
1800
1987
|
|
|
1988
|
+
### 原生动作与防重复点击
|
|
1989
|
+
|
|
1990
|
+
<form class="example-box example-box-column" data-demo="button-native-debounce" @submit.prevent="nativeCount++" @reset="formStatus = '防重复示例已重置'">
|
|
1991
|
+
<label>必填内容 <input name="message" required value="初始内容" /></label>
|
|
1992
|
+
<span role="status">已提交 {{ nativeCount }} 次;{{ formStatus }}</span>
|
|
1993
|
+
</form>
|
|
1994
|
+
|
|
1995
|
+
`debounce` 用于防止重复点击,提交结果在表单的 submit 事件中处理。
|
|
1996
|
+
|
|
1801
1997
|
```vue
|
|
1802
1998
|
<script setup lang="ts">
|
|
1803
1999
|
import 'x-next/style.css';
|
|
@@ -1815,6 +2011,23 @@ const handleSubmit = () => {
|
|
|
1815
2011
|
</template>
|
|
1816
2012
|
```
|
|
1817
2013
|
|
|
2014
|
+
```vue
|
|
2015
|
+
<script setup lang="ts">
|
|
2016
|
+
import 'x-next/style.css';
|
|
2017
|
+
import { Button } from 'x-next';
|
|
2018
|
+
import { ref } from 'vue';
|
|
2019
|
+
const count = ref(0), message = ref('尚未重置');
|
|
2020
|
+
</script>
|
|
2021
|
+
<template>
|
|
2022
|
+
<form @submit.prevent="count++" @reset="message = '已重置'">
|
|
2023
|
+
<label>必填内容 <input name="message" required value="初始内容" /></label>
|
|
2024
|
+
<Button type="solid" status="primary" html-type="submit" :debounce="800">防重复提交</Button>
|
|
2025
|
+
<Button html-type="reset" :debounce="800">防重复重置</Button>
|
|
2026
|
+
<span role="status">已提交 {{ count }} 次;{{ message }}</span>
|
|
2027
|
+
</form>
|
|
2028
|
+
</template>
|
|
2029
|
+
```
|
|
2030
|
+
|
|
1818
2031
|
### 文字与图标
|
|
1819
2032
|
|
|
1820
2033
|
按钮支持中英文混排,可以通过 `prefix`、`suffix` 插槽添加图标或附加文字。下面展示不同尺寸的组合,切换加载状态可查看加载图标与内容的排列。
|
|
@@ -1948,6 +2161,8 @@ const nativeAttrs1 = { "aria-label": "切换填充加载" } satisfies ButtonHTML
|
|
|
1948
2161
|
|
|
1949
2162
|
按钮组只连接相邻边缘,保留两端的形状;只有一个按钮时仍保留完整圆角。
|
|
1950
2163
|
|
|
2164
|
+
circle 与 block 同用时保持圆形等宽高;普通纯图标与 block 同用时撑满父宽。按钮组中无边框、subtle 和 text 形态不自动补左侧分隔边框。
|
|
2165
|
+
|
|
1951
2166
|
```vue
|
|
1952
2167
|
<script setup lang="ts">
|
|
1953
2168
|
import 'x-next/style.css';
|
|
@@ -4658,6 +4873,10 @@ const range = ref(['2026-06-01', '2026-06-30']);
|
|
|
4658
4873
|
|
|
4659
4874
|
### 中国农历展示
|
|
4660
4875
|
|
|
4876
|
+
### 农历空辅助行和禁用状态
|
|
4877
|
+
|
|
4878
|
+
只显示节日和节气时,部分日期没有辅助文案;数字、选中圆圈和范围色带仍共用同一日期区。周末禁用时,数字与农历文字一同弱化,包括绑定值已命中禁用日期的情况。
|
|
4879
|
+
|
|
4661
4880
|
```vue
|
|
4662
4881
|
<script setup lang="ts">
|
|
4663
4882
|
import 'x-next/style.css';
|
|
@@ -4676,6 +4895,24 @@ const range = ref(['2026-06-19', '2026-09-25']);
|
|
|
4676
4895
|
</template>
|
|
4677
4896
|
```
|
|
4678
4897
|
|
|
4898
|
+
```vue
|
|
4899
|
+
<script setup lang="ts">
|
|
4900
|
+
import 'x-next/style.css';
|
|
4901
|
+
import { RangePicker, DatePicker } from 'x-next';
|
|
4902
|
+
import { ref } from 'vue';
|
|
4903
|
+
const range = ref(['2026-06-19', '2026-07-07']);
|
|
4904
|
+
const date = ref('2026-06-20');
|
|
4905
|
+
const disabledDate = (current: Date) => [0, 6].includes(current.getDay());
|
|
4906
|
+
import type { HTMLAttributes } from 'vue';
|
|
4907
|
+
const nativeAttrs1 = { "aria-label": "节日节气范围" } satisfies HTMLAttributes;
|
|
4908
|
+
const nativeAttrs2 = { "aria-label": "农历日期" } satisfies HTMLAttributes;
|
|
4909
|
+
</script>
|
|
4910
|
+
<template>
|
|
4911
|
+
<RangePicker v-bind="nativeAttrs1" v-model="range" :show-lunar="{ showLunarDate: false }" />
|
|
4912
|
+
<DatePicker v-bind="nativeAttrs2" v-model="date" show-lunar :disabled-date="disabledDate" />
|
|
4913
|
+
</template>
|
|
4914
|
+
```
|
|
4915
|
+
|
|
4679
4916
|
### 带时间的日期选择
|
|
4680
4917
|
|
|
4681
4918
|
```vue
|
|
@@ -4693,6 +4930,51 @@ const dateTimeRange = ref(['2026-06-02 00:00:00', '2026-07-29 09:09:06']);
|
|
|
4693
4930
|
</template>
|
|
4694
4931
|
```
|
|
4695
4932
|
|
|
4933
|
+
### 手输与禁用规则
|
|
4934
|
+
|
|
4935
|
+
第一项可输入 `2026-06-06`(禁用周末)或 `2026-02-31`(不存在的日期),按 Enter 后会恢复原值。第二项可输入 `2026-06-04 15:46:12`,提交后保留时分秒;0–8 时和每小时 30 分不可选,也不能通过手输提交。`disabledTime` 按字段覆盖 `timePickerProps` 中的时间禁用函数。
|
|
4936
|
+
|
|
4937
|
+
```vue
|
|
4938
|
+
<script setup lang="ts">
|
|
4939
|
+
import 'x-next/style.css';
|
|
4940
|
+
import { DatePicker } from 'x-next';
|
|
4941
|
+
import { ref } from 'vue';
|
|
4942
|
+
const date = ref('2026-06-04');
|
|
4943
|
+
const dateTime = ref('2026-06-04 09:15:00');
|
|
4944
|
+
const log = ref('等待有效提交');
|
|
4945
|
+
const disabledDate = (current: Date) => [0, 6].includes(current.getDay());
|
|
4946
|
+
const timeProps = { disabledHours: () => [0, 1, 2, 3, 4, 5, 6, 7, 8] };
|
|
4947
|
+
const disabledTime = () => ({ disabledMinutes: () => [30] });
|
|
4948
|
+
import type { HTMLAttributes } from 'vue';
|
|
4949
|
+
const nativeAttrs1 = { "aria-label": "预约日期" } satisfies HTMLAttributes;
|
|
4950
|
+
const nativeAttrs2 = { "aria-label": "预约日期时间" } satisfies HTMLAttributes;
|
|
4951
|
+
</script>
|
|
4952
|
+
<template>
|
|
4953
|
+
<DatePicker v-bind="nativeAttrs1" v-model="date" :disabled-date="disabledDate" />
|
|
4954
|
+
<DatePicker v-bind="nativeAttrs2" v-model="dateTime" show-time :time-picker-props="timeProps" :disabled-time="disabledTime" @change="log = `提交:${$event}`" />
|
|
4955
|
+
<p>{{ date }};{{ dateTime }};{{ log }}</p>
|
|
4956
|
+
</template>
|
|
4957
|
+
```
|
|
4958
|
+
|
|
4959
|
+
### 周一起始的周选择
|
|
4960
|
+
|
|
4961
|
+
周选择的网格、点击、手输和提交保持相同的周起始日。下方可输入 `2026-40th`,或选择 2026 年 9 月 28 日到 10 月 4 日中的任一天,再重新打开确认高亮行。
|
|
4962
|
+
|
|
4963
|
+
```vue
|
|
4964
|
+
<script setup lang="ts">
|
|
4965
|
+
import 'x-next/style.css';
|
|
4966
|
+
import { WeekPicker } from 'x-next';
|
|
4967
|
+
import { ref } from 'vue';
|
|
4968
|
+
const week = ref('2026-40th');
|
|
4969
|
+
import type { HTMLAttributes } from 'vue';
|
|
4970
|
+
const nativeAttrs1 = { "aria-label": "排期周" } satisfies HTMLAttributes;
|
|
4971
|
+
</script>
|
|
4972
|
+
<template>
|
|
4973
|
+
<WeekPicker v-bind="nativeAttrs1" v-model="week" :day-start-of-week="1" />
|
|
4974
|
+
<p>{{ week }}</p>
|
|
4975
|
+
</template>
|
|
4976
|
+
```
|
|
4977
|
+
|
|
4696
4978
|
### 月范围和受控面板
|
|
4697
4979
|
|
|
4698
4980
|
```vue
|
|
@@ -4765,18 +5047,24 @@ const date = ref('2026-09-30');
|
|
|
4765
5047
|
|
|
4766
5048
|
### 状态
|
|
4767
5049
|
|
|
5050
|
+
范围仅禁用一端时,面板与手输只更新另一端,并保持原有起止顺序;为避免清掉锁定值,此时隐藏整体清空按钮。
|
|
5051
|
+
|
|
4768
5052
|
```vue
|
|
4769
5053
|
<script setup lang="ts">
|
|
4770
5054
|
import 'x-next/style.css';
|
|
4771
|
-
import { DatePicker } from 'x-next';
|
|
5055
|
+
import { DatePicker, RangePicker } from 'x-next';
|
|
4772
5056
|
import { ref } from 'vue';
|
|
4773
5057
|
const date = ref('2026-09-30');
|
|
5058
|
+
const range = ref(['2026-06-01', '2026-06-30']);
|
|
5059
|
+
import type { HTMLAttributes } from 'vue';
|
|
5060
|
+
const nativeAttrs1 = { "aria-label": "开始日期已锁定" } satisfies HTMLAttributes;
|
|
4774
5061
|
</script>
|
|
4775
5062
|
<template>
|
|
4776
5063
|
<DatePicker v-model="date" allow-clear />
|
|
4777
5064
|
<DatePicker default-value="2026-06-04" readonly />
|
|
4778
5065
|
<DatePicker default-value="2026-06-04" disabled />
|
|
4779
5066
|
<DatePicker v-model="date" error />
|
|
5067
|
+
<RangePicker v-bind="nativeAttrs1" v-model="range" :disabled="[true, false]" />
|
|
4780
5068
|
</template>
|
|
4781
5069
|
```
|
|
4782
5070
|
|
|
@@ -4930,7 +5218,9 @@ const nativeAttrs2 = { "aria-label": "预约日期范围" } satisfies HTMLAttrib
|
|
|
4930
5218
|
|
|
4931
5219
|
- `showTime` 仅在日期和日期范围模式生效,默认格式为 `YYYY-MM-DD HH:mm:ss`,选择后需要点击“确定”提交。
|
|
4932
5220
|
- `showLunar` 仅影响日期格辅助展示,不改变 `modelValue`、`format`、范围排序或禁用逻辑;内置数据来自香港天文台 1901-2100 年公历 / 农历对照表,超出范围时默认不展示。
|
|
4933
|
-
-
|
|
5221
|
+
- 合法手输按 Enter 或失焦提交,日期时间保留时分秒。不存在的日期、越界时间或命中禁用规则的输入会恢复已提交值;编辑空草稿期间不立即回填。
|
|
5222
|
+
- 今天、快捷项与确认提交同样遵守禁用规则;确认前规则变化导致草稿不可选时,“确定”按钮禁用。日期时间面板点选仍需点击“确定”提交。
|
|
5223
|
+
- 面板标题为年月文本,使用左右箭头翻页;当前不提供点击标题进行年月视图下钻。
|
|
4934
5224
|
- 普通范围选择会在选择结束值后自动排序并提交;开启 `showTime` 后需要点击“确定”提交。
|
|
4935
5225
|
- `valueFormat="timestamp"` 会让绑定值和事件值返回时间戳。
|
|
4936
5226
|
|
|
@@ -5244,6 +5534,38 @@ import { Alert } from 'x-next';
|
|
|
5244
5534
|
</template>
|
|
5245
5535
|
```
|
|
5246
5536
|
|
|
5537
|
+
### 暗色主题
|
|
5538
|
+
|
|
5539
|
+
暗色提示与 Button 状态按钮、Link 悬浮背景及反馈图标底使用同组状态配色,正文保持浅色,图标保留类型辨识度。`normal` 继续使用中性弱提示背景。下面通过 ConfigProvider 展示局部暗色,页面主题切换时也会应用相同配色。
|
|
5540
|
+
|
|
5541
|
+
```vue
|
|
5542
|
+
<script setup lang="ts">
|
|
5543
|
+
import 'x-next/style.css';
|
|
5544
|
+
import { Alert as XAlert, ConfigProvider as XConfigProvider } from 'x-next';
|
|
5545
|
+
import 'x-next/style/base.css';
|
|
5546
|
+
import 'x-next/style/alert.css';
|
|
5547
|
+
</script>
|
|
5548
|
+
<template>
|
|
5549
|
+
<XConfigProvider :dark="true" class="alert-dark-example">
|
|
5550
|
+
<XAlert type="info">用于普通信息提示。</XAlert>
|
|
5551
|
+
<XAlert type="success">用于成功状态反馈。</XAlert>
|
|
5552
|
+
<XAlert type="warning">用于需要关注的警告信息。</XAlert>
|
|
5553
|
+
<XAlert type="strong">用于需要强调的提醒信息。</XAlert>
|
|
5554
|
+
<XAlert type="error">用于错误或失败信息。</XAlert>
|
|
5555
|
+
<XAlert type="normal">用于弱提示或中性说明。</XAlert>
|
|
5556
|
+
</XConfigProvider>
|
|
5557
|
+
</template>
|
|
5558
|
+
<style scoped>
|
|
5559
|
+
.alert-dark-example {
|
|
5560
|
+
display: grid;
|
|
5561
|
+
gap: 12px;
|
|
5562
|
+
padding: 20px;
|
|
5563
|
+
border-radius: 8px;
|
|
5564
|
+
background: var(--x-color-bg-surface);
|
|
5565
|
+
}
|
|
5566
|
+
</style>
|
|
5567
|
+
```
|
|
5568
|
+
|
|
5247
5569
|
### 标题
|
|
5248
5570
|
|
|
5249
5571
|
```vue
|
|
@@ -5477,6 +5799,8 @@ const beforeClose = async (action: 'cancel' | 'ok') => {
|
|
|
5477
5799
|
|
|
5478
5800
|
### 显示方式
|
|
5479
5801
|
|
|
5802
|
+
默认对话框距离顶部 `100px`,可通过 `top` 自定义;设置 `center` 后垂直居中,`fullscreen` 则占满容器。右上角关闭按钮悬停时显示背景,也支持键盘聚焦。
|
|
5803
|
+
|
|
5480
5804
|
```vue
|
|
5481
5805
|
<script setup lang="ts">
|
|
5482
5806
|
import 'x-next/style.css';
|
|
@@ -19730,13 +20054,12 @@ interface BarChartLayout {
|
|
|
19730
20054
|
| loadingFill | 加载时居中覆盖内容并保持尺寸;结束后恢复文字和插槽 | undefined | false | true | 否 | false |
|
|
19731
20055
|
| debounce | 点击后保持 loading 态的时间,单位 ms,用于防重复点击 | undefined | number | 否 | 0 |
|
|
19732
20056
|
| shape | 胶囊形、圆形或直角;未设置时使用默认圆角 | undefined | "round" | "circle" | "square" | 否 | undefined |
|
|
19733
|
-
|
|
|
19734
|
-
| type | 按钮类型 | undefined | "default" | "primary" | "dashed" | "outline" | "text" | 否 | "default" |
|
|
20057
|
+
| type | 按钮形态;primary 是实心形态的快捷类型,默认使用品牌色 | undefined | "default" | "primary" | "solid" | "subtle" | "dashed" | "outline" | "text" | 否 | "default" |
|
|
19735
20058
|
| htmlType | 原生按钮类型;模板中使用 html-type | undefined | "button" | "submit" | "reset" | 否 | "button" |
|
|
19736
|
-
| status |
|
|
19737
|
-
| plain |
|
|
20059
|
+
| status | 按钮颜色 | undefined | "default" | "success" | "warning" | "strong" | "info" | "primary" | "danger" | 否 | "default" |
|
|
20060
|
+
| plain | 将 default / solid / primary 改为弱底,保留颜色 | undefined | false | true | 否 | false |
|
|
19738
20061
|
| size | 按钮尺寸 | undefined | "mini" | "small" | "medium" | "large" | "huge" | 否 | undefined |
|
|
19739
|
-
| border |
|
|
20062
|
+
| border | 是否允许形态的边框;false 只隐藏边框 | undefined | false | true | 否 | true |
|
|
19740
20063
|
| narrow | 是否使用窄按钮,无内边距 | undefined | false | true | 否 | false |
|
|
19741
20064
|
|
|
19742
20065
|
### Events
|
|
@@ -19752,7 +20075,7 @@ interface BarChartLayout {
|
|
|
19752
20075
|
| default | 按钮内容 | () => any |
|
|
19753
20076
|
| prefix | 前置内容 | () => any |
|
|
19754
20077
|
| suffix | 后置内容 | () => any |
|
|
19755
|
-
| icon |
|
|
20078
|
+
| icon | 图标内容,会渲染在文字前;仅有此插槽时通常等宽高,block 时撑满父宽;请设置 aria-label | any |
|
|
19756
20079
|
|
|
19757
20080
|
### 实例方法
|
|
19758
20081
|
|
|
@@ -19765,9 +20088,9 @@ interface BarChartLayout {
|
|
|
19765
20088
|
```typescript-reference
|
|
19766
20089
|
type ButtonSize = 'mini' | 'small' | 'medium' | 'large' | 'huge';
|
|
19767
20090
|
|
|
19768
|
-
type ButtonStatus = 'default' | 'success' | 'warning' | 'strong' | 'danger' | 'info';
|
|
20091
|
+
type ButtonStatus = 'default' | 'primary' | 'success' | 'warning' | 'strong' | 'danger' | 'info';
|
|
19769
20092
|
|
|
19770
|
-
type ButtonTypes = 'primary' | 'default' | 'dashed' | 'outline' | 'text';
|
|
20093
|
+
type ButtonTypes = 'primary' | 'default' | 'solid' | 'subtle' | 'dashed' | 'outline' | 'text';
|
|
19771
20094
|
|
|
19772
20095
|
type ButtonHtmlType = 'button' | 'submit' | 'reset';
|
|
19773
20096
|
|
|
@@ -19780,7 +20103,6 @@ type ButtonProps = {
|
|
|
19780
20103
|
loadingFill?: boolean;
|
|
19781
20104
|
debounce?: number;
|
|
19782
20105
|
shape?: ButtonShape;
|
|
19783
|
-
link?: boolean;
|
|
19784
20106
|
type?: ButtonTypes;
|
|
19785
20107
|
htmlType?: ButtonHtmlType;
|
|
19786
20108
|
status?: ButtonStatus;
|
|
@@ -19800,11 +20122,11 @@ type ButtonProps = {
|
|
|
19800
20122
|
|
|
19801
20123
|
| 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
|
|
19802
20124
|
| --- | --- | --- | --- | --- |
|
|
19803
|
-
| type | 子按钮默认类型 | undefined | "default" | "primary" | "dashed" | "outline" | "text" | 否 | 未声明 |
|
|
19804
|
-
| status | 子按钮默认状态 | undefined | "default" | "success" | "warning" | "strong" | "info" | "danger" | 否 | 未声明 |
|
|
20125
|
+
| type | 子按钮默认类型 | undefined | "default" | "primary" | "solid" | "subtle" | "dashed" | "outline" | "text" | 否 | 未声明 |
|
|
20126
|
+
| status | 子按钮默认状态 | undefined | "default" | "success" | "warning" | "strong" | "info" | "primary" | "danger" | 否 | 未声明 |
|
|
19805
20127
|
| shape | 子按钮默认形状 | undefined | "round" | "circle" | "square" | 否 | 未声明 |
|
|
19806
20128
|
| size | 子按钮默认尺寸 | undefined | "mini" | "small" | "medium" | "large" | "huge" | 否 | 未声明 |
|
|
19807
|
-
| disabled |
|
|
20129
|
+
| disabled | 子按钮默认禁用值;子按钮显式值优先 | undefined | false | true | 否 | false(Vue Boolean 转换) |
|
|
19808
20130
|
|
|
19809
20131
|
### Events
|
|
19810
20132
|
|
|
@@ -19825,9 +20147,9 @@ type ButtonProps = {
|
|
|
19825
20147
|
```typescript-reference
|
|
19826
20148
|
type ButtonSize = 'mini' | 'small' | 'medium' | 'large' | 'huge';
|
|
19827
20149
|
|
|
19828
|
-
type ButtonStatus = 'default' | 'success' | 'warning' | 'strong' | 'danger' | 'info';
|
|
20150
|
+
type ButtonStatus = 'default' | 'primary' | 'success' | 'warning' | 'strong' | 'danger' | 'info';
|
|
19829
20151
|
|
|
19830
|
-
type ButtonTypes = 'primary' | 'default' | 'dashed' | 'outline' | 'text';
|
|
20152
|
+
type ButtonTypes = 'primary' | 'default' | 'solid' | 'subtle' | 'dashed' | 'outline' | 'text';
|
|
19831
20153
|
|
|
19832
20154
|
type ButtonHtmlType = 'button' | 'submit' | 'reset';
|
|
19833
20155
|
|
|
@@ -19840,7 +20162,6 @@ type ButtonProps = {
|
|
|
19840
20162
|
loadingFill?: boolean;
|
|
19841
20163
|
debounce?: number;
|
|
19842
20164
|
shape?: ButtonShape;
|
|
19843
|
-
link?: boolean;
|
|
19844
20165
|
type?: ButtonTypes;
|
|
19845
20166
|
htmlType?: ButtonHtmlType;
|
|
19846
20167
|
status?: ButtonStatus;
|
|
@@ -20210,7 +20531,7 @@ type GridItemInstance = InstanceType<typeof _GridItem>;
|
|
|
20210
20531
|
| pickerValue | 面板显示日期 | undefined | string | number | Date | (DatePickerValue | undefined)[] | 否 | 未声明 |
|
|
20211
20532
|
| defaultPickerValue | 默认面板显示日期 | undefined | string | number | Date | (DatePickerValue | undefined)[] | 否 | 未声明 |
|
|
20212
20533
|
| placeholder | 占位文案 | undefined | string | string[] | 否 | 未声明 |
|
|
20213
|
-
| disabled |
|
|
20534
|
+
| disabled | 是否禁用;范围数组分别锁定两端,单端锁定时只更新另一端并隐藏整体清空 | undefined | false | true | boolean[] | 否 | false |
|
|
20214
20535
|
| readonly | 是否只读 | undefined | false | true | 否 | false |
|
|
20215
20536
|
| disabledInput | 禁止输入框键盘输入但允许面板选择 | undefined | false | true | 否 | false |
|
|
20216
20537
|
| inputReadOnly | 输入框只读,常用于移动端避免软键盘 | undefined | false | true | 否 | false |
|
|
@@ -20232,8 +20553,8 @@ type GridItemInstance = InstanceType<typeof _GridItem>;
|
|
|
20232
20553
|
| showToday | 是否显示今天 / 本月 / 今年按钮 | undefined | false | true | 否 | true |
|
|
20233
20554
|
| showConfirmBtn | 是否显示确认按钮 | undefined | false | true | 否 | false |
|
|
20234
20555
|
| showTime | 是否开启日期时间选择,仅 date / date-range 生效 | undefined | false | true | 否 | false |
|
|
20235
|
-
| timePickerProps | 时间列配置,支持 format、step、use12Hours、disabledHours、disabledMinutes、disabledSeconds、hideDisabledOptions、defaultValue | undefined |
|
|
20236
|
-
| disabledTime | 禁用时间,需要配合 showTime 使用 | undefined | (current?: Date, type?: DatePickerRange) =>
|
|
20556
|
+
| timePickerProps | 时间列配置,支持 format、step、use12Hours、disabledHours、disabledMinutes、disabledSeconds、hideDisabledOptions、defaultValue | undefined | DatePickerTimePickerProps | 否 | 未声明 |
|
|
20557
|
+
| disabledTime | 禁用时间,需要配合 showTime 使用 | undefined | (current?: Date, type?: DatePickerRange) => DatePickerDisabledTimeProps | undefined | 否 | 未声明 |
|
|
20237
20558
|
| showLunar | 是否展示中国农历辅助信息,支持控制农历日期、农历节日、节气和公历节日 | undefined | false | true | { showLunarDate?: boolean; showLunarFestival?: boolean; showSolarTerm?: boolean; showSolarFestival?: boolean; fallbackText?: string; } | 否 | false |
|
|
20238
20559
|
|
|
20239
20560
|
### Events
|
|
@@ -20264,9 +20585,12 @@ type GridItemInstance = InstanceType<typeof _GridItem>;
|
|
|
20264
20585
|
| cell | 自定义日期单元格 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
|
|
20265
20586
|
| extra | 面板快捷区额外内容 | 文档列出的实际插槽;公开类型未细化,作用域见场景用法 |
|
|
20266
20587
|
|
|
20267
|
-
### 实例方法
|
|
20588
|
+
### 实例方法 / 暴露值
|
|
20268
20589
|
|
|
20269
|
-
|
|
20590
|
+
| 名称 | 公开类型 |
|
|
20591
|
+
| --- | --- |
|
|
20592
|
+
| focus | () => void |
|
|
20593
|
+
| blur | () => void |
|
|
20270
20594
|
|
|
20271
20595
|
### 关联类型定义
|
|
20272
20596
|
|
|
@@ -20469,7 +20793,7 @@ interface DialogCaller {
|
|
|
20469
20793
|
| renderTo | 见场景用法与类型 | undefined | string | HTMLElement | 否 | "body" |
|
|
20470
20794
|
| disabled | 见场景用法与类型 | undefined | false | true | 否 | false |
|
|
20471
20795
|
| modelValue | 见场景用法与类型 | undefined | false | true | 否 | false |
|
|
20472
|
-
| top | 见场景用法与类型 | undefined | string | number | 否 | "
|
|
20796
|
+
| top | 见场景用法与类型 | undefined | string | number | 否 | "100px" |
|
|
20473
20797
|
| center | 见场景用法与类型 | undefined | false | true | 否 | false |
|
|
20474
20798
|
| width | 见场景用法与类型 | undefined | string | number | 否 | 0 |
|
|
20475
20799
|
| height | 见场景用法与类型 | undefined | string | number | 否 | 0 |
|
|
@@ -20680,8 +21004,8 @@ interface UseDraggableOptions<T> extends Options {
|
|
|
20680
21004
|
| okText | 确认按钮文案 | undefined | string | 否 | "" |
|
|
20681
21005
|
| cancelText | 取消按钮文案 | undefined | string | 否 | "" |
|
|
20682
21006
|
| okLoading | 确认按钮是否 loading | undefined | false | true | 否 | false |
|
|
20683
|
-
| okButtonProps | 确认按钮 props | undefined | { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape;
|
|
20684
|
-
| cancelButtonProps | 取消按钮 props | undefined | { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape;
|
|
21007
|
+
| okButtonProps | 确认按钮 props | undefined | { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
|
|
21008
|
+
| cancelButtonProps | 取消按钮 props | undefined | { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
|
|
20685
21009
|
| hideCancel | 是否隐藏默认取消按钮 | undefined | false | true | 否 | false |
|
|
20686
21010
|
| onBeforeOk | 确认前拦截,返回 false 阻止关闭 | undefined | (event?: Event) => boolean | void | Promise<boolean | void> | 否 | 未声明 |
|
|
20687
21011
|
| onBeforeCancel | 取消前拦截,返回 false 阻止关闭 | undefined | (event?: Event) => boolean | void | Promise<boolean | void> | 否 | 未声明 |
|
|
@@ -20820,6 +21144,7 @@ type DropdownOption = DOption | DGroup | DSubmenu;
|
|
|
20820
21144
|
|
|
20821
21145
|
interface DropdownContext {
|
|
20822
21146
|
popupMaxHeight: boolean | number;
|
|
21147
|
+
onTabOut?: () => void;
|
|
20823
21148
|
onOptionClick: (value: string | number | Record<string, unknown> | undefined, ev: Event) => void;
|
|
20824
21149
|
}
|
|
20825
21150
|
|
|
@@ -20854,9 +21179,9 @@ interface DropdownPanelRef {
|
|
|
20854
21179
|
| position | 弹出位置 | undefined | "top" | "bottom" | "tl" | "tr" | "bl" | "br" | 否 | "br" |
|
|
20855
21180
|
| popupContainer | 弹出层挂载容器 | undefined | string | HTMLElement | 否 | 未声明 |
|
|
20856
21181
|
| disabled | 是否禁用 | undefined | false | true | 否 | false |
|
|
20857
|
-
| type | 按钮类型 | undefined | "default" | "primary" | "dashed" | "outline" | "text" | 否 | "default" |
|
|
21182
|
+
| type | 按钮类型 | undefined | "default" | "primary" | "solid" | "subtle" | "dashed" | "outline" | "text" | 否 | "default" |
|
|
20858
21183
|
| size | 按钮尺寸 | undefined | "mini" | "small" | "medium" | "large" | "huge" | 否 | "medium" |
|
|
20859
|
-
| buttonProps | 左侧主按钮属性 | undefined | { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape;
|
|
21184
|
+
| buttonProps | 左侧主按钮属性 | undefined | { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
|
|
20860
21185
|
| hideOnSelect | 选择后是否隐藏弹出层 | undefined | false | true | 否 | true |
|
|
20861
21186
|
|
|
20862
21187
|
### Events
|
|
@@ -20929,6 +21254,7 @@ type DropdownOption = DOption | DGroup | DSubmenu;
|
|
|
20929
21254
|
|
|
20930
21255
|
interface DropdownContext {
|
|
20931
21256
|
popupMaxHeight: boolean | number;
|
|
21257
|
+
onTabOut?: () => void;
|
|
20932
21258
|
onOptionClick: (value: string | number | Record<string, unknown> | undefined, ev: Event) => void;
|
|
20933
21259
|
}
|
|
20934
21260
|
|
|
@@ -21023,6 +21349,7 @@ type DropdownOption = DOption | DGroup | DSubmenu;
|
|
|
21023
21349
|
|
|
21024
21350
|
interface DropdownContext {
|
|
21025
21351
|
popupMaxHeight: boolean | number;
|
|
21352
|
+
onTabOut?: () => void;
|
|
21026
21353
|
onOptionClick: (value: string | number | Record<string, unknown> | undefined, ev: Event) => void;
|
|
21027
21354
|
}
|
|
21028
21355
|
|
|
@@ -21123,6 +21450,7 @@ type DropdownOption = DOption | DGroup | DSubmenu;
|
|
|
21123
21450
|
|
|
21124
21451
|
interface DropdownContext {
|
|
21125
21452
|
popupMaxHeight: boolean | number;
|
|
21453
|
+
onTabOut?: () => void;
|
|
21126
21454
|
onOptionClick: (value: string | number | Record<string, unknown> | undefined, ev: Event) => void;
|
|
21127
21455
|
}
|
|
21128
21456
|
|
|
@@ -21229,6 +21557,7 @@ type DropdownOption = DOption | DGroup | DSubmenu;
|
|
|
21229
21557
|
|
|
21230
21558
|
interface DropdownContext {
|
|
21231
21559
|
popupMaxHeight: boolean | number;
|
|
21560
|
+
onTabOut?: () => void;
|
|
21232
21561
|
onOptionClick: (value: string | number | Record<string, unknown> | undefined, ev: Event) => void;
|
|
21233
21562
|
}
|
|
21234
21563
|
|
|
@@ -27491,7 +27820,7 @@ interface ActionType {
|
|
|
27491
27820
|
| disabled | 禁用输入和搜索按钮 | undefined | false | true | 否 | false |
|
|
27492
27821
|
| size | 尺寸,继承 Form / 全局配置 | undefined | "mini" | "small" | "medium" | "large" | 否 | 未声明 |
|
|
27493
27822
|
| buttonText | 搜索按钮文字 | undefined | string | 否 | 未声明 |
|
|
27494
|
-
| buttonProps | 搜索按钮属性 | undefined | { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape;
|
|
27823
|
+
| buttonProps | 搜索按钮属性 | undefined | { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
|
|
27495
27824
|
| modelValue | 见场景用法与类型 | undefined | string | 否 | 透传内层组件;默认值见对应组件 |
|
|
27496
27825
|
| type | 见场景用法与类型 | undefined | "text" | "password" | 否 | 透传内层组件;默认值见对应组件 |
|
|
27497
27826
|
| error | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
@@ -28848,8 +29177,8 @@ interface IMessageItem extends Required<Pick<IMessageOptions, 'duration' | 'posi
|
|
|
28848
29177
|
| showToday | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
28849
29178
|
| showConfirmBtn | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
28850
29179
|
| showTime | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
28851
|
-
| timePickerProps | 见场景用法与类型 | undefined |
|
|
28852
|
-
| disabledTime | 见场景用法与类型 | undefined | (current?: Date, type?: DatePickerRange) =>
|
|
29180
|
+
| timePickerProps | 见场景用法与类型 | undefined | DatePickerTimePickerProps | 否 | 透传内层组件;默认值见对应组件 |
|
|
29181
|
+
| disabledTime | 见场景用法与类型 | undefined | (current?: Date, type?: DatePickerRange) => DatePickerDisabledTimeProps | undefined | 否 | 透传内层组件;默认值见对应组件 |
|
|
28853
29182
|
| showLunar | 见场景用法与类型 | undefined | false | true | { showLunarDate?: boolean; showLunarFestival?: boolean; showSolarTerm?: boolean; showSolarFestival?: boolean; fallbackText?: string; } | 否 | 透传内层组件;默认值见对应组件 |
|
|
28854
29183
|
|
|
28855
29184
|
### Events
|
|
@@ -28874,9 +29203,12 @@ interface IMessageItem extends Required<Pick<IMessageOptions, 'duration' | 'posi
|
|
|
28874
29203
|
|
|
28875
29204
|
公开类型未逐项声明插槽;本页场景说明列出实际使用的插槽,不将任意插槽视为已支持。
|
|
28876
29205
|
|
|
28877
|
-
### 实例方法
|
|
29206
|
+
### 实例方法 / 暴露值
|
|
28878
29207
|
|
|
28879
|
-
|
|
29208
|
+
| 名称 | 公开类型 |
|
|
29209
|
+
| --- | --- |
|
|
29210
|
+
| focus | (() => void) & (() => void) |
|
|
29211
|
+
| blur | (() => void) & (() => void) |
|
|
28880
29212
|
|
|
28881
29213
|
### 关联类型定义
|
|
28882
29214
|
|
|
@@ -29480,8 +29812,8 @@ interface PieChartSegment {
|
|
|
29480
29812
|
| okText | 确认按钮文案 | undefined | string | 否 | undefined |
|
|
29481
29813
|
| cancelText | 取消按钮文案 | undefined | string | 否 | undefined |
|
|
29482
29814
|
| okLoading | 确认按钮是否为 loading | undefined | false | true | 否 | false |
|
|
29483
|
-
| okButtonProps | 确认按钮 props | undefined | { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape;
|
|
29484
|
-
| cancelButtonProps | 取消按钮 props | undefined | { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape;
|
|
29815
|
+
| okButtonProps | 确认按钮 props | undefined | { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
|
|
29816
|
+
| cancelButtonProps | 取消按钮 props | undefined | { disabled?: boolean; block?: boolean; loading?: boolean; loadingFill?: boolean; debounce?: number; shape?: ButtonShape; type?: ButtonTypes; htmlType?: ButtonHtmlType; status?: ButtonStatus; plain?: boolean; size?: ButtonSize; border?: boolean; narrow?: boolean; } | 否 | 未声明 |
|
|
29485
29817
|
| onBeforeOk | 确认前拦截,返回 false 阻止关闭;返回 Promise 时确认按钮进入 loading | undefined | (e: Event) => boolean | void | Promise<boolean | void> | 否 | undefined |
|
|
29486
29818
|
| onBeforeCancel | 取消前拦截,返回 false 阻止关闭;返回 Promise 时取消按钮进入 loading | undefined | (e: Event) => boolean | void | Promise<boolean | void> | 否 | undefined |
|
|
29487
29819
|
| renderTo | 弹层挂载容器 | undefined | string | HTMLElement | 否 | 未声明 |
|
|
@@ -29734,8 +30066,8 @@ type PopconfirmTypes = 'primary' | 'success' | 'warning' | 'strong' | 'danger' |
|
|
|
29734
30066
|
| showToday | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
29735
30067
|
| showConfirmBtn | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
29736
30068
|
| showTime | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
29737
|
-
| timePickerProps | 见场景用法与类型 | undefined |
|
|
29738
|
-
| disabledTime | 见场景用法与类型 | undefined | (current?: Date, type?: DatePickerRange) =>
|
|
30069
|
+
| timePickerProps | 见场景用法与类型 | undefined | DatePickerTimePickerProps | 否 | 透传内层组件;默认值见对应组件 |
|
|
30070
|
+
| disabledTime | 见场景用法与类型 | undefined | (current?: Date, type?: DatePickerRange) => DatePickerDisabledTimeProps | undefined | 否 | 透传内层组件;默认值见对应组件 |
|
|
29739
30071
|
| showLunar | 见场景用法与类型 | undefined | false | true | { showLunarDate?: boolean; showLunarFestival?: boolean; showSolarTerm?: boolean; showSolarFestival?: boolean; fallbackText?: string; } | 否 | 透传内层组件;默认值见对应组件 |
|
|
29740
30072
|
|
|
29741
30073
|
### Events
|
|
@@ -29760,9 +30092,12 @@ type PopconfirmTypes = 'primary' | 'success' | 'warning' | 'strong' | 'danger' |
|
|
|
29760
30092
|
|
|
29761
30093
|
公开类型未逐项声明插槽;本页场景说明列出实际使用的插槽,不将任意插槽视为已支持。
|
|
29762
30094
|
|
|
29763
|
-
### 实例方法
|
|
30095
|
+
### 实例方法 / 暴露值
|
|
29764
30096
|
|
|
29765
|
-
|
|
30097
|
+
| 名称 | 公开类型 |
|
|
30098
|
+
| --- | --- |
|
|
30099
|
+
| focus | (() => void) & (() => void) |
|
|
30100
|
+
| blur | (() => void) & (() => void) |
|
|
29766
30101
|
|
|
29767
30102
|
### 关联类型定义
|
|
29768
30103
|
|
|
@@ -30075,8 +30410,8 @@ interface RadioGroupContext {
|
|
|
30075
30410
|
| showToday | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
30076
30411
|
| showConfirmBtn | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
30077
30412
|
| showTime | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
30078
|
-
| timePickerProps | 见场景用法与类型 | undefined |
|
|
30079
|
-
| disabledTime | 见场景用法与类型 | undefined | (current?: Date, type?: DatePickerRange) =>
|
|
30413
|
+
| timePickerProps | 见场景用法与类型 | undefined | DatePickerTimePickerProps | 否 | 透传内层组件;默认值见对应组件 |
|
|
30414
|
+
| disabledTime | 见场景用法与类型 | undefined | (current?: Date, type?: DatePickerRange) => DatePickerDisabledTimeProps | undefined | 否 | 透传内层组件;默认值见对应组件 |
|
|
30080
30415
|
| showLunar | 见场景用法与类型 | undefined | false | true | { showLunarDate?: boolean; showLunarFestival?: boolean; showSolarTerm?: boolean; showSolarFestival?: boolean; fallbackText?: string; } | 否 | 透传内层组件;默认值见对应组件 |
|
|
30081
30416
|
|
|
30082
30417
|
### Events
|
|
@@ -30101,9 +30436,12 @@ interface RadioGroupContext {
|
|
|
30101
30436
|
|
|
30102
30437
|
公开类型未逐项声明插槽;本页场景说明列出实际使用的插槽,不将任意插槽视为已支持。
|
|
30103
30438
|
|
|
30104
|
-
### 实例方法
|
|
30439
|
+
### 实例方法 / 暴露值
|
|
30105
30440
|
|
|
30106
|
-
|
|
30441
|
+
| 名称 | 公开类型 |
|
|
30442
|
+
| --- | --- |
|
|
30443
|
+
| focus | (() => void) & (() => void) |
|
|
30444
|
+
| blur | (() => void) & (() => void) |
|
|
30107
30445
|
|
|
30108
30446
|
### 关联类型定义
|
|
30109
30447
|
|
|
@@ -34255,7 +34593,7 @@ type Filters = Record<string, string[]>;
|
|
|
34255
34593
|
| 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
|
|
34256
34594
|
| --- | --- | --- | --- | --- |
|
|
34257
34595
|
| reverse | 是否倒序展示 | undefined | false | true | 否 | false(Vue Boolean 转换) |
|
|
34258
|
-
| lineType | 轴线样式 | undefined | "
|
|
34596
|
+
| lineType | 轴线样式 | undefined | "solid" | "dashed" | "dotted" | 否 | "solid" |
|
|
34259
34597
|
| direction | 时间线方向 | undefined | "horizontal" | "vertical" | 否 | "vertical" |
|
|
34260
34598
|
| mode | 展示模式 | undefined | "top" | "bottom" | "right" | "left" | "alternate" | 否 | "left" |
|
|
34261
34599
|
| pending | 是否展示幽灵节点,传入字符串时作为节点内容展示 | undefined | string | false | true | 否 | false(Vue Boolean 转换) |
|
|
@@ -34308,7 +34646,7 @@ type TimelineItemPosition = 'left' | 'right' | 'top' | 'bottom';
|
|
|
34308
34646
|
| label | 标签文本 | undefined | string | 否 | 未声明 |
|
|
34309
34647
|
| dotColor | 时间点颜色 | undefined | string & {} | "initial" | "red" | "orangered" | "orange" | "gold" | "lime" | "green" | "cyan" | "blue" | "purple" | "magenta" | "gray" | "-moz-initial" | "inherit" | "revert" | "revert-layer" | "unset" | "aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedalmond" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflowerblue" | "cornsilk" | "crimson" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "goldenrod" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "limegreen" | "linen" | "maroon" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "oldlace" | "olive" | "olivedrab" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "rebeccapurple" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "slategrey" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen" | "transparent" | "AccentColor" | "AccentColorText" | "ActiveText" | "ButtonBorder" | "ButtonFace" | "ButtonText" | "Canvas" | "CanvasText" | "Field" | "FieldText" | "GrayText" | "Highlight" | "HighlightText" | "LinkText" | "Mark" | "MarkText" | "SelectedItem" | "SelectedItemText" | "VisitedText" | "ActiveBorder" | "ActiveCaption" | "AppWorkspace" | "Background" | "ButtonHighlight" | "ButtonShadow" | "CaptionText" | "InactiveBorder" | "InactiveCaption" | "InactiveCaptionText" | "InfoBackground" | "InfoText" | "Menu" | "MenuText" | "Scrollbar" | "ThreeDDarkShadow" | "ThreeDFace" | "ThreeDHighlight" | "ThreeDLightShadow" | "ThreeDShadow" | "Window" | "WindowFrame" | "WindowText" | "currentColor" | 否 | 未声明 |
|
|
34310
34648
|
| dotType | 时间点类型 | undefined | "solid" | "hollow" | 否 | "solid" |
|
|
34311
|
-
| lineType | 当前节点后的轴线样式 | undefined | "
|
|
34649
|
+
| lineType | 当前节点后的轴线样式 | undefined | "solid" | "dashed" | "dotted" | 否 | 未声明 |
|
|
34312
34650
|
| lineColor | 当前节点后的轴线颜色 | undefined | string & {} | "initial" | "red" | "orangered" | "orange" | "gold" | "lime" | "green" | "cyan" | "blue" | "purple" | "magenta" | "gray" | "-moz-initial" | "inherit" | "revert" | "revert-layer" | "unset" | "aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedalmond" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflowerblue" | "cornsilk" | "crimson" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "goldenrod" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "limegreen" | "linen" | "maroon" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "oldlace" | "olive" | "olivedrab" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "rebeccapurple" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "slategrey" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen" | "transparent" | "AccentColor" | "AccentColorText" | "ActiveText" | "ButtonBorder" | "ButtonFace" | "ButtonText" | "Canvas" | "CanvasText" | "Field" | "FieldText" | "GrayText" | "Highlight" | "HighlightText" | "LinkText" | "Mark" | "MarkText" | "SelectedItem" | "SelectedItemText" | "VisitedText" | "ActiveBorder" | "ActiveCaption" | "AppWorkspace" | "Background" | "ButtonHighlight" | "ButtonShadow" | "CaptionText" | "InactiveBorder" | "InactiveCaption" | "InactiveCaptionText" | "InfoBackground" | "InfoText" | "Menu" | "MenuText" | "Scrollbar" | "ThreeDDarkShadow" | "ThreeDFace" | "ThreeDHighlight" | "ThreeDLightShadow" | "ThreeDShadow" | "Window" | "WindowFrame" | "WindowText" | "currentColor" | 否 | 未声明 |
|
|
34313
34651
|
| position | 交替模式下的单项位置 | undefined | "top" | "bottom" | "right" | "left" | 否 | 未声明 |
|
|
34314
34652
|
|
|
@@ -36302,8 +36640,8 @@ type WatermarkGap = [number, number];
|
|
|
36302
36640
|
| showToday | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
36303
36641
|
| showConfirmBtn | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
36304
36642
|
| showTime | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
36305
|
-
| timePickerProps | 见场景用法与类型 | undefined |
|
|
36306
|
-
| disabledTime | 见场景用法与类型 | undefined | (current?: Date, type?: DatePickerRange) =>
|
|
36643
|
+
| timePickerProps | 见场景用法与类型 | undefined | DatePickerTimePickerProps | 否 | 透传内层组件;默认值见对应组件 |
|
|
36644
|
+
| disabledTime | 见场景用法与类型 | undefined | (current?: Date, type?: DatePickerRange) => DatePickerDisabledTimeProps | undefined | 否 | 透传内层组件;默认值见对应组件 |
|
|
36307
36645
|
| showLunar | 见场景用法与类型 | undefined | false | true | { showLunarDate?: boolean; showLunarFestival?: boolean; showSolarTerm?: boolean; showSolarFestival?: boolean; fallbackText?: string; } | 否 | 透传内层组件;默认值见对应组件 |
|
|
36308
36646
|
|
|
36309
36647
|
### Events
|
|
@@ -36328,9 +36666,12 @@ type WatermarkGap = [number, number];
|
|
|
36328
36666
|
|
|
36329
36667
|
公开类型未逐项声明插槽;本页场景说明列出实际使用的插槽,不将任意插槽视为已支持。
|
|
36330
36668
|
|
|
36331
|
-
### 实例方法
|
|
36669
|
+
### 实例方法 / 暴露值
|
|
36332
36670
|
|
|
36333
|
-
|
|
36671
|
+
| 名称 | 公开类型 |
|
|
36672
|
+
| --- | --- |
|
|
36673
|
+
| focus | (() => void) & (() => void) |
|
|
36674
|
+
| blur | (() => void) & (() => void) |
|
|
36334
36675
|
|
|
36335
36676
|
### 关联类型定义
|
|
36336
36677
|
|
|
@@ -36485,8 +36826,8 @@ interface DatePickerProps {
|
|
|
36485
36826
|
| showToday | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
36486
36827
|
| showConfirmBtn | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
36487
36828
|
| showTime | 见场景用法与类型 | undefined | false | true | 否 | 透传内层组件;默认值见对应组件 |
|
|
36488
|
-
| timePickerProps | 见场景用法与类型 | undefined |
|
|
36489
|
-
| disabledTime | 见场景用法与类型 | undefined | (current?: Date, type?: DatePickerRange) =>
|
|
36829
|
+
| timePickerProps | 见场景用法与类型 | undefined | DatePickerTimePickerProps | 否 | 透传内层组件;默认值见对应组件 |
|
|
36830
|
+
| disabledTime | 见场景用法与类型 | undefined | (current?: Date, type?: DatePickerRange) => DatePickerDisabledTimeProps | undefined | 否 | 透传内层组件;默认值见对应组件 |
|
|
36490
36831
|
| showLunar | 见场景用法与类型 | undefined | false | true | { showLunarDate?: boolean; showLunarFestival?: boolean; showSolarTerm?: boolean; showSolarFestival?: boolean; fallbackText?: string; } | 否 | 透传内层组件;默认值见对应组件 |
|
|
36491
36832
|
|
|
36492
36833
|
### Events
|
|
@@ -36511,9 +36852,12 @@ interface DatePickerProps {
|
|
|
36511
36852
|
|
|
36512
36853
|
公开类型未逐项声明插槽;本页场景说明列出实际使用的插槽,不将任意插槽视为已支持。
|
|
36513
36854
|
|
|
36514
|
-
### 实例方法
|
|
36855
|
+
### 实例方法 / 暴露值
|
|
36515
36856
|
|
|
36516
|
-
|
|
36857
|
+
| 名称 | 公开类型 |
|
|
36858
|
+
| --- | --- |
|
|
36859
|
+
| focus | (() => void) & (() => void) |
|
|
36860
|
+
| blur | (() => void) & (() => void) |
|
|
36517
36861
|
|
|
36518
36862
|
### 关联类型定义
|
|
36519
36863
|
|