@fangzhongya/fang-ui 0.0.60 → 0.0.62
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/src/index2.cjs +10 -12
- package/dist/components/array/src/index2.js +10 -12
- package/dist/components/box/index.css +2 -1
- package/dist/components/box-adjust/index.css +2 -1
- package/dist/components/box-adjust/src/data.cjs +2 -3
- package/dist/components/box-adjust/src/data.d.ts +1 -2
- package/dist/components/box-adjust/src/data.js +2 -3
- package/dist/components/box-adjust/src/index2.cjs +27 -22
- package/dist/components/box-adjust/src/index2.js +15 -10
- package/dist/components/box-local/index.css +2 -1
- package/dist/components/box-title/index.css +2 -1
- package/dist/components/box-title/index.scss +2 -1
- package/dist/components/box-title/src/data.cjs +2 -1
- package/dist/components/box-title/src/data.d.ts +1 -0
- package/dist/components/box-title/src/data.js +2 -1
- package/dist/components/box-title/src/index2.cjs +3 -3
- package/dist/components/box-title/src/index2.js +5 -5
- package/dist/components/common/use.cjs +16 -0
- package/dist/components/common/use.d.ts +3 -0
- package/dist/components/common/use.js +16 -0
- package/dist/components/dialogs/src/index2.cjs +8 -9
- package/dist/components/dialogs/src/index2.js +8 -9
- package/dist/components/edit/src/data.cjs +1 -0
- package/dist/components/edit/src/data.d.ts +1 -0
- package/dist/components/edit/src/data.js +1 -0
- package/dist/components/edit/src/index2.cjs +10 -3
- package/dist/components/edit/src/index2.js +10 -3
- package/dist/components/edit-float/index.css +1 -2
- package/dist/components/edit-float/index.scss +1 -2
- package/dist/components/edit-float/src/data.cjs +1 -0
- package/dist/components/edit-float/src/data.d.ts +1 -0
- package/dist/components/edit-float/src/data.js +1 -0
- package/dist/components/edit-float/src/index2.cjs +21 -19
- package/dist/components/edit-float/src/index2.js +16 -14
- package/dist/components/no-data/src/index2.cjs +6 -6
- package/dist/components/no-data/src/index2.js +6 -6
- package/dist/components/popup/index.css +2 -1
- package/dist/components/popup/src/data.cjs +2 -3
- package/dist/components/popup/src/data.d.ts +1 -2
- package/dist/components/popup/src/data.js +2 -3
- package/dist/components/popup/src/index2.cjs +15 -9
- package/dist/components/popup/src/index2.js +16 -10
- package/dist/components/tables/common/pagin.cjs +2 -0
- package/dist/components/tables/common/pagin.d.ts +2 -0
- package/dist/components/tables/common/pagin.js +2 -0
- package/dist/components/window/index.css +3 -1
- package/dist/components/window/index.scss +1 -5
- package/dist/components/window/src/data.cjs +2 -3
- package/dist/components/window/src/data.d.ts +1 -2
- package/dist/components/window/src/data.js +2 -3
- package/dist/components/window/src/index2.cjs +17 -11
- package/dist/components/window/src/index2.js +17 -11
- package/dist/css/box-adjust.css +2 -1
- package/dist/css/box-local.css +2 -1
- package/dist/css/box-title.css +2 -1
- package/dist/css/box.css +2 -1
- package/dist/css/edit-float.css +1 -2
- package/dist/css/index.css +4 -3
- package/dist/css/popup.css +2 -1
- package/dist/css/window.css +3 -1
- package/dist/directives/drag/index.cjs +3 -2
- package/dist/directives/drag/index.js +3 -2
- package/dist/hooks/index.cjs +0 -1
- package/dist/hooks/index.js +1 -2
- package/dist/hooks/locale/index.cjs +5 -45
- package/dist/hooks/locale/index.d.ts +0 -9
- package/dist/hooks/locale/index.js +5 -45
- package/dist/icons/index.css +27 -33
- package/dist/icons/index.json +10 -10
- package/dist/icons/vue/frame.cjs +2 -6
- package/dist/icons/vue/frame.js +2 -6
- package/dist/icons/vue/star.cjs +7 -4
- package/dist/icons/vue/star.js +7 -4
- package/dist/index.css +4 -3
- package/dist/locale/en.cjs +5 -0
- package/dist/locale/en.d.ts +5 -0
- package/dist/locale/en.js +5 -0
- package/dist/locale/zh-cn.cjs +5 -0
- package/dist/locale/zh-cn.d.ts +5 -0
- package/dist/locale/zh-cn.js +5 -0
- package/package.json +8 -8
- /package/dist/components/{keep-com → popconfirm}/index.css +0 -0
- /package/dist/css/{keep-com.css → popconfirm.css} +0 -0
|
@@ -20,6 +20,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
20
20
|
const refEdit = vue.ref();
|
|
21
21
|
const width = vue.ref("");
|
|
22
22
|
const display = vue.ref("");
|
|
23
|
+
const getWidth = () => {
|
|
24
|
+
const dom = refEdit.value;
|
|
25
|
+
if (dom) {
|
|
26
|
+
width.value = (dom.clientWidth || dom.offsetWidth) + 40 + "px";
|
|
27
|
+
}
|
|
28
|
+
};
|
|
23
29
|
const value = vue.computed({
|
|
24
30
|
get() {
|
|
25
31
|
let v = props.modelValue;
|
|
@@ -60,13 +66,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
60
66
|
let dom = refEdit.value;
|
|
61
67
|
dom.onmouseenter = (event) => {
|
|
62
68
|
isIcon.value = true;
|
|
69
|
+
getWidth();
|
|
63
70
|
};
|
|
64
71
|
dom.onmouseleave = (event) => {
|
|
65
72
|
setIsIcon();
|
|
66
73
|
isInput.value = false;
|
|
67
74
|
};
|
|
68
75
|
display.value = dom.style.display || "inline";
|
|
69
|
-
|
|
76
|
+
getWidth();
|
|
70
77
|
});
|
|
71
78
|
__expose({
|
|
72
79
|
...data.dataExpose
|
|
@@ -84,11 +91,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
84
91
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
85
92
|
ref_key: "refEditInput",
|
|
86
93
|
ref: refEditInput,
|
|
87
|
-
type: "text",
|
|
94
|
+
type: props.textarea ? "textarea" : "text",
|
|
88
95
|
clearable: _ctx.clearable,
|
|
89
96
|
onBlur,
|
|
90
97
|
class: vue.normalizeClass(vue.unref(cs).z("input"))
|
|
91
|
-
}, null, 8, ["style", "modelValue", "clearable", "class"])) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
98
|
+
}, null, 8, ["style", "modelValue", "type", "clearable", "class"])) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
92
99
|
key: 1,
|
|
93
100
|
onDblclick: vue.withModifiers(onDblclick, ["stop"]),
|
|
94
101
|
class: vue.normalizeClass(vue.unref(cs).z("value"))
|
|
@@ -18,6 +18,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
const refEdit = ref();
|
|
19
19
|
const width = ref("");
|
|
20
20
|
const display = ref("");
|
|
21
|
+
const getWidth = () => {
|
|
22
|
+
const dom = refEdit.value;
|
|
23
|
+
if (dom) {
|
|
24
|
+
width.value = (dom.clientWidth || dom.offsetWidth) + 40 + "px";
|
|
25
|
+
}
|
|
26
|
+
};
|
|
21
27
|
const value = computed({
|
|
22
28
|
get() {
|
|
23
29
|
let v = props.modelValue;
|
|
@@ -58,13 +64,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
64
|
let dom = refEdit.value;
|
|
59
65
|
dom.onmouseenter = (event) => {
|
|
60
66
|
isIcon.value = true;
|
|
67
|
+
getWidth();
|
|
61
68
|
};
|
|
62
69
|
dom.onmouseleave = (event) => {
|
|
63
70
|
setIsIcon();
|
|
64
71
|
isInput.value = false;
|
|
65
72
|
};
|
|
66
73
|
display.value = dom.style.display || "inline";
|
|
67
|
-
|
|
74
|
+
getWidth();
|
|
68
75
|
});
|
|
69
76
|
__expose({
|
|
70
77
|
...dataExpose
|
|
@@ -82,11 +89,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
82
89
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
83
90
|
ref_key: "refEditInput",
|
|
84
91
|
ref: refEditInput,
|
|
85
|
-
type: "text",
|
|
92
|
+
type: props.textarea ? "textarea" : "text",
|
|
86
93
|
clearable: _ctx.clearable,
|
|
87
94
|
onBlur,
|
|
88
95
|
class: normalizeClass(unref(cs).z("input"))
|
|
89
|
-
}, null, 8, ["style", "modelValue", "clearable", "class"])) : (openBlock(), createElementBlock("span", {
|
|
96
|
+
}, null, 8, ["style", "modelValue", "type", "clearable", "class"])) : (openBlock(), createElementBlock("span", {
|
|
90
97
|
key: 1,
|
|
91
98
|
onDblclick: withModifiers(onDblclick, ["stop"]),
|
|
92
99
|
class: normalizeClass(unref(cs).z("value"))
|
|
@@ -1,18 +1,20 @@
|
|
|
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$
|
|
4
|
+
const index$3 = require("../../icon/index.cjs");
|
|
5
5
|
const edit = require("../../../icons/vue/edit.cjs");
|
|
6
6
|
const elementPlus = require("element-plus");
|
|
7
7
|
const data = require("./data.cjs");
|
|
8
|
-
const index$
|
|
9
|
-
const index = require("../../../hooks/cssname/index.cjs");
|
|
8
|
+
const index$2 = require("../../inputs/index.cjs");
|
|
9
|
+
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
10
|
+
const index = require("../../../hooks/locale/index.cjs");
|
|
10
11
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
11
12
|
__name: "index",
|
|
12
13
|
props: data.dataProps,
|
|
13
14
|
emits: data.dataEmits,
|
|
14
15
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15
|
-
const
|
|
16
|
+
const { getLocale } = index.useLocale();
|
|
17
|
+
const cs = index$1.useCssName("edit-float");
|
|
16
18
|
const props = __props;
|
|
17
19
|
const emit = __emit;
|
|
18
20
|
const isInput = vue.ref(false);
|
|
@@ -96,7 +98,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
96
98
|
onDblclick: vue.withModifiers(onDblclick, ["stop"]),
|
|
97
99
|
class: vue.normalizeClass(vue.unref(cs).z("value"))
|
|
98
100
|
}, vue.toDisplayString(props.modelValue), 35),
|
|
99
|
-
isIcon.value && !isInput.value ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
101
|
+
isIcon.value && !isInput.value ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.Icon), {
|
|
100
102
|
key: 0,
|
|
101
103
|
onClick,
|
|
102
104
|
class: vue.normalizeClass(vue.unref(cs).z("icon"))
|
|
@@ -114,38 +116,38 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
114
116
|
}, [
|
|
115
117
|
vue.createElementVNode("div", {
|
|
116
118
|
class: vue.normalizeClass(vue.unref(cs).z("title"))
|
|
117
|
-
}, "
|
|
118
|
-
vue.createVNode(vue.unref(index$
|
|
119
|
+
}, vue.toDisplayString(vue.unref(getLocale)("modify")), 3),
|
|
120
|
+
vue.createVNode(vue.unref(index$2.Inputs), {
|
|
119
121
|
modelValue: value.value,
|
|
120
122
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
121
123
|
ref_key: "refEditInput",
|
|
122
124
|
ref: refEditInput,
|
|
123
|
-
type: "text",
|
|
125
|
+
type: props.textarea ? "textarea" : "text",
|
|
124
126
|
onBlur,
|
|
125
127
|
clearable: _ctx.clearable,
|
|
126
128
|
class: vue.normalizeClass(vue.unref(cs).z("input"))
|
|
127
|
-
}, null, 8, ["modelValue", "clearable", "class"]),
|
|
129
|
+
}, null, 8, ["modelValue", "type", "clearable", "class"]),
|
|
128
130
|
vue.createElementVNode("div", {
|
|
129
131
|
class: vue.normalizeClass(vue.unref(cs).z("but"))
|
|
130
132
|
}, [
|
|
131
133
|
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
132
134
|
size: "small",
|
|
133
|
-
|
|
134
|
-
onClick:
|
|
135
|
+
text: "",
|
|
136
|
+
onClick: onClickqx
|
|
135
137
|
}, {
|
|
136
|
-
default: vue.withCtx(() => [
|
|
137
|
-
vue.createTextVNode("
|
|
138
|
-
])
|
|
138
|
+
default: vue.withCtx(() => [
|
|
139
|
+
vue.createTextVNode(vue.toDisplayString(vue.unref(getLocale)("close")), 1)
|
|
140
|
+
]),
|
|
139
141
|
_: 1
|
|
140
142
|
}),
|
|
141
143
|
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
142
144
|
size: "small",
|
|
143
|
-
|
|
144
|
-
onClick:
|
|
145
|
+
type: "primary",
|
|
146
|
+
onClick: onConfirm
|
|
145
147
|
}, {
|
|
146
|
-
default: vue.withCtx(() => [
|
|
147
|
-
vue.createTextVNode("
|
|
148
|
-
])
|
|
148
|
+
default: vue.withCtx(() => [
|
|
149
|
+
vue.createTextVNode(vue.toDisplayString(vue.unref(getLocale)("form.confirm")), 1)
|
|
150
|
+
]),
|
|
149
151
|
_: 1
|
|
150
152
|
})
|
|
151
153
|
], 2)
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, onMounted, createElementBlock, openBlock, normalizeClass, unref, createVNode, withCtx, createElementVNode, createTextVNode, createBlock, createCommentVNode, withModifiers
|
|
1
|
+
import { defineComponent, ref, watch, onMounted, createElementBlock, openBlock, normalizeClass, unref, createVNode, withCtx, createElementVNode, toDisplayString, createTextVNode, createBlock, createCommentVNode, withModifiers } from "vue";
|
|
2
2
|
import { Icon } from "../../icon/index.js";
|
|
3
3
|
import Edit from "../../../icons/vue/edit.js";
|
|
4
4
|
import { ElPopover, ElButton } from "element-plus";
|
|
5
5
|
import { dataExpose, dataEmits, dataProps } from "./data.js";
|
|
6
6
|
import { Inputs } from "../../inputs/index.js";
|
|
7
7
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
8
|
+
import { useLocale } from "../../../hooks/locale/index.js";
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
10
|
__name: "index",
|
|
10
11
|
props: dataProps,
|
|
11
12
|
emits: dataEmits,
|
|
12
13
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
14
|
+
const { getLocale } = useLocale();
|
|
13
15
|
const cs = useCssName("edit-float");
|
|
14
16
|
const props = __props;
|
|
15
17
|
const emit = __emit;
|
|
@@ -112,38 +114,38 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
112
114
|
}, [
|
|
113
115
|
createElementVNode("div", {
|
|
114
116
|
class: normalizeClass(unref(cs).z("title"))
|
|
115
|
-
}, "
|
|
117
|
+
}, toDisplayString(unref(getLocale)("modify")), 3),
|
|
116
118
|
createVNode(unref(Inputs), {
|
|
117
119
|
modelValue: value.value,
|
|
118
120
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
119
121
|
ref_key: "refEditInput",
|
|
120
122
|
ref: refEditInput,
|
|
121
|
-
type: "text",
|
|
123
|
+
type: props.textarea ? "textarea" : "text",
|
|
122
124
|
onBlur,
|
|
123
125
|
clearable: _ctx.clearable,
|
|
124
126
|
class: normalizeClass(unref(cs).z("input"))
|
|
125
|
-
}, null, 8, ["modelValue", "clearable", "class"]),
|
|
127
|
+
}, null, 8, ["modelValue", "type", "clearable", "class"]),
|
|
126
128
|
createElementVNode("div", {
|
|
127
129
|
class: normalizeClass(unref(cs).z("but"))
|
|
128
130
|
}, [
|
|
129
131
|
createVNode(unref(ElButton), {
|
|
130
132
|
size: "small",
|
|
131
|
-
|
|
132
|
-
onClick:
|
|
133
|
+
text: "",
|
|
134
|
+
onClick: onClickqx
|
|
133
135
|
}, {
|
|
134
|
-
default: withCtx(() => [
|
|
135
|
-
createTextVNode("
|
|
136
|
-
])
|
|
136
|
+
default: withCtx(() => [
|
|
137
|
+
createTextVNode(toDisplayString(unref(getLocale)("close")), 1)
|
|
138
|
+
]),
|
|
137
139
|
_: 1
|
|
138
140
|
}),
|
|
139
141
|
createVNode(unref(ElButton), {
|
|
140
142
|
size: "small",
|
|
141
|
-
|
|
142
|
-
onClick:
|
|
143
|
+
type: "primary",
|
|
144
|
+
onClick: onConfirm
|
|
143
145
|
}, {
|
|
144
|
-
default: withCtx(() => [
|
|
145
|
-
createTextVNode("
|
|
146
|
-
])
|
|
146
|
+
default: withCtx(() => [
|
|
147
|
+
createTextVNode(toDisplayString(unref(getLocale)("form.confirm")), 1)
|
|
148
|
+
]),
|
|
147
149
|
_: 1
|
|
148
150
|
})
|
|
149
151
|
], 2)
|
|
@@ -4,20 +4,20 @@ 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 use = require("../../common/use.cjs");
|
|
7
8
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
8
9
|
__name: "index",
|
|
9
10
|
props: data.dataProps,
|
|
10
11
|
emits: data.dataEmits,
|
|
11
12
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
12
|
-
const {
|
|
13
|
+
const { getLocale } = index.useLocale();
|
|
13
14
|
const cs = index$1.useCssName("no-data");
|
|
14
15
|
const prs = __props;
|
|
15
|
-
const props =
|
|
16
|
-
{
|
|
17
|
-
|
|
18
|
-
locale: "nodata"
|
|
16
|
+
const props = use.uesPropsDefault(prs, {
|
|
17
|
+
text() {
|
|
18
|
+
return getLocale("nodata");
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
});
|
|
21
21
|
const emit = __emit;
|
|
22
22
|
__expose({
|
|
23
23
|
...data.dataExpose
|
|
@@ -2,20 +2,20 @@ import { defineComponent, createElementBlock, openBlock, normalizeClass, unref,
|
|
|
2
2
|
import { dataExpose, dataEmits, dataProps } from "./data.js";
|
|
3
3
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
4
4
|
import { useLocale } from "../../../hooks/locale/index.js";
|
|
5
|
+
import { uesPropsDefault } from "../../common/use.js";
|
|
5
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
7
|
__name: "index",
|
|
7
8
|
props: dataProps,
|
|
8
9
|
emits: dataEmits,
|
|
9
10
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
10
|
-
const {
|
|
11
|
+
const { getLocale } = useLocale();
|
|
11
12
|
const cs = useCssName("no-data");
|
|
12
13
|
const prs = __props;
|
|
13
|
-
const props =
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
locale: "nodata"
|
|
14
|
+
const props = uesPropsDefault(prs, {
|
|
15
|
+
text() {
|
|
16
|
+
return getLocale("nodata");
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
});
|
|
19
19
|
const emit = __emit;
|
|
20
20
|
__expose({
|
|
21
21
|
...dataExpose
|
|
@@ -38,14 +38,15 @@
|
|
|
38
38
|
.box-title-close {
|
|
39
39
|
right: 10px;
|
|
40
40
|
font-size: 18px;
|
|
41
|
+
height: 100%;
|
|
41
42
|
display: flex;
|
|
42
43
|
align-items: center;
|
|
44
|
+
cursor: pointer;
|
|
43
45
|
}
|
|
44
46
|
.box-title-close-icon {
|
|
45
47
|
width: 20px;
|
|
46
48
|
height: 20px;
|
|
47
49
|
margin: 0 4px;
|
|
48
|
-
cursor: pointer;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
.popup {
|
|
@@ -5,12 +5,11 @@ const data = require("../../box/src/data.cjs");
|
|
|
5
5
|
const dataProps = buildProps.buildProps({
|
|
6
6
|
...data.dataProps,
|
|
7
7
|
/**
|
|
8
|
-
* @props { String, Boolean } drag='.
|
|
8
|
+
* @props { String, Boolean } drag='.box-title-name' ( )
|
|
9
9
|
* 可拖拽的元素样式 为空字符串就不拖拽
|
|
10
10
|
*/
|
|
11
11
|
drag: {
|
|
12
|
-
type: [String, Boolean]
|
|
13
|
-
default: ".com-title-name"
|
|
12
|
+
type: [String, Boolean]
|
|
14
13
|
},
|
|
15
14
|
/**
|
|
16
15
|
* @props { Boolean } drag= ( )
|
|
@@ -2,12 +2,11 @@ import { ExtractPublicPropTypes } from 'vue';
|
|
|
2
2
|
import { FunctConfig } from '../../../utils/enums';
|
|
3
3
|
export declare const dataProps: {
|
|
4
4
|
/**
|
|
5
|
-
* @props { String, Boolean } drag='.
|
|
5
|
+
* @props { String, Boolean } drag='.box-title-name' ( )
|
|
6
6
|
* 可拖拽的元素样式 为空字符串就不拖拽
|
|
7
7
|
*/
|
|
8
8
|
drag: {
|
|
9
9
|
type: (BooleanConstructor | StringConstructor)[];
|
|
10
|
-
default: string;
|
|
11
10
|
};
|
|
12
11
|
/**
|
|
13
12
|
* @props { Boolean } drag= ( )
|
|
@@ -3,12 +3,11 @@ import { dataProps as dataProps$1, dataEmits as dataEmits$1, dataSlot as dataSlo
|
|
|
3
3
|
const dataProps = buildProps({
|
|
4
4
|
...dataProps$1,
|
|
5
5
|
/**
|
|
6
|
-
* @props { String, Boolean } drag='.
|
|
6
|
+
* @props { String, Boolean } drag='.box-title-name' ( )
|
|
7
7
|
* 可拖拽的元素样式 为空字符串就不拖拽
|
|
8
8
|
*/
|
|
9
9
|
drag: {
|
|
10
|
-
type: [String, Boolean]
|
|
11
|
-
default: ".com-title-name"
|
|
10
|
+
type: [String, Boolean]
|
|
12
11
|
},
|
|
13
12
|
/**
|
|
14
13
|
* @props { Boolean } drag= ( )
|
|
@@ -9,6 +9,7 @@ const index$3 = require("../../box-mask/index.cjs");
|
|
|
9
9
|
const index$2 = require("../../box-teleport/index.cjs");
|
|
10
10
|
const index$6 = require("../../../directives/adjust/index.cjs");
|
|
11
11
|
const index$5 = require("../../../directives/drag/index.cjs");
|
|
12
|
+
const use = require("../../common/use.cjs");
|
|
12
13
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
13
14
|
__name: "index",
|
|
14
15
|
props: data.dataProps,
|
|
@@ -17,7 +18,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
17
18
|
const isInit = vue.shallowRef(false);
|
|
18
19
|
const { getLocale } = index.useLocale();
|
|
19
20
|
const cs = index$1.useCssName("popup");
|
|
20
|
-
const
|
|
21
|
+
const prs = __props;
|
|
22
|
+
const props = use.uesPropsDefault(prs, {
|
|
23
|
+
drag() {
|
|
24
|
+
return "." + cs.name + "box-title-name";
|
|
25
|
+
}
|
|
26
|
+
});
|
|
21
27
|
const emit = __emit;
|
|
22
28
|
const drag = { dom: props.self ? false : props.drag };
|
|
23
29
|
const adjust = !props.self && props.adjust ? {
|
|
@@ -46,25 +52,25 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
46
52
|
...data.dataExpose
|
|
47
53
|
});
|
|
48
54
|
return (_ctx, _cache) => {
|
|
49
|
-
return props.local ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
55
|
+
return vue.unref(props).local ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
50
56
|
key: 0,
|
|
51
57
|
class: vue.normalizeClass(vue.unref(cs).z("local"))
|
|
52
58
|
}, [
|
|
53
59
|
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).default)
|
|
54
60
|
], 2)) : (vue.openBlock(), vue.createBlock(vue.unref(index$2.BoxTeleport), {
|
|
55
61
|
key: 1,
|
|
56
|
-
disabled: props.disabled,
|
|
57
|
-
to: props.to
|
|
62
|
+
disabled: vue.unref(props).disabled,
|
|
63
|
+
to: vue.unref(props).to
|
|
58
64
|
}, {
|
|
59
65
|
default: vue.withCtx(() => [
|
|
60
66
|
isInit.value ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
61
67
|
key: 0,
|
|
62
|
-
class: vue.normalizeClass([vue.unref(cs).z(), props.self ? vue.unref(cs).z("center") : ""])
|
|
68
|
+
class: vue.normalizeClass([vue.unref(cs).z(), vue.unref(props).self ? vue.unref(cs).z("center") : ""])
|
|
63
69
|
}, [
|
|
64
|
-
props.mask ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.BoxMask), {
|
|
70
|
+
vue.unref(props).mask ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.BoxMask), {
|
|
65
71
|
key: 0,
|
|
66
72
|
onClick: onMaskClose,
|
|
67
|
-
cssprefix: props.cssprefix || vue.unref(cs).z()
|
|
73
|
+
cssprefix: vue.unref(props).cssprefix || vue.unref(cs).z()
|
|
68
74
|
}, null, 8, ["cssprefix"])) : vue.createCommentVNode("", true),
|
|
69
75
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
70
76
|
class: vue.normalizeClass(vue.unref(cs).z("body"))
|
|
@@ -72,7 +78,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
72
78
|
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).title, {}, () => [
|
|
73
79
|
vue.createVNode(vue.unref(index$4.BoxTitle), {
|
|
74
80
|
onClose,
|
|
75
|
-
title: props.title
|
|
81
|
+
title: vue.unref(props).title
|
|
76
82
|
}, null, 8, ["title"])
|
|
77
83
|
]),
|
|
78
84
|
vue.createElementVNode("div", {
|
|
@@ -86,7 +92,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
86
92
|
[vue.unref(index$6.default), vue.unref(adjust)]
|
|
87
93
|
])
|
|
88
94
|
], 2)), [
|
|
89
|
-
[vue.vShow, props.modelValue]
|
|
95
|
+
[vue.vShow, vue.unref(props).modelValue]
|
|
90
96
|
]) : vue.createCommentVNode("", true)
|
|
91
97
|
]),
|
|
92
98
|
_: 3
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, shallowRef, watch, createElementBlock, createBlock, openBlock, normalizeClass,
|
|
1
|
+
import { defineComponent, shallowRef, watch, createElementBlock, createBlock, unref, openBlock, normalizeClass, renderSlot, withCtx, withDirectives, createCommentVNode, createElementVNode, createVNode, vShow } from "vue";
|
|
2
2
|
import { dataExpose, dataSlot, dataEmits, dataProps } from "./data.js";
|
|
3
3
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
4
4
|
import { useLocale } from "../../../hooks/locale/index.js";
|
|
@@ -7,6 +7,7 @@ import { BoxMask } from "../../box-mask/index.js";
|
|
|
7
7
|
import { BoxTeleport } from "../../box-teleport/index.js";
|
|
8
8
|
import vAdjust from "../../../directives/adjust/index.js";
|
|
9
9
|
import vDrag from "../../../directives/drag/index.js";
|
|
10
|
+
import { uesPropsDefault } from "../../common/use.js";
|
|
10
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
12
|
__name: "index",
|
|
12
13
|
props: dataProps,
|
|
@@ -15,7 +16,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
16
|
const isInit = shallowRef(false);
|
|
16
17
|
const { getLocale } = useLocale();
|
|
17
18
|
const cs = useCssName("popup");
|
|
18
|
-
const
|
|
19
|
+
const prs = __props;
|
|
20
|
+
const props = uesPropsDefault(prs, {
|
|
21
|
+
drag() {
|
|
22
|
+
return "." + cs.name + "box-title-name";
|
|
23
|
+
}
|
|
24
|
+
});
|
|
19
25
|
const emit = __emit;
|
|
20
26
|
const drag = { dom: props.self ? false : props.drag };
|
|
21
27
|
const adjust = !props.self && props.adjust ? {
|
|
@@ -44,25 +50,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
50
|
...dataExpose
|
|
45
51
|
});
|
|
46
52
|
return (_ctx, _cache) => {
|
|
47
|
-
return props.local ? (openBlock(), createElementBlock("div", {
|
|
53
|
+
return unref(props).local ? (openBlock(), createElementBlock("div", {
|
|
48
54
|
key: 0,
|
|
49
55
|
class: normalizeClass(unref(cs).z("local"))
|
|
50
56
|
}, [
|
|
51
57
|
renderSlot(_ctx.$slots, unref(dataSlot).default)
|
|
52
58
|
], 2)) : (openBlock(), createBlock(unref(BoxTeleport), {
|
|
53
59
|
key: 1,
|
|
54
|
-
disabled: props.disabled,
|
|
55
|
-
to: props.to
|
|
60
|
+
disabled: unref(props).disabled,
|
|
61
|
+
to: unref(props).to
|
|
56
62
|
}, {
|
|
57
63
|
default: withCtx(() => [
|
|
58
64
|
isInit.value ? withDirectives((openBlock(), createElementBlock("div", {
|
|
59
65
|
key: 0,
|
|
60
|
-
class: normalizeClass([unref(cs).z(), props.self ? unref(cs).z("center") : ""])
|
|
66
|
+
class: normalizeClass([unref(cs).z(), unref(props).self ? unref(cs).z("center") : ""])
|
|
61
67
|
}, [
|
|
62
|
-
props.mask ? (openBlock(), createBlock(unref(BoxMask), {
|
|
68
|
+
unref(props).mask ? (openBlock(), createBlock(unref(BoxMask), {
|
|
63
69
|
key: 0,
|
|
64
70
|
onClick: onMaskClose,
|
|
65
|
-
cssprefix: props.cssprefix || unref(cs).z()
|
|
71
|
+
cssprefix: unref(props).cssprefix || unref(cs).z()
|
|
66
72
|
}, null, 8, ["cssprefix"])) : createCommentVNode("", true),
|
|
67
73
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
68
74
|
class: normalizeClass(unref(cs).z("body"))
|
|
@@ -70,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
70
76
|
renderSlot(_ctx.$slots, unref(dataSlot).title, {}, () => [
|
|
71
77
|
createVNode(unref(BoxTitle), {
|
|
72
78
|
onClose,
|
|
73
|
-
title: props.title
|
|
79
|
+
title: unref(props).title
|
|
74
80
|
}, null, 8, ["title"])
|
|
75
81
|
]),
|
|
76
82
|
createElementVNode("div", {
|
|
@@ -84,7 +90,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
84
90
|
[unref(vAdjust), unref(adjust)]
|
|
85
91
|
])
|
|
86
92
|
], 2)), [
|
|
87
|
-
[vShow, props.modelValue]
|
|
93
|
+
[vShow, unref(props).modelValue]
|
|
88
94
|
]) : createCommentVNode("", true)
|
|
89
95
|
]),
|
|
90
96
|
_: 3
|
|
@@ -258,6 +258,8 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
258
258
|
is: boolean;
|
|
259
259
|
load: Ref<boolean, boolean>;
|
|
260
260
|
end: ComputedRef<boolean>;
|
|
261
|
+
endText: any;
|
|
262
|
+
loadText: any;
|
|
261
263
|
onChange: () => void;
|
|
262
264
|
}>;
|
|
263
265
|
onSortChange: (obj: ObjAny) => void;
|
|
@@ -38,14 +38,15 @@
|
|
|
38
38
|
.box-title-close {
|
|
39
39
|
right: 10px;
|
|
40
40
|
font-size: 18px;
|
|
41
|
+
height: 100%;
|
|
41
42
|
display: flex;
|
|
42
43
|
align-items: center;
|
|
44
|
+
cursor: pointer;
|
|
43
45
|
}
|
|
44
46
|
.box-title-close-icon {
|
|
45
47
|
width: 20px;
|
|
46
48
|
height: 20px;
|
|
47
49
|
margin: 0 4px;
|
|
48
|
-
cursor: pointer;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
.window {
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
display: inline-flex;
|
|
73
74
|
align-items: center;
|
|
74
75
|
margin: 0 4px;
|
|
76
|
+
height: 100%;
|
|
75
77
|
cursor: pointer;
|
|
76
78
|
}
|
|
77
79
|
.window-body-div {
|
|
@@ -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 *;
|
|
@@ -30,6 +25,7 @@ $window: 'window';
|
|
|
30
25
|
display: inline-flex;
|
|
31
26
|
align-items: center;
|
|
32
27
|
margin: 0 4px;
|
|
28
|
+
height: 100%;
|
|
33
29
|
cursor: pointer;
|
|
34
30
|
}
|
|
35
31
|
|
|
@@ -6,12 +6,11 @@ const data = require("../../box/src/data.cjs");
|
|
|
6
6
|
const dataProps = buildProps.buildProps({
|
|
7
7
|
...data.dataProps,
|
|
8
8
|
/**
|
|
9
|
-
* @props { String, Boolean } drag='.
|
|
9
|
+
* @props { String, Boolean } drag='.box-title-name' ( )
|
|
10
10
|
* 可拖拽的元素样式 为空字符串就不拖拽
|
|
11
11
|
*/
|
|
12
12
|
drag: {
|
|
13
|
-
type: [String, Boolean]
|
|
14
|
-
default: ".com-title-name"
|
|
13
|
+
type: [String, Boolean]
|
|
15
14
|
},
|
|
16
15
|
/**
|
|
17
16
|
* @props { Boolean } adjust=true ( )
|