From 2412f32561e5cbc58b7d2b1a00a9158db87028c0 Mon Sep 17 00:00:00 2001 From: mantou132 <709922234@qq.com> Date: Mon, 4 Dec 2023 23:12:37 +0800 Subject: [PATCH] Closed #86 --- .../duoyun-ui/docs/en/01-guide/02-form.md | 2 +- packages/duoyun-ui/docs/en/01-guide/README.md | 6 ++--- .../{cascader-pick.md => cascader-picker.md} | 8 +++--- .../docs/en/02-elements/color-pick.md | 12 --------- .../docs/en/02-elements/color-picker.md | 12 +++++++++ .../{time-pick.md => date-picker.md} | 8 +++--- .../02-elements/date-range-picker.md} | 8 +++--- .../{file-pick.md => file-picker.md} | 8 +++--- .../docs/en/02-elements/image-preview.md | 2 +- .../pick.md => en/02-elements/picker.md} | 8 +++--- .../02-elements/time-picker.md} | 8 +++--- .../duoyun-ui/docs/zh/01-guide/02-form.md | 2 +- packages/duoyun-ui/docs/zh/01-guide/README.md | 6 ++--- .../{cascader-pick.md => cascader-picker.md} | 8 +++--- .../docs/zh/02-elements/color-pick.md | 12 --------- .../docs/zh/02-elements/color-picker.md | 12 +++++++++ .../02-elements/date-picker.md} | 8 +++--- .../02-elements/date-range-picker.md} | 8 +++--- .../{file-pick.md => file-picker.md} | 8 +++--- .../docs/zh/02-elements/image-preview.md | 2 +- .../pick.md => zh/02-elements/picker.md} | 8 +++--- .../{time-pick.md => time-picker.md} | 8 +++--- .../{cascader-pick.ts => cascader-picker.ts} | 6 ++--- .../{color-pick.ts => color-picker.ts} | 6 ++--- .../elements/{date-pick.ts => date-picker.ts} | 6 ++--- ...ate-range-pick.ts => date-range-picker.ts} | 6 ++--- .../elements/{file-pick.ts => file-picker.ts} | 6 ++--- packages/duoyun-ui/src/elements/form.ts | 26 +++++++++---------- packages/duoyun-ui/src/elements/pagination.ts | 8 +++--- .../src/elements/{pick.ts => picker.ts} | 4 +-- packages/duoyun-ui/src/elements/select.ts | 2 +- .../elements/{time-pick.ts => time-picker.ts} | 6 ++--- 32 files changed, 120 insertions(+), 120 deletions(-) rename packages/duoyun-ui/docs/en/02-elements/{cascader-pick.md => cascader-picker.md} (61%) delete mode 100644 packages/duoyun-ui/docs/en/02-elements/color-pick.md create mode 100644 packages/duoyun-ui/docs/en/02-elements/color-picker.md rename packages/duoyun-ui/docs/en/02-elements/{time-pick.md => date-picker.md} (52%) rename packages/duoyun-ui/docs/{zh/02-elements/date-range-pick.md => en/02-elements/date-range-picker.md} (51%) rename packages/duoyun-ui/docs/en/02-elements/{file-pick.md => file-picker.md} (51%) rename packages/duoyun-ui/docs/{zh/02-elements/pick.md => en/02-elements/picker.md} (58%) rename packages/duoyun-ui/docs/{zh/02-elements/date-pick.md => en/02-elements/time-picker.md} (52%) rename packages/duoyun-ui/docs/zh/02-elements/{cascader-pick.md => cascader-picker.md} (61%) delete mode 100644 packages/duoyun-ui/docs/zh/02-elements/color-pick.md create mode 100644 packages/duoyun-ui/docs/zh/02-elements/color-picker.md rename packages/duoyun-ui/docs/{en/02-elements/date-pick.md => zh/02-elements/date-picker.md} (52%) rename packages/duoyun-ui/docs/{en/02-elements/date-range-pick.md => zh/02-elements/date-range-picker.md} (51%) rename packages/duoyun-ui/docs/zh/02-elements/{file-pick.md => file-picker.md} (51%) rename packages/duoyun-ui/docs/{en/02-elements/pick.md => zh/02-elements/picker.md} (58%) rename packages/duoyun-ui/docs/zh/02-elements/{time-pick.md => time-picker.md} (52%) rename packages/duoyun-ui/src/elements/{cascader-pick.ts => cascader-picker.ts} (96%) rename packages/duoyun-ui/src/elements/{color-pick.ts => color-picker.ts} (95%) rename packages/duoyun-ui/src/elements/{date-pick.ts => date-picker.ts} (97%) rename packages/duoyun-ui/src/elements/{date-range-pick.ts => date-range-picker.ts} (97%) rename packages/duoyun-ui/src/elements/{file-pick.ts => file-picker.ts} (98%) rename packages/duoyun-ui/src/elements/{pick.ts => picker.ts} (98%) rename packages/duoyun-ui/src/elements/{time-pick.ts => time-picker.ts} (96%) diff --git a/packages/duoyun-ui/docs/en/01-guide/02-form.md b/packages/duoyun-ui/docs/en/01-guide/02-form.md index bb82c4af..82d197ba 100644 --- a/packages/duoyun-ui/docs/en/01-guide/02-form.md +++ b/packages/duoyun-ui/docs/en/01-guide/02-form.md @@ -106,7 +106,7 @@ export class MyEleElement extends GemElement { ## Custom form field -`` default support `text`, `number`, `checkbox`, `pick`, `radio`, `select`, `textarea`, +`` default support `text`, `number`, `checkbox`, `picker`, `radio`, `select`, `textarea`, if them can't meet your needs, you can use your own elements, just implement the `value` attributes and bubble `change` event, then you can use [``](../02-elements/form.md#dy-form-item-api) `slot` type: diff --git a/packages/duoyun-ui/docs/en/01-guide/README.md b/packages/duoyun-ui/docs/en/01-guide/README.md index c0a72612..b7c225af 100644 --- a/packages/duoyun-ui/docs/en/01-guide/README.md +++ b/packages/duoyun-ui/docs/en/01-guide/README.md @@ -11,7 +11,7 @@ DuoyunUI aims to provide a UI library for lightweight, high performance, full fe ## Elements Overview - Form - > [``](../02-elements/cascader-pick.md), [``](../02-elements/cascader.md), [``](../02-elements/checkbox.md), [``](../02-elements/color-panel.md), [``](../02-elements/color-pick.md), [``](../02-elements/date-panel.md), [``](../02-elements/date-pick.md), [``](../02-elements/date-range-panel.md), [``](../02-elements/date-range-pick.md), [``](../02-elements/drop-area.md), [``](../02-elements/file-pick.md), [``](../02-elements/form.md), [``](../02-elements/input.md), [``](../02-elements/pick.md), [``](../02-elements/radio.md), [``](../02-elements/rating.md), [``](../02-elements/select.md), [``](../02-elements/shortcut-record.md), [``](../02-elements/slider.md), [``](../02-elements/switch.md), [``](../02-elements/time-panel.md), [``](../02-elements/time-pick.md) + > [``](../02-elements/cascader-picker.md), [``](../02-elements/cascader.md), [``](../02-elements/checkbox.md), [``](../02-elements/color-panel.md), [``](../02-elements/color-picker.md), [``](../02-elements/date-panel.md), [``](../02-elements/date-picker.md), [``](../02-elements/date-range-panel.md), [``](../02-elements/date-range-picker.md), [``](../02-elements/drop-area.md), [``](../02-elements/file-picker.md), [``](../02-elements/form.md), [``](../02-elements/input.md), [``](../02-elements/picker.md), [``](../02-elements/radio.md), [``](../02-elements/rating.md), [``](../02-elements/select.md), [``](../02-elements/shortcut-record.md), [``](../02-elements/slider.md), [``](../02-elements/switch.md), [``](../02-elements/time-panel.md), [``](../02-elements/time-picker.md) - Action > [``](../02-elements/action-text.md), [``](../02-elements/button.md), [``](../02-elements/copy.md), [``](../02-elements/link.md), [``](../02-elements/menu.md), [``](../02-elements/options.md) - Feedback @@ -40,9 +40,9 @@ Use DuoyunUI element: ```ts import { render } from '@mantou/gem'; -import 'duoyun-ui/elements/color-pick'; +import 'duoyun-ui/elements/color-picker'; -render(html``, document.body); +render(html``, document.body); ``` Use element API: diff --git a/packages/duoyun-ui/docs/en/02-elements/cascader-pick.md b/packages/duoyun-ui/docs/en/02-elements/cascader-picker.md similarity index 61% rename from packages/duoyun-ui/docs/en/02-elements/cascader-pick.md rename to packages/duoyun-ui/docs/en/02-elements/cascader-picker.md index 0d6c79af..82c535d8 100644 --- a/packages/duoyun-ui/docs/en/02-elements/cascader-pick.md +++ b/packages/duoyun-ui/docs/en/02-elements/cascader-picker.md @@ -1,12 +1,12 @@ -# `` +# `` ## Example + src="https://jspm.dev/duoyun-ui/elements/cascader-picker"> ## API - + diff --git a/packages/duoyun-ui/docs/en/02-elements/color-pick.md b/packages/duoyun-ui/docs/en/02-elements/color-pick.md deleted file mode 100644 index 7962365d..00000000 --- a/packages/duoyun-ui/docs/en/02-elements/color-pick.md +++ /dev/null @@ -1,12 +0,0 @@ -# `` - -## Example - - - -## API - - diff --git a/packages/duoyun-ui/docs/en/02-elements/color-picker.md b/packages/duoyun-ui/docs/en/02-elements/color-picker.md new file mode 100644 index 00000000..d0a2e757 --- /dev/null +++ b/packages/duoyun-ui/docs/en/02-elements/color-picker.md @@ -0,0 +1,12 @@ +# `` + +## Example + + + +## API + + diff --git a/packages/duoyun-ui/docs/en/02-elements/time-pick.md b/packages/duoyun-ui/docs/en/02-elements/date-picker.md similarity index 52% rename from packages/duoyun-ui/docs/en/02-elements/time-pick.md rename to packages/duoyun-ui/docs/en/02-elements/date-picker.md index 264c0348..39e05ae0 100644 --- a/packages/duoyun-ui/docs/en/02-elements/time-pick.md +++ b/packages/duoyun-ui/docs/en/02-elements/date-picker.md @@ -1,12 +1,12 @@ -# `` +# `` ## Example + src="https://jspm.dev/duoyun-ui/elements/date-picker"> ## API - + diff --git a/packages/duoyun-ui/docs/zh/02-elements/date-range-pick.md b/packages/duoyun-ui/docs/en/02-elements/date-range-picker.md similarity index 51% rename from packages/duoyun-ui/docs/zh/02-elements/date-range-pick.md rename to packages/duoyun-ui/docs/en/02-elements/date-range-picker.md index 50fed5d6..5d199a15 100644 --- a/packages/duoyun-ui/docs/zh/02-elements/date-range-pick.md +++ b/packages/duoyun-ui/docs/en/02-elements/date-range-picker.md @@ -1,12 +1,12 @@ -# `` +# `` ## Example + src="https://jspm.dev/duoyun-ui/elements/date-range-picker"> ## API - + diff --git a/packages/duoyun-ui/docs/en/02-elements/file-pick.md b/packages/duoyun-ui/docs/en/02-elements/file-picker.md similarity index 51% rename from packages/duoyun-ui/docs/en/02-elements/file-pick.md rename to packages/duoyun-ui/docs/en/02-elements/file-picker.md index a450b0bd..d141a723 100644 --- a/packages/duoyun-ui/docs/en/02-elements/file-pick.md +++ b/packages/duoyun-ui/docs/en/02-elements/file-picker.md @@ -1,12 +1,12 @@ -# `` +# `` ## Example + src="https://jspm.dev/duoyun-ui/elements/file-picker"> ## API - + diff --git a/packages/duoyun-ui/docs/en/02-elements/image-preview.md b/packages/duoyun-ui/docs/en/02-elements/image-preview.md index 317707a1..9178011e 100644 --- a/packages/duoyun-ui/docs/en/02-elements/image-preview.md +++ b/packages/duoyun-ui/docs/en/02-elements/image-preview.md @@ -2,7 +2,7 @@ ## Example -See [``](./file-pick.md). +See [``](./file-picker.md). ## API diff --git a/packages/duoyun-ui/docs/zh/02-elements/pick.md b/packages/duoyun-ui/docs/en/02-elements/picker.md similarity index 58% rename from packages/duoyun-ui/docs/zh/02-elements/pick.md rename to packages/duoyun-ui/docs/en/02-elements/picker.md index b368cf96..54e3c18c 100644 --- a/packages/duoyun-ui/docs/zh/02-elements/pick.md +++ b/packages/duoyun-ui/docs/en/02-elements/picker.md @@ -1,12 +1,12 @@ -# `` +# `` ## Example + src="https://jspm.dev/duoyun-ui/elements/picker"> ## API - + diff --git a/packages/duoyun-ui/docs/zh/02-elements/date-pick.md b/packages/duoyun-ui/docs/en/02-elements/time-picker.md similarity index 52% rename from packages/duoyun-ui/docs/zh/02-elements/date-pick.md rename to packages/duoyun-ui/docs/en/02-elements/time-picker.md index 87988689..aab0fdfd 100644 --- a/packages/duoyun-ui/docs/zh/02-elements/date-pick.md +++ b/packages/duoyun-ui/docs/en/02-elements/time-picker.md @@ -1,12 +1,12 @@ -# `` +# `` ## Example + src="https://jspm.dev/duoyun-ui/elements/time-picker"> ## API - + diff --git a/packages/duoyun-ui/docs/zh/01-guide/02-form.md b/packages/duoyun-ui/docs/zh/01-guide/02-form.md index ba64025f..7423f224 100644 --- a/packages/duoyun-ui/docs/zh/01-guide/02-form.md +++ b/packages/duoyun-ui/docs/zh/01-guide/02-form.md @@ -105,7 +105,7 @@ export class MyEleElement extends GemElement { ## 自定义表单字段 -`` 默认支持 `text`, `number`, `checkbox`, `pick`, `radio`, `select`, `textarea`,如果这些不能满足你的需求,你可以使用自己的元素, +`` 默认支持 `text`, `number`, `checkbox`, `picker`, `radio`, `select`, `textarea`,如果这些不能满足你的需求,你可以使用自己的元素, 只需要实现 `value` 属性 和可冒泡 `change` 事件即可,然后你可以使用 [``](../02-elements/form.md#dy-form-item-api) 的 `slot` 类型: ```ts 14-16 diff --git a/packages/duoyun-ui/docs/zh/01-guide/README.md b/packages/duoyun-ui/docs/zh/01-guide/README.md index d591bb41..1d9783e8 100644 --- a/packages/duoyun-ui/docs/zh/01-guide/README.md +++ b/packages/duoyun-ui/docs/zh/01-guide/README.md @@ -10,7 +10,7 @@ DuoyunUI 是使用 [Gem](https://gemjs.org/) 开发的桌面端中后台 Web UI ## 元素分类 - 表单元素 - > [``](../02-elements/cascader-pick.md), [``](../02-elements/cascader.md), [``](../02-elements/checkbox.md), [``](../02-elements/color-panel.md), [``](../02-elements/color-pick.md), [``](../02-elements/date-panel.md), [``](../02-elements/date-pick.md), [``](../02-elements/date-range-panel.md), [``](../02-elements/date-range-pick.md), [``](../02-elements/drop-area.md), [``](../02-elements/file-pick.md), [``](../02-elements/form.md), [``](../02-elements/input.md), [``](../02-elements/pick.md), [``](../02-elements/radio.md), [``](../02-elements/rating.md), [``](../02-elements/select.md), [``](../02-elements/shortcut-record.md), [``](../02-elements/slider.md), [``](../02-elements/switch.md), [``](../02-elements/time-panel.md), [``](../02-elements/time-pick.md) + > [``](../02-elements/cascader-picker.md), [``](../02-elements/cascader.md), [``](../02-elements/checkbox.md), [``](../02-elements/color-panel.md), [``](../02-elements/color-picker.md), [``](../02-elements/date-panel.md), [``](../02-elements/date-picker.md), [``](../02-elements/date-range-panel.md), [``](../02-elements/date-range-picker.md), [``](../02-elements/drop-area.md), [``](../02-elements/file-picker.md), [``](../02-elements/form.md), [``](../02-elements/input.md), [``](../02-elements/picker.md), [``](../02-elements/radio.md), [``](../02-elements/rating.md), [``](../02-elements/select.md), [``](../02-elements/shortcut-record.md), [``](../02-elements/slider.md), [``](../02-elements/switch.md), [``](../02-elements/time-panel.md), [``](../02-elements/time-picker.md) - 动作元素 > [``](../02-elements/action-text.md), [``](../02-elements/button.md), [``](../02-elements/copy.md), [``](../02-elements/link.md), [``](../02-elements/menu.md), [``](../02-elements/options.md) - 反馈元素 @@ -39,9 +39,9 @@ npm install duoyun-ui ```ts import { render } from '@mantou/gem'; -import 'duoyun-ui/elements/color-pick'; +import 'duoyun-ui/elements/color-picker'; -render(html``, document.body); +render(html``, document.body); ``` 使用元素 API: diff --git a/packages/duoyun-ui/docs/zh/02-elements/cascader-pick.md b/packages/duoyun-ui/docs/zh/02-elements/cascader-picker.md similarity index 61% rename from packages/duoyun-ui/docs/zh/02-elements/cascader-pick.md rename to packages/duoyun-ui/docs/zh/02-elements/cascader-picker.md index 0d6c79af..82c535d8 100644 --- a/packages/duoyun-ui/docs/zh/02-elements/cascader-pick.md +++ b/packages/duoyun-ui/docs/zh/02-elements/cascader-picker.md @@ -1,12 +1,12 @@ -# `` +# `` ## Example + src="https://jspm.dev/duoyun-ui/elements/cascader-picker"> ## API - + diff --git a/packages/duoyun-ui/docs/zh/02-elements/color-pick.md b/packages/duoyun-ui/docs/zh/02-elements/color-pick.md deleted file mode 100644 index 7962365d..00000000 --- a/packages/duoyun-ui/docs/zh/02-elements/color-pick.md +++ /dev/null @@ -1,12 +0,0 @@ -# `` - -## Example - - - -## API - - diff --git a/packages/duoyun-ui/docs/zh/02-elements/color-picker.md b/packages/duoyun-ui/docs/zh/02-elements/color-picker.md new file mode 100644 index 00000000..d0a2e757 --- /dev/null +++ b/packages/duoyun-ui/docs/zh/02-elements/color-picker.md @@ -0,0 +1,12 @@ +# `` + +## Example + + + +## API + + diff --git a/packages/duoyun-ui/docs/en/02-elements/date-pick.md b/packages/duoyun-ui/docs/zh/02-elements/date-picker.md similarity index 52% rename from packages/duoyun-ui/docs/en/02-elements/date-pick.md rename to packages/duoyun-ui/docs/zh/02-elements/date-picker.md index 87988689..39e05ae0 100644 --- a/packages/duoyun-ui/docs/en/02-elements/date-pick.md +++ b/packages/duoyun-ui/docs/zh/02-elements/date-picker.md @@ -1,12 +1,12 @@ -# `` +# `` ## Example + src="https://jspm.dev/duoyun-ui/elements/date-picker"> ## API - + diff --git a/packages/duoyun-ui/docs/en/02-elements/date-range-pick.md b/packages/duoyun-ui/docs/zh/02-elements/date-range-picker.md similarity index 51% rename from packages/duoyun-ui/docs/en/02-elements/date-range-pick.md rename to packages/duoyun-ui/docs/zh/02-elements/date-range-picker.md index 50fed5d6..5d199a15 100644 --- a/packages/duoyun-ui/docs/en/02-elements/date-range-pick.md +++ b/packages/duoyun-ui/docs/zh/02-elements/date-range-picker.md @@ -1,12 +1,12 @@ -# `` +# `` ## Example + src="https://jspm.dev/duoyun-ui/elements/date-range-picker"> ## API - + diff --git a/packages/duoyun-ui/docs/zh/02-elements/file-pick.md b/packages/duoyun-ui/docs/zh/02-elements/file-picker.md similarity index 51% rename from packages/duoyun-ui/docs/zh/02-elements/file-pick.md rename to packages/duoyun-ui/docs/zh/02-elements/file-picker.md index a450b0bd..d141a723 100644 --- a/packages/duoyun-ui/docs/zh/02-elements/file-pick.md +++ b/packages/duoyun-ui/docs/zh/02-elements/file-picker.md @@ -1,12 +1,12 @@ -# `` +# `` ## Example + src="https://jspm.dev/duoyun-ui/elements/file-picker"> ## API - + diff --git a/packages/duoyun-ui/docs/zh/02-elements/image-preview.md b/packages/duoyun-ui/docs/zh/02-elements/image-preview.md index 317707a1..9178011e 100644 --- a/packages/duoyun-ui/docs/zh/02-elements/image-preview.md +++ b/packages/duoyun-ui/docs/zh/02-elements/image-preview.md @@ -2,7 +2,7 @@ ## Example -See [``](./file-pick.md). +See [``](./file-picker.md). ## API diff --git a/packages/duoyun-ui/docs/en/02-elements/pick.md b/packages/duoyun-ui/docs/zh/02-elements/picker.md similarity index 58% rename from packages/duoyun-ui/docs/en/02-elements/pick.md rename to packages/duoyun-ui/docs/zh/02-elements/picker.md index b368cf96..54e3c18c 100644 --- a/packages/duoyun-ui/docs/en/02-elements/pick.md +++ b/packages/duoyun-ui/docs/zh/02-elements/picker.md @@ -1,12 +1,12 @@ -# `` +# `` ## Example + src="https://jspm.dev/duoyun-ui/elements/picker"> ## API - + diff --git a/packages/duoyun-ui/docs/zh/02-elements/time-pick.md b/packages/duoyun-ui/docs/zh/02-elements/time-picker.md similarity index 52% rename from packages/duoyun-ui/docs/zh/02-elements/time-pick.md rename to packages/duoyun-ui/docs/zh/02-elements/time-picker.md index 264c0348..aab0fdfd 100644 --- a/packages/duoyun-ui/docs/zh/02-elements/time-pick.md +++ b/packages/duoyun-ui/docs/zh/02-elements/time-picker.md @@ -1,12 +1,12 @@ -# `` +# `` ## Example + src="https://jspm.dev/duoyun-ui/elements/time-picker"> ## API - + diff --git a/packages/duoyun-ui/src/elements/cascader-pick.ts b/packages/duoyun-ui/src/elements/cascader-picker.ts similarity index 96% rename from packages/duoyun-ui/src/elements/cascader-pick.ts rename to packages/duoyun-ui/src/elements/cascader-picker.ts index adb045d9..bbbbe3fe 100644 --- a/packages/duoyun-ui/src/elements/cascader-pick.ts +++ b/packages/duoyun-ui/src/elements/cascader-picker.ts @@ -18,7 +18,7 @@ import { commonHandle } from '../lib/hotkeys'; import { focusStyle } from '../lib/styles'; import { ContextMenu } from './menu'; -import { BasePickerElement, pickerStyle } from './pick'; +import { BasePickerElement, pickerStyle } from './picker'; import type { Option, DuoyunCascaderElement } from './cascader'; import './use'; @@ -43,9 +43,9 @@ const style = createCSSSheet(css` `); /** - * @customElement dy-cascader-pick + * @customElement dy-cascader-picker */ -@customElement('dy-cascader-pick') +@customElement('dy-cascader-picker') @adoptedStyle(style) @adoptedStyle(pickerStyle) @adoptedStyle(focusStyle) diff --git a/packages/duoyun-ui/src/elements/color-pick.ts b/packages/duoyun-ui/src/elements/color-picker.ts similarity index 95% rename from packages/duoyun-ui/src/elements/color-pick.ts rename to packages/duoyun-ui/src/elements/color-picker.ts index c956ef6f..92996297 100644 --- a/packages/duoyun-ui/src/elements/color-pick.ts +++ b/packages/duoyun-ui/src/elements/color-picker.ts @@ -17,7 +17,7 @@ import { theme } from '../lib/theme'; import { commonHandle } from '../lib/hotkeys'; import { focusStyle } from '../lib/styles'; -import type { BasePickerElement } from './pick'; +import type { BasePickerElement } from './picker'; import type { DuoyunPopoverElement } from './popover'; import './popover'; @@ -48,9 +48,9 @@ const style = createCSSSheet(css` `); /** - * @customElement dy-color-pick + * @customElement dy-color-picker */ -@customElement('dy-color-pick') +@customElement('dy-color-picker') @adoptedStyle(style) @adoptedStyle(focusStyle) export class DuoyunColorPickElement extends GemElement implements BasePickerElement { diff --git a/packages/duoyun-ui/src/elements/date-pick.ts b/packages/duoyun-ui/src/elements/date-picker.ts similarity index 97% rename from packages/duoyun-ui/src/elements/date-pick.ts rename to packages/duoyun-ui/src/elements/date-picker.ts index 774c7b75..2ed72fb7 100644 --- a/packages/duoyun-ui/src/elements/date-pick.ts +++ b/packages/duoyun-ui/src/elements/date-picker.ts @@ -24,7 +24,7 @@ import { focusStyle } from '../lib/styles'; import type { DuoyunButtonElement } from './button'; import type { DuoyunDatePanelElement } from './date-panel'; import { ContextMenu } from './menu'; -import { BasePickerElement, pickerStyle } from './pick'; +import { BasePickerElement, pickerStyle } from './picker'; import './use'; import './date-panel'; @@ -61,7 +61,7 @@ export interface Option { } /** - * @customElement dy-date-pick + * @customElement dy-date-picker * @attr placeholder * @attr time * @attr clearable @@ -69,7 +69,7 @@ export interface Option { * @fires change * @fires clear */ -@customElement('dy-date-pick') +@customElement('dy-date-picker') @adoptedStyle(pickerStyle) @adoptedStyle(style) @adoptedStyle(focusStyle) diff --git a/packages/duoyun-ui/src/elements/date-range-pick.ts b/packages/duoyun-ui/src/elements/date-range-picker.ts similarity index 97% rename from packages/duoyun-ui/src/elements/date-range-pick.ts rename to packages/duoyun-ui/src/elements/date-range-picker.ts index 0b0eded5..b4299d3b 100644 --- a/packages/duoyun-ui/src/elements/date-range-pick.ts +++ b/packages/duoyun-ui/src/elements/date-range-picker.ts @@ -22,7 +22,7 @@ import { focusStyle } from '../lib/styles'; import type { DuoyunButtonElement } from './button'; import { ContextMenu } from './menu'; -import { BasePickerElement, pickerStyle } from './pick'; +import { BasePickerElement, pickerStyle } from './picker'; import './use'; import './date-range-panel'; @@ -54,14 +54,14 @@ const style = createCSSSheet(css` `); /** - * @customElement dy-date-range-pick + * @customElement dy-date-range-picker * @attr placeholder * @attr clearable * @attr disabled * @fires change * @fires clear */ -@customElement('dy-date-range-pick') +@customElement('dy-date-range-picker') @adoptedStyle(style) @adoptedStyle(pickerStyle) @adoptedStyle(focusStyle) diff --git a/packages/duoyun-ui/src/elements/file-pick.ts b/packages/duoyun-ui/src/elements/file-picker.ts similarity index 98% rename from packages/duoyun-ui/src/elements/file-pick.ts rename to packages/duoyun-ui/src/elements/file-picker.ts index c2300176..22e9977f 100644 --- a/packages/duoyun-ui/src/elements/file-pick.ts +++ b/packages/duoyun-ui/src/elements/file-picker.ts @@ -20,7 +20,7 @@ import { focusStyle } from '../lib/styles'; import { utf8ToB64 } from '../lib/encode'; import type { ImageStatus } from './image-preview'; -import type { BasePickerElement } from './pick'; +import type { BasePickerElement } from './picker'; import './use'; import './image-preview'; @@ -114,9 +114,9 @@ export interface FileItem extends File { } /** - * @customElement dy-file-pick + * @customElement dy-file-picker */ -@customElement('dy-file-pick') +@customElement('dy-file-picker') @adoptedStyle(style) @adoptedStyle(focusStyle) export class DuoyunFilePickElement extends GemElement implements BasePickerElement { diff --git a/packages/duoyun-ui/src/elements/form.ts b/packages/duoyun-ui/src/elements/form.ts index fb0c8a54..6f2c9296 100644 --- a/packages/duoyun-ui/src/elements/form.ts +++ b/packages/duoyun-ui/src/elements/form.ts @@ -19,19 +19,19 @@ import { theme } from '../lib/theme'; import { locale } from '../lib/locale'; import type { DataList } from './input'; -import type { Option } from './pick'; +import type { Option } from './picker'; import type { Option as SelectOption } from './select'; import type { Adder } from './options'; import './input'; -import './pick'; +import './picker'; import './button'; import './checkbox'; import './radio'; import './select'; import './help-text'; -import './date-pick'; -import './date-range-pick'; +import './date-picker'; +import './date-range-picker'; const formStyle = createCSSSheet(css` :where(dy-form:not([hidden])) { @@ -231,12 +231,12 @@ export class DuoyunFormItemElement extends GemElement { | 'number' | 'checkbox' | 'checkbox-group' // value is array - | 'pick' + | 'picker' | 'radio-group' | 'select' | 'textarea' | 'slot'; - @boolattribute multiple: boolean; // pick/select/text + @boolattribute multiple: boolean; // picker/select/text @attribute name: string; @attribute label: string; @attribute placeholder: string; @@ -365,7 +365,7 @@ export class DuoyunFormItemElement extends GemElement { ` : this.#type === 'date' ? html` - evt.target.change(undefined)} @@ -375,11 +375,11 @@ export class DuoyunFormItemElement extends GemElement { .placeholder=${this.placeholder} .clearable=${!this.required} > - + ` : this.#type === 'date-range' ? html` - evt.target.change(undefined)} @@ -388,11 +388,11 @@ export class DuoyunFormItemElement extends GemElement { .placeholder=${this.placeholder} .clearable=${!this.required} > - + ` - : this.#type === 'pick' + : this.#type === 'picker' ? html` - { .fit=${true} .placeholder=${this.placeholder} .options=${this.dataList} - > + > ` : this.#type === 'checkbox' ? html` diff --git a/packages/duoyun-ui/src/elements/pagination.ts b/packages/duoyun-ui/src/elements/pagination.ts index a09c6ff8..8e32a1e8 100644 --- a/packages/duoyun-ui/src/elements/pagination.ts +++ b/packages/duoyun-ui/src/elements/pagination.ts @@ -23,7 +23,7 @@ import { Popover } from './popover'; import './use'; import './input'; import './button'; -import './pick'; +import './picker'; const style = createCSSSheet(css` :host(:where(:not([hidden]))) { @@ -123,7 +123,7 @@ export class DuoyunPaginationElement extends GemElement { step=${1} min=${1} max=${this.total} - value=${this.page} + value=${String(this.page)} @change=${({ detail, target }: CustomEvent) => ((target as HTMLInputElement).value = detail)} > ${locale.ok} @@ -186,7 +186,7 @@ export class DuoyunPaginationElement extends GemElement { ${this.sizes ? html` - ({ label: splice(locale.perPage, String(size)), value: size }))} .value=${this.size} @change=${({ detail }: CustomEvent) => this.sizechange(detail)} - > + > ` : ''}
{ } /** - * @customElement dy-pick + * @customElement dy-picker * @attr disabled * @attr borderless * @attr selectmode * @attr fit * @attr multiple */ -@customElement('dy-pick') +@customElement('dy-picker') @adoptedStyle(style) @adoptedStyle(pickerStyle) @adoptedStyle(focusStyle) diff --git a/packages/duoyun-ui/src/elements/select.ts b/packages/duoyun-ui/src/elements/select.ts index 014c54e2..4a062394 100644 --- a/packages/duoyun-ui/src/elements/select.ts +++ b/packages/duoyun-ui/src/elements/select.ts @@ -23,7 +23,7 @@ import { hotkeys } from '../lib/hotkeys'; import { isNotNullish } from '../lib/types'; import { focusStyle } from '../lib/styles'; -import { BasePickerElement, pickerStyle } from './pick'; +import { BasePickerElement, pickerStyle } from './picker'; import type { Adder } from './options'; import './reflect'; diff --git a/packages/duoyun-ui/src/elements/time-pick.ts b/packages/duoyun-ui/src/elements/time-picker.ts similarity index 96% rename from packages/duoyun-ui/src/elements/time-pick.ts rename to packages/duoyun-ui/src/elements/time-picker.ts index ae64e667..d33b81a8 100644 --- a/packages/duoyun-ui/src/elements/time-pick.ts +++ b/packages/duoyun-ui/src/elements/time-picker.ts @@ -21,7 +21,7 @@ import { commonHandle } from '../lib/hotkeys'; import { focusStyle } from '../lib/styles'; import { ContextMenu } from './menu'; -import { BasePickerElement, pickerStyle } from './pick'; +import { BasePickerElement, pickerStyle } from './picker'; import type { DuoyunButtonElement } from './button'; import type { DuoyunTimePanelElement } from './time-panel'; @@ -53,9 +53,9 @@ const style = createCSSSheet(css` `); /** - * @customElement dy-time-pick + * @customElement dy-time-picker */ -@customElement('dy-time-pick') +@customElement('dy-time-picker') @adoptedStyle(style) @adoptedStyle(pickerStyle) @adoptedStyle(focusStyle)