@das-fed/ui 6.4.0-dev.55.1 → 6.4.0-dev.55.3
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/package.json +5 -5
- package/packages/business-components/process-form/i18n/index.d.ts +4 -0
- package/packages/business-components/process-form/index.js +86 -85
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-log/index.js +1 -1
- package/packages/business-components/process-log/index.js.gz +0 -0
- package/packages/business-components/process-log/style.css +1 -1
- package/packages/business-components/process-log/style.css.gz +0 -0
- package/packages/components/color-picker/index.js +87 -84
- package/packages/components/color-picker/index.js.gz +0 -0
- package/packages/components/color-picker/style.css +1 -1
- package/packages/components/color-picker/style.css.gz +0 -0
- package/packages/components/form-item/index.js +1 -1
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/popover/index.d.ts +3 -0
- package/packages/components/popover/index.js +24 -23
- package/packages/components/popover/index.js.gz +0 -0
- package/packages/components/rich-editor/index.js +2855 -2854
- package/packages/components/rich-editor/index.js.gz +0 -0
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/color-picker/style.css';
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as S, computed as I, ref as y, openBlock as c, createElementBlock as V, createVNode as k, unref as e, mergeProps as T, isRef as z, withCtx as f, createBlock as v, createCommentVNode as w, createElementVNode as P, normalizeClass as C, normalizeStyle as H, Fragment as x, renderList as N } from "vue";
|
|
3
3
|
import { withInstall as O } from "@das-fed/utils/with-install/index";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { currentLang as $, t as F, setI18nRule as A } from "@das-fed/web/packages/i18n/index";
|
|
5
|
+
import { DasDropdown as L, DasDropdownMenu as M } from "@das-fed/ui/packages/components/dropdown/index";
|
|
6
|
+
import { DasAutoRegisterIcon as U, DasIcon as j } from "@das-fed/ui/packages/components/icon/index";
|
|
7
|
+
import { DasInput as q } from "@das-fed/ui/packages/components/input/index";
|
|
8
|
+
import { ElConfigProvider as G, ElColorPicker as J } from "element-plus";
|
|
8
9
|
import "element-plus/es/components/color-picker/style/css";
|
|
9
|
-
import { useModelValue as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { setThemeRule as
|
|
13
|
-
const
|
|
14
|
-
const l =
|
|
15
|
-
let
|
|
16
|
-
return { innerValue: l, inputChangeHandler: (
|
|
17
|
-
|
|
18
|
-
}, inputInputHandler: (
|
|
19
|
-
|
|
20
|
-
}, colorOption:
|
|
21
|
-
},
|
|
10
|
+
import { useModelValue as g } from "@das-fed/utils/vue";
|
|
11
|
+
import K from "element-plus/dist/locale/zh-cn.mjs";
|
|
12
|
+
import Q from "element-plus/dist/locale/en.mjs";
|
|
13
|
+
import { setThemeRule as W } from "@das-fed/web/packages/theme/index";
|
|
14
|
+
const X = (s, t) => {
|
|
15
|
+
const l = g(s, "modelValue"), u = g(s, "options");
|
|
16
|
+
let p = g(s, "modelValue");
|
|
17
|
+
return { innerValue: l, inputChangeHandler: (n) => {
|
|
18
|
+
p.value = n, t("update:modelValue", n), t("change", n);
|
|
19
|
+
}, inputInputHandler: (n) => {
|
|
20
|
+
p.value = n, t("update:modelValue", n), t("dasInput", n), t("change", n);
|
|
21
|
+
}, colorOption: u, colorPickerValue: p };
|
|
22
|
+
}, Y = {
|
|
22
23
|
class: "das-ui-color-picker",
|
|
23
24
|
style: { width: "100%" }
|
|
24
|
-
},
|
|
25
|
+
}, Z = { class: "color-predefine-content" }, ee = ["onClick"], oe = /* @__PURE__ */ S({
|
|
25
26
|
__name: "Index",
|
|
26
27
|
props: {
|
|
27
28
|
modelValue: { default: "" },
|
|
@@ -39,91 +40,93 @@ const K = (t, r) => {
|
|
|
39
40
|
noSetDefaultVal: { type: Boolean, default: !1 }
|
|
40
41
|
},
|
|
41
42
|
emits: ["update:modelValue", "change", "dasInput"],
|
|
42
|
-
setup(
|
|
43
|
-
const l =
|
|
44
|
-
|
|
43
|
+
setup(s, { emit: t }) {
|
|
44
|
+
const l = s, u = t;
|
|
45
|
+
U({
|
|
45
46
|
fold: import("@das-fed/ui/packages/icons/fold"),
|
|
46
47
|
close2: import("@das-fed/ui/packages/icons/close-2")
|
|
47
|
-
})
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
});
|
|
49
|
+
const p = I(() => $.value === "zh-CN" ? K : Q);
|
|
50
|
+
I(() => l.placeholder || F("请输入"));
|
|
51
|
+
const { innerValue: i, inputChangeHandler: _, inputInputHandler: n, colorOption: o, colorPickerValue: b } = X(l, u), h = y(), m = y(!1), R = (d) => {
|
|
52
|
+
var a, r;
|
|
53
|
+
u("change", d), i.value = d, (r = (a = h.value) == null ? void 0 : a.getElRef()) == null || r.handleClose(), m.value = !1;
|
|
54
|
+
}, D = () => {
|
|
55
|
+
var d, a;
|
|
56
|
+
o.value.mode != "default" && ((a = (d = h.value) == null ? void 0 : d.getElRef()) == null || a.handleOpen(), m.value = !0);
|
|
57
|
+
}, B = (d) => {
|
|
58
|
+
m.value = d;
|
|
56
59
|
};
|
|
57
|
-
return (d,
|
|
58
|
-
|
|
60
|
+
return (d, a) => (c(), V("div", Y, [
|
|
61
|
+
k(e(q), T({
|
|
59
62
|
class: ["das-color-picker-input", [
|
|
60
63
|
`das-color-picker-${e(o).size}`,
|
|
61
64
|
{ "das-empty-color": !e(i) },
|
|
62
65
|
{ "das-predefine-cell": e(o).mode == "predefine" && (!e(o).isView || !l.isView) },
|
|
63
66
|
{ "das-predefine-view-cell": e(o).mode == "predefine" && (e(o).isView || l.isView) },
|
|
64
67
|
{ "das-both-view-cell": e(o).isView || l.isView },
|
|
65
|
-
{ "focus-predefine-view-cell": e(o).mode == "predefine" &&
|
|
68
|
+
{ "focus-predefine-view-cell": e(o).mode == "predefine" && m.value }
|
|
66
69
|
]],
|
|
67
70
|
modelValue: e(i),
|
|
68
|
-
"onUpdate:modelValue":
|
|
71
|
+
"onUpdate:modelValue": a[1] || (a[1] = (r) => z(i) ? i.value = r : null)
|
|
69
72
|
}, d.$attrs, {
|
|
70
73
|
isView: e(o).mode == "predefine" ? !0 : e(o).isView || l.isView,
|
|
71
74
|
disabled: e(o).disabled || l.disabled,
|
|
72
75
|
append: "",
|
|
73
|
-
onClick:
|
|
74
|
-
onInput: e(
|
|
76
|
+
onClick: D,
|
|
77
|
+
onInput: e(n),
|
|
75
78
|
borderType: l.borderType,
|
|
76
79
|
noSetDefaultVal: e(o).mode == "predefine" && !e(o).isView && !l.isView && !e(o).disabled && !l.disabled || l.noSetDefaultVal && (e(o).isView || l.isView) && !e(i)
|
|
77
80
|
}), {
|
|
78
|
-
append:
|
|
79
|
-
e(o).mode == "default" ? (
|
|
81
|
+
append: f(() => [
|
|
82
|
+
e(o).mode == "default" ? (c(), v(e(G), {
|
|
80
83
|
key: 0,
|
|
81
|
-
locale:
|
|
84
|
+
locale: p.value
|
|
82
85
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
!e(o).isView && !l.isView || e(i) ? (
|
|
86
|
+
default: f(() => [
|
|
87
|
+
!e(o).isView && !l.isView || e(i) ? (c(), v(e(J), {
|
|
85
88
|
key: 0,
|
|
86
|
-
locale:
|
|
89
|
+
locale: p.value,
|
|
87
90
|
placement: e(o).placement,
|
|
88
|
-
onChange: e(
|
|
89
|
-
modelValue: e(
|
|
90
|
-
"onUpdate:modelValue":
|
|
91
|
+
onChange: e(_),
|
|
92
|
+
modelValue: e(b),
|
|
93
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => z(b) ? b.value = r : null),
|
|
91
94
|
size: e(o).size,
|
|
92
95
|
"show-alpha": e(o).showAlpha,
|
|
93
96
|
"color-format": e(o).colorFormat,
|
|
94
97
|
"popper-class": `das-color-picker-popper ${e(o).popperClass}`,
|
|
95
98
|
predefine: e(o).predefine,
|
|
96
99
|
disabled: e(o).disabled || l.disabled || e(o).isView || l.isView
|
|
97
|
-
}, null, 8, ["locale", "placement", "onChange", "modelValue", "size", "show-alpha", "color-format", "popper-class", "predefine", "disabled"])) :
|
|
100
|
+
}, null, 8, ["locale", "placement", "onChange", "modelValue", "size", "show-alpha", "color-format", "popper-class", "predefine", "disabled"])) : w("v-if", !0)
|
|
98
101
|
]),
|
|
99
102
|
_: 1
|
|
100
103
|
/* STABLE */
|
|
101
|
-
}, 8, ["locale"])) :
|
|
102
|
-
e(o).mode == "predefine" ? (
|
|
104
|
+
}, 8, ["locale"])) : w("v-if", !0),
|
|
105
|
+
e(o).mode == "predefine" ? (c(), v(e(L), {
|
|
103
106
|
key: 1,
|
|
104
107
|
disabled: e(o).disabled || l.disabled || e(o).isView || l.isView,
|
|
105
108
|
ref_key: "predefineDrown",
|
|
106
|
-
ref:
|
|
109
|
+
ref: h,
|
|
107
110
|
trigger: "click",
|
|
108
111
|
placement: "bottom-end",
|
|
109
112
|
selfPopperClass: "color-predefine-dropdown",
|
|
110
113
|
"hide-on-click": !1,
|
|
111
|
-
onVisibleChange:
|
|
114
|
+
onVisibleChange: B
|
|
112
115
|
}, {
|
|
113
|
-
content:
|
|
114
|
-
|
|
116
|
+
content: f(() => [
|
|
117
|
+
P(
|
|
115
118
|
"span",
|
|
116
119
|
{
|
|
117
|
-
class:
|
|
120
|
+
class: C([
|
|
118
121
|
"color-predefine-icon",
|
|
119
122
|
e(o).size,
|
|
120
123
|
e(i) && e(i) != "-",
|
|
121
124
|
{ "view-prefine-icon": e(o).disabled || l.disabled || e(o).isView || l.isView }
|
|
122
125
|
]),
|
|
123
|
-
style:
|
|
126
|
+
style: H("background-color:" + e(i))
|
|
124
127
|
},
|
|
125
128
|
[
|
|
126
|
-
|
|
129
|
+
k(e(j), {
|
|
127
130
|
icon: e(i) && e(i) != "-" ? "fold" : "close2",
|
|
128
131
|
customSize: "6px",
|
|
129
132
|
iconColor: e(i) && e(i) != "-" ? "#fff" : "#909399"
|
|
@@ -133,19 +136,19 @@ const K = (t, r) => {
|
|
|
133
136
|
/* CLASS, STYLE */
|
|
134
137
|
)
|
|
135
138
|
]),
|
|
136
|
-
default:
|
|
137
|
-
|
|
138
|
-
default:
|
|
139
|
-
|
|
140
|
-
(
|
|
139
|
+
default: f(() => [
|
|
140
|
+
k(e(M), null, {
|
|
141
|
+
default: f(() => [
|
|
142
|
+
P("div", Z, [
|
|
143
|
+
(c(!0), V(
|
|
141
144
|
x,
|
|
142
145
|
null,
|
|
143
|
-
N(e(o).predefine, (
|
|
144
|
-
class:
|
|
145
|
-
key:
|
|
146
|
-
style:
|
|
147
|
-
onClick: (
|
|
148
|
-
}, null, 14,
|
|
146
|
+
N(e(o).predefine, (r, E) => (c(), V("div", {
|
|
147
|
+
class: C(["color-predefine-span", { active: e(i) == r }]),
|
|
148
|
+
key: E,
|
|
149
|
+
style: H("background-color:" + r),
|
|
150
|
+
onClick: (re) => R(r)
|
|
151
|
+
}, null, 14, ee))),
|
|
149
152
|
128
|
|
150
153
|
/* KEYED_FRAGMENT */
|
|
151
154
|
))
|
|
@@ -157,44 +160,44 @@ const K = (t, r) => {
|
|
|
157
160
|
]),
|
|
158
161
|
_: 1
|
|
159
162
|
/* STABLE */
|
|
160
|
-
}, 8, ["disabled"])) :
|
|
163
|
+
}, 8, ["disabled"])) : w("v-if", !0)
|
|
161
164
|
]),
|
|
162
165
|
_: 1
|
|
163
166
|
/* STABLE */
|
|
164
167
|
}, 16, ["class", "modelValue", "isView", "disabled", "onInput", "borderType", "noSetDefaultVal"]),
|
|
165
|
-
e(o).mode == "predefine" && !e(o).isView && !l.isView && !e(o).disabled && !l.disabled && !e(i) ? (
|
|
168
|
+
e(o).mode == "predefine" && !e(o).isView && !l.isView && !e(o).disabled && !l.disabled && !e(i) ? (c(), V(
|
|
166
169
|
"span",
|
|
167
170
|
{
|
|
168
171
|
key: 0,
|
|
169
|
-
class:
|
|
170
|
-
onClick:
|
|
172
|
+
class: C(["predefine-placeholder", { "padding-l": l.borderType == "bordered" }]),
|
|
173
|
+
onClick: D
|
|
171
174
|
},
|
|
172
175
|
"请选择",
|
|
173
176
|
2
|
|
174
177
|
/* CLASS */
|
|
175
|
-
)) :
|
|
178
|
+
)) : w("v-if", !0)
|
|
176
179
|
]));
|
|
177
180
|
}
|
|
178
|
-
}),
|
|
179
|
-
const l =
|
|
180
|
-
for (const [
|
|
181
|
-
l[
|
|
181
|
+
}), le = (s, t) => {
|
|
182
|
+
const l = s.__vccOpts || s;
|
|
183
|
+
for (const [u, p] of t)
|
|
184
|
+
l[u] = p;
|
|
182
185
|
return l;
|
|
183
|
-
},
|
|
186
|
+
}, ie = /* @__PURE__ */ le(oe, [["__scopeId", "data-v-b55c259b"]]), ne = {
|
|
184
187
|
"--demo-alert-bg": {
|
|
185
188
|
light: "#fff",
|
|
186
189
|
dark: "rgba(255,255,255,.2)"
|
|
187
190
|
},
|
|
188
191
|
"--das-ui-color-picker-primary": "#5582F3"
|
|
189
192
|
// 主题色
|
|
190
|
-
},
|
|
193
|
+
}, ae = {
|
|
191
194
|
请输入: { "zh-CN": "请输入", en: "Please enter" }
|
|
192
195
|
};
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
const
|
|
196
|
+
A(ae);
|
|
197
|
+
W(ne);
|
|
198
|
+
const ke = () => y(null), ve = O(ie);
|
|
196
199
|
export {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
+
ve as DasColorPicker,
|
|
201
|
+
ke as DasColorPickerRef,
|
|
202
|
+
ve as default
|
|
200
203
|
};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.das-ui-color-picker[data-v-
|
|
1
|
+
.das-ui-color-picker[data-v-b55c259b]{position:relative}.das-ui-color-picker .das-input-table-size+.predefine-placeholder[data-v-b55c259b]{font-size:12px}.das-ui-color-picker .predefine-placeholder[data-v-b55c259b]{position:absolute;top:50%;left:0;transform:translateY(-50%);cursor:pointer;color:#b2b2b2;font-size:14px}.das-ui-color-picker .predefine-placeholder.padding-l[data-v-b55c259b]{left:8px}.das-ui-color-picker .das-ui-input[data-v-b55c259b]:not(.only-border-bottom) .el-input-group__append{display:flex;align-items:center;justify-content:center}.das-ui-color-picker[data-v-b55c259b] .el-color-picker__mask{display:none}.das-ui-color-picker .only-border-bottom[data-v-b55c259b] .das-color-picker-input .el-input-group__append{display:flex;align-items:flex-end}.das-ui-color-picker .only-border-bottom[data-v-b55c259b] .das-color-picker-input .color-predefine-icon{margin-bottom:2px}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input:not(.das-predefine-cell) .el-input-group__append{padding:0 5px!important}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input .el-color-picker{display:flex;align-items:flex-end}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input .el-color-picker__color{border-color:#9093994d}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input .el-color-picker__color .el-color-picker__color-inner{border-radius:2px}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input.das-empty-color .el-color-picker__color{border-color:#909399}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input.das-color-picker-mini .el-color-picker__trigger{width:20px;height:20px}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input.das-color-picker-mini .el-color-picker__mask{width:20px;height:16px}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input.el-input.el-input-group .el-input-group__prepend{padding-right:8px!important}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input.el-input.el-input-group .el-input-group__prepend .ant-select-selection-item{padding-right:18px}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input .el-color-picker__trigger{border:0;padding:2px}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input .color-predefine-icon{width:16px;height:16px;border-radius:2px;border:1px solid rgb(144,147,153);display:flex;align-items:center;justify-content:center;padding:2px;box-sizing:border-box}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input .color-predefine-icon.border-predefine{border-color:#9093994d}.das-ui-color-picker[data-v-b55c259b] .das-color-picker-input .color-predefine-icon.view-prefine-icon{cursor:not-allowed}.color-predefine-dropdown .color-predefine-content[data-v-b55c259b]{max-width:314px;padding:10px;box-sizing:border-box;display:flex;flex-wrap:wrap}.color-predefine-dropdown .color-predefine-content .color-predefine-span[data-v-b55c259b]{width:20px;height:20px;border-radius:3px;margin:0 8px 8px 0}.color-predefine-dropdown .color-predefine-content .color-predefine-span[data-v-b55c259b]:first-of-type{margin-left:0}.color-predefine-dropdown .color-predefine-content .color-predefine-span.active[data-v-b55c259b]{box-shadow:0 0 5px #00abff}.das-ui-color-picker .das-ui-input .is-view.el-input-group.das-predefine-cell.is-disabled .el-input__inner{color:#b2b2b2!important;-webkit-text-fill-color:#b2b2b2!important}.das-ui-color-picker .das-ui-input .is-view.el-input-group.das-predefine-cell:not(.das-predefine-view-cell,.is-disabled) .el-input__wrapper{background-color:#fff}.das-ui-color-picker .das-ui-input:not(.only-border-bottom) .focus-predefine-view-cell .el-input__wrapper{box-shadow:0 0 0 1px #5582f3 inset!important}.das-ui-color-picker .das-ui-input.only-border-bottom .el-input.is-disabled.el-input-group{border-bottom-color:#e5e5e5!important}.das-ui-color-picker .das-ui-input.only-border-bottom .el-input.is-view.el-input-group.das-predefine-cell{border:0 none;border-bottom:1px solid #999!important}.das-ui-color-picker .das-ui-input.only-border-bottom .el-input.is-view.el-input-group.das-predefine-cell:not(.das-predefine-view-cell,.is-disabled) .el-input__wrapper .el-input__inner{background-color:#fff}.das-ui-color-picker .das-ui-input.only-border-bottom .el-input.is-view.el-input-group.das-predefine-cell:not(.das-predefine-view-cell,.is-disabled).focus-predefine-view-cell{border-color:#5582f3!important}.das-ui-color-picker .das-ui-input.only-border-bottom .el-input.is-view.el-input-group.das-predefine-cell:not(.das-both-view-cell,.is-disabled) .el-input__wrapper .el-input__inner{cursor:pointer}.das-ui-color-picker .das-ui-input.only-border-bottom .el-input.is-view.el-input-group.das-predefine-cell:hover{border-bottom-color:#999!important}.das-ui-color-picker .das-ui-input.only-border-bottom .el-input.is-view.el-input-group.das-predefine-cell:hover.das-predefine-view-cell,.das-ui-color-picker .das-ui-input.only-border-bottom .el-input.is-view.el-input-group.das-predefine-cell.is-disabled{border-bottom-color:#e5e5e5!important}.das-ui-color-picker .das-ui-input.only-border-bottom .el-input.is-view.el-input-group.das-predefine-cell.is-disabled .el-input__inner{color:#b2b2b2!important;-webkit-text-fill-color:#b2b2b2!important}.das-ui-color-picker .das-ui-input.only-border-bottom .el-input.is-view.el-input-group.das-predefine-view-cell{border-bottom-color:#e5e5e5!important}.das-ui-color-picker .el-color-picker .el-color-picker__empty{font-size:8px!important}.das-color-picker-popper .el-button.is-text:not(.is-disabled):focus,.das-color-picker-popper .el-button.is-text:not(.is-disabled):hover{background-color:transparent;color:var(--das-ui-color-picker-primary)}.das-color-picker-popper .el-button.is-plain:not(.is-disabled):focus,.das-color-picker-popper .el-button.is-plain:not(.is-disabled):hover{color:var(--das-ui-color-picker-primary);border-color:var(--das-ui-color-picker-primary)}.das-both-view-cell .color-predefine-icon .das-icon,.das-both-view-cell .el-color-picker__color .el-color-picker__icon{display:none}.das-both-view-cell .el-color-picker__color,.das-both-view-cell .color-predefine-icon.view-prefine-icon{border:none!important}
|
|
Binary file
|
|
@@ -1276,7 +1276,7 @@ const Lo = (e, t, r) => {
|
|
|
1276
1276
|
const U = () => {
|
|
1277
1277
|
j.value = "", t("update:error", "");
|
|
1278
1278
|
}, D = Z(void 0), k = (s, g) => {
|
|
1279
|
-
if (_(), r("
|
|
1279
|
+
if (_(), r("inputNumber")) {
|
|
1280
1280
|
if (JSON.stringify(s) === JSON.stringify(D.value)) return;
|
|
1281
1281
|
D.value = No(s);
|
|
1282
1282
|
}
|
|
Binary file
|
|
@@ -12,6 +12,7 @@ declare const DasPopover: import("@das-fed/utils").SFCWithInstall<{
|
|
|
12
12
|
clickOutside: () => any;
|
|
13
13
|
}, import("vue").PublicProps, {
|
|
14
14
|
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
15
|
+
width: string | number;
|
|
15
16
|
showBtns: boolean;
|
|
16
17
|
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
17
18
|
P: {};
|
|
@@ -28,6 +29,7 @@ declare const DasPopover: import("@das-fed/utils").SFCWithInstall<{
|
|
|
28
29
|
$popoverRef: import("vue").Ref<null, null>;
|
|
29
30
|
}, {}, {}, {}, {
|
|
30
31
|
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
32
|
+
width: string | number;
|
|
31
33
|
showBtns: boolean;
|
|
32
34
|
}>;
|
|
33
35
|
__isFragment?: never;
|
|
@@ -45,6 +47,7 @@ declare const DasPopover: import("@das-fed/utils").SFCWithInstall<{
|
|
|
45
47
|
clickOutside: () => any;
|
|
46
48
|
}, string, {
|
|
47
49
|
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
50
|
+
width: string | number;
|
|
48
51
|
showBtns: boolean;
|
|
49
52
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
50
53
|
$slots: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/popover/style.css';
|
|
2
|
-
import { withInstall as
|
|
3
|
-
import { i18n as
|
|
4
|
-
import { defineComponent as b, useAttrs as g, ref as D, computed as O, openBlock as s, createBlock as V, unref as t, mergeProps as E, withCtx as r, renderSlot as
|
|
2
|
+
import { withInstall as B } from "@das-fed/utils/with-install/index";
|
|
3
|
+
import { i18n as d, setI18nRule as _ } from "@das-fed/web/packages/i18n/index";
|
|
4
|
+
import { defineComponent as b, useAttrs as g, ref as D, computed as O, openBlock as s, createBlock as V, unref as t, mergeProps as E, withCtx as r, renderSlot as m, withDirectives as I, createElementBlock as p, toDisplayString as n, createCommentVNode as u, createElementVNode as P, createTextVNode as a, createVNode as f } from "vue";
|
|
5
5
|
import { ElPopover as R, ClickOutside as z } from "element-plus";
|
|
6
6
|
import { DasButton as v } from "@das-fed/ui/packages/components/button/index";
|
|
7
7
|
import "element-plus/es/components/popover/style/css";
|
|
@@ -16,29 +16,30 @@ const S = { class: "das-ui-popover-container" }, T = {
|
|
|
16
16
|
__name: "Index",
|
|
17
17
|
props: {
|
|
18
18
|
title: {},
|
|
19
|
+
width: { default: "240px" },
|
|
19
20
|
content: {},
|
|
20
21
|
popperClass: {},
|
|
21
22
|
showBtns: { type: Boolean, default: !1 },
|
|
22
23
|
placement: { default: "bottom-start" }
|
|
23
24
|
},
|
|
24
25
|
emits: ["cancel", "confirm", "clickOutside"],
|
|
25
|
-
setup(C, { expose:
|
|
26
|
-
const l = C, i =
|
|
26
|
+
setup(C, { expose: h, emit: k }) {
|
|
27
|
+
const l = C, i = k, $ = g(), c = D(null), w = O(() => {
|
|
27
28
|
let e = "das-ui-popover-over-container";
|
|
28
29
|
return l.popperClass && (e = `${e} ${l.popperClass}`), e;
|
|
29
|
-
}),
|
|
30
|
-
|
|
30
|
+
}), y = () => {
|
|
31
|
+
$.visible !== void 0 && i("clickOutside");
|
|
31
32
|
};
|
|
32
|
-
return
|
|
33
|
+
return h({ $popoverRef: c }), (e, o) => (s(), V(t(R), E({
|
|
33
34
|
ref_key: "$popoverRef",
|
|
34
35
|
ref: c,
|
|
35
36
|
class: "das-ui-popover",
|
|
36
37
|
placement: e.placement,
|
|
37
|
-
width:
|
|
38
|
-
"popper-class":
|
|
38
|
+
width: e.width,
|
|
39
|
+
"popper-class": w.value
|
|
39
40
|
}, e.$attrs), {
|
|
40
41
|
reference: r(() => [
|
|
41
|
-
|
|
42
|
+
m(e.$slots, "reference")
|
|
42
43
|
]),
|
|
43
44
|
default: r(() => [
|
|
44
45
|
I((s(), p("div", S, [
|
|
@@ -49,7 +50,7 @@ const S = { class: "das-ui-popover-container" }, T = {
|
|
|
49
50
|
1
|
|
50
51
|
/* TEXT */
|
|
51
52
|
)) : u("v-if", !0),
|
|
52
|
-
|
|
53
|
+
m(e.$slots, "default", {}, () => [
|
|
53
54
|
P("div", A, [
|
|
54
55
|
a(
|
|
55
56
|
n(e.content) + " ",
|
|
@@ -58,11 +59,11 @@ const S = { class: "das-ui-popover-container" }, T = {
|
|
|
58
59
|
),
|
|
59
60
|
e.showBtns ? (s(), p("div", j, [
|
|
60
61
|
f(t(v), {
|
|
61
|
-
onClick: o[0] || (o[0] = (
|
|
62
|
+
onClick: o[0] || (o[0] = (N) => i("cancel"))
|
|
62
63
|
}, {
|
|
63
64
|
default: r(() => [
|
|
64
65
|
a(
|
|
65
|
-
n(t(
|
|
66
|
+
n(t(d)("das-ui-popover-cancel").value),
|
|
66
67
|
1
|
|
67
68
|
/* TEXT */
|
|
68
69
|
)
|
|
@@ -72,12 +73,12 @@ const S = { class: "das-ui-popover-container" }, T = {
|
|
|
72
73
|
}),
|
|
73
74
|
f(t(v), {
|
|
74
75
|
btnType: "primary",
|
|
75
|
-
onClick: o[1] || (o[1] = (
|
|
76
|
+
onClick: o[1] || (o[1] = (N) => i("confirm")),
|
|
76
77
|
style: { "margin-left": "12px" }
|
|
77
78
|
}, {
|
|
78
79
|
default: r(() => [
|
|
79
80
|
a(
|
|
80
|
-
n(t(
|
|
81
|
+
n(t(d)("das-ui-popover-confirm").value),
|
|
81
82
|
1
|
|
82
83
|
/* TEXT */
|
|
83
84
|
)
|
|
@@ -89,19 +90,19 @@ const S = { class: "das-ui-popover-container" }, T = {
|
|
|
89
90
|
])
|
|
90
91
|
])
|
|
91
92
|
])), [
|
|
92
|
-
[t(z),
|
|
93
|
+
[t(z), y]
|
|
93
94
|
])
|
|
94
95
|
]),
|
|
95
96
|
_: 3
|
|
96
97
|
/* FORWARDED */
|
|
97
|
-
}, 16, ["placement", "popper-class"]));
|
|
98
|
+
}, 16, ["placement", "width", "popper-class"]));
|
|
98
99
|
}
|
|
99
|
-
}),
|
|
100
|
+
}), F = {
|
|
100
101
|
"das-ui-popover-confirm": { "zh-CN": "确定", en: "Confirm" },
|
|
101
102
|
"das-ui-popover-cancel": { "zh-CN": "取消", en: "Cancel" }
|
|
102
|
-
},
|
|
103
|
-
_(
|
|
103
|
+
}, U = B(q);
|
|
104
|
+
_(F);
|
|
104
105
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
U as DasPopover,
|
|
107
|
+
U as default
|
|
107
108
|
};
|
|
Binary file
|