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,96 @@
|
|
|
1
|
+
import { defineComponent as C, ref as c, onMounted as R, openBlock as W, createElementBlock as z, normalizeClass as N, unref as _, createElementVNode as g } from "vue";
|
|
2
|
+
import { createNamespace as D } from "../../../assets/ts/utils.mjs";
|
|
3
|
+
import "./style/index.css";
|
|
4
|
+
const F = C({
|
|
5
|
+
name: "k-timeline"
|
|
6
|
+
}), X = C({
|
|
7
|
+
...F,
|
|
8
|
+
props: {
|
|
9
|
+
options: { default: () => ({
|
|
10
|
+
startTime: "",
|
|
11
|
+
endTime: "",
|
|
12
|
+
msList: []
|
|
13
|
+
}) }
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:point"],
|
|
16
|
+
setup(T, { emit: E }) {
|
|
17
|
+
const { n: a } = D("timeline"), b = E, d = c(), l = c(), v = c();
|
|
18
|
+
let o;
|
|
19
|
+
const p = c(16.2), u = c(!1), m = T;
|
|
20
|
+
function f(e) {
|
|
21
|
+
return e = e.substring(0, 19), e = e.replace(/-/g, "/"), new Date(e).getTime();
|
|
22
|
+
}
|
|
23
|
+
const r = {
|
|
24
|
+
st: f(m.options.startTime),
|
|
25
|
+
et: f(m.options.endTime)
|
|
26
|
+
}, h = new Array();
|
|
27
|
+
m.options.msList && m.options.msList.forEach((e) => {
|
|
28
|
+
h.push({
|
|
29
|
+
time: f(e.time + ""),
|
|
30
|
+
desc: e.desc
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
const w = (r.et - r.st) / 1e3, M = () => {
|
|
34
|
+
l.value.innerHTML = "", o = d.value.getBoundingClientRect();
|
|
35
|
+
let e = Math.ceil(l.value.offsetWidth / p.value);
|
|
36
|
+
for (let n = 0; n < e; n++) {
|
|
37
|
+
let i = document.createElement("span");
|
|
38
|
+
i.className = a("ticTiny"), i.id = n + "", l.value.appendChild(i), i.style.left = Math.round(p.value * n) / o.width * 100 + "%";
|
|
39
|
+
}
|
|
40
|
+
let t = Math.ceil(e / 10);
|
|
41
|
+
for (let n = 0; n < t; n += 2) {
|
|
42
|
+
let i = document.createElement("span");
|
|
43
|
+
i.className = a("ticMain"), i.id = n + "ss", l.value.appendChild(i), i.style.left = Math.round(p.value * t * n) + "px";
|
|
44
|
+
let s = document.createElement("span");
|
|
45
|
+
s.className = a("date"), s.id = n + "data", s.innerHTML = "2023-02-10 10:20:40", s.style.left = Math.round(p.value * n * t) / o.width * 100 + "%", l.value.appendChild(s);
|
|
46
|
+
}
|
|
47
|
+
}, L = () => {
|
|
48
|
+
u.value = !0;
|
|
49
|
+
}, P = (e) => {
|
|
50
|
+
let t = e / o.width;
|
|
51
|
+
return v.value.style.left = `calc(${Number((t * 100).toFixed(2))}% - 8px)`, Math.round(t * w * 1e3) + r.st;
|
|
52
|
+
}, k = (e) => {
|
|
53
|
+
e.forEach((t) => {
|
|
54
|
+
Number(t.time) < r.st || Number(t.time) > r.et || x(t);
|
|
55
|
+
});
|
|
56
|
+
}, x = (e) => {
|
|
57
|
+
let t = Number(e.time), n = (t - r.st) / 1e3, i = Number((n / w * 100).toFixed(2)), s = document.createElement("span");
|
|
58
|
+
s.className = a("timepoint"), s.dataset.ms = t + "", d.value.appendChild(s), s.style.left = i + "%", s.onclick = () => {
|
|
59
|
+
alert(e.desc);
|
|
60
|
+
};
|
|
61
|
+
}, B = (e) => {
|
|
62
|
+
if (u.value) {
|
|
63
|
+
let t = e.clientX - o.left - 8;
|
|
64
|
+
t = t < -8 ? -8 : t, t + 8 > o.width && (t = o.width - 8), b("update:point", P(t + 8));
|
|
65
|
+
}
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
}, y = () => {
|
|
68
|
+
u.value = !1;
|
|
69
|
+
};
|
|
70
|
+
return R(() => {
|
|
71
|
+
d.value.getBoundingClientRect().width, M(), k(h), window.addEventListener("resize", M);
|
|
72
|
+
}), (e, t) => (W(), z("div", {
|
|
73
|
+
class: N([_(a)()]),
|
|
74
|
+
ref_key: "wrapper",
|
|
75
|
+
ref: d,
|
|
76
|
+
onPointerdown: L,
|
|
77
|
+
onPointerup: y,
|
|
78
|
+
onPointermove: B,
|
|
79
|
+
onMouseleave: y
|
|
80
|
+
}, [
|
|
81
|
+
g("div", {
|
|
82
|
+
ref_key: "timeWrapper",
|
|
83
|
+
ref: l,
|
|
84
|
+
style: { width: "100%", overflow: "hidden" }
|
|
85
|
+
}, null, 512),
|
|
86
|
+
g("div", {
|
|
87
|
+
class: N([_(a)("point")]),
|
|
88
|
+
ref_key: "refPoint",
|
|
89
|
+
ref: v
|
|
90
|
+
}, null, 2)
|
|
91
|
+
], 34));
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
export {
|
|
95
|
+
X as default
|
|
96
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineComponent as t, openBlock as e, createElementBlock as o } from "vue";
|
|
2
|
+
import "./style/index.css";
|
|
3
|
+
const s = { class: "k-toast" }, a = t({
|
|
4
|
+
name: "k-toast"
|
|
5
|
+
}), l = t({
|
|
6
|
+
...a,
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: Boolean
|
|
9
|
+
},
|
|
10
|
+
emits: [""],
|
|
11
|
+
setup(n) {
|
|
12
|
+
return (_, c) => (e(), o("div", s, " toast "));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
l as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineComponent as l, useAttrs as C, ref as T, computed as g, openBlock as t, createBlock as h, unref as s, mergeProps as B, withCtx as a, renderSlot as c, createElementBlock as u, Fragment as H, createTextVNode as L, toDisplayString as M } from "vue";
|
|
2
|
+
import { TooltipProps as N } from "./tooltip2.mjs";
|
|
3
|
+
import { KPopper as O } from "../../popper/index.mjs";
|
|
4
|
+
import { useNowrap as R } from "../../popper/src/use-nowrap.mjs";
|
|
5
|
+
import "./style/index.css";
|
|
6
|
+
import { PopperProps as S } from "../../popper/src/popper.mjs";
|
|
7
|
+
const $ = ["innerHTML"], A = l({
|
|
8
|
+
name: "k-tooltip"
|
|
9
|
+
}), j = l({
|
|
10
|
+
...A,
|
|
11
|
+
props: N,
|
|
12
|
+
setup(f, { expose: i }) {
|
|
13
|
+
const m = f, d = C(), o = T(), k = (e, r) => r.reduce((n, p) => (n[p] = e[p], n), {}), _ = g(() => ({ ...d, ...k(m, Object.keys(S)) })), w = R();
|
|
14
|
+
function P() {
|
|
15
|
+
o.value.update();
|
|
16
|
+
}
|
|
17
|
+
function v() {
|
|
18
|
+
o.value.onOpen();
|
|
19
|
+
}
|
|
20
|
+
function y() {
|
|
21
|
+
o.value.onClose();
|
|
22
|
+
}
|
|
23
|
+
return i({
|
|
24
|
+
update: P,
|
|
25
|
+
open: v,
|
|
26
|
+
close: y
|
|
27
|
+
}), (e, r) => (t(), h(s(O), B({
|
|
28
|
+
ref_key: "popperRef",
|
|
29
|
+
ref: o
|
|
30
|
+
}, _.value, { nowrap: s(w) }), {
|
|
31
|
+
content: a(() => [
|
|
32
|
+
c(e.$slots, "content", {}, () => [
|
|
33
|
+
e.rawContent ? (t(), u("span", {
|
|
34
|
+
key: 0,
|
|
35
|
+
innerHTML: e.content
|
|
36
|
+
}, null, 8, $)) : (t(), u(H, { key: 1 }, [
|
|
37
|
+
L(M(e.content), 1)
|
|
38
|
+
], 64))
|
|
39
|
+
])
|
|
40
|
+
]),
|
|
41
|
+
default: a(() => [
|
|
42
|
+
c(e.$slots, "default")
|
|
43
|
+
]),
|
|
44
|
+
_: 3
|
|
45
|
+
}, 16, ["nowrap"]));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
j as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
content: String,
|
|
3
|
+
placement: {
|
|
4
|
+
type: String,
|
|
5
|
+
default: "bottom"
|
|
6
|
+
},
|
|
7
|
+
effect: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "dark"
|
|
10
|
+
},
|
|
11
|
+
disabled: {
|
|
12
|
+
type: Boolean
|
|
13
|
+
},
|
|
14
|
+
rawContent: Boolean,
|
|
15
|
+
transitionName: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "van-popper-fade"
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
t as TooltipProps
|
|
22
|
+
};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
.k-tree {
|
|
2
|
+
--tree-border-color:#1d72ff;
|
|
3
|
+
--bg-triangle:#fff;
|
|
4
|
+
--bg-node-point:#000000;
|
|
5
|
+
--k-tree-node-hover-bg-color: var(--k-disabled-bg-color);
|
|
6
|
+
--k-tree-text-color: var(--k-text-color-regular);
|
|
7
|
+
--k-tree-expand-icon-color: var(--k-text-color-placeholder);
|
|
8
|
+
position: relative;
|
|
9
|
+
cursor: default;
|
|
10
|
+
color: var(--k-tree-text-color);
|
|
11
|
+
font-size: var(--k-font-size-middle);
|
|
12
|
+
position: relative;
|
|
13
|
+
}
|
|
14
|
+
.k-tree__node {
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
outline: none;
|
|
17
|
+
position: relative;
|
|
18
|
+
}
|
|
19
|
+
.k-tree__node__content {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
height: 26px;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
will-change: height;
|
|
25
|
+
}
|
|
26
|
+
.k-tree__node__content:hover {
|
|
27
|
+
background: var(--k-tree-node-hover-bg-color);
|
|
28
|
+
}
|
|
29
|
+
.k-tree__node__content .single-item {
|
|
30
|
+
width: 18px;
|
|
31
|
+
height: 14px;
|
|
32
|
+
position: relative;
|
|
33
|
+
}
|
|
34
|
+
.k-tree__node__content .single-item::after {
|
|
35
|
+
content: "";
|
|
36
|
+
position: absolute;
|
|
37
|
+
width: 6px;
|
|
38
|
+
height: 6px;
|
|
39
|
+
top: 4px;
|
|
40
|
+
left: 4px;
|
|
41
|
+
background: var(--bg-node-point);
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
z-index: 4;
|
|
44
|
+
}
|
|
45
|
+
.k-tree__node__content .is-parent {
|
|
46
|
+
position: relative;
|
|
47
|
+
transform: translateX(-2px);
|
|
48
|
+
}
|
|
49
|
+
.k-tree__node__content .is-parent::after {
|
|
50
|
+
content: "";
|
|
51
|
+
position: absolute;
|
|
52
|
+
width: 16px;
|
|
53
|
+
height: 16px;
|
|
54
|
+
background: var(--bg-triangle);
|
|
55
|
+
top: calc(50% - 8px);
|
|
56
|
+
left: calc(50% - 8px);
|
|
57
|
+
}
|
|
58
|
+
.k-tree__node__content .k-tree__node__label {
|
|
59
|
+
position: relative;
|
|
60
|
+
margin-left: 4px;
|
|
61
|
+
}
|
|
62
|
+
.k-tree__node__content .k-tree__node__label::after {
|
|
63
|
+
content: "";
|
|
64
|
+
position: absolute;
|
|
65
|
+
left: -11px;
|
|
66
|
+
width: 8px;
|
|
67
|
+
height: 1px;
|
|
68
|
+
border-top: 1px dashed var(--tree-border-color);
|
|
69
|
+
z-index: 2;
|
|
70
|
+
top: 9px;
|
|
71
|
+
}
|
|
72
|
+
.k-tree__node__content .k-tree__icon-wrapper {
|
|
73
|
+
z-index: 4;
|
|
74
|
+
}
|
|
75
|
+
.k-tree__node__content .last-isleaf-node {
|
|
76
|
+
position: relative;
|
|
77
|
+
}
|
|
78
|
+
.k-tree__node__content .last-isleaf-node::after {
|
|
79
|
+
content: "";
|
|
80
|
+
position: absolute;
|
|
81
|
+
left: 10px;
|
|
82
|
+
width: 14px;
|
|
83
|
+
height: 1px;
|
|
84
|
+
border-top: 1px dashed var(--tree-border-color);
|
|
85
|
+
z-index: 2;
|
|
86
|
+
top: 12px;
|
|
87
|
+
}
|
|
88
|
+
.k-tree__node__content.is-expand .k-tree__node__expand-icon {
|
|
89
|
+
transform: rotate(90deg);
|
|
90
|
+
}
|
|
91
|
+
.k-tree__node__expand-icon {
|
|
92
|
+
padding: 6px;
|
|
93
|
+
color: var(--k-tree-text-color);
|
|
94
|
+
transition: transform 0.2s;
|
|
95
|
+
z-index: 4;
|
|
96
|
+
}
|
|
97
|
+
.k-tree__node__expand-icon.is-leaf {
|
|
98
|
+
color: transparent;
|
|
99
|
+
cursor: default;
|
|
100
|
+
position: relative;
|
|
101
|
+
}
|
|
102
|
+
.k-tree__node:last-child::before {
|
|
103
|
+
border-right: none;
|
|
104
|
+
}
|
|
105
|
+
.k-tree__node .sub-child {
|
|
106
|
+
position: relative;
|
|
107
|
+
}
|
|
108
|
+
.k-tree__node .sub-child::after {
|
|
109
|
+
content: "";
|
|
110
|
+
position: absolute;
|
|
111
|
+
left: var(--left);
|
|
112
|
+
width: 1px;
|
|
113
|
+
bottom: 15px;
|
|
114
|
+
z-index: 2;
|
|
115
|
+
border-left: 1px dashed var(--tree-border-color);
|
|
116
|
+
top: 11px;
|
|
117
|
+
}
|
|
118
|
+
.k-tree > .first {
|
|
119
|
+
position: relative;
|
|
120
|
+
}
|
|
121
|
+
.k-tree > .first::after {
|
|
122
|
+
content: "";
|
|
123
|
+
position: absolute;
|
|
124
|
+
left: 32px;
|
|
125
|
+
width: 1px;
|
|
126
|
+
bottom: -6px;
|
|
127
|
+
z-index: 2;
|
|
128
|
+
border-left: 1px dashed var(--tree-border-color);
|
|
129
|
+
top: 20px;
|
|
130
|
+
}
|
|
131
|
+
.k-tree > .first:last-child::after {
|
|
132
|
+
border: none;
|
|
133
|
+
}
|
|
134
|
+
.k-tree > .first:last-child .last-isleaf-node::after {
|
|
135
|
+
border: none;
|
|
136
|
+
}
|
|
137
|
+
.k-tree__empty-block {
|
|
138
|
+
position: relative;
|
|
139
|
+
min-height: 60px;
|
|
140
|
+
text-align: center;
|
|
141
|
+
width: 100%;
|
|
142
|
+
height: 100%;
|
|
143
|
+
}
|
|
144
|
+
.k-tree__empty-text {
|
|
145
|
+
position: absolute;
|
|
146
|
+
left: 50%;
|
|
147
|
+
top: 50%;
|
|
148
|
+
transform: translate(-50%, -50%);
|
|
149
|
+
color: var(--k-text-color-secondary);
|
|
150
|
+
font-size: var(--k-font-size-middle);
|
|
151
|
+
}
|
|
152
|
+
.k-tree .is-dragging {
|
|
153
|
+
border-top: 1px solid var(--k-color-primary);
|
|
154
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { defineComponent as le, ref as O, computed as U, reactive as ie, provide as ce, watch as ae, h as c } from "vue";
|
|
2
|
+
import { isFunction as k, createNamespace as de } from "../../../assets/ts/utils.mjs";
|
|
3
|
+
import { TreeProps as se, TreeContextKeys as re } from "./tree2.mjs";
|
|
4
|
+
import { useDrag as oe } from "./use-drag.mjs";
|
|
5
|
+
import { Icon as W } from "../../icon/index.mjs";
|
|
6
|
+
import { KCollapseTransition as fe } from "../../collapse-transition/index.mjs";
|
|
7
|
+
import { KCheckbox as ue } from "../../checkbox/index.mjs";
|
|
8
|
+
import "./style/index.css";
|
|
9
|
+
import he from "../../../_virtual/plugin-vue_export-helper.mjs";
|
|
10
|
+
let ge = 1;
|
|
11
|
+
const j = 22, me = {
|
|
12
|
+
children: "children",
|
|
13
|
+
label: "label",
|
|
14
|
+
disabled: "disabled"
|
|
15
|
+
}, ke = le({
|
|
16
|
+
name: "k-tree",
|
|
17
|
+
props: se,
|
|
18
|
+
setup(i, { emit: u, expose: V, slots: C }) {
|
|
19
|
+
const { n: a } = de("tree"), y = O(""), r = U(() => ({ ...me, ...i.props })), K = U(() => i.load && k(i.load)), _ = O(), d = ie({
|
|
20
|
+
childNodes: h(i.data),
|
|
21
|
+
children: i.data
|
|
22
|
+
}), { createDragEvents: q } = oe(i, u, $);
|
|
23
|
+
ce(re, i), ae(() => i.data, () => {
|
|
24
|
+
$();
|
|
25
|
+
});
|
|
26
|
+
function $() {
|
|
27
|
+
d.childNodes = h(i.data), d.children = i.data;
|
|
28
|
+
}
|
|
29
|
+
function L(e) {
|
|
30
|
+
return e && e.childNodes && e.childNodes.length;
|
|
31
|
+
}
|
|
32
|
+
function I(e) {
|
|
33
|
+
!K.value || i.load(e || { level: 0 }, (t) => {
|
|
34
|
+
e ? (e.isLeaf = t.length === 0, e.loading = !1, e.loaded = !0, e.childNodes = h(t, e.level + 1, e)) : d.childNodes = h(t);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function z(e) {
|
|
38
|
+
var t;
|
|
39
|
+
e.loading || !i.expandOnClickNode || (e.expand = !e.expand, _.value = e, i.accordion && (((t = e.parent) == null ? void 0 : t.childNodes) || d.childNodes).forEach((l) => {
|
|
40
|
+
l !== e && (l.expand = !1);
|
|
41
|
+
}), K.value && !e.loaded && (e.loading = !0, I(e)), u(e.expand ? "node-expand" : "node-collapse", e.data, e), u("node-click", e));
|
|
42
|
+
}
|
|
43
|
+
function G(e, t) {
|
|
44
|
+
u("node-contextmenu", e, t.data, t);
|
|
45
|
+
}
|
|
46
|
+
function H(e, t) {
|
|
47
|
+
e.checked = e.indeterminate ? !0 : t, e.indeterminate && (e.indeterminate = !1), w(e, e.checked), M(e.parent), setTimeout(() => {
|
|
48
|
+
u("check-change", e, t, e.indeterminate);
|
|
49
|
+
}, 200);
|
|
50
|
+
}
|
|
51
|
+
function M(e) {
|
|
52
|
+
if (!e)
|
|
53
|
+
return;
|
|
54
|
+
let t = e;
|
|
55
|
+
for (; t; ) {
|
|
56
|
+
if (L(t)) {
|
|
57
|
+
const n = t.childNodes.filter((l) => l.checked);
|
|
58
|
+
if (!n.length)
|
|
59
|
+
t.checked = !1, t.childNodes.filter((l) => l.indeterminate).length <= 0 && (t.indeterminate = !1);
|
|
60
|
+
else {
|
|
61
|
+
if (n.length < t.childNodes.length)
|
|
62
|
+
break;
|
|
63
|
+
t.indeterminate = !1, t.checked = !0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
t = t.parent;
|
|
67
|
+
}
|
|
68
|
+
for (; t; )
|
|
69
|
+
t.checked = !1, t.indeterminate = !0, t = t.parent;
|
|
70
|
+
return t;
|
|
71
|
+
}
|
|
72
|
+
function w(e, t) {
|
|
73
|
+
!L(e) || e.childNodes.forEach((n) => {
|
|
74
|
+
n.checked = t, n.indeterminate = !1, w(n, t);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function h(e, t = 0, n = null) {
|
|
78
|
+
if (!e)
|
|
79
|
+
return [];
|
|
80
|
+
!e.length && n && (n.expand = !1, n.isLeaf = !0);
|
|
81
|
+
const l = r.value.children, N = r.value.label, g = r.value.isLeaf, T = r.value.disabled, x = i.nodeKey;
|
|
82
|
+
return e.map((s) => {
|
|
83
|
+
const m = s[x] || ge++, b = i.defaultCheckedKeys.includes(m), v = !!i.defaultExpandAll || i.defaultExpandedKeys.includes(m), f = {
|
|
84
|
+
[x]: m,
|
|
85
|
+
data: s,
|
|
86
|
+
label: s[N],
|
|
87
|
+
level: t,
|
|
88
|
+
checked: b || (n == null ? void 0 : n.checked),
|
|
89
|
+
expand: v,
|
|
90
|
+
childNodes: [],
|
|
91
|
+
parent: n,
|
|
92
|
+
indeterminate: !1,
|
|
93
|
+
loaded: !1,
|
|
94
|
+
isLeaf: s[g],
|
|
95
|
+
disabled: s[T]
|
|
96
|
+
};
|
|
97
|
+
if (s[l] && s[l].length ? f.childNodes = h(s[l], t + 1, f) : K.value || (f.isLeaf = !0), b && n) {
|
|
98
|
+
let o = n;
|
|
99
|
+
for (; o; )
|
|
100
|
+
o.indeterminate = !0, o = o.parent;
|
|
101
|
+
}
|
|
102
|
+
return f;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
const J = (e) => i.showCheckbox ? c(
|
|
106
|
+
ue,
|
|
107
|
+
{
|
|
108
|
+
label: "",
|
|
109
|
+
modelValue: e.checked,
|
|
110
|
+
indeterminate: e.indeterminate,
|
|
111
|
+
disabled: e.disabled,
|
|
112
|
+
"onUpdate:modelValue": (t) => H(e, t)
|
|
113
|
+
}
|
|
114
|
+
) : c("div", { class: ["single-item"] });
|
|
115
|
+
function Q() {
|
|
116
|
+
return P(d.childNodes);
|
|
117
|
+
}
|
|
118
|
+
function R() {
|
|
119
|
+
return P(d.childNodes).map((t) => t[i.nodeKey]);
|
|
120
|
+
}
|
|
121
|
+
function P(e) {
|
|
122
|
+
if (!e)
|
|
123
|
+
return [];
|
|
124
|
+
let t = [];
|
|
125
|
+
return E(e, (n) => {
|
|
126
|
+
n.checked && t.push(n);
|
|
127
|
+
}), t;
|
|
128
|
+
}
|
|
129
|
+
function A(e, t) {
|
|
130
|
+
if (!e)
|
|
131
|
+
return [];
|
|
132
|
+
E(e, (n) => {
|
|
133
|
+
t.includes(n[i.nodeKey]) ? (n.checked = !0, w(n, n.checked), M(n.parent)) : n.checked = n.indeterminate = !1;
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function S(e) {
|
|
137
|
+
A(d.childNodes, e);
|
|
138
|
+
}
|
|
139
|
+
function X(e) {
|
|
140
|
+
const t = e.map((n) => n[i.nodeKey]);
|
|
141
|
+
A(d.childNodes, t);
|
|
142
|
+
}
|
|
143
|
+
function p(e) {
|
|
144
|
+
return k(i.filterNodeMethod) ? i.filterNodeMethod(y.value, e) : !0;
|
|
145
|
+
}
|
|
146
|
+
function Y(e) {
|
|
147
|
+
y.value = e;
|
|
148
|
+
}
|
|
149
|
+
function Z() {
|
|
150
|
+
return _.value[i.nodeKey];
|
|
151
|
+
}
|
|
152
|
+
function ee() {
|
|
153
|
+
return _.value;
|
|
154
|
+
}
|
|
155
|
+
function E(e, t) {
|
|
156
|
+
!e || e.forEach((n) => {
|
|
157
|
+
t(n), L(n) && E(n.childNodes, t);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
V({
|
|
161
|
+
getCheckedKeys: R,
|
|
162
|
+
getCheckedNodes: Q,
|
|
163
|
+
setCheckedKeys: S,
|
|
164
|
+
setCheckedNodes: X,
|
|
165
|
+
getCurrentKey: Z,
|
|
166
|
+
getCurrentNode: ee,
|
|
167
|
+
filter: Y
|
|
168
|
+
});
|
|
169
|
+
function te(e) {
|
|
170
|
+
return k(i.renderContent) ? i.renderContent(c, { node: e, data: e.data, store: e.store }) : C.default ? C.default({ node: e, data: e.data, store: e.store }) : c("span", { class: [a("node__label"), e.isLeaf ? "is-leaf-text" : "is-parent-text"] }, e.label);
|
|
171
|
+
}
|
|
172
|
+
function B(e) {
|
|
173
|
+
if (!e)
|
|
174
|
+
return [];
|
|
175
|
+
let t = [];
|
|
176
|
+
for (let n = 0; n < e.length; n++) {
|
|
177
|
+
const l = e[n], N = (l.childNodes || []).filter((D) => p(D.data));
|
|
178
|
+
let g = null;
|
|
179
|
+
const T = c(W, { name: "caret-right", class: [a("node__expand-icon"), { "is-leaf": l.isLeaf }] }), x = c("div", { class: [a("icon-wrapper"), { "is-parent": !l.isLeaf, "last-isleaf-node": l.isLeaf && n == e.length - 1 && l.childNodes.length > 0 }] }, [T]), s = l.loading && c(W, { name: "loading", class: [a("node__loading-icon"), { "is-loading": !0 }] }), m = te(l), b = J(l), v = r.value.class && k(r.value.class) ? r.value.class(l.data, l) : r.value.class, f = c(
|
|
180
|
+
"div",
|
|
181
|
+
{
|
|
182
|
+
class: [a("node__content"), { "is-expand": l.expand, "is-checked": l.checked }],
|
|
183
|
+
style: { paddingLeft: l.level * j + "px" },
|
|
184
|
+
onClick() {
|
|
185
|
+
z(l);
|
|
186
|
+
},
|
|
187
|
+
onContextmenu(D) {
|
|
188
|
+
G(D, l);
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
[x, b, s, m]
|
|
192
|
+
), o = i.draggable && k(i.allowDrag) && i.allowDrag(l), F = o ? q(l) : {};
|
|
193
|
+
if (N.length)
|
|
194
|
+
g = c(
|
|
195
|
+
"div",
|
|
196
|
+
{ class: [a("node"), v, l.data.class, N.length == 1 ? "only-one-child" : ""], draggable: o, ...F },
|
|
197
|
+
[
|
|
198
|
+
f,
|
|
199
|
+
c(
|
|
200
|
+
fe,
|
|
201
|
+
() => l.expand && c(
|
|
202
|
+
"div",
|
|
203
|
+
{
|
|
204
|
+
class: ["node_children", l.childNodes && l.childNodes.length > 0 ? "sub-child" : ""],
|
|
205
|
+
style: { "--left": l.level * j + 54 + "px" }
|
|
206
|
+
},
|
|
207
|
+
B(l.childNodes)
|
|
208
|
+
)
|
|
209
|
+
)
|
|
210
|
+
]
|
|
211
|
+
);
|
|
212
|
+
else {
|
|
213
|
+
if (!p(l.data))
|
|
214
|
+
continue;
|
|
215
|
+
g = c("div", { class: [a("node"), v, "no-sub-child"], draggable: o, ...F }, f);
|
|
216
|
+
}
|
|
217
|
+
t.push(g);
|
|
218
|
+
}
|
|
219
|
+
return t;
|
|
220
|
+
}
|
|
221
|
+
function ne() {
|
|
222
|
+
return !i.data.length && c("div", { class: a("empty-block") }, c("span", { class: a("empty-text") }, i.emptyText));
|
|
223
|
+
}
|
|
224
|
+
return I(), () => c("div", { class: a() }, [d.childNodes.length ? B(d.childNodes) : ne()]);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
function Ne(i, u, V, C, a, y) {
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
const Ee = /* @__PURE__ */ he(ke, [["render", Ne]]);
|
|
231
|
+
export {
|
|
232
|
+
Ee as default
|
|
233
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
data: {
|
|
3
|
+
type: Array,
|
|
4
|
+
default: []
|
|
5
|
+
},
|
|
6
|
+
props: {
|
|
7
|
+
type: Object,
|
|
8
|
+
default: () => ({
|
|
9
|
+
children: "children",
|
|
10
|
+
label: "label",
|
|
11
|
+
disabled: "disabled"
|
|
12
|
+
})
|
|
13
|
+
},
|
|
14
|
+
emptyText: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "no Data"
|
|
17
|
+
},
|
|
18
|
+
showCheckbox: {
|
|
19
|
+
type: Boolean
|
|
20
|
+
},
|
|
21
|
+
load: {
|
|
22
|
+
type: Function
|
|
23
|
+
},
|
|
24
|
+
defaultExpandAll: {
|
|
25
|
+
type: Boolean
|
|
26
|
+
},
|
|
27
|
+
nodeKey: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "id"
|
|
30
|
+
},
|
|
31
|
+
defaultExpandedKeys: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: () => []
|
|
34
|
+
},
|
|
35
|
+
defaultCheckedKeys: {
|
|
36
|
+
type: Array,
|
|
37
|
+
default: () => []
|
|
38
|
+
},
|
|
39
|
+
renderContent: {
|
|
40
|
+
type: Function
|
|
41
|
+
},
|
|
42
|
+
expandOnClickNode: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !0
|
|
45
|
+
},
|
|
46
|
+
accordion: {
|
|
47
|
+
type: Boolean
|
|
48
|
+
},
|
|
49
|
+
filterNodeMethod: {
|
|
50
|
+
type: Function
|
|
51
|
+
},
|
|
52
|
+
draggable: {
|
|
53
|
+
type: Boolean
|
|
54
|
+
},
|
|
55
|
+
allowDrop: {
|
|
56
|
+
type: Function
|
|
57
|
+
},
|
|
58
|
+
allowDrag: {
|
|
59
|
+
type: Function
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
e.renderContent, e.showCheckbox, e.props, e.accordion, e.allowDrop, e.allowDrag, e.draggable;
|
|
63
|
+
const t = Symbol("TreeContextKeys");
|
|
64
|
+
export {
|
|
65
|
+
t as TreeContextKeys,
|
|
66
|
+
e as TreeProps
|
|
67
|
+
};
|