@fangzhongya/fang-ui 0.1.25 → 0.1.27
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/dist/components/array/index.css +5 -0
- package/dist/components/array/src/index2.cjs +0 -1
- package/dist/components/array/src/index2.js +0 -1
- package/dist/components/audios/index.css +5 -0
- package/dist/components/box/index.css +29 -0
- package/dist/components/box-adjust/index.css +29 -1
- package/dist/components/box-adjust/index.scss +0 -6
- package/dist/components/box-adjust/src/index2.cjs +6 -6
- package/dist/components/box-adjust/src/index2.js +3 -3
- package/dist/components/box-fun/index.cjs +7 -0
- package/dist/components/box-fun/index.d.ts +7 -0
- package/dist/components/box-fun/index.js +7 -0
- package/dist/components/box-fun/src/data.cjs +34 -0
- package/dist/components/box-fun/src/data.d.ts +35 -0
- package/dist/components/box-fun/src/data.js +34 -0
- package/dist/components/box-fun/src/function.cjs +97 -0
- package/dist/components/box-fun/src/function.d.ts +8 -0
- package/dist/components/box-fun/src/function.js +97 -0
- package/dist/components/box-fun/src/index.cjs +5 -0
- package/dist/components/box-fun/src/index.d.ts +2 -0
- package/dist/components/box-fun/src/index.js +5 -0
- package/dist/components/box-local/index.css +29 -0
- package/dist/components/box-mask/index.css +5 -0
- package/dist/components/box-teleport/src/index2.cjs +2 -11
- package/dist/components/box-teleport/src/index2.js +2 -11
- package/dist/components/box-title/index.css +29 -0
- package/dist/components/box-title/index.scss +1 -1
- package/dist/components/buttons/index.css +5 -0
- package/dist/components/cascaders/index.css +5 -0
- package/dist/components/checks/index.css +5 -0
- package/dist/components/dates/index.css +5 -0
- package/dist/components/dates-divide/index.css +5 -0
- package/dist/components/dates-picker/index.css +5 -0
- package/dist/components/dates2/index.css +5 -0
- package/dist/components/dialogs/index.css +5 -0
- package/dist/components/draggable/index.cjs +9 -0
- package/dist/components/draggable/index.d.ts +4 -0
- package/dist/components/draggable/index.js +9 -0
- package/dist/components/draggable/index.scss +5 -0
- package/dist/components/draggable/src/data.cjs +37 -0
- package/dist/components/draggable/src/data.d.ts +60 -0
- package/dist/components/draggable/src/data.js +37 -0
- package/dist/components/draggable/src/index.cjs +4 -0
- package/dist/components/draggable/src/index.js +4 -0
- package/dist/components/draggable/src/index2.cjs +101 -0
- package/dist/components/draggable/src/index2.js +101 -0
- package/dist/components/edit/index.css +5 -0
- package/dist/components/edit-float/index.css +5 -0
- package/dist/components/forms/common/config.cjs +7 -0
- package/dist/components/forms/common/config.d.ts +4 -0
- package/dist/components/forms/common/config.js +7 -0
- package/dist/components/forms/index.css +5 -0
- package/dist/components/forms/src/data.cjs +0 -5
- package/dist/components/forms/src/data.d.ts +0 -4
- package/dist/components/forms/src/data.js +1 -6
- package/dist/components/forms/src/setup.cjs +3 -2
- package/dist/components/forms/src/setup.js +2 -1
- package/dist/components/forms-div/index.css +5 -0
- package/dist/components/forms-div/src/index2.cjs +2 -2
- package/dist/components/forms-div/src/index2.js +1 -1
- package/dist/components/forms-drag/src/index2.cjs +12 -12
- package/dist/components/forms-drag/src/index2.js +1 -1
- package/dist/components/forms-item/index.css +5 -0
- package/dist/components/forms-item/src/index2.cjs +2 -2
- package/dist/components/forms-item/src/index2.js +1 -1
- package/dist/components/forms-item/src/label.cjs +7 -7
- package/dist/components/forms-item/src/label.js +1 -1
- package/dist/components/forms-items/src/index2.cjs +9 -9
- package/dist/components/forms-items/src/index2.js +1 -1
- package/dist/components/full-screen/index.css +5 -0
- package/dist/components/global-config/index.css +5 -0
- package/dist/components/global-config/index.d.ts +1 -1
- package/dist/components/global-config/src/index.d.ts +1 -1
- package/dist/components/history/index.css +5 -0
- package/dist/components/icon/index.css +5 -0
- package/dist/components/icon-picker/index.css +5 -0
- package/dist/components/iframe/index.css +5 -0
- package/dist/components/images/index.css +5 -0
- package/dist/components/index.cjs +411 -407
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index.scss +1 -0
- package/dist/components/index2.scss +1 -0
- package/dist/components/input-array/index.css +5 -0
- package/dist/components/input-history/index.css +5 -0
- package/dist/components/input-num/index.css +5 -0
- package/dist/components/input-select/index.css +5 -0
- package/dist/components/inputs/index.css +5 -0
- package/dist/components/labels/index.css +5 -0
- package/dist/components/list/index.css +5 -0
- package/dist/components/lists/index.css +5 -0
- package/dist/components/lists/src/index2.cjs +9 -9
- package/dist/components/lists/src/index2.js +9 -9
- package/dist/components/listsp/index.css +5 -0
- package/dist/components/listspd/index.css +5 -0
- package/dist/components/loading/src/data.cjs +13 -0
- package/dist/components/loading/src/data.d.ts +17 -0
- package/dist/components/loading/src/data.js +13 -0
- package/dist/components/loading/src/index.cjs +1 -0
- package/dist/components/loading/src/index.d.ts +0 -4
- package/dist/components/loading/src/index.js +1 -0
- package/dist/components/menus/index.css +5 -0
- package/dist/components/message/src/data.cjs +13 -0
- package/dist/components/message/src/data.d.ts +17 -0
- package/dist/components/message/src/data.js +13 -0
- package/dist/components/message/src/index.cjs +1 -0
- package/dist/components/message/src/index.d.ts +0 -4
- package/dist/components/message/src/index.js +1 -0
- package/dist/components/message-box/src/data.cjs +13 -0
- package/dist/components/message-box/src/data.d.ts +17 -0
- package/dist/components/message-box/src/data.js +13 -0
- package/dist/components/message-box/src/index.cjs +1 -0
- package/dist/components/message-box/src/index.d.ts +0 -4
- package/dist/components/message-box/src/index.js +1 -0
- package/dist/components/no-data/index.css +5 -0
- package/dist/components/page/index.css +5 -0
- package/dist/components/page/src/set-column2.cjs +2 -2
- package/dist/components/page/src/set-column2.js +1 -1
- package/dist/components/paging/index.css +5 -0
- package/dist/components/popup/index.css +29 -0
- package/dist/components/retract/index.css +5 -0
- package/dist/components/right-key/index.css +5 -0
- package/dist/components/scss/common.scss +5 -0
- package/dist/components/seamless-scroll/index.css +5 -0
- package/dist/components/select-scroll/index.css +5 -0
- package/dist/components/selector/index.css +5 -0
- package/dist/components/selects/index.css +5 -0
- package/dist/components/sliders/index.css +5 -0
- package/dist/components/switchs/index.css +5 -0
- package/dist/components/tables/common/pagin.cjs +49 -20
- package/dist/components/tables/common/pagin.d.ts +32 -8
- package/dist/components/tables/common/pagin.js +49 -20
- package/dist/components/tables/index.css +5 -0
- package/dist/components/tables/src/column.cjs +1 -2
- package/dist/components/tables/src/column.js +1 -2
- package/dist/components/tables/src/data.d.ts +1 -1
- package/dist/components/tables/src/index2.cjs +12 -1
- package/dist/components/tables/src/index2.js +12 -1
- package/dist/components/tablesp/index.css +5 -0
- package/dist/components/tablesp/src/index2.cjs +9 -5
- package/dist/components/tablesp/src/index2.js +9 -5
- package/dist/components/tablespd/index.css +5 -0
- package/dist/components/tabless/index.css +5 -0
- package/dist/components/tablesv/index.css +5 -0
- package/dist/components/tablesvp/index.css +5 -0
- package/dist/components/uploads/index.css +5 -0
- package/dist/components/videos/index.css +5 -0
- package/dist/components/window/index.css +29 -0
- package/dist/css/array.css +5 -0
- package/dist/css/audios.css +5 -0
- package/dist/css/box-adjust.css +29 -1
- package/dist/css/box-local.css +29 -0
- package/dist/css/box-mask.css +5 -0
- package/dist/css/box-title.css +29 -0
- package/dist/css/box.css +29 -0
- package/dist/css/buttons.css +5 -0
- package/dist/css/cascaders.css +5 -0
- package/dist/css/checks.css +5 -0
- package/dist/css/dates-divide.css +5 -0
- package/dist/css/dates-picker.css +5 -0
- package/dist/css/dates.css +5 -0
- package/dist/css/dates2.css +5 -0
- package/dist/css/dialogs.css +5 -0
- package/dist/css/edit-float.css +5 -0
- package/dist/css/edit.css +5 -0
- package/dist/css/forms-div.css +5 -0
- package/dist/css/forms-item.css +5 -0
- package/dist/css/forms.css +5 -0
- package/dist/css/full-screen.css +5 -0
- package/dist/css/global-config.css +5 -0
- package/dist/css/history.css +5 -0
- package/dist/css/icon-picker.css +5 -0
- package/dist/css/icon.css +5 -0
- package/dist/css/iframe.css +5 -0
- package/dist/css/images.css +5 -0
- package/dist/css/index.css +29 -25
- package/dist/css/input-array.css +5 -0
- package/dist/css/input-history.css +5 -0
- package/dist/css/input-num.css +5 -0
- package/dist/css/input-select.css +5 -0
- package/dist/css/inputs.css +5 -0
- package/dist/css/labels.css +5 -0
- package/dist/css/list.css +5 -0
- package/dist/css/lists.css +5 -0
- package/dist/css/listsp.css +5 -0
- package/dist/css/listspd.css +5 -0
- package/dist/css/menus.css +5 -0
- package/dist/css/no-data.css +5 -0
- package/dist/css/page.css +5 -0
- package/dist/css/paging.css +5 -0
- package/dist/css/popup.css +29 -0
- package/dist/css/retract.css +5 -0
- package/dist/css/right-key.css +5 -0
- package/dist/css/seamless-scroll.css +5 -0
- package/dist/css/select-scroll.css +5 -0
- package/dist/css/selector.css +5 -0
- package/dist/css/selects.css +5 -0
- package/dist/css/sliders.css +5 -0
- package/dist/css/switchs.css +5 -0
- package/dist/css/tables.css +5 -0
- package/dist/css/tablesp.css +5 -0
- package/dist/css/tablespd.css +5 -0
- package/dist/css/tabless.css +5 -0
- package/dist/css/tablesv.css +5 -0
- package/dist/css/tablesvp.css +5 -0
- package/dist/css/uploads.css +5 -0
- package/dist/css/videos.css +5 -0
- package/dist/css/window.css +29 -0
- package/dist/expand/{chunk-RBGCE6BS.js → chunk-CV4O5V2F.js} +3 -0
- package/dist/expand/{chunk-2L4PC7LZ.cjs → chunk-MC76Q3TQ.cjs} +3 -0
- package/dist/expand/components.cjs +5 -5
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/hooks/props-default/index.cjs +0 -12
- package/dist/hooks/props-default/index.d.ts +1 -1
- package/dist/hooks/props-default/index.js +0 -12
- package/dist/icons/index.json +1 -1
- package/dist/index.cjs +435 -431
- package/dist/index.css +29 -25
- package/dist/index.js +4 -0
- package/dist/type.d.ts +10 -5
- package/dist/utils/vues/getBoxDom.cjs +22 -0
- package/dist/utils/vues/getBoxDom.d.ts +1 -0
- package/dist/utils/vues/getBoxDom.js +22 -0
- package/dist/utils/vues/index.cjs +2 -0
- package/dist/utils/vues/index.d.ts +1 -0
- package/dist/utils/vues/index.js +2 -0
- package/package.json +11 -12
|
@@ -5,7 +5,6 @@ const data = require("./data.cjs");
|
|
|
5
5
|
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
6
6
|
const index$3 = require("../../icon/index.cjs");
|
|
7
7
|
const clear = require("../../../icons/vue/clear.cjs");
|
|
8
|
-
require("../../forms/src/data.cjs");
|
|
9
8
|
const compons = require("../../common/compons.cjs");
|
|
10
9
|
const index$2 = require("../../../hooks/props-default/index.cjs");
|
|
11
10
|
const lineToLargeHump = require("@fangzhongya/utils/name/lineToLargeHump");
|
|
@@ -3,7 +3,6 @@ import { name, dataProps, dataExpose, dataSlot, dataEmits } from "./data.js";
|
|
|
3
3
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
4
4
|
import { Icon } from "../../icon/index.js";
|
|
5
5
|
import Clear from "../../../icons/vue/clear.js";
|
|
6
|
-
import "../../forms/src/data.js";
|
|
7
6
|
import { useGetCompons } from "../../common/compons.js";
|
|
8
7
|
import { usePropsDefault, viewProps, getProps } from "../../../hooks/props-default/index.js";
|
|
9
8
|
import { lineToLargeHump } from "@fangzhongya/utils/name/lineToLargeHump";
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
--g-main-bg: var(--bg-color-page);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.com-footer {
|
|
16
|
+
border-top: 1px solid var(--border);
|
|
17
|
+
padding: 20px 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
.box-mask {
|
|
16
21
|
display: block;
|
|
17
22
|
opacity: 0.5;
|
|
@@ -24,6 +29,30 @@
|
|
|
24
29
|
background: rgba(2, 28, 39, 0.4);
|
|
25
30
|
}
|
|
26
31
|
|
|
32
|
+
.icon {
|
|
33
|
+
--color: inherit;
|
|
34
|
+
height: 1em;
|
|
35
|
+
width: 1em;
|
|
36
|
+
line-height: 1em;
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
align-items: center;
|
|
40
|
+
position: relative;
|
|
41
|
+
fill: currentColor;
|
|
42
|
+
color: var(--color);
|
|
43
|
+
font-size: inherit;
|
|
44
|
+
}
|
|
45
|
+
.icon-cont {
|
|
46
|
+
border: 0;
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
object-fit: contain;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
font-size: inherit !important;
|
|
52
|
+
width: inherit !important;
|
|
53
|
+
height: inherit !important;
|
|
54
|
+
}
|
|
55
|
+
|
|
27
56
|
.box-title {
|
|
28
57
|
padding: 10px;
|
|
29
58
|
position: relative;
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
--g-main-bg: var(--bg-color-page);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.com-footer {
|
|
16
|
+
border-top: 1px solid var(--border);
|
|
17
|
+
padding: 20px 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
.box-mask {
|
|
16
21
|
display: block;
|
|
17
22
|
opacity: 0.5;
|
|
@@ -24,6 +29,30 @@
|
|
|
24
29
|
background: rgba(2, 28, 39, 0.4);
|
|
25
30
|
}
|
|
26
31
|
|
|
32
|
+
.icon {
|
|
33
|
+
--color: inherit;
|
|
34
|
+
height: 1em;
|
|
35
|
+
width: 1em;
|
|
36
|
+
line-height: 1em;
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
align-items: center;
|
|
40
|
+
position: relative;
|
|
41
|
+
fill: currentColor;
|
|
42
|
+
color: var(--color);
|
|
43
|
+
font-size: inherit;
|
|
44
|
+
}
|
|
45
|
+
.icon-cont {
|
|
46
|
+
border: 0;
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
object-fit: contain;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
font-size: inherit !important;
|
|
52
|
+
width: inherit !important;
|
|
53
|
+
height: inherit !important;
|
|
54
|
+
}
|
|
55
|
+
|
|
27
56
|
.box-title {
|
|
28
57
|
padding: 10px;
|
|
29
58
|
position: relative;
|
|
@@ -80,7 +109,6 @@
|
|
|
80
109
|
.box-adjust-body .box-adjust-title-icon {
|
|
81
110
|
width: 20px;
|
|
82
111
|
display: inline-flex;
|
|
83
|
-
color: #fff;
|
|
84
112
|
align-items: center;
|
|
85
113
|
margin: 0 4px;
|
|
86
114
|
height: 100%;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
// @use '../common.scss' as *;
|
|
2
|
-
|
|
3
|
-
// @use '../box-mask/src/index.scss' as *;
|
|
4
|
-
// @use '../box-title/src/index.scss' as *;
|
|
5
|
-
|
|
6
1
|
@use '../scss/common.scss' as *;
|
|
7
2
|
@use '../box-mask/index.scss' as *;
|
|
8
3
|
@use '../box-title/index.scss' as *;
|
|
@@ -37,7 +32,6 @@ $box-adjust: 'box-adjust';
|
|
|
37
32
|
.#{z($box-adjust, 'title-icon')} {
|
|
38
33
|
width: 20px;
|
|
39
34
|
display: inline-flex;
|
|
40
|
-
color: #fff;
|
|
41
35
|
align-items: center;
|
|
42
36
|
margin: 0 4px;
|
|
43
37
|
height: 100%;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
+
const index$6 = require("../../icon/index.cjs");
|
|
4
5
|
const data = require("./data.cjs");
|
|
5
6
|
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
6
7
|
const index = require("../../../hooks/locale/index.cjs");
|
|
@@ -9,8 +10,8 @@ const star = require("../../../icons/vue/star.cjs");
|
|
|
9
10
|
const index$5 = require("../../box-title/index.cjs");
|
|
10
11
|
const index$4 = require("../../box-mask/index.cjs");
|
|
11
12
|
const index$3 = require("../../box-teleport/index.cjs");
|
|
12
|
-
const index$
|
|
13
|
-
const index$
|
|
13
|
+
const index$8 = require("../../../directives/adjust/index.cjs");
|
|
14
|
+
const index$7 = require("../../../directives/drag/index.cjs");
|
|
14
15
|
const data$1 = require("../../box-title/src/data.cjs");
|
|
15
16
|
const index$2 = require("../../../hooks/props-default/index.cjs");
|
|
16
17
|
const _hoisted_1 = ["title"];
|
|
@@ -51,7 +52,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
51
52
|
...data.dataExpose
|
|
52
53
|
});
|
|
53
54
|
return (_ctx, _cache) => {
|
|
54
|
-
const _component_Icon = vue.resolveComponent("Icon");
|
|
55
55
|
return vue.openBlock(), vue.createBlock(vue.unref(index$3.BoxTeleport), {
|
|
56
56
|
disabled: vue.unref(props).disabled,
|
|
57
57
|
to: vue.unref(props).to
|
|
@@ -83,7 +83,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
83
83
|
vue.unref(cs).z("title-max")
|
|
84
84
|
])
|
|
85
85
|
}, [
|
|
86
|
-
vue.createVNode(
|
|
86
|
+
vue.createVNode(vue.unref(index$6.Icon), null, {
|
|
87
87
|
default: vue.withCtx(() => [
|
|
88
88
|
maxvalue.value ? vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot)["icon-full"], { key: 0 }, () => [
|
|
89
89
|
vue.createVNode(star.default)
|
|
@@ -105,10 +105,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
105
105
|
], 2),
|
|
106
106
|
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).footer)
|
|
107
107
|
], 2)), [
|
|
108
|
-
[vue.unref(index$
|
|
108
|
+
[vue.unref(index$7.default), {
|
|
109
109
|
dom: vue.unref(props).drag
|
|
110
110
|
}],
|
|
111
|
-
[vue.unref(index$
|
|
111
|
+
[vue.unref(index$8.default), {
|
|
112
112
|
often: vue.unref(props).often,
|
|
113
113
|
all: { position: true }
|
|
114
114
|
}]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent, shallowRef, watch,
|
|
1
|
+
import { defineComponent, shallowRef, watch, createBlock, openBlock, unref, withCtx, withDirectives, createCommentVNode, createElementBlock, normalizeClass, createVNode, renderSlot, createElementVNode, vShow } from "vue";
|
|
2
|
+
import { Icon } from "../../icon/index.js";
|
|
2
3
|
import { name, dataProps, dataExpose, dataSlot, dataEmits } from "./data.js";
|
|
3
4
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
4
5
|
import { useLocale } from "../../../hooks/locale/index.js";
|
|
@@ -49,7 +50,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
50
|
...dataExpose
|
|
50
51
|
});
|
|
51
52
|
return (_ctx, _cache) => {
|
|
52
|
-
const _component_Icon = resolveComponent("Icon");
|
|
53
53
|
return openBlock(), createBlock(unref(BoxTeleport), {
|
|
54
54
|
disabled: unref(props).disabled,
|
|
55
55
|
to: unref(props).to
|
|
@@ -81,7 +81,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
81
81
|
unref(cs).z("title-max")
|
|
82
82
|
])
|
|
83
83
|
}, [
|
|
84
|
-
createVNode(
|
|
84
|
+
createVNode(unref(Icon), null, {
|
|
85
85
|
default: withCtx(() => [
|
|
86
86
|
maxvalue.value ? renderSlot(_ctx.$slots, unref(dataSlot)["icon-full"], { key: 0 }, () => [
|
|
87
87
|
createVNode(Star)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const index = require("./src/index.cjs");
|
|
4
|
+
const _function = require("./src/function.cjs");
|
|
5
|
+
const BoxFun = _function.withInstall(index.default, "BoxFun");
|
|
6
|
+
exports.BoxFun = BoxFun;
|
|
7
|
+
exports.default = BoxFun;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataProps } from '../box/src/data';
|
|
2
|
+
declare const BoxFun: (content?: string | Function, props?: DataProps & {
|
|
3
|
+
isCancel?: boolean;
|
|
4
|
+
cancelName?: string;
|
|
5
|
+
confirmName?: string;
|
|
6
|
+
}, verify?: () => boolean) => Promise<unknown>;
|
|
7
|
+
export { BoxFun, BoxFun as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const buildProps = require("../../../utils/vues/buildProps.cjs");
|
|
4
|
+
const name = "box-fun";
|
|
5
|
+
const dataProps = buildProps.buildProps({
|
|
6
|
+
/**
|
|
7
|
+
* @props {String, Function} content='' 内容
|
|
8
|
+
*/
|
|
9
|
+
content: {
|
|
10
|
+
type: [String, Function]
|
|
11
|
+
},
|
|
12
|
+
/**
|
|
13
|
+
* @props { Object } props={} 配置
|
|
14
|
+
*/
|
|
15
|
+
props: {
|
|
16
|
+
type: Object
|
|
17
|
+
},
|
|
18
|
+
/**
|
|
19
|
+
* @props { Function } verify=()=>true 校验
|
|
20
|
+
*/
|
|
21
|
+
verify: {
|
|
22
|
+
type: Function
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const dataEmits = {};
|
|
26
|
+
const dataSlot = {
|
|
27
|
+
default: "default"
|
|
28
|
+
};
|
|
29
|
+
const dataExpose = { name };
|
|
30
|
+
exports.dataEmits = dataEmits;
|
|
31
|
+
exports.dataExpose = dataExpose;
|
|
32
|
+
exports.dataProps = dataProps;
|
|
33
|
+
exports.dataSlot = dataSlot;
|
|
34
|
+
exports.name = name;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* @title {h3} BoxFun
|
|
4
|
+
* @text box-fun
|
|
5
|
+
*/
|
|
6
|
+
export declare const name = "box-fun";
|
|
7
|
+
export declare const dataProps: {
|
|
8
|
+
/**
|
|
9
|
+
* @props {String, Function} content='' 内容
|
|
10
|
+
*/
|
|
11
|
+
content: {
|
|
12
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @props { Object } props={} 配置
|
|
16
|
+
*/
|
|
17
|
+
props: {
|
|
18
|
+
type: ObjectConstructor;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @props { Function } verify=()=>true 校验
|
|
22
|
+
*/
|
|
23
|
+
verify: {
|
|
24
|
+
type: FunctionConstructor;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type DataProps = ExtractPublicPropTypes<typeof dataProps>;
|
|
28
|
+
export declare const dataEmits: {};
|
|
29
|
+
export type DataEmits = typeof dataEmits;
|
|
30
|
+
export declare const dataSlot: {
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const dataExpose: {
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { buildProps } from "../../../utils/vues/buildProps.js";
|
|
2
|
+
const name = "box-fun";
|
|
3
|
+
const dataProps = buildProps({
|
|
4
|
+
/**
|
|
5
|
+
* @props {String, Function} content='' 内容
|
|
6
|
+
*/
|
|
7
|
+
content: {
|
|
8
|
+
type: [String, Function]
|
|
9
|
+
},
|
|
10
|
+
/**
|
|
11
|
+
* @props { Object } props={} 配置
|
|
12
|
+
*/
|
|
13
|
+
props: {
|
|
14
|
+
type: Object
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* @props { Function } verify=()=>true 校验
|
|
18
|
+
*/
|
|
19
|
+
verify: {
|
|
20
|
+
type: Function
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const dataEmits = {};
|
|
24
|
+
const dataSlot = {
|
|
25
|
+
default: "default"
|
|
26
|
+
};
|
|
27
|
+
const dataExpose = { name };
|
|
28
|
+
export {
|
|
29
|
+
dataEmits,
|
|
30
|
+
dataExpose,
|
|
31
|
+
dataProps,
|
|
32
|
+
dataSlot,
|
|
33
|
+
name
|
|
34
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const index$2 = require("../../box/index.cjs");
|
|
5
|
+
const getBoxDom = require("../../../utils/vues/getBoxDom.cjs");
|
|
6
|
+
const index$1 = require("../../button/index.cjs");
|
|
7
|
+
const index = require("../../../hooks/locale/index.cjs");
|
|
8
|
+
const BoxFun = (content = "", props = {}, verify = () => true) => {
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
const mountNode = document.createElement("div");
|
|
11
|
+
const dom = getBoxDom.getBoxDom();
|
|
12
|
+
(dom ?? document.body).appendChild(mountNode);
|
|
13
|
+
const visible = vue.ref(true);
|
|
14
|
+
const app = vue.createApp({
|
|
15
|
+
render() {
|
|
16
|
+
const { getLocale } = index.useLocale();
|
|
17
|
+
let defaultFun;
|
|
18
|
+
if (typeof content === "string") {
|
|
19
|
+
defaultFun = () => vue.h("div", content);
|
|
20
|
+
} else if (content) {
|
|
21
|
+
defaultFun = content;
|
|
22
|
+
}
|
|
23
|
+
const cancel = vue.h(
|
|
24
|
+
index$1.Button,
|
|
25
|
+
{
|
|
26
|
+
onClick() {
|
|
27
|
+
visible.value = false;
|
|
28
|
+
vue.nextTick(() => {
|
|
29
|
+
app.unmount();
|
|
30
|
+
mountNode.remove();
|
|
31
|
+
});
|
|
32
|
+
reject(false);
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
default() {
|
|
37
|
+
return props.cancelName ?? getLocale("form.cancel");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
return vue.h(
|
|
42
|
+
index$2.Box,
|
|
43
|
+
{
|
|
44
|
+
modelValue: visible.value,
|
|
45
|
+
"onUpdate:modelValue": (value) => {
|
|
46
|
+
visible.value = value;
|
|
47
|
+
},
|
|
48
|
+
...props
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
footer: () => {
|
|
52
|
+
return vue.h(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
class: "com-footer",
|
|
56
|
+
style: {
|
|
57
|
+
"text-align": "right"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
[
|
|
61
|
+
props.isCancel === false ? void 0 : cancel,
|
|
62
|
+
vue.h(
|
|
63
|
+
index$1.Button,
|
|
64
|
+
{
|
|
65
|
+
type: "primary",
|
|
66
|
+
onClick: async () => {
|
|
67
|
+
if (await verify()) {
|
|
68
|
+
visible.value = false;
|
|
69
|
+
vue.nextTick(() => {
|
|
70
|
+
app.unmount();
|
|
71
|
+
mountNode.remove();
|
|
72
|
+
});
|
|
73
|
+
resolve(true);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
default() {
|
|
79
|
+
return props.confirmName ?? getLocale("form.confirm");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
]
|
|
84
|
+
);
|
|
85
|
+
},
|
|
86
|
+
default: defaultFun
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
app.mount(mountNode);
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
function withInstall(fun, name) {
|
|
95
|
+
return BoxFun;
|
|
96
|
+
}
|
|
97
|
+
exports.withInstall = withInstall;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataProps } from '../box/src/data';
|
|
2
|
+
type Props = {
|
|
3
|
+
isCancel?: boolean;
|
|
4
|
+
cancelName?: string;
|
|
5
|
+
confirmName?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function withInstall<T>(fun: T, name: string): (content?: string | Function, props?: DataProps & Props, verify?: () => boolean) => Promise<unknown>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { ref, createApp, h, nextTick } from "vue";
|
|
2
|
+
import { Box } from "../../box/index.js";
|
|
3
|
+
import { getBoxDom } from "../../../utils/vues/getBoxDom.js";
|
|
4
|
+
import { Button } from "../../button/index.js";
|
|
5
|
+
import { useLocale } from "../../../hooks/locale/index.js";
|
|
6
|
+
const BoxFun = (content = "", props = {}, verify = () => true) => {
|
|
7
|
+
return new Promise((resolve, reject) => {
|
|
8
|
+
const mountNode = document.createElement("div");
|
|
9
|
+
const dom = getBoxDom();
|
|
10
|
+
(dom ?? document.body).appendChild(mountNode);
|
|
11
|
+
const visible = ref(true);
|
|
12
|
+
const app = createApp({
|
|
13
|
+
render() {
|
|
14
|
+
const { getLocale } = useLocale();
|
|
15
|
+
let defaultFun;
|
|
16
|
+
if (typeof content === "string") {
|
|
17
|
+
defaultFun = () => h("div", content);
|
|
18
|
+
} else if (content) {
|
|
19
|
+
defaultFun = content;
|
|
20
|
+
}
|
|
21
|
+
const cancel = h(
|
|
22
|
+
Button,
|
|
23
|
+
{
|
|
24
|
+
onClick() {
|
|
25
|
+
visible.value = false;
|
|
26
|
+
nextTick(() => {
|
|
27
|
+
app.unmount();
|
|
28
|
+
mountNode.remove();
|
|
29
|
+
});
|
|
30
|
+
reject(false);
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
default() {
|
|
35
|
+
return props.cancelName ?? getLocale("form.cancel");
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
return h(
|
|
40
|
+
Box,
|
|
41
|
+
{
|
|
42
|
+
modelValue: visible.value,
|
|
43
|
+
"onUpdate:modelValue": (value) => {
|
|
44
|
+
visible.value = value;
|
|
45
|
+
},
|
|
46
|
+
...props
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
footer: () => {
|
|
50
|
+
return h(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
class: "com-footer",
|
|
54
|
+
style: {
|
|
55
|
+
"text-align": "right"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
[
|
|
59
|
+
props.isCancel === false ? void 0 : cancel,
|
|
60
|
+
h(
|
|
61
|
+
Button,
|
|
62
|
+
{
|
|
63
|
+
type: "primary",
|
|
64
|
+
onClick: async () => {
|
|
65
|
+
if (await verify()) {
|
|
66
|
+
visible.value = false;
|
|
67
|
+
nextTick(() => {
|
|
68
|
+
app.unmount();
|
|
69
|
+
mountNode.remove();
|
|
70
|
+
});
|
|
71
|
+
resolve(true);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
default() {
|
|
77
|
+
return props.confirmName ?? getLocale("form.confirm");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
]
|
|
82
|
+
);
|
|
83
|
+
},
|
|
84
|
+
default: defaultFun
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
app.mount(mountNode);
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
function withInstall(fun, name) {
|
|
93
|
+
return BoxFun;
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
withInstall
|
|
97
|
+
};
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
--g-main-bg: var(--bg-color-page);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.com-footer {
|
|
16
|
+
border-top: 1px solid var(--border);
|
|
17
|
+
padding: 20px 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
.box-mask {
|
|
16
21
|
display: block;
|
|
17
22
|
opacity: 0.5;
|
|
@@ -24,6 +29,30 @@
|
|
|
24
29
|
background: rgba(2, 28, 39, 0.4);
|
|
25
30
|
}
|
|
26
31
|
|
|
32
|
+
.icon {
|
|
33
|
+
--color: inherit;
|
|
34
|
+
height: 1em;
|
|
35
|
+
width: 1em;
|
|
36
|
+
line-height: 1em;
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
align-items: center;
|
|
40
|
+
position: relative;
|
|
41
|
+
fill: currentColor;
|
|
42
|
+
color: var(--color);
|
|
43
|
+
font-size: inherit;
|
|
44
|
+
}
|
|
45
|
+
.icon-cont {
|
|
46
|
+
border: 0;
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
object-fit: contain;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
font-size: inherit !important;
|
|
52
|
+
width: inherit !important;
|
|
53
|
+
height: inherit !important;
|
|
54
|
+
}
|
|
55
|
+
|
|
27
56
|
.box-title {
|
|
28
57
|
padding: 10px;
|
|
29
58
|
position: relative;
|
|
@@ -4,7 +4,7 @@ const vue = require("vue");
|
|
|
4
4
|
const data = require("./data.cjs");
|
|
5
5
|
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
6
6
|
const index = require("../../../hooks/locale/index.cjs");
|
|
7
|
-
const
|
|
7
|
+
const getBoxDom = require("../../../utils/vues/getBoxDom.cjs");
|
|
8
8
|
const index$2 = require("../../../hooks/props-default/index.cjs");
|
|
9
9
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
10
10
|
__name: "index",
|
|
@@ -17,16 +17,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
17
17
|
const props = index$2.usePropsDefault(data.name, prs, data.dataProps);
|
|
18
18
|
index$2.viewProps(props, data.name);
|
|
19
19
|
const emit = __emit;
|
|
20
|
-
|
|
21
|
-
if (document && !(document == null ? void 0 : document.querySelector(id))) {
|
|
22
|
-
const d = document.createElement("div");
|
|
23
|
-
if (id.startsWith("#")) {
|
|
24
|
-
d.id = id.replace(/^#/, "");
|
|
25
|
-
} else if (id.startsWith(".")) {
|
|
26
|
-
d.className = id.replace(/./g, " ");
|
|
27
|
-
}
|
|
28
|
-
document.body.appendChild(d);
|
|
29
|
-
}
|
|
20
|
+
getBoxDom.getBoxDom();
|
|
30
21
|
__expose({
|
|
31
22
|
...data.dataExpose
|
|
32
23
|
});
|