From db48216ab3c707f3688cbf8237d16fd67772946d Mon Sep 17 00:00:00 2001 From: daief <1437931235@qq.com> Date: Tue, 12 Apr 2022 22:12:46 +0800 Subject: [PATCH] feat: init modal base --- README.md | 7 +- docs/src/pages/components/popper.md | 22 ++--- docs/src/pages/demo.md | 43 ++++++--- package.json | 2 +- src/components/index.tsx | 1 + src/components/modal/base.tsx | 130 +++++++++++++++++++++++++++ src/components/modal/index.tsx | 1 + src/components/modal/style/base.less | 28 ++++++ 8 files changed, 208 insertions(+), 26 deletions(-) create mode 100644 src/components/modal/base.tsx create mode 100644 src/components/modal/index.tsx create mode 100644 src/components/modal/style/base.less diff --git a/README.md b/README.md index 5df5a93..2ab320f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # daisyui-vue -基于 daisyui 封装的 vue 组件库。 +基于 [daisyui](https://github.com/saadeghi/daisyui) 封装的 vue 组件库。 ## Usage @@ -140,3 +140,8 @@ export function render() { - [ ] mockup-code - [ ] mockup-phone - [ ] mockup-window + +## 命名规则 + +- 事件名称,`onNameAction`:onMaskClick、onEscKeyDown +- 事件控制,`xxxYYable`: keyboardCloseable diff --git a/docs/src/pages/components/popper.md b/docs/src/pages/components/popper.md index d6c90fe..8aef23d 100644 --- a/docs/src/pages/components/popper.md +++ b/docs/src/pages/components/popper.md @@ -225,17 +225,17 @@ template slots ### Attributes -| name | description | type | default | -| ------------------ | ------------------------------------ | -------------------------------- | ------- | -| content | popper content | any, function | - | -| open | popper open status | boolean | - | -| placement | popper placement | Placement | auto | -| disableTeleport | disable popper node teleport to body | boolean | false | -| disabled | disable popper | boolean | true | -| onChange | emitted whe popper status change | function | - | -| triggerAction | the action to tigger popper | contextMenu, hover, click, focus | hover | -| outsideCloseable | click outside to close popper | boolean | true | -| escapeKeyCloseable | press escape to close popper | boolean | true | +| name | description | type | default | +| ---------------- | ------------------------------------ | -------------------------------- | ------- | +| content | popper content | any, function | - | +| open | popper open status | boolean | - | +| placement | popper placement | Placement | auto | +| disableTeleport | disable popper node teleport to body | boolean | false | +| disabled | disable popper | boolean | true | +| onChange | emitted whe popper status change | function | - | +| triggerAction | the action to tigger popper | contextMenu, hover, click, focus | hover | +| outsideCloseable | click outside to close popper | boolean | true | +| escapeCloseable | press escape key to close popper | boolean | true | ### Slots diff --git a/docs/src/pages/demo.md b/docs/src/pages/demo.md index 1c0d4dc..4d64ba0 100644 --- a/docs/src/pages/demo.md +++ b/docs/src/pages/demo.md @@ -1,18 +1,35 @@ # Demo for development -```html :::demo -