diff --git a/example/docs/zh-CN/components/animation.md b/example/docs/zh-CN/components/animation.md
index e50b1aa6..495869be 100644
--- a/example/docs/zh-CN/components/animation.md
+++ b/example/docs/zh-CN/components/animation.md
@@ -92,3 +92,6 @@ export default {
| layui-anim-rotate layui-anim-loop | 循环动画 | `layui-anim layui-anim-rotate layui-anim-loop` |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/avatar.md b/example/docs/zh-CN/components/avatar.md
index 4726a96f..618cd37c 100644
--- a/example/docs/zh-CN/components/avatar.md
+++ b/example/docs/zh-CN/components/avatar.md
@@ -92,3 +92,6 @@ export default {
| radius | 圆形 | `true` `false` |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/badge.md b/example/docs/zh-CN/components/badge.md
index 0f9abc2a..72cb6320 100644
--- a/example/docs/zh-CN/components/badge.md
+++ b/example/docs/zh-CN/components/badge.md
@@ -58,3 +58,6 @@ export default {
| default | 默认 | 非 `dot` 可用 |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/block.md b/example/docs/zh-CN/components/block.md
index 1d2500a4..043b8f51 100644
--- a/example/docs/zh-CN/components/block.md
+++ b/example/docs/zh-CN/components/block.md
@@ -57,3 +57,6 @@ export default {
| nm | 灰色样式 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/breadcrumb.md b/example/docs/zh-CN/components/breadcrumb.md
index 0dc7e11a..5cead785 100644
--- a/example/docs/zh-CN/components/breadcrumb.md
+++ b/example/docs/zh-CN/components/breadcrumb.md
@@ -100,3 +100,6 @@ export default {
| default | 默认插槽 | `--` |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/button.md b/example/docs/zh-CN/components/button.md
index 3e771d89..b1666915 100644
--- a/example/docs/zh-CN/components/button.md
+++ b/example/docs/zh-CN/components/button.md
@@ -305,3 +305,6 @@ export default {
| click | 单击事件 | `--` |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/card.md b/example/docs/zh-CN/components/card.md
index 6a85f720..020d1a9e 100644
--- a/example/docs/zh-CN/components/card.md
+++ b/example/docs/zh-CN/components/card.md
@@ -128,3 +128,6 @@ export default {
| body | 内容插槽 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/carousel.md b/example/docs/zh-CN/components/carousel.md
index b5b841f4..a513e16f 100644
--- a/example/docs/zh-CN/components/carousel.md
+++ b/example/docs/zh-CN/components/carousel.md
@@ -139,3 +139,6 @@ export default {
| change | 切换回调 | id |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/checkbox.md b/example/docs/zh-CN/components/checkbox.md
index 77e641ef..8376eeed 100644
--- a/example/docs/zh-CN/components/checkbox.md
+++ b/example/docs/zh-CN/components/checkbox.md
@@ -210,3 +210,6 @@ export default {
| change | 切换事件 | isChecked : 当前状态 |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/collapse.md b/example/docs/zh-CN/components/collapse.md
index 1fe5cabe..3de704bf 100644
--- a/example/docs/zh-CN/components/collapse.md
+++ b/example/docs/zh-CN/components/collapse.md
@@ -206,3 +206,6 @@ export default {
| change | 折叠面板变化触发事件 | (`id`, `isShow`, activeValues)
`id`: (`number` / `string`)对应当前操作面板的值
`isShow`: (`boolean`)`true` -> 展开, `false` -> 折叠
`activeValues`: (`Array`)当前状态为展开的面板值集合|
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/color.md b/example/docs/zh-CN/components/color.md
index 46a96638..f62e3ab6 100644
--- a/example/docs/zh-CN/components/color.md
+++ b/example/docs/zh-CN/components/color.md
@@ -160,3 +160,6 @@ export default {
| layui-bg-black | 雅黑 | class="layui-bg-black" |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/colorPicker.md b/example/docs/zh-CN/components/colorPicker.md
index cbb1b2dd..cf6176c7 100644
--- a/example/docs/zh-CN/components/colorPicker.md
+++ b/example/docs/zh-CN/components/colorPicker.md
@@ -28,3 +28,6 @@ export default {
| showSearch | 启用搜索 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/confirm.md b/example/docs/zh-CN/components/confirm.md
index 93c69c7b..ba92fcaf 100644
--- a/example/docs/zh-CN/components/confirm.md
+++ b/example/docs/zh-CN/components/confirm.md
@@ -72,4 +72,7 @@ layer.confirm(content, options)
| content | 内容 | -- |
| options | 选配属性 | { time: 加载时长, btn: 按钮组 } |
+:::
+
+::: comment
:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/container.md b/example/docs/zh-CN/components/container.md
index c6809bf2..eb146a36 100644
--- a/example/docs/zh-CN/components/container.md
+++ b/example/docs/zh-CN/components/container.md
@@ -75,3 +75,6 @@ export default {
| fluid | 流模式 | `true` `false` |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/dropdown.md b/example/docs/zh-CN/components/dropdown.md
index 7db551d8..930126cc 100644
--- a/example/docs/zh-CN/components/dropdown.md
+++ b/example/docs/zh-CN/components/dropdown.md
@@ -88,3 +88,6 @@ export default {
| content | 下拉内容 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/empty.md b/example/docs/zh-CN/components/empty.md
index beda3975..b877f41f 100644
--- a/example/docs/zh-CN/components/empty.md
+++ b/example/docs/zh-CN/components/empty.md
@@ -54,3 +54,6 @@ export default {
| description | 描述信息 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/field.md b/example/docs/zh-CN/components/field.md
index 13b3a49a..a4c73024 100644
--- a/example/docs/zh-CN/components/field.md
+++ b/example/docs/zh-CN/components/field.md
@@ -68,3 +68,6 @@ export default {
| title | 标题 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/form.md b/example/docs/zh-CN/components/form.md
index 289d40c4..f87c90eb 100644
--- a/example/docs/zh-CN/components/form.md
+++ b/example/docs/zh-CN/components/form.md
@@ -74,3 +74,6 @@ export default {
| label | 标题名称 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/grid.md b/example/docs/zh-CN/components/grid.md
index 9d366c56..d4dbd089 100644
--- a/example/docs/zh-CN/components/grid.md
+++ b/example/docs/zh-CN/components/grid.md
@@ -164,3 +164,6 @@ export default {
| lg-offset | 偏移 - 大型屏幕 (桌面 ≥1200px) | 0 - 24 |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/icon.md b/example/docs/zh-CN/components/icon.md
index 22e19ff2..f873c389 100644
--- a/example/docs/zh-CN/components/icon.md
+++ b/example/docs/zh-CN/components/icon.md
@@ -1127,3 +1127,6 @@ npm install @layui/icons-vue
| size | 尺寸 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/iconPicker.md b/example/docs/zh-CN/components/iconPicker.md
index e9d0b09b..f2536026 100644
--- a/example/docs/zh-CN/components/iconPicker.md
+++ b/example/docs/zh-CN/components/iconPicker.md
@@ -110,3 +110,6 @@ export default {
| showSearch | 启用搜索 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/input.md b/example/docs/zh-CN/components/input.md
index 46197f5b..53a4904c 100644
--- a/example/docs/zh-CN/components/input.md
+++ b/example/docs/zh-CN/components/input.md
@@ -129,3 +129,6 @@ export default {
| blur | 原生 blur 事件 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/inputNumber.md b/example/docs/zh-CN/components/inputNumber.md
new file mode 100644
index 00000000..12891786
--- /dev/null
+++ b/example/docs/zh-CN/components/inputNumber.md
@@ -0,0 +1,142 @@
+::: title 基础使用
+:::
+
+::: demo
+
+
+
+
+
+
+
+
+:::
+
+::: title 尺寸
+:::
+
+::: demo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+:::
+
+::: title 限制数字大小
+:::
+
+::: demo
+
+
+
+
+
+
+
+:::
+
+::: title 数字步数
+:::
+
+::: demo
+
+
+
+
+
+
+
+:::
+
+::: title 禁用
+:::
+
+::: demo
+
+
+ 禁用输入
+
+ 全部禁用
+
+
+
+
+
+:::
+
+
+::: title input-number属性
+:::
+
+::: table
+
+| 属性 | 描述 | 类型 | 默认值 |
+| -------- | ------------- | ------ | ------ |
+| v-model | 值 | `number` | 0 |
+| name | 原生属性`name` | `number` | 5 |
+| disabledInput | 禁用输入框输入 | `boolean` | false |
+| disabled | 禁用操作 | `boolean` | false |
+| step | 数字增减的步数 | `number` | 1 |
+| position | 控制按钮显示位置, 目前除了默认值,只有`right`可填 | `string` | -- |
+| min | 最小可输入的数 | `number` | -- |
+| max | 最大可输入的数 | `number` | -- |
+| size | 尺寸, 可选值`md` / `sm` / `xs`| `string` | 默认为最大尺寸 |
+
+:::
+
+::: title 事件
+:::
+
+::: table
+
+| 属性 | 描述 | 回调参数 |
+| -------- | -------- | ------ |
+| change | 值更改触发事件 | (value: number) |
+
+:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/layer.md b/example/docs/zh-CN/components/layer.md
new file mode 100644
index 00000000..e69de29b
diff --git a/example/docs/zh-CN/components/layout.md b/example/docs/zh-CN/components/layout.md
index 8d940cdc..3a3cc825 100644
--- a/example/docs/zh-CN/components/layout.md
+++ b/example/docs/zh-CN/components/layout.md
@@ -184,3 +184,6 @@ export default {
| lay-footer | 底部 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/line.md b/example/docs/zh-CN/components/line.md
index 19676f0a..5ac07d88 100644
--- a/example/docs/zh-CN/components/line.md
+++ b/example/docs/zh-CN/components/line.md
@@ -41,3 +41,6 @@ export default {
| theme | 主题 | `orange` `green` `cyan` `blue` `black` `gray` |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/load.md b/example/docs/zh-CN/components/load.md
index cb9067ff..d717a49b 100644
--- a/example/docs/zh-CN/components/load.md
+++ b/example/docs/zh-CN/components/load.md
@@ -122,4 +122,7 @@ layer.load(load, options)
| load | 组件类型 | `1` `2` `3` |
| options | 选配属性 | { time: 加载时长 } |
+:::
+
+::: comment
:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/menu.md b/example/docs/zh-CN/components/menu.md
index a8f7b7ea..26351f35 100644
--- a/example/docs/zh-CN/components/menu.md
+++ b/example/docs/zh-CN/components/menu.md
@@ -99,3 +99,6 @@ export default {
| title | 菜单标题 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/modal.md b/example/docs/zh-CN/components/modal.md
index 04ec7641..bf3fe7c0 100644
--- a/example/docs/zh-CN/components/modal.md
+++ b/example/docs/zh-CN/components/modal.md
@@ -6,6 +6,7 @@
基础使用
+ 内容
@@ -38,6 +39,7 @@ export default {
允许拖动
+ 内容
@@ -70,6 +72,7 @@ export default {
放大缩小
+ 内容
@@ -102,6 +105,7 @@ export default {
指定位置
+ 内容
@@ -167,6 +171,7 @@ export default {
定义操作
+ 内容
@@ -203,7 +208,8 @@ export default {
开启遮盖
-
+
+ 内容
@@ -296,3 +302,6 @@ export default {
| isOutAnim | 关闭动画 | `true` `false` |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/msg.md b/example/docs/zh-CN/components/msg.md
index 2b2d507d..34e848a2 100644
--- a/example/docs/zh-CN/components/msg.md
+++ b/example/docs/zh-CN/components/msg.md
@@ -90,4 +90,7 @@ layer.msg(content, options)
| content | 消息内容 | -- |
| options | 选配属性 | { time: 加载时长, icon: 图标 } |
+:::
+
+::: comment
:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/page.md b/example/docs/zh-CN/components/page.md
index 5e8bb3c1..51f60a7c 100644
--- a/example/docs/zh-CN/components/page.md
+++ b/example/docs/zh-CN/components/page.md
@@ -232,3 +232,6 @@ export default {
| next | 下一页 | 下一页 |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/panel.md b/example/docs/zh-CN/components/panel.md
index bb65a5e4..218d95e1 100644
--- a/example/docs/zh-CN/components/panel.md
+++ b/example/docs/zh-CN/components/panel.md
@@ -31,3 +31,6 @@ export default {
| default | 默认插槽 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/progress.md b/example/docs/zh-CN/components/progress.md
index c94f64e1..e60d2f13 100644
--- a/example/docs/zh-CN/components/progress.md
+++ b/example/docs/zh-CN/components/progress.md
@@ -125,3 +125,6 @@ export default {
| showText | 展示描述 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/radio.md b/example/docs/zh-CN/components/radio.md
index e57707fd..eb260b6c 100644
--- a/example/docs/zh-CN/components/radio.md
+++ b/example/docs/zh-CN/components/radio.md
@@ -117,3 +117,6 @@ export default {
| change | 切换事件 | current : 当前值 |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/rate.md b/example/docs/zh-CN/components/rate.md
index ac5e645f..2ac0cd43 100644
--- a/example/docs/zh-CN/components/rate.md
+++ b/example/docs/zh-CN/components/rate.md
@@ -305,3 +305,6 @@ export default {
| select | 选中之后触发事件 | (value: number) |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/select.md b/example/docs/zh-CN/components/select.md
index 8765bf92..1e776edf 100644
--- a/example/docs/zh-CN/components/select.md
+++ b/example/docs/zh-CN/components/select.md
@@ -100,3 +100,6 @@ export default {
| change | 切换事件 | value |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/slider.md b/example/docs/zh-CN/components/slider.md
index 8f3e6c7a..d1565b09 100644
--- a/example/docs/zh-CN/components/slider.md
+++ b/example/docs/zh-CN/components/slider.md
@@ -1,7 +1,7 @@
::: demo
-
+
+:::
+
+::: comment
:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/switch.md b/example/docs/zh-CN/components/switch.md
index 3ee8a871..9218ecf0 100644
--- a/example/docs/zh-CN/components/switch.md
+++ b/example/docs/zh-CN/components/switch.md
@@ -133,3 +133,6 @@ export default {
| change | 切换事件 | current : 当前值 |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/tab.md b/example/docs/zh-CN/components/tab.md
index 68bae84e..10707744 100644
--- a/example/docs/zh-CN/components/tab.md
+++ b/example/docs/zh-CN/components/tab.md
@@ -243,3 +243,6 @@ export default {
| close | 关闭事件 | id |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/table.md b/example/docs/zh-CN/components/table.md
index cbb312e7..d30dd32f 100644
--- a/example/docs/zh-CN/components/table.md
+++ b/example/docs/zh-CN/components/table.md
@@ -223,12 +223,12 @@ export default {
{
title:"账户",
width:"200px",
- slot:"username",
+ customSlot:"username",
key:"username"
},{
title:"密码",
width: "180px",
- slot:"password",
+ customSlot:"password",
key:"password"
},{
title:"年龄",
@@ -248,11 +248,11 @@ export default {
]
const rowClick = function(data) {
- alert(JSON.stringify(data))
+ console.log(JSON.stringify(data))
}
const rowDoubleClick = function(data) {
- alert(JSON.stringify(data))
+ console.log(JSON.stringify(data))
}
return {
@@ -309,3 +309,19 @@ export default {
| toolbar | 自定义工具栏 | -- |
:::
+
+::: title 列配置
+:::
+
+::: table
+
+| 插槽 | 描述 | 默认 |
+| ------- | ------------ | ---- |
+| title | 列标题 | -- |
+| key | 数据字段 | -- |
+| customSlot | 插槽名称 | -- |
+| width | 宽度 | -- |
+:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/textarea.md b/example/docs/zh-CN/components/textarea.md
index cc3c8a31..ba43e165 100644
--- a/example/docs/zh-CN/components/textarea.md
+++ b/example/docs/zh-CN/components/textarea.md
@@ -108,3 +108,6 @@ export default {
| blur | 原生 blur 事件 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/timeline.md b/example/docs/zh-CN/components/timeline.md
index 43b50363..5fa7a8e2 100644
--- a/example/docs/zh-CN/components/timeline.md
+++ b/example/docs/zh-CN/components/timeline.md
@@ -83,3 +83,6 @@ export default {
| title | 标题 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/tooltip.md b/example/docs/zh-CN/components/tooltip.md
new file mode 100644
index 00000000..30889db2
--- /dev/null
+++ b/example/docs/zh-CN/components/tooltip.md
@@ -0,0 +1,130 @@
+::: title 基础使用
+:::
+
+::: demo
+
+
+
+ tooltip
+
+
+
+
+:::
+
+::: title 显示位置
+:::
+
+::: demo
+
+
+
+
+
+ 上边
+
+
+
+
+
+ 下边
+
+
+
+
+
+
+:::
+
+::: title 浅色主题
+:::
+
+::: demo
+
+
+
+ tooltip
+
+
+
+
+:::
+
+::: title 是否禁用/动态属性
+:::
+
+::: demo
+
+
+
+ tooltip
+
+
+
+
+
+
+
+:::
+
+::: title tooltip属性
+:::
+
+::: table
+
+| 属性 | 描述 | 可选值 |
+| ----------- | -------- | -------------- |
+| content | 显示内容 | -- |
+| position | 显示位置 | `top`(默认值)、`bottom`、`left`、`right` |
+| isDark | 是否为黑色主题 | `true`(默认值)、`false`(浅色) |
+| disabled | 是否禁用 | `false`(默认值)、`true`(禁用) ||
+| visible | 控制是否显示 | `true`(默认值)、`false` ||
+| isCanHide | 控制是否可以隐藏,可参考`lay-slider`组件 | `true`(默认值)、`false` ||
+
+:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/transfer.md b/example/docs/zh-CN/components/transfer.md
index ba2f79a3..7a8843f5 100644
--- a/example/docs/zh-CN/components/transfer.md
+++ b/example/docs/zh-CN/components/transfer.md
@@ -106,3 +106,6 @@ export default {
| item | 列表项 | { data } |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/components/tree.md b/example/docs/zh-CN/components/tree.md
index acdd05eb..581d7f85 100644
--- a/example/docs/zh-CN/components/tree.md
+++ b/example/docs/zh-CN/components/tree.md
@@ -253,3 +253,6 @@ function handleClick(node) {
| node-click | 节点 click 事件 | -- |
:::
+
+::: comment
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/guide/changelog.md b/example/docs/zh-CN/guide/changelog.md
index ece7a912..2482ec4c 100644
--- a/example/docs/zh-CN/guide/changelog.md
+++ b/example/docs/zh-CN/guide/changelog.md
@@ -10,174 +10,38 @@
::: demo
-
-[完善] rate 评分组件。
-[完善] collapse 手风琴组件。
-[新增] useState 变量状态管理。
-[新增] useBoolean 布尔变量状态管理。
-[新增] tab 选项卡 before-close, before-leave 钩子。
-[新增] rate 评分组件 half 属性, 支持半选状态。
-[新增] rate 评分组件 select 事件, 评分回调事件。
-[新增] layer 对象 confirm 方法, 函数式调用信息框。
-[新增] layer 对象 load 方法, 通过 type 配置调用不同类型加载层。
-[修复] tab 选项卡 close 无法删除选项卡问题。
-[修复] layer 对象的函数调用, 导致弹层过渡动画失效的问题。
-[文档] icons-vue 组件化使用方式。
-[文档] hooks-vue 使用文档。
-[升级] hooks-vue 0.1.6。
-[升级] layer-vue 1.1.2。
-[升级] vue 3.2.24。
-
-
-[依赖] hooks-vue 0.1.2。
-[升级] layer-vue 1.0.3。
-
-
-[新增] layer 提供 open, close, closeAll 函数式调用。
-[新增] icons 组件化调用方式, 使用 class 作为组件名使用组件。
-[修复] layer 的 id 属性不唯一, 调整 Guid 为 Uuid 策略。
-[修改] layer 组件 move 默认为 true, 默认提供拖拽支持。
-[修改] layer.css 为 @layui/layui-vue/lib/index.css。
-[修改] layer 组件为 lay-modal, 使用方式保持不变。
-[独立] layui-vue 项目, 亦支持单独引用。
-[独立] icons-vue 项目, 亦支持单独引用。
-
-
-[增强] checkbox 组件, v-model 支持 array 数据类型。
-[重构] row col 栅格组件, 支持 24 粒度布局。
-[重构] layui.css 样式, 集成 less 编译器。
-[重构] button, button-group, button-container 非破坏性改进代码。
-[修复] themeline 时间线,因 mackdown 造成的样式污染。
-[新增] layer 弹层出场动画, 允许使用 isOutAmin 关闭。
-[新增] checkbox-group 复选框组, 更方便的复选方式。
-[优化] table 和 tranfer 组件复选实现。
-[删除] rate 评分 theme 属性默认值。
-
-
-[新增] table 表格 列筛选功能。
-[新增] table 表格 row 行单击, row-double 行双击事件。
-[新增] layer 弹层 closeBtn 属性, 允许隐藏关闭操作。
-[新增] layer 弹层 btnAlign 属性, 允许自定义按钮布局。
-[新增] layer 弹层 anim 属性, 支持 7 种入场动画。
-[修复] layer 弹层 btn 属性为非必填。
-[修复] layer 弹层 boolean 类型推断造成的警告。
-[修复] mackdown 文档 table 样式对 table 组件的污染。
-[修复] breadcrumb-item 面包屑 title 属性, 未填写造成的警告。
-[修复] select-option 下拉选择 disabled 属性的类型推断造成的警告。
-[修复] page 分页 showSkip 属性的类型推断造成的警告。
-[修复] rate 评分 readonly 属性的类型推断造成的警告。
-[修复] carousel 轮播 anim arrow indicator 属性为非必传。
-[优化] carousel 轮播逻辑, 允许循环切换。
-[优化] layer 弹层 border 样式。
-[优化] layer 弹层 id 默认生成方式, 使用 Guid 作为编号。
-[升级] vue-router 4.0.12 版本。
-[升级] vue 3.2.21 版本。
-
-
-[新增] useFullScreen 全屏 hooks。
-[新增] useMove 拖拽 hooks。
-[新增] textarea 文本域 blur foucs 获取焦点 失去焦点 事件。
-[新增] layer 弹层。
-
-
-[新增] hooks 文档
-[新增] useClickOutside 外部 click 事件 hooks。
-[新增] rate 评分 readonly 属性, 支持只读模式。
-[新增] rate 评分 theme 属性, 支持自定义主题。
-[新增] progress 文档, 区分 theme 与 size 使用案例。
-[新增] dropdown 下拉组件 dropdown-item 点击监听, 隐藏 content 内容。
-[新增] input 输入框 foucs blur 原生事件绑定。
-[修复] rate 评分 modelValue 属性, 支持双向数据绑定。
-
-
-[新增] carousel 轮播 anim 属性, 支持 default updown 不同方向轮播。
-[新增] carousel 轮播 arrow 属性, 支持 always hover none 不同状态切换按钮。
-[新增] carousel 轮播 indicator 属性, 支持 none inside outside 不同位置轮播控制器。
-[新增] carousel 轮播 change 事件, 用于自定义切换回调事件。
-[重构] layout 系列组件, 支持 纵向布局, 横向布局, 嵌套布局等。
-
-
-[新增] carousel 轮播组件, 初步完成切换逻辑。
-[新增] colorPicker 颜色选择器, 初步完成组件渲染。
-[文档] 新增首页模块。
-[文档] 拆分菜单为指南与组件模块。
-[文档] 新增全局内容检索。
-
-
-[新增] table 表格 size 属性, 提供不同尺寸。
-[新增] transfer 穿梭框 item 插槽, 允许自定义列表项。
-[新增] select 下拉选择 change 事件, 值变动触发回调。
-[新增] select-option 下拉选择项 disabled 属性, 允许可选项禁用。
-[修复] transfer 穿梭框 切换 逻辑。
-[删除] dropdown 下拉菜单 padding 样式。
-
-
-[新增] page 分页 prev 插槽。
-[新增] page 分页 next 插槽。
-[新增] button 按钮 naiveType 属性, 原生 type 属性, 支持 button, submit 可选值。
-[新增] form 表单 model 属性, 共 submit 等事件作为入参。
-[新增] form 表单 submit 事件, 内部 submit 提交回调。
-[修复] menu 菜单 selectedKey 选中项 openKeys 打开项 props 双绑。
-[修复] tab 选项卡 v-model 激活项 双绑。
-[修复] tab 选项卡 tab-item 组件套用 for 循环无法获取 props 属性。
-[重构] tree 树内部逻辑, 优化性能。
-
-
-[新增] button 按钮 loading 属性, 提供 加载 状态。
-[新增] tab 选项卡 allow-close 属性,支持 关闭。
-[新增] tab 选项卡 close change 事件,扩展 tab 动态逻辑。
-[新增] ClickOutside 工具。
-[新增] menu 菜单 selectedKey, openKeys 属性。
-[修复] menu 菜单 layui-this 样式,多 a 标签样式重叠。
-
-
-[新增] menu 菜单 title 插槽,允许自定义菜单项。
-[新增] table 表格 toolbar 插槽, 用于自定义工具栏。
-[新增] icon 图标 color 属性, 用于自定义颜色。
-[新增] icon 图标 size 属性, 用于自定义尺寸。
-[新增] breadcrumb-item 面包屑 default 插槽, 用于自定义标题。
-[调整] menu 菜单 child-item 行高, 由 40 调整为 46。
-[调整] breadcrumb 面包屑样式, 让 Api 更合理。
-
-
-[新增] tree 树,支持 node-click,selectKeys 等
-[新增] table 表格,提供 columns datasource page 分页
-[新增] transfer 穿梭框,提供 双列表数据切换
-[新增] textarea 文本域 input 事件 与 disabled 禁用属性
-[新增] button 按钮 disabled 禁用属性
-[新增] input 输入框 disabled 禁用属性
-[新增] checkbox 复选框 disabled 禁用属性
-[新增] icon 图标 prefix 属性,支持自定义 iconfont 引入使用
-[修改] card 卡片 slot 判断逻辑,body 不存在时,使用 default slot
-[修改] field 字段逻辑,当 slot 为空时,展现为线状,否则为面板
-[修复] collapse 手风琴,展开 收起 状态时的不同图标展示
-[重构] checkbox 复选框逻辑,让 api 更合理
-[依赖] 升级 vue 3.2.20 依赖
-
-
-[新增] table 表格组件
-[新增] tab 选项卡组件
-[新增] rate 评分组件
-[新增] button 组件 border 属性,设置边框颜色
-[新增] iconPicker 组件 showSearch 配置, 是否启用搜索
-[新增] page 分页组件
-[修复] menu 组件,菜单项 与 目录 重复渲染
-[支持] 完善 layui-vue-sample 案例
-[支持] 文档支持模糊查询, 用于快速检索组件文档
-[支持] 文档移动端预览
-
-
-[新增] menu 菜单组件
-[新增] iconPicker 图标选择组件
-[新增] anim 动画文档
-[新增] dropdown 下拉菜单组件
-[新增] color 颜色文档
-[新增] collapse 手风琴组件
-[新增] select 下拉选择组件
-[新增] empty 空数据组件
-[新增] scroll 滚动容器组件
-[新增] avatar 头像组件
-
+
+
+
+ -
+
0.2.8 2021-12-15
+
+ - [新增] tooltip 警告提示,展现需要关注的信息。
+ - [新增] input-number 数字输入框, 通过鼠标或键盘,输入范围内的数值。
+ - [新增] layer 组件 isHtmlFangement 属性,函数调用时,用于解析 html 片段。
+ - [新增] layer 组件 resize 属性, 开启弹层尺寸拉伸, 常用于 页面层 与 Iframe 层。
+ - [加强] layer 组件 area 属性, 支持 字符串 与 数组 类型, 默认 auto 宽高根据内容自适应。
+ - [修复] layer 组件 body 禁用拖动, 仅支持标题拖动窗体。
+ - [修复] icon-picker 组件 select 图标时, 自动隐藏选择内容。
+ - [修复] dropdown 组件触发方式为 hover 时,移动不到菜单子项的问题
+ - [集成] utteranc.es 插件, 基于 issues 提供为文档提供留言能力。
+ - [升级] layer-vue 1.2.0, 更稳定的 layer 版本。
+ - [升级] vue 3.2.26 版本。
+
+
+
+
+
+
+
+ -
+
0.1.0 2021-12-10
+
+
+
+
diff --git a/example/docs/zh-CN/guide/contribution.md b/example/docs/zh-CN/guide/contribution.md
deleted file mode 100644
index 54b084c5..00000000
--- a/example/docs/zh-CN/guide/contribution.md
+++ /dev/null
@@ -1,2 +0,0 @@
-::: title 贡献代码
-:::
diff --git a/example/docs/zh-CN/guide/introduce.md b/example/docs/zh-CN/guide/introduce.md
index 8e57741e..ba93d954 100644
--- a/example/docs/zh-CN/guide/introduce.md
+++ b/example/docs/zh-CN/guide/introduce.md
@@ -1,7 +1,11 @@
::: title 基本介绍
:::
-
+
+
+
+
+
diff --git a/example/docs/zh-CN/guide/member.md b/example/docs/zh-CN/guide/member.md
new file mode 100644
index 00000000..13f0b5c8
--- /dev/null
+++ b/example/docs/zh-CN/guide/member.md
@@ -0,0 +1,10 @@
+::: title 贡献代码
+:::
+
+
+::: describe
+
+
+[](https://giteye.net/chart/DBC9Z6HQ)
+
+:::
\ No newline at end of file
diff --git a/example/docs/zh-CN/guide/problem.md b/example/docs/zh-CN/guide/problem.md
index ddcf1b94..48a6c510 100644
--- a/example/docs/zh-CN/guide/problem.md
+++ b/example/docs/zh-CN/guide/problem.md
@@ -1,2 +1,2 @@
::: title 常见问题
-:::
+:::
\ No newline at end of file
diff --git a/example/src/assets/css/markdown.css b/example/src/assets/css/markdown.css
index 72e2403f..db461523 100644
--- a/example/src/assets/css/markdown.css
+++ b/example/src/assets/css/markdown.css
@@ -1,3 +1,8 @@
+.utterances {
+ margin-top: 30px;
+ max-width: 100%;
+}
+
html {
line-height: 1.4;
font-size: 16px;
diff --git a/example/src/components/LayCode.vue b/example/src/components/LayCode.vue
index ace7fd0c..3fa909b6 100644
--- a/example/src/components/LayCode.vue
+++ b/example/src/components/LayCode.vue
@@ -19,6 +19,7 @@
\ No newline at end of file
diff --git a/example/src/components/LaySearch.vue b/example/src/components/LaySearch.vue
index 0d8cb134..adb8080a 100644
--- a/example/src/components/LaySearch.vue
+++ b/example/src/components/LaySearch.vue
@@ -41,7 +41,7 @@
+
+
\ No newline at end of file
diff --git a/src/module/button/index.less b/src/module/button/index.less
index 74be8434..4d7ef9b0 100644
--- a/src/module/button/index.less
+++ b/src/module/button/index.less
@@ -1,6 +1,6 @@
.layui-btn {
height: 38px;
- line-height: 38px;
+ line-height: 36px;
border: 1px solid transparent;
padding: 0 18px;
background-color: #009688;
diff --git a/src/module/dropdown/index.vue b/src/module/dropdown/index.vue
index 4eded2f2..8271c843 100644
--- a/src/module/dropdown/index.vue
+++ b/src/module/dropdown/index.vue
@@ -1,3 +1,49 @@
+
+
+
+
-
-
-
+
\ No newline at end of file
diff --git a/src/module/iconPicker/index.vue b/src/module/iconPicker/index.vue
index d58d6143..b7b4afec 100644
--- a/src/module/iconPicker/index.vue
+++ b/src/module/iconPicker/index.vue
@@ -1,5 +1,5 @@
-
+
(),
- {
+}
+
+const props = withDefaults(defineProps
(),{
modelValue: 'layui-icon-face-smile',
page: false,
- }
-)
+})
+
+const dropdownRef = ref(null);
const emit = defineEmits(['update:modelValue'])
@@ -104,6 +105,8 @@ const selectedIcon: Ref = ref(props.modelValue as string)
const selectIcon = function (icon: string) {
emit('update:modelValue', icon)
selectedIcon.value = icon
+ // @ts-ignore
+ dropdownRef.value.hide()
}
const icones: Ref = ref([])
diff --git a/src/module/input/index.vue b/src/module/input/index.vue
index ca987567..381b9a7e 100644
--- a/src/module/input/index.vue
+++ b/src/module/input/index.vue
@@ -20,7 +20,7 @@ export interface LayInputProps {
name?: string;
type?: string;
disabled?: boolean;
- modelValue?: string;
+ modelValue?: string | number;
placeholder?: string;
}
@@ -41,4 +41,5 @@ const onFocus = function (event: FocusEvent) {
const onBlur = function () {
emit("blur");
};
+
diff --git a/src/module/inputNumber/index.less b/src/module/inputNumber/index.less
new file mode 100644
index 00000000..02942be5
--- /dev/null
+++ b/src/module/inputNumber/index.less
@@ -0,0 +1,117 @@
+@border-color: #eee;
+@hover-border-color: #5fb878;
+@lg: 40px;
+@lg-wdith: 200px;
+@lg-right: 20px;
+@md: 32px;
+@md-wdith: 160px;
+@md-right: 16px;
+@sm: 28px;
+@sm-wdith: 140px;
+@sm-right: 14px;
+@xs: 24px;
+@xs-wdith: 120px;
+@xs-right: 12px;
+
+.set-size(@width, @size, @right-size){
+ &{
+ height: @size;
+ width: @width;
+ .layui-input{
+ height: @size;
+ line-height: @size;
+ padding: 0 @size;
+ }
+ .layui-control-btn {
+ width: @size;
+ height: @size;
+ line-height: @size;
+ }
+ &[position=right]{
+ .layui-input{
+ padding: 0 @size 0 0;
+ }
+ .layui-control-btn {
+ height: @right-size;
+ line-height: @right-size;
+ }
+ .layui-subtraction-btn{
+ top: @right-size - 1;
+ }
+ }
+ }
+}
+
+.layui-input-number{
+ position: relative;
+ display: inline-block;
+ box-sizing: border-box;
+ border: 1px solid @border-color;
+ border-color: @border-color;
+ border-radius: 2px;
+ overflow: hidden;
+ .set-size(@lg-wdith, @lg, @lg-right);
+ margin-left: 5px;
+ .layui-input{
+ text-align: center;
+ border: 0;
+ }
+ .layui-control-btn {
+ position: absolute;
+ box-sizing: border-box;
+ border: 0;
+ border-color: @border-color;
+ border-style: solid;
+ border-radius: 0;
+ padding: 0;
+ text-align: center;
+ top: 0;
+ &:hover{
+ color: @hover-border-color;
+ }
+ &.layui-subtraction-btn{
+ border-right-width: 1px;
+ }
+ &.layui-addition-btn{
+ border-left-width: 1px;
+ right: 0;
+ }
+ .layui-icon{
+ padding: 0px;
+ }
+ }
+ /* 谷歌--去掉自带的控制按钮 */
+ input.layui-input::-webkit-outer-spin-button,
+ input.layui-input::-webkit-inner-spin-button {
+ -webkit-appearance: none;
+ }
+
+ /* 火狐--去掉自带的控制按钮 */
+ input.layui-input[type="number"]{
+ -moz-appearance: textfield;
+ }
+
+ &[position=right]{
+ .layui-subtraction-btn{
+ right: 0;
+ border-right-width: 0px;
+ border-left-width: 1px;
+ }
+ .layui-addition-btn{
+ border-bottom-width: 1px;
+ }
+ }
+
+ &[size=md] {
+ .set-size(@md-wdith,@md, @md-right)
+ }
+
+ &[size=sm] {
+ .set-size(@sm-wdith, @sm, @sm-right)
+ }
+
+ &[size=xs] {
+ .set-size(@xs-wdith, @xs, @xs-right)
+ }
+
+}
\ No newline at end of file
diff --git a/src/module/inputNumber/index.ts b/src/module/inputNumber/index.ts
new file mode 100644
index 00000000..4ad6c2ef
--- /dev/null
+++ b/src/module/inputNumber/index.ts
@@ -0,0 +1,9 @@
+import type { App } from 'vue'
+import Component from './index.vue'
+import type { IDefineComponent } from '../type/index'
+
+Component.install = (app: App) => {
+ app.component(Component.name || 'LayInputNumber', Component)
+}
+
+export default Component as IDefineComponent
diff --git a/src/module/inputNumber/index.vue b/src/module/inputNumber/index.vue
new file mode 100644
index 00000000..ebcb207b
--- /dev/null
+++ b/src/module/inputNumber/index.vue
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
diff --git a/src/module/popper/calcPosition.ts b/src/module/popper/calcPosition.ts
new file mode 100644
index 00000000..cea53dd3
--- /dev/null
+++ b/src/module/popper/calcPosition.ts
@@ -0,0 +1,50 @@
+import { Ref } from "vue";
+// 计算各个方向位置
+const postionFns: any = {
+ top(el: HTMLElement, popper: HTMLElement, innnerPosition: Ref, called: boolean) {
+ let {top, left, bottom} = el.getBoundingClientRect()
+ if ((top = top - popper.offsetHeight - 6) < 0 && bottom > popper.offsetHeight) {
+ innnerPosition.value = 'bottom';
+ top = bottom;
+ }
+ return {
+ top: `${top}px`,
+ left: `${left - (popper.offsetWidth - el.offsetWidth) / 2}px`
+ }
+ },
+ bottom(el: HTMLElement, popper: HTMLElement, innnerPosition: Ref, called: boolean) {
+ let { top, left, bottom } = el.getBoundingClientRect()
+ if (window.innerHeight - bottom < popper.offsetHeight + 6) {
+ innnerPosition.value = 'top';
+ bottom = top - popper.offsetHeight - 6;
+ }
+ return {
+ top: `${bottom}px`,
+ left: `${left - (popper.offsetWidth - el.offsetWidth) / 2}px`
+ }
+ },
+ left(el: HTMLElement, popper: HTMLElement, innnerPosition: Ref, called : boolean) {
+ let {top, left, right} = el.getBoundingClientRect()
+ left = left - popper.offsetWidth - 6;
+ if (left < 0) {
+ innnerPosition.value = 'right';
+ left = right;
+ }
+ return {
+ top: `${top - (popper.offsetHeight - el.offsetHeight) / 2}px`,
+ left: `${left}px`
+ }
+ },
+ right(el: HTMLElement, popper: HTMLElement, innnerPosition: Ref, called: boolean) {
+ let { top, left, right } = el.getBoundingClientRect()
+ if (window.innerWidth < right + popper.offsetWidth + 6) {
+ innnerPosition.value = 'left';
+ right = left - popper.offsetWidth - 6;
+ }
+ return {
+ top: `${top - (popper.offsetHeight - el.offsetHeight) / 2}px`,
+ left: `${right}px`
+ }
+ }
+}
+export default postionFns;
\ No newline at end of file
diff --git a/src/module/popper/index.less b/src/module/popper/index.less
new file mode 100644
index 00000000..ae994b31
--- /dev/null
+++ b/src/module/popper/index.less
@@ -0,0 +1,101 @@
+// 主题颜色
+// 浅色 --> 默认使用
+@ligh-background: #FFF;
+@ligh-color: #3a3a3a;
+
+// 深色
+@dark-background: #353535;
+@dark-color: #FFF;
+
+@border-clor: #cecece;
+
+// 单一设置主题
+.single-theme(@position, @contrary_position, @margin_postion, @color, @m-border-color) {
+ @attr : ~'[position=@{position}]';
+ &{
+ border: 1px solid @m-border-color;
+ &.layui-popper@{attr}{
+ margin-@{contrary_position}: 6px;
+ .layui-popper-arrow {
+ @{contrary_position}: -6px;
+ border-@{contrary_position}-width: 0;
+ border-@{position}-color: @m-border-color;
+ &::after{
+ @{contrary_position}: 1px;
+ border-@{contrary_position}-width: 0;
+ margin-@{margin_postion}: -6px;
+ border-@{position}-color: @color;
+ }
+ }
+ }
+ }
+}
+// 统一设置四个方向的主题
+.theme(@background-color, @color, @border-color) {
+ background-color: @background-color;
+ color: @color;
+ .single-theme(top, bottom, left, @background-color, @border-color);
+ .single-theme(bottom, top, left, @background-color, @border-color);
+ .single-theme(right, left, top, @background-color, @border-color);
+ .single-theme(left, right, top, @background-color, @border-color);
+}
+
+// 箭头默认居中
+.arrow-default-center(@position, @prop) {
+ @attr : ~'[position=@{position}]';
+ &.layui-popper@{attr} {
+ .layui-popper-arrow{
+ @{prop}: -moz-calc(50% - 6px);
+ @{prop}: -webkit-calc(50% - 6px);
+ @{prop}: calc(50% - 6px);
+ }
+ }
+}
+.all-arrow-default-center() {
+ .arrow-default-center(top, left);
+ .arrow-default-center(bottom, left);
+ .arrow-default-center(left, top);
+ .arrow-default-center(right, top);
+}
+
+// 样式开始
+.layui-popper {
+ position: fixed;
+ padding: 10px;
+ border-radius: 3px;
+ word-wrap: break-word;
+ min-width: 12px;
+ min-height: 12px;
+ font-size: 14px;
+ box-sizing: border-box;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
+ .theme(@ligh-background, @ligh-color, @border-clor);
+ max-width: 300px;
+ z-index: 9999;
+
+ // 箭头默认居中
+ .all-arrow-default-center();
+
+ .layui-popper-arrow {
+ &,&::after{
+ position: absolute;
+ display: block;
+ width: 0;
+ height: 0;
+ border-width: 6px;
+ border-style: solid;
+ border-color: transparent;
+ }
+
+ &::after{
+ content: ' ';
+ }
+
+ }
+
+ /* 深色主题 */
+ &.layui-dark {
+ .theme(@dark-background, @dark-color, @dark-background);
+ }
+
+}
\ No newline at end of file
diff --git a/src/module/popper/index.vue b/src/module/popper/index.vue
new file mode 100644
index 00000000..8b9a527f
--- /dev/null
+++ b/src/module/popper/index.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/module/popper/usePopper.ts b/src/module/popper/usePopper.ts
new file mode 100644
index 00000000..c60c44b2
--- /dev/null
+++ b/src/module/popper/usePopper.ts
@@ -0,0 +1,43 @@
+import { h, ref, render, watchEffect, watch} from "vue";
+import popper from "./index.vue";
+import { once } from "../../tools/domUtil";
+const EVENT_MAP : any = {
+ 'hover': 'mouseenter',
+ 'click': 'click'
+}
+const usePopper = {
+ createPopper(el: HTMLElement, props: any, trigger : string) {
+ const _this = this;
+ once(el, EVENT_MAP[trigger], () => {
+ // TODO 临时解决方案
+ const _props:any = {el};
+ for (const key in props) {
+ _props[key] = ref(props[key]);
+ }
+ _props.updateVisible = function(val:boolean) {
+ _props.visible && (_props.visible.value = val);
+ }
+ _this.renderPopper(_props);
+ watchEffect(() => {
+ for (const key in _props) {
+ if (key === 'visible') {
+ continue;
+ }
+ _props[key].value = props[key];
+ }
+ });
+ watch(() => props.visible, (val: boolean)=> {
+ _props.updateVisible(val);
+ })
+ })
+ },
+ renderPopper(props: any) {
+ const container: HTMLDivElement = document.createElement("div");
+ // container.setAttribute("class", "lay-div");
+ const node = h(popper, props);
+ render(node, container);
+ container.firstElementChild && document.body.appendChild(container.firstElementChild);
+ return node;
+ }
+}
+export default usePopper;
\ No newline at end of file
diff --git a/src/module/slider/index.less b/src/module/slider/index.less
new file mode 100644
index 00000000..ba831de4
--- /dev/null
+++ b/src/module/slider/index.less
@@ -0,0 +1,34 @@
+.layui-slider-v {
+ width: 100%;
+ height: 50px;
+ /* background-color: palevioletred; */
+ }
+
+ .layui-slider-track-v {
+ width: 100%;
+ height: 16px;
+ position: relative;
+ cursor: pointer;
+ z-index: 30;
+ }
+
+ .layui-slider-btn-v {
+ width: 12px;
+ height: 12px;
+ background-color: white;
+ position: absolute;
+ // top: -7px;
+ border: 2px solid rgb(0, 150, 136);
+ border-radius: 50%;
+ cursor: pointer;
+ left: 0%;
+ }
+
+ .layui-slider-rate-v {
+ width: 0%;
+ height: 4px;
+ position: absolute;
+ top: 6px;
+ left: 0;
+ background-color: rgb(0, 150, 136);
+ }
\ No newline at end of file
diff --git a/src/module/slider/index.vue b/src/module/slider/index.vue
index 5eeec521..4750a816 100644
--- a/src/module/slider/index.vue
+++ b/src/module/slider/index.vue
@@ -1,38 +1,89 @@
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/src/module/tooltip/index.ts b/src/module/tooltip/index.ts
new file mode 100644
index 00000000..82ddc5d6
--- /dev/null
+++ b/src/module/tooltip/index.ts
@@ -0,0 +1,9 @@
+import type { App } from 'vue'
+import Component from './index.vue'
+import type { IDefineComponent } from '../type/index'
+
+Component.install = (app: App) => {
+ app.component(Component.name || 'LayTooltip', Component)
+}
+
+export default Component as IDefineComponent
\ No newline at end of file
diff --git a/src/module/tooltip/index.vue b/src/module/tooltip/index.vue
new file mode 100644
index 00000000..e85205c4
--- /dev/null
+++ b/src/module/tooltip/index.vue
@@ -0,0 +1,42 @@
+
diff --git a/src/module/transfer/index.vue b/src/module/transfer/index.vue
index 8e565a7a..c9dc418f 100644
--- a/src/module/transfer/index.vue
+++ b/src/module/transfer/index.vue
@@ -44,7 +44,7 @@ const allLeftChange = function (checked: any) {
watch(
leftSelectedKeys,
- function () {
+ () => {
if (
leftDataSource.value.length === leftSelectedKeys.value.length &&
leftDataSource.value.length != 0
@@ -70,7 +70,7 @@ const allRightChange = function (checked: any) {
watch(
rightSelectedKeys,
- function () {
+ () => {
if (
rightDataSource.value.length === rightSelectedKeys.value.length &&
rightDataSource.value.length != 0
diff --git a/src/module/type/public.ts b/src/module/type/public.ts
index 8ca0102c..e3a622c4 100644
--- a/src/module/type/public.ts
+++ b/src/module/type/public.ts
@@ -1,4 +1,5 @@
import type { App, DefineComponent, Ref } from 'vue'
+
export type StringObject = Record
export type UnknownObject = Record
diff --git a/src/tools/domUtil.js b/src/tools/domUtil.js
new file mode 100644
index 00000000..1895887a
--- /dev/null
+++ b/src/tools/domUtil.js
@@ -0,0 +1,27 @@
+// 获取标签与窗口顶边距离
+export function getTop(elem) {
+ return elem.offsetTop + (elem.offsetParent && getTop(elem.offsetParent) || 0);
+}
+
+// 获取标签与窗口左边距离
+export function getLeft(elem) {
+ return elem.offsetLeft + (elem.offsetParent && getLeft(elem.offsetParent) || 0);
+}
+
+// 事件绑定
+export function on(elem, events, handler) {
+ [].concat(events).forEach(event => elem.addEventListener(event, handler, false));
+}
+
+export function once (elem, events, handler) {
+ const listener = function (_this, args) {
+ handler.apply(_this, args)
+ off(elem, events, listener);
+ }
+ on(elem, events, listener)
+}
+
+// 事件解除
+export function off(elem, events, handler) {
+ [].concat(events).forEach(event => elem.removeEventListener(event, handler, false));
+}
\ No newline at end of file