diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js index d16446d..82aa986 100644 --- a/docs/.vitepress/theme/index.js +++ b/docs/.vitepress/theme/index.js @@ -1,5 +1,8 @@ import DefaultTheme from 'vitepress/dist/client/theme-default' -import PrincessUI from "@princess-ui/components" + +import PrincessUI from "princess-ui" +import "princess-ui/theme-chalk/index.css" + export default { ...DefaultTheme, diff --git a/docs/demo-example.vue b/docs/demo-example.vue index 5a7c228..0160cc9 100644 --- a/docs/demo-example.vue +++ b/docs/demo-example.vue @@ -12,18 +12,40 @@ {{ count }}

+ diff --git a/packages/playground/src/dev/captcha.vue b/packages/playground/src/dev/captcha.vue new file mode 100644 index 0000000..c97e3dc --- /dev/null +++ b/packages/playground/src/dev/captcha.vue @@ -0,0 +1,27 @@ + + + diff --git a/packages/playground/src/dev/tree.vue b/packages/playground/src/dev/tree.vue new file mode 100644 index 0000000..e62cac0 --- /dev/null +++ b/packages/playground/src/dev/tree.vue @@ -0,0 +1,31 @@ + + + diff --git a/packages/theme-chalk/src/base.scss b/packages/theme-chalk/src/base.scss index 29745e9..e69de29 100644 --- a/packages/theme-chalk/src/base.scss +++ b/packages/theme-chalk/src/base.scss @@ -1,3 +0,0 @@ -*{ - color: gainsboro; -} \ No newline at end of file diff --git a/packages/theme-chalk/src/button.scss b/packages/theme-chalk/src/button.scss index 981e602..b634ca7 100644 --- a/packages/theme-chalk/src/button.scss +++ b/packages/theme-chalk/src/button.scss @@ -1,5 +1 @@ -@use "common/var.scss"; - -div{ - color: darkkhaki; -} \ No newline at end of file +@import 'common/var.scss'; \ No newline at end of file diff --git a/packages/theme-chalk/src/captcha.scss b/packages/theme-chalk/src/captcha.scss index 1fa1d67..89c9216 100644 --- a/packages/theme-chalk/src/captcha.scss +++ b/packages/theme-chalk/src/captcha.scss @@ -1,4 +1,4 @@ -@use 'common/var.scss'; +@import 'common/var.scss'; .ps-send { user-select: none; diff --git a/packages/theme-chalk/src/common/var.scss b/packages/theme-chalk/src/common/var.scss index 8b13789..7b33766 100644 --- a/packages/theme-chalk/src/common/var.scss +++ b/packages/theme-chalk/src/common/var.scss @@ -1 +1 @@ - +$primary-color: red;//#32b0f877 diff --git a/packages/theme-chalk/src/index.scss b/packages/theme-chalk/src/index.scss index 7e4c069..6718ebb 100644 --- a/packages/theme-chalk/src/index.scss +++ b/packages/theme-chalk/src/index.scss @@ -1,2 +1,3 @@ @import "./button.scss"; @import "./captcha.scss"; +@import "./tree.scss"; diff --git a/packages/theme-chalk/src/tree.scss b/packages/theme-chalk/src/tree.scss new file mode 100644 index 0000000..0677b45 --- /dev/null +++ b/packages/theme-chalk/src/tree.scss @@ -0,0 +1,72 @@ +@import 'common/var.scss'; + +.ps-tree-node.component { + position: relative; + + &.draging { + opacity: 0.6; + } + + .ps-tree-node-wrapper { + position: relative; + } +} + +.ps-tree-drag-up { + background-color: $primary-color !important; + position: absolute; + top: -1px; + left: 5px; + right: 8px; + height: 2px; + pointer-events: none; + z-index: 9; + + &::before { + content: ''; + width: 6px; + height: 6px; + background-color: $primary-color; + border-radius: 50%; + position: absolute; + left: 0; + top: 50%; + margin-top: -3px; + margin-left: -3px; + } +} + +.ps-tree-drag-down { + background-color: $primary-color !important; + position: absolute; + bottom: -1px; + left: 5px; + right: 8px; + height: 2px; + pointer-events: none; + z-index: 9; + + &::before { + content: ''; + width: 6px; + height: 6px; + background-color: $primary-color; + border-radius: 50%; + position: absolute; + left: 0; + top: 50%; + margin-top: -3px; + margin-left: -3px; + } +} + +.ps-tree-drag-in { + background-color: $primary-color !important; + position: absolute; + bottom: 0; + left: 0; + right: 0; + top: 0; + pointer-events: none; + z-index: 9; +}