diff --git a/packages/demo-test/src/style.css b/packages/demo-test/src/style.css index cec67f5d..d2e9756a 100644 --- a/packages/demo-test/src/style.css +++ b/packages/demo-test/src/style.css @@ -35,25 +35,6 @@ h1 { line-height: 1.1; } -button { - padding: 0.6em 1.2em; - font-size: 1em; - font-family: inherit; - font-weight: 500; - border: 1px solid transparent; - border-radius: 8px; - background-color: #1a1a1a; - transition: border-color 0.25s; - cursor: pointer; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - .card { padding: 2em; } diff --git a/packages/yike-design-demo/src/components/Snippet.vue b/packages/yike-design-demo/src/components/Snippet.vue index 45214859..cd8f4a37 100644 --- a/packages/yike-design-demo/src/components/Snippet.vue +++ b/packages/yike-design-demo/src/components/Snippet.vue @@ -56,7 +56,7 @@ function onCopy() {
- +
{}` | +| 方法 | 描述 | 入参类型 | 默认值 | +| -------------- | ------------------------ | ---------- | -------- | +| `onCloseModal` | 对话框关闭时的回调函数 | `Function` | `()=>{}` | +| `onSubmit` | 对话点击确定时的回调函数 | `Function` | `()=>{}` | ### 插槽 diff --git a/packages/yike-design-demo/src/examples/modal/modal-base.vue b/packages/yike-design-demo/src/examples/modal/modal-base.vue index c4b20bbb..b8377784 100644 --- a/packages/yike-design-demo/src/examples/modal/modal-base.vue +++ b/packages/yike-design-demo/src/examples/modal/modal-base.vue @@ -11,4 +11,4 @@ const showModal = () => { visible.value = true } - + diff --git a/packages/yike-design-demo/src/examples/modal/modal-close.vue b/packages/yike-design-demo/src/examples/modal/modal-close.vue index 89507d74..fb349174 100644 --- a/packages/yike-design-demo/src/examples/modal/modal-close.vue +++ b/packages/yike-design-demo/src/examples/modal/modal-close.vue @@ -15,4 +15,4 @@ const closeModal = () => { proxy.$message({ type: 'success', message: '这里是对话框关闭的回调函数' }) } - + diff --git a/packages/yike-design-demo/src/examples/modal/modal-footer-show.vue b/packages/yike-design-demo/src/examples/modal/modal-footer-show.vue index b9965ca9..2cc9c591 100644 --- a/packages/yike-design-demo/src/examples/modal/modal-footer-show.vue +++ b/packages/yike-design-demo/src/examples/modal/modal-footer-show.vue @@ -11,4 +11,4 @@ const showModal = () => { visible.value = true } - + diff --git a/packages/yike-design-demo/src/examples/modal/modal-footer.vue b/packages/yike-design-demo/src/examples/modal/modal-footer.vue index 20cb708e..b83aec7b 100644 --- a/packages/yike-design-demo/src/examples/modal/modal-footer.vue +++ b/packages/yike-design-demo/src/examples/modal/modal-footer.vue @@ -12,4 +12,4 @@ const showModal = () => { visible.value = true } - + diff --git a/packages/yike-design-demo/src/examples/modal/modal-header.vue b/packages/yike-design-demo/src/examples/modal/modal-header.vue index 1b08b31d..246a2582 100644 --- a/packages/yike-design-demo/src/examples/modal/modal-header.vue +++ b/packages/yike-design-demo/src/examples/modal/modal-header.vue @@ -12,4 +12,4 @@ const showModal = () => { visible.value = true } - + diff --git a/packages/yike-design-demo/src/examples/modal/modal-small.vue b/packages/yike-design-demo/src/examples/modal/modal-small.vue index dc0078ce..4291f2b6 100644 --- a/packages/yike-design-demo/src/examples/modal/modal-small.vue +++ b/packages/yike-design-demo/src/examples/modal/modal-small.vue @@ -11,4 +11,4 @@ const showModal = () => { visible.value = true } - + diff --git a/packages/yike-design-demo/src/examples/table/doc.md b/packages/yike-design-demo/src/examples/table/doc.md index 5eb7a346..1507f20d 100644 --- a/packages/yike-design-demo/src/examples/table/doc.md +++ b/packages/yike-design-demo/src/examples/table/doc.md @@ -24,6 +24,12 @@ ::: +:::snippet +自定义内容 +通过设置 slot 来自定义内容。 + +::: + ### API #### Table 属性 @@ -50,9 +56,10 @@ | formatter | 用来格式化内容 | function(row, column, cellValue, index) | — | | align | 对齐方式 | left / center / right | left | -#### Table-column 插槽 +#### Table 插槽 -| 参数 | 描述 | -| ------- | -------------------------------------------------- | -| default | 自定义列的内容 作用域参数为 { row, column, index } | -| header | 自定义表头的内容, 作用域参数为 { column, index } | +| 参数 | 描述 | +| ------- | ------------------------------------------------------------------------------ | +| default | 自定义列的内容 作用域参数为 { row, column, index } 其中 index 为所在行的索引值 | +| header | 自定义表头的内容, 作用域参数为 { column, index } | +| tbody | 自定义表的内容 | diff --git a/packages/yike-design-demo/src/examples/table/table-custom.vue b/packages/yike-design-demo/src/examples/table/table-custom.vue index 45c34b58..92249710 100644 --- a/packages/yike-design-demo/src/examples/table/table-custom.vue +++ b/packages/yike-design-demo/src/examples/table/table-custom.vue @@ -1,27 +1,75 @@ diff --git a/packages/yike-design-demo/src/examples/table/table-tbody.vue b/packages/yike-design-demo/src/examples/table/table-tbody.vue new file mode 100644 index 00000000..840cae10 --- /dev/null +++ b/packages/yike-design-demo/src/examples/table/table-tbody.vue @@ -0,0 +1,43 @@ + + diff --git a/packages/yike-design-demo/src/style/markdown.less b/packages/yike-design-demo/src/style/markdown.less index c6dd9c91..213eb827 100644 --- a/packages/yike-design-demo/src/style/markdown.less +++ b/packages/yike-design-demo/src/style/markdown.less @@ -112,17 +112,17 @@ } th { - padding-left: @space-m; + padding: 0 @space-xl; font-size: @size-s; font-weight: 600; text-align: left; - background-color: @bg-color-m; + background-color: @bg-color-s; transition: background-color @animats; - line-height: 44px; + line-height: 56px; } td { - padding: 10px @space-m; + padding: @space-l @space-xl; max-width: 240px; border-top: 1px solid @line-color-s; text-align: left; diff --git a/packages/yike-design-demo/src/views/develop/getting-started.md b/packages/yike-design-demo/src/views/develop/getting-started.md index 95c7b626..779beb95 100644 --- a/packages/yike-design-demo/src/views/develop/getting-started.md +++ b/packages/yike-design-demo/src/views/develop/getting-started.md @@ -2,7 +2,7 @@ ### 安装方式 -``` +```ts npm install --save-dev @yike-design/ui ``` diff --git a/packages/yike-design-ui/CHANGELOG.md b/packages/yike-design-ui/CHANGELOG.md index f043fdba..affff16a 100644 --- a/packages/yike-design-ui/CHANGELOG.md +++ b/packages/yike-design-ui/CHANGELOG.md @@ -1,6 +1,35 @@ # 更新日志 +### [0.0.13](https://github.com/ecaps1038/yike-design-dev/compare/v0.0.12...v0.0.13) (2024-03-25) + + +### ✨ Features | 新功能 + +* **test:** remove doc default button style ([43e237e](https://github.com/ecaps1038/yike-design-dev/commit/43e237e00b917fafdeeb4c3f34fd05f7b2d4c96b)) + + +### ✏️ Documentation | 文档 + +* Modal组件文档优化 ([b55c32d](https://github.com/ecaps1038/yike-design-dev/commit/b55c32dc7e4ce3323774e1a4c44330993a73ea07)) +* modal组件文档修改 ([91998a3](https://github.com/ecaps1038/yike-design-dev/commit/91998a35b4d9fd8151e6559e0bfc32ab7e8028b0)) +* **started:** modify start code style ([9722a20](https://github.com/ecaps1038/yike-design-dev/commit/9722a20ae3f64b9880858d63c9c40f45320e983f)) + + +### 🐛 Bug Fixes | Bug 修复 + +* **button:** fix status style repeat ([f70340e](https://github.com/ecaps1038/yike-design-dev/commit/f70340e78aae096b273aef74866166caa31c154b)) +* **button:** simplify class names ([9ad8b2e](https://github.com/ecaps1038/yike-design-dev/commit/9ad8b2edd8193f975c3f4b994a2816821c7f57cd)) +* **input:** remove multiple bem ([96a3d27](https://github.com/ecaps1038/yike-design-dev/commit/96a3d276711c38b72a172405cab544f50e5cf425)) +* modal组件新增content-hight属性 ([ba18e91](https://github.com/ecaps1038/yike-design-dev/commit/ba18e91e120192c164482c80ed2733f6504157ff)) +* **space:** fix space undifined ([#337](https://github.com/ecaps1038/yike-design-dev/issues/337)) ([743931f](https://github.com/ecaps1038/yike-design-dev/commit/743931f0a451104853b482f00e9aeca3f9ec03a0)) +* **styles:** 优化颜色混合模式 ([111b962](https://github.com/ecaps1038/yike-design-dev/commit/111b9624a2b2fc3f11c4db53e27bbb7083ca8c9c)) +* **styles:** 优化颜色混合模式 ([4392dc8](https://github.com/ecaps1038/yike-design-dev/commit/4392dc8c19964311eacd54f6b2e3bfb18904ceb0)) +* **table:** 优化样式 ([02bca5e](https://github.com/ecaps1038/yike-design-dev/commit/02bca5e8b30bf72638698c59851ec1539e314ae6)) +* **table:** 简单增加内容插槽 ([a880f3d](https://github.com/ecaps1038/yike-design-dev/commit/a880f3da423e91771153349f9666f70dd8bcd342)) +* table组件样式调整 ([0648ff4](https://github.com/ecaps1038/yike-design-dev/commit/0648ff4ef4ebb215084eb8dda15f2f0906e31889)) +* table组件样式调整 ([e1a8480](https://github.com/ecaps1038/yike-design-dev/commit/e1a8480519ba90bafd09046786c08a2e44982d01)) + ### [0.0.12](https://github.com/ecaps1038/yike-design-dev/compare/v0.0.11...v0.0.12) (2024-03-20) diff --git a/packages/yike-design-ui/components/alert/style/variables.less b/packages/yike-design-ui/components/alert/style/variables.less index cbf6e216..95d48187 100644 --- a/packages/yike-design-ui/components/alert/style/variables.less +++ b/packages/yike-design-ui/components/alert/style/variables.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; @alert-info-color: @pcolor; @alert-success-color: @scolor; @alert-warning-color: @wcolor; diff --git a/packages/yike-design-ui/components/anchor/style/index.less b/packages/yike-design-ui/components/anchor/style/index.less index 2073477d..e55571d7 100644 --- a/packages/yike-design-ui/components/anchor/style/index.less +++ b/packages/yike-design-ui/components/anchor/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; @import '../../scrollbar/style/index.less'; .yk-anchor { position: relative; diff --git a/packages/yike-design-ui/components/avatar/style/index.less b/packages/yike-design-ui/components/avatar/style/index.less index ba0fdbfd..6a4de5a3 100644 --- a/packages/yike-design-ui/components/avatar/style/index.less +++ b/packages/yike-design-ui/components/avatar/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; .yk-avatar { display: inline-flex; justify-content: center; diff --git a/packages/yike-design-ui/components/back-top/style/index.less b/packages/yike-design-ui/components/back-top/style/index.less index 9acbd379..e4233c84 100644 --- a/packages/yike-design-ui/components/back-top/style/index.less +++ b/packages/yike-design-ui/components/back-top/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; .yk-backtop { position: fixed; z-index: 999; diff --git a/packages/yike-design-ui/components/badge/style/index.less b/packages/yike-design-ui/components/badge/style/index.less index 76f2c09b..69757b30 100644 --- a/packages/yike-design-ui/components/badge/style/index.less +++ b/packages/yike-design-ui/components/badge/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; .modal { &-enter { &-from { diff --git a/packages/yike-design-ui/components/button/src/button.vue b/packages/yike-design-ui/components/button/src/button.vue index f9483e02..24490f87 100644 --- a/packages/yike-design-ui/components/button/src/button.vue +++ b/packages/yike-design-ui/components/button/src/button.vue @@ -1,16 +1,10 @@ diff --git a/packages/yike-design-ui/components/button/src/utils.ts b/packages/yike-design-ui/components/button/src/utils.ts deleted file mode 100644 index 3cab95d0..00000000 --- a/packages/yike-design-ui/components/button/src/utils.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Size } from '../../utils'; - -export const getSize = (size: Size): number => { - switch (size) { - case 's': - return 12; - case 'm': - return 14; - case 'l': - return 14; - case 'xl': - return 16; - default: - return 16; - } -}; diff --git a/packages/yike-design-ui/components/button/style/css.ts b/packages/yike-design-ui/components/button/style/css.ts deleted file mode 100644 index a91762c3..00000000 --- a/packages/yike-design-ui/components/button/style/css.ts +++ /dev/null @@ -1,2 +0,0 @@ -// TODO: 待打包工具完善后 -// 这里需要引入打包后 CSS diff --git a/packages/yike-design-ui/components/button/style/index.less b/packages/yike-design-ui/components/button/style/index.less index 97344000..bcf59c1e 100644 --- a/packages/yike-design-ui/components/button/style/index.less +++ b/packages/yike-design-ui/components/button/style/index.less @@ -1,135 +1,55 @@ @import '../../styles/mixin.less'; @import './variables.less'; -@import '../../spinner/style/index.less'; -/* stylelint-disable */ -.yk-button--loading { - opacity: 0.7 !important; - .yk-spinner { - margin-right: 4px; - } - circle { - stroke: #fff !important; - } -} +@typeList: secondary, outline; +@statusList: primary, success, warning, danger; +@sizeList: s, m, xl; .yk-button { display: inline-flex; justify-content: center; align-items: center; - padding: 6px 16px; + border: 1px solid; white-space: nowrap; - // 默认按钮状态 - color: @btn-primary-color-text; - color: @btn-primary-color-text; - background-color: @btn-primary-color-bg; outline: none; transition: all @animatb; box-sizing: border-box; - border-width: 1px; - border-style: solid; cursor: pointer; user-select: none; - circle { - stroke: @btn-primary-color-text !important; - } + .btn-type(); + .btn-size(); &__icon { margin-right: @space-ss; } - .btn-type(@type) { - .normal() { - color: ~'@{btn-@{type}-color-text}'; - circle { - stroke: ~'@{btn-@{type}-color-text}' !important; - } - background-color: ~'@{btn-@{type}-color-bg}'; - border-color: ~'@{btn-@{type}-color-border}'; - &:not(:disabled):hover { - background-color: ~'@{btn-@{type}-color-hover}'; - } - &:not(:disabled):active { - background-color: ~'@{btn-@{type}-color-active}'; - } + &--loading { + opacity: 0.7 !important; + + .yk-spinner { + margin-right: 4px; } - &--@{type} { - .normal(); + + circle { + stroke: #fff !important; } } - .btn-status(@type: primary, @status: primary) { - .normal() { - color: ~'@{btn-@{type}-color-text_@{status}}'; - circle { - stroke: ~'@{btn-@{type}-color-text_@{status}}' !important; - } - background-color: ~'@{btn-@{type}-color-bg_@{status}}'; - border-color: ~'@{btn-@{type}-color-border_@{status}}'; - &:not(:disabled):hover { - background-color: ~'@{btn-@{type}-color-hover_@{status}}'; - } - &:not(:disabled):active { - background-color: ~'@{btn-@{type}-color-active_@{status}}'; - } - } - &.yk-button--@{type}.yk-button--@{status} { - .normal(); + // yk-button--[status] + each(@statusList, { + &--@{value} { + .btn-status(primary, @value); } - } + }); + + .genTypeAndStatus(); + .gen-size(); - .btn-type(primary); - .btn-type(secondary); - .btn-type(outline); - - .btn-status(primary); - .btn-status(primary, success); - .btn-status(primary, warning); - .btn-status(primary, danger); - - .btn-status(secondary); - .btn-status(secondary, success); - .btn-status(secondary, warning); - .btn-status(secondary, danger); - - .btn-status(outline); - .btn-status(outline, success); - .btn-status(outline, warning); - .btn-status(outline, danger); - - // 尺寸 size - &--s { - padding: 0px @space-s; - min-width: 24px; - height: 24px; - font-size: @size-ss; - border-radius: @radius-s; - } - &--m { - padding: 0px @space-l; - min-width: 32px; - height: 32px; - border-radius: @radius-s; - } - &--l { - padding: 0px @space-l; - min-width: 36px; - height: 36px; - border-radius: @radius-m; - } - &--xl { - padding: 0px @space-xl; - min-width: 48px; - height: 48px; - font-size: @size-m; - border-radius: @radius-m; - } &--long { display: block; width: 100%; } - // 圆角样式 &--round { border-radius: @radius-r; } @@ -137,13 +57,80 @@ padding: 0; border-radius: @radius-r; } - &--square { padding: 0; } - // 禁用 &--disabled { .disabled(); } } + +.genTypeAndStatus() { + each(@typeList, { + &--@{value} { + .btn-type(@value); + } + .gen-status(@value); + }); +} + +.gen-status(@type) { + @statusList: primary, success, warning, danger; + + each(@statusList, { + &--@{type}.yk-button--@{value} { + .btn-status(@type, @value); + } + }); +} + +.gen-size() { + each(@sizeList, { + &--@{value} { + .btn-size(@value); + } + }); +} + +.btn-type(@type: primary) { + color: ~'@{btn-@{type}-color-text}'; + background-color: ~'@{btn-@{type}-color-bg}'; + border-color: ~'@{btn-@{type}-color-border}'; + + &:not(:disabled):hover { + background-color: ~'@{btn-@{type}-color-hover}'; + } + &:not(:disabled):active { + background-color: ~'@{btn-@{type}-color-active}'; + } + + circle { + stroke: ~'@{btn-@{type}-color-text}' !important; + } +} + +.btn-status(@type, @status: primary) { + color: ~'@{btn-@{type}-color-text_@{status}}'; + background-color: ~'@{btn-@{type}-color-bg_@{status}}'; + border-color: ~'@{btn-@{type}-color-border_@{status}}'; + + &:not(:disabled):hover { + background-color: ~'@{btn-@{type}-color-hover_@{status}}'; + } + &:not(:disabled):active { + background-color: ~'@{btn-@{type}-color-active_@{status}}'; + } + + circle { + stroke: ~'@{btn-@{type}-color-text_@{status}}' !important; + } +} + +.btn-size(@size: l) { + padding: ~'@{btn-size-padding_@{size}}'; + min-width: ~'@{btn-size-minWidth_@{size}}'; + height: ~'@{btn-size-height_@{size}}'; + font-size: ~'@{btn-size-fontSize_@{size}}'; + border-radius: ~'@{btn-size-borderRadius_@{size}}'; +} diff --git a/packages/yike-design-ui/components/button/style/index.ts b/packages/yike-design-ui/components/button/style/index.ts index d74e52ee..8479bad7 100644 --- a/packages/yike-design-ui/components/button/style/index.ts +++ b/packages/yike-design-ui/components/button/style/index.ts @@ -1 +1,2 @@ import './index.less'; +import '../../spinner/style'; diff --git a/packages/yike-design-ui/components/button/style/variables.less b/packages/yike-design-ui/components/button/style/variables.less index 50c370c6..ad5346ff 100644 --- a/packages/yike-design-ui/components/button/style/variables.less +++ b/packages/yike-design-ui/components/button/style/variables.less @@ -1,51 +1,57 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; +// Primary +// btn-[type]-color-text_[status] @btn-primary-color-text: #fff; @btn-primary-color-text_primary: #fff; @btn-primary-color-text_success: #fff; @btn-primary-color-text_warning: #fff; @btn-primary-color-text_danger: #fff; + @btn-primary-color-bg: @pcolor; @btn-primary-color-bg_primary: @pcolor; @btn-primary-color-bg_success: @scolor; @btn-primary-color-bg_warning: @wcolor; @btn-primary-color-bg_danger: @ecolor; + @btn-primary-color-hover: @pcolor-6; -@btn-primary-color-active: @pcolor-8; -@btn-primary-color-border_primary: @pcolor; -@btn-primary-color-border_success: @scolor; -@btn-primary-color-border_warning: @wcolor; -@btn-primary-color-border_danger: @ecolor; @btn-primary-color-hover_primary: @pcolor-6; @btn-primary-color-hover_success: @scolor-6; @btn-primary-color-hover_warning: @wcolor-6; @btn-primary-color-hover_danger: @ecolor-6; + +@btn-primary-color-active: @pcolor-8; @btn-primary-color-active_primary: @pcolor-8; @btn-primary-color-active_success: @scolor-8; @btn-primary-color-active_warning: @wcolor-8; @btn-primary-color-active_danger: @ecolor-8; + @btn-primary-color-border: transparent; @btn-primary-color-border_primary: transparent; @btn-primary-color-border_success: transparent; @btn-primary-color-border_warning: transparent; @btn-primary-color-border_danger: transparent; +// Secondary @btn-secondary-color-text: @font-color-l; @btn-secondary-color-text_primary: @pcolor; @btn-secondary-color-text_success: @scolor; @btn-secondary-color-text_warning: @wcolor; @btn-secondary-color-text_danger: @ecolor; + @btn-secondary-color-bg: @gray-1; -@btn-secondary-color-hover: @gray-2; -@btn-secondary-color-active: @gray-3; @btn-secondary-color-bg_primary: @pcolor-1; @btn-secondary-color-bg_success: @scolor-1; @btn-secondary-color-bg_warning: @wcolor-1; @btn-secondary-color-bg_danger: @ecolor-1; + +@btn-secondary-color-hover: @gray-2; @btn-secondary-color-hover_primary: @pcolor-2; @btn-secondary-color-hover_success: @scolor-2; @btn-secondary-color-hover_warning: @wcolor-2; @btn-secondary-color-hover_danger: @ecolor-2; + +@btn-secondary-color-active: @gray-3; @btn-secondary-color-active_primary: @pcolor-3; @btn-secondary-color-active_success: @scolor-3; @btn-secondary-color-active_warning: @wcolor-3; @@ -57,28 +63,58 @@ @btn-secondary-color-border_warning: transparent; @btn-secondary-color-border_danger: transparent; +// Outline @btn-outline-color-text: @font-color-l; @btn-outline-color-text_primary: @pcolor; @btn-outline-color-text_success: @scolor; @btn-outline-color-text_warning: @wcolor; @btn-outline-color-text_danger: @ecolor; + @btn-outline-color-bg: transparent; -@btn-outline-color-hover: @gray-1; -@btn-outline-color-active: @gray-2; @btn-outline-color-bg_primary: transparent; @btn-outline-color-bg_success: transparent; @btn-outline-color-bg_warning: transparent; @btn-outline-color-bg_danger: transparent; + @btn-outline-color-border: @gray-3; @btn-outline-color-border_primary: @pcolor-3; @btn-outline-color-border_success: @scolor-3; @btn-outline-color-border_warning: @wcolor-3; @btn-outline-color-border_danger: @ecolor-3; + +@btn-outline-color-hover: @gray-1; @btn-outline-color-hover_primary: @pcolor-1; @btn-outline-color-hover_success: @scolor-1; @btn-outline-color-hover_warning: @wcolor-1; @btn-outline-color-hover_danger: @ecolor-1; + +@btn-outline-color-active: @gray-2; @btn-outline-color-active_primary: @pcolor-2; @btn-outline-color-active_success: @scolor-2; @btn-outline-color-active_warning: @wcolor-2; @btn-outline-color-active_danger: @ecolor-2; + +// Size +@btn-size-padding_s: 0px @space-s; +@btn-size-minWidth_s: 24px; +@btn-size-height_s: 24px; +@btn-size-fontSize_s: @size-ss; +@btn-size-borderRadius_s: @radius-s; + +@btn-size-padding_m: 0px @space-l; +@btn-size-minWidth_m: 32px; +@btn-size-height_m: 32px; +@btn-size-fontSize_m: inherit; +@btn-size-borderRadius_m: @radius-s; + +@btn-size-padding_l: 0px @space-l; +@btn-size-minWidth_l: 36px; +@btn-size-height_l: 36px; +@btn-size-fontSize_l: inherit; +@btn-size-borderRadius_l: @radius-m; + +@btn-size-padding_xl: 0px @space-xl; +@btn-size-minWidth_xl: 48px; +@btn-size-height_xl: 48px; +@btn-size-fontSize_xl: @size-m; +@btn-size-borderRadius_xl: @radius-m; diff --git a/packages/yike-design-ui/components/calendar/style/index.less b/packages/yike-design-ui/components/calendar/style/index.less index a09bc442..650bbca0 100644 --- a/packages/yike-design-ui/components/calendar/style/index.less +++ b/packages/yike-design-ui/components/calendar/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; .yk-calendar { color: var(--pcolor); @@ -32,7 +32,7 @@ box-sizing: border-box; &.is-selected { border-bottom-width: 3px; - border-bottom-color: @scolor-7; + border-bottom-color: @scolor; } } td.prev, diff --git a/packages/yike-design-ui/components/checkbox/style/checkbox.less b/packages/yike-design-ui/components/checkbox/style/checkbox.less index 4c98d77f..9791c665 100644 --- a/packages/yike-design-ui/components/checkbox/style/checkbox.less +++ b/packages/yike-design-ui/components/checkbox/style/checkbox.less @@ -1,4 +1,5 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; + .yk-checkbox { position: relative; display: inline-flex; diff --git a/packages/yike-design-ui/components/checkbox/style/index.less b/packages/yike-design-ui/components/checkbox/style/index.less index 67a1535c..ef968746 100644 --- a/packages/yike-design-ui/components/checkbox/style/index.less +++ b/packages/yike-design-ui/components/checkbox/style/index.less @@ -1,3 +1,2 @@ -@import '../../styles/color/colors.less'; @import './checkbox.less'; @import './checkbox-group.less'; diff --git a/packages/yike-design-ui/components/collapse/style/index.less b/packages/yike-design-ui/components/collapse/style/index.less index 932fc4c4..08ff6439 100644 --- a/packages/yike-design-ui/components/collapse/style/index.less +++ b/packages/yike-design-ui/components/collapse/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; @import '../../styles/mixin.less'; .yk-collapse-group { diff --git a/packages/yike-design-ui/components/divider/style/index.less b/packages/yike-design-ui/components/divider/style/index.less index 5809f81a..6f43bc0e 100644 --- a/packages/yike-design-ui/components/divider/style/index.less +++ b/packages/yike-design-ui/components/divider/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/index.less'; +@import '../../styles/basis.less'; .yk-divider { --border-color: @line-color-m; --border-style: solid; diff --git a/packages/yike-design-ui/components/drawer/style/index.less b/packages/yike-design-ui/components/drawer/style/index.less index 6183b2b2..9d1bc88a 100644 --- a/packages/yike-design-ui/components/drawer/style/index.less +++ b/packages/yike-design-ui/components/drawer/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; @import '../../styles/icon.less'; .yk-drawer { diff --git a/packages/yike-design-ui/components/dropdown/style/index.less b/packages/yike-design-ui/components/dropdown/style/index.less index 7580afb2..35382f46 100644 --- a/packages/yike-design-ui/components/dropdown/style/index.less +++ b/packages/yike-design-ui/components/dropdown/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; @import '../../styles//mixin.less'; @import '../../tooltip/style/index.less'; .yk-dropdown { diff --git a/packages/yike-design-ui/components/empty/style/index.less b/packages/yike-design-ui/components/empty/style/index.less index 745ae052..5a63d441 100644 --- a/packages/yike-design-ui/components/empty/style/index.less +++ b/packages/yike-design-ui/components/empty/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; .yk-empty { display: flex; justify-content: center; diff --git a/packages/yike-design-ui/components/form/style/index.less b/packages/yike-design-ui/components/form/style/index.less index 65c1be93..be9b5af5 100644 --- a/packages/yike-design-ui/components/form/style/index.less +++ b/packages/yike-design-ui/components/form/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; .yk-form { display: flex; diff --git a/packages/yike-design-ui/components/icon/index.ts b/packages/yike-design-ui/components/icon/index.ts deleted file mode 100644 index 469e8599..00000000 --- a/packages/yike-design-ui/components/icon/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import Icon from './src/icon.vue'; -import { withInstall } from '../utils'; - -export const YkIcon = withInstall(Icon); -export default YkIcon; diff --git a/packages/yike-design-ui/components/icon/src/icon.vue b/packages/yike-design-ui/components/icon/src/icon.vue deleted file mode 100644 index f598850e..00000000 --- a/packages/yike-design-ui/components/icon/src/icon.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - diff --git a/packages/yike-design-ui/components/icon/style/index.less b/packages/yike-design-ui/components/icon/style/index.less deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yike-design-ui/components/icon/style/index.ts b/packages/yike-design-ui/components/icon/style/index.ts deleted file mode 100644 index d74e52ee..00000000 --- a/packages/yike-design-ui/components/icon/style/index.ts +++ /dev/null @@ -1 +0,0 @@ -import './index.less'; diff --git a/packages/yike-design-ui/components/image/style/index.less b/packages/yike-design-ui/components/image/style/index.less index f85ccde3..97731969 100644 --- a/packages/yike-design-ui/components/image/style/index.less +++ b/packages/yike-design-ui/components/image/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; @import '../../styles/mixin.less'; .yk-image { diff --git a/packages/yike-design-ui/components/input-search/style/index.less b/packages/yike-design-ui/components/input-search/style/index.less index 3b338542..eb76d07c 100644 --- a/packages/yike-design-ui/components/input-search/style/index.less +++ b/packages/yike-design-ui/components/input-search/style/index.less @@ -1,2 +1,2 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; @import '../../input/style/index.less'; diff --git a/packages/yike-design-ui/components/input-tag/style/index.less b/packages/yike-design-ui/components/input-tag/style/index.less index d5708d93..d33ec423 100644 --- a/packages/yike-design-ui/components/input-tag/style/index.less +++ b/packages/yike-design-ui/components/input-tag/style/index.less @@ -1,4 +1,4 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; @import '../../input/style/index.less'; @import '../../tag/style/index.less'; diff --git a/packages/yike-design-ui/components/input/src/input.vue b/packages/yike-design-ui/components/input/src/input.vue index e4f52449..a72d8a70 100644 --- a/packages/yike-design-ui/components/input/src/input.vue +++ b/packages/yike-design-ui/components/input/src/input.vue @@ -11,19 +11,21 @@
diff --git a/packages/yike-design-ui/components/input/style/functions.less b/packages/yike-design-ui/components/input/style/functions.less index 9fde3ee7..cc5f9fd8 100644 --- a/packages/yike-design-ui/components/input/style/functions.less +++ b/packages/yike-design-ui/components/input/style/functions.less @@ -25,10 +25,10 @@ border-radius: @br; } - &.yk-input--@{size} { + &.yk-input__inner--@{size} { .inner(); } - &.yk-input--@{size} input { + &.yk-input__inner--@{size} input { .widget(); } } @@ -48,7 +48,7 @@ background-color: @fsbgcolor !important; } } - &.yk-input--@{status} { + &.yk-input__inner--@{status} { .bow(); } } diff --git a/packages/yike-design-ui/components/input/style/index.less b/packages/yike-design-ui/components/input/style/index.less index d0c31878..c087edc4 100644 --- a/packages/yike-design-ui/components/input/style/index.less +++ b/packages/yike-design-ui/components/input/style/index.less @@ -1,10 +1,27 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; @import './functions.less'; @import '../../spinner/style/index.less'; .yk-input { display: inline-flex; align-items: center; transition: all @animatb ease-in-out; + &__inner { + display: inline-flex; + align-items: center; + transition: all @animatb ease-in-out; + .input-size(s, 22px, @space-s, @size-ss, @radius-s); + .input-size(m, 30px, @space-m, @size-s, @radius-s); + .input-size(l, 34px, @space-m, @size-s, @radius-m); + .input-size(xl, 46px, @space-l, @size-m, @radius-m); + + .input-status(primary, @bg-color-s, @bg-color-s, @pcolor, @bg-color-m, @pcolor, @bg-color-l); + .input-status(danger, transparent, @ecolor-2, @ecolor, @ecolor-1, @ecolor, @bg-color-l); + .input-status(success, transparent, @scolor-2, @scolor, @scolor-1, @scolor, @bg-color-l); + .input-status(warning, transparent, @wcolor-2, @wcolor, @wcolor-1, @wcolor, @bg-color-l); + .input-status(error, transparent, @ecolor-2, @ecolor, @ecolor-1, @ecolor, @bg-color-l); + .input-status(disabled, @bg-color-m, @bg-color-m, @bg-color-m, @bg-color-m, @bg-color-m, @bg-color-m); + .input-status(readonly, @bg-color-s, @bg-color-s, @bg-color-s, @bg-color-s, @bg-color-s, @bg-color-s); + } } .yk-input__spinner { @@ -13,18 +30,18 @@ margin-right: 6px; } -.yk-input--disabled input { +.yk-input__inner--disabled input { cursor: not-allowed; color: @font-color-s !important; } -.yk-input--leftbr0, -.yk-input--leftbr0 input { +.yk-input__inner--leftbr0, +.yk-input__inner--leftbr0 input { .left-no-border-radius(); } -.yk-input--rightbr0, -.yk-input--rightbr0 input { +.yk-input__inner--rightbr0, +.yk-input__inner--rightbr0 input { .right-no-border-radius(); } @@ -110,16 +127,3 @@ .yk-input--error { .input-status(warning, transparent, @wcolor-2, @wcolor, @wcolor-1, @wcolor, @bg-color-l); } - -.input-size(s, 22px, @space-s, @size-ss, @radius-s); -.input-size(m, 30px, @space-m, @size-s, @radius-s); -.input-size(l, 34px, @space-m, @size-s, @radius-m); -.input-size(xl, 46px, @space-l, @size-m, @radius-m); - -.input-status(primary, @bg-color-s, @bg-color-s, @pcolor, @bg-color-m, @pcolor, @bg-color-l); -.input-status(danger, transparent, @ecolor-2, @ecolor, @ecolor-1, @ecolor, @bg-color-l); -.input-status(success, transparent, @scolor-2, @scolor, @scolor-1, @scolor, @bg-color-l); -.input-status(warning, transparent, @wcolor-2, @wcolor, @wcolor-1, @wcolor, @bg-color-l); -.input-status(error, transparent, @ecolor-2, @ecolor, @ecolor-1, @ecolor, @bg-color-l); -.input-status(disabled, @bg-color-m, @bg-color-m, @bg-color-m, @bg-color-m, @bg-color-m, @bg-color-m); -.input-status(readonly, @bg-color-s, @bg-color-s, @bg-color-s, @bg-color-s, @bg-color-s, @bg-color-s); diff --git a/packages/yike-design-ui/components/link/style/index.less b/packages/yike-design-ui/components/link/style/index.less index 9f36ce95..298ca5b4 100644 --- a/packages/yike-design-ui/components/link/style/index.less +++ b/packages/yike-design-ui/components/link/style/index.less @@ -1,3 +1,5 @@ +@import '../../styles/basis.less'; + .yk-link { border-radius: @radius-s; text-decoration: underline; diff --git a/packages/yike-design-ui/components/message/style/index.less b/packages/yike-design-ui/components/message/style/index.less index bce034de..24e2188c 100644 --- a/packages/yike-design-ui/components/message/style/index.less +++ b/packages/yike-design-ui/components/message/style/index.less @@ -1,4 +1,5 @@ -@import '../../styles/color/colors.less'; +@import '../../styles/basis.less'; + .yk-message-container { position: fixed; top: @space-xl; diff --git a/packages/yike-design-ui/components/modal/src/modal.ts b/packages/yike-design-ui/components/modal/src/modal.ts index 20020142..66eef7c3 100644 --- a/packages/yike-design-ui/components/modal/src/modal.ts +++ b/packages/yike-design-ui/components/modal/src/modal.ts @@ -8,4 +8,5 @@ export type modalBaseProps = { showMask?: boolean; escapable?: boolean; showFooter?: boolean; + contentHeight?: string | number; }; diff --git a/packages/yike-design-ui/components/modal/src/modal.vue b/packages/yike-design-ui/components/modal/src/modal.vue index 025d937f..95bb91a6 100644 --- a/packages/yike-design-ui/components/modal/src/modal.vue +++ b/packages/yike-design-ui/components/modal/src/modal.vue @@ -37,9 +37,11 @@
-
- -
+ +
+ +
+