@fangzhongya/fang-ui 0.1.46 → 0.1.48
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/cascaders/index.css +6 -0
- package/dist/components/cascaders/index.scss +6 -0
- package/dist/components/common/compons/components.cjs +0 -16
- package/dist/components/common/compons/components.d.ts +0 -8
- package/dist/components/common/compons/components.js +0 -16
- package/dist/components/common/compons/index.scss +0 -8
- package/dist/components/common/compons/index2.scss +0 -8
- package/dist/components/dates-divide/index.css +6 -0
- package/dist/components/dates-divide/index.scss +6 -0
- package/dist/components/dates-divide/src/index2.cjs +4 -2
- package/dist/components/dates-divide/src/index2.js +4 -2
- package/dist/components/dates-picker/index.css +2 -2
- package/dist/components/dates-picker/index.scss +4 -4
- package/dist/components/dates-picker/src/index2.cjs +2 -1
- package/dist/components/dates-picker/src/index2.js +2 -1
- package/dist/components/dates2/index.css +9 -0
- package/dist/components/dates2/index.scss +3 -0
- package/dist/components/dates2/src/index2.cjs +6 -4
- package/dist/components/dates2/src/index2.js +6 -4
- package/dist/components/double/index.css +45 -10
- package/dist/components/double/index.scss +30 -17
- package/dist/components/double/src/data.cjs +24 -5
- package/dist/components/double/src/data.d.ts +23 -1
- package/dist/components/double/src/data.js +24 -5
- package/dist/components/double/src/index2.cjs +129 -64
- package/dist/components/double/src/index2.js +126 -61
- package/dist/components/double/style/index2.scss +1 -0
- package/dist/components/forms/common/config.cjs +3 -2
- package/dist/components/forms/common/config.js +3 -2
- package/dist/components/forms/index.css +74 -162
- package/dist/components/forms/src/util.cjs +30 -33
- package/dist/components/forms/src/util.js +29 -32
- package/dist/components/forms-item/index.css +3 -0
- package/dist/components/forms-item/index.scss +5 -0
- package/dist/components/forms-items/index.css +3 -0
- package/dist/components/input-history/index.css +3 -0
- package/dist/components/input-history/index.scss +3 -1
- package/dist/components/input-history/src/data.d.ts +1 -0
- package/dist/components/input-history/src/index2.cjs +23 -19
- package/dist/components/input-history/src/index2.js +15 -11
- package/dist/components/input-select/index.css +35 -7
- package/dist/components/input-select/index.scss +10 -7
- package/dist/components/input-select/src/index2.cjs +26 -19
- package/dist/components/input-select/src/index2.js +23 -16
- package/dist/components/input-select/style/index2.scss +2 -1
- package/dist/components/list/src/index2.cjs +5 -0
- package/dist/components/list/src/index2.js +6 -1
- package/dist/components/page/index.css +74 -162
- package/dist/components/scss/function.scss +3 -1
- package/dist/components/select-scroll/src/index2.cjs +1 -1
- package/dist/components/select-scroll/src/index2.js +2 -2
- package/dist/components/selector/index.css +50 -10
- package/dist/components/selector/index.scss +5 -0
- package/dist/components/selector/src/data.cjs +7 -3
- package/dist/components/selector/src/data.d.ts +8 -4
- package/dist/components/selector/src/data.js +7 -3
- package/dist/components/selector/src/index2.cjs +127 -91
- package/dist/components/selector/src/index2.js +124 -88
- package/dist/components/tables/common/pagin.d.ts +4 -4
- package/dist/components/tables/src/index2.cjs +9 -3
- package/dist/components/tables/src/index2.js +10 -4
- package/dist/components/tablesv/src/index2.cjs +9 -3
- package/dist/components/tablesv/src/index2.js +10 -4
- package/dist/css/cascaders.css +6 -0
- package/dist/css/dates-divide.css +6 -0
- package/dist/css/dates-picker.css +2 -2
- package/dist/css/dates2.css +9 -0
- package/dist/css/double.css +45 -10
- package/dist/css/forms-item.css +3 -0
- package/dist/css/forms-items.css +3 -0
- package/dist/css/forms.css +74 -162
- package/dist/css/index.css +227 -186
- package/dist/css/input-history.css +3 -0
- package/dist/css/input-select.css +35 -7
- package/dist/css/page.css +74 -162
- package/dist/css/selector.css +50 -10
- package/dist/icons/index.json +1 -1
- package/dist/index.css +227 -186
- package/dist/type.d.ts +2 -2
- package/package.json +5 -5
- /package/dist/components/{global-config → keep-com}/index.css +0 -0
- /package/dist/css/{global-config.css → keep-com.css} +0 -0
|
@@ -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$6 = require("../../icon/index.cjs");
|
|
5
5
|
const clear = require("../../../icons/vue/clear.cjs");
|
|
6
|
-
const index$
|
|
7
|
-
const index$
|
|
8
|
-
const index$
|
|
9
|
-
const index$
|
|
6
|
+
const index$4 = require("../../../hooks/expose/index.cjs");
|
|
7
|
+
const index$5 = require("../../popover/index.cjs");
|
|
8
|
+
const index$8 = require("../../button/index.cjs");
|
|
9
|
+
const index$7 = require("../../inputs/index.cjs");
|
|
10
10
|
const getCss = require("@fangzhongya/utils/css/getCss");
|
|
11
11
|
const util = require("./util.cjs");
|
|
12
12
|
const data = require("./data.cjs");
|
|
13
13
|
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
14
14
|
const index = require("../../../hooks/inherit/index.cjs");
|
|
15
15
|
const index$2 = require("../../../hooks/props-default/index.cjs");
|
|
16
|
+
require("../../form/index.cjs");
|
|
17
|
+
const index$3 = require("element-plus/es/components/form/index");
|
|
16
18
|
const replaceAfter = require("@fangzhongya/utils/basic/array/replaceAfter");
|
|
17
19
|
const deleteArray = require("@fangzhongya/utils/basic/array/deleteArray");
|
|
18
20
|
const _hoisted_1 = ["onClick"];
|
|
@@ -27,6 +29,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
27
29
|
const cs = index$1.useCssName(data.name);
|
|
28
30
|
const prs = __props;
|
|
29
31
|
const props = index$2.usePropsDefault(data.name, prs, data.dataProps);
|
|
32
|
+
const disabled = index$3.useDisabled();
|
|
30
33
|
const emit = __emit;
|
|
31
34
|
const visible = vue.ref(false);
|
|
32
35
|
const width = vue.ref(200);
|
|
@@ -71,10 +74,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
71
74
|
}
|
|
72
75
|
function setValue(item) {
|
|
73
76
|
value.value = item;
|
|
74
|
-
emit("update:modelValue");
|
|
75
77
|
}
|
|
76
78
|
function onClear(...arr) {
|
|
77
79
|
emit("clear", ...arr);
|
|
80
|
+
onChange();
|
|
78
81
|
visible.value = true;
|
|
79
82
|
}
|
|
80
83
|
function onChange() {
|
|
@@ -82,6 +85,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
82
85
|
if (v) {
|
|
83
86
|
options.value = replaceAfter.replaceAfter(options.value, v, "", true);
|
|
84
87
|
}
|
|
88
|
+
emit("update:modelValue", v);
|
|
85
89
|
emit("change", v);
|
|
86
90
|
}
|
|
87
91
|
function onClean(v) {
|
|
@@ -95,7 +99,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
95
99
|
setWidth();
|
|
96
100
|
});
|
|
97
101
|
__expose(
|
|
98
|
-
index$
|
|
102
|
+
index$4.useExpose(
|
|
99
103
|
{
|
|
100
104
|
...data.dataExpose
|
|
101
105
|
},
|
|
@@ -106,21 +110,21 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
106
110
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
107
111
|
class: [vue.unref(cs).z()]
|
|
108
112
|
}, vue.unref(attrs).root), [
|
|
109
|
-
vue.createVNode(vue.unref(index$
|
|
113
|
+
vue.createVNode(vue.unref(index$5.Popover), {
|
|
110
114
|
trigger: "click",
|
|
111
115
|
"popper-class": vue.unref(cs).z("popper"),
|
|
112
116
|
visible: visible.value,
|
|
113
|
-
disabled: vue.unref(
|
|
117
|
+
disabled: vue.unref(disabled) || vue.unref(options).length == 0,
|
|
114
118
|
width: width.value
|
|
115
119
|
}, {
|
|
116
120
|
reference: vue.withCtx(() => [
|
|
117
|
-
vue.createVNode(vue.unref(index$
|
|
121
|
+
vue.createVNode(vue.unref(index$7.Inputs), vue.mergeProps(vue.unref(attrs).assem, {
|
|
118
122
|
ref_key: "refInput",
|
|
119
123
|
ref: refInput,
|
|
120
124
|
modelValue: value.value,
|
|
121
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
122
|
-
|
|
123
|
-
disabled: vue.unref(
|
|
125
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
126
|
+
class: [vue.unref(cs).z("input")],
|
|
127
|
+
disabled: vue.unref(disabled),
|
|
124
128
|
onInput,
|
|
125
129
|
onFocus,
|
|
126
130
|
onBlur,
|
|
@@ -132,15 +136,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
132
136
|
)),
|
|
133
137
|
onClear
|
|
134
138
|
}), vue.createSlots({ _: 2 }, [
|
|
135
|
-
vue.renderList(Object.keys(vue.unref(slots)), (k
|
|
139
|
+
vue.renderList(Object.keys(vue.unref(slots)), (k) => {
|
|
136
140
|
return {
|
|
137
141
|
name: k,
|
|
138
|
-
fn: vue.withCtx(() => [
|
|
139
|
-
vue.renderSlot(_ctx.$slots, k)
|
|
142
|
+
fn: vue.withCtx((scope) => [
|
|
143
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
140
144
|
])
|
|
141
145
|
};
|
|
142
146
|
})
|
|
143
|
-
]), 1040, ["modelValue", "disabled"])
|
|
147
|
+
]), 1040, ["modelValue", "class", "disabled"])
|
|
144
148
|
]),
|
|
145
149
|
default: vue.withCtx(() => [
|
|
146
150
|
vue.unref(options).length > 0 ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -156,7 +160,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
156
160
|
onClick: vue.withModifiers(($event) => onClickSelect(item), ["stop"])
|
|
157
161
|
}, [
|
|
158
162
|
vue.createElementVNode("span", null, vue.toDisplayString(item), 1),
|
|
159
|
-
vue.unref(props).clean ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
163
|
+
vue.unref(props).clean ? (vue.openBlock(), vue.createBlock(vue.unref(index$6.Icon), {
|
|
160
164
|
key: 0,
|
|
161
165
|
class: vue.normalizeClass([vue.unref(cs).z("select-li-clean")]),
|
|
162
166
|
onClick: vue.withModifiers(($event) => onClean(item), ["stop"])
|
|
@@ -173,7 +177,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
173
177
|
]),
|
|
174
178
|
_: 3
|
|
175
179
|
}, 8, ["popper-class", "visible", "disabled", "width"]),
|
|
176
|
-
vue.unref(props).buts ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
180
|
+
vue.unref(props).buts ? (vue.openBlock(), vue.createBlock(vue.unref(index$8.Button), vue.mergeProps({
|
|
177
181
|
key: 0,
|
|
178
182
|
class: [vue.unref(cs).z("but"), vue.unref(props).buts.class]
|
|
179
183
|
}, vue.unref(props).buts, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useAttrs, useSlots, ref, watch, onMounted, createElementBlock, openBlock, mergeProps, unref, createVNode, createBlock, createCommentVNode, withCtx, normalizeClass, createElementVNode, Fragment, renderList, withModifiers, toDisplayString, withKeys, createSlots, renderSlot, createTextVNode } from "vue";
|
|
1
|
+
import { defineComponent, useAttrs, useSlots, ref, watch, onMounted, createElementBlock, openBlock, mergeProps, unref, createVNode, createBlock, createCommentVNode, withCtx, normalizeClass, createElementVNode, Fragment, renderList, withModifiers, toDisplayString, withKeys, createSlots, renderSlot, normalizeProps, guardReactiveProps, createTextVNode } from "vue";
|
|
2
2
|
import { Icon } from "../../icon/index.js";
|
|
3
3
|
import Clear from "../../../icons/vue/clear.js";
|
|
4
4
|
import { useExpose } from "../../../hooks/expose/index.js";
|
|
@@ -11,6 +11,8 @@ import { name, dataProps, dataExpose, dataEmits } from "./data.js";
|
|
|
11
11
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
12
12
|
import { useInherit } from "../../../hooks/inherit/index.js";
|
|
13
13
|
import { usePropsDefault, getProps } from "../../../hooks/props-default/index.js";
|
|
14
|
+
import "../../form/index.js";
|
|
15
|
+
import { useDisabled } from "element-plus/es/components/form/index";
|
|
14
16
|
import { replaceAfter } from "@fangzhongya/utils/basic/array/replaceAfter";
|
|
15
17
|
import { deleteArray } from "@fangzhongya/utils/basic/array/deleteArray";
|
|
16
18
|
const _hoisted_1 = ["onClick"];
|
|
@@ -25,6 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
27
|
const cs = useCssName(name);
|
|
26
28
|
const prs = __props;
|
|
27
29
|
const props = usePropsDefault(name, prs, dataProps);
|
|
30
|
+
const disabled = useDisabled();
|
|
28
31
|
const emit = __emit;
|
|
29
32
|
const visible = ref(false);
|
|
30
33
|
const width = ref(200);
|
|
@@ -69,10 +72,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
72
|
}
|
|
70
73
|
function setValue(item) {
|
|
71
74
|
value.value = item;
|
|
72
|
-
emit("update:modelValue");
|
|
73
75
|
}
|
|
74
76
|
function onClear(...arr) {
|
|
75
77
|
emit("clear", ...arr);
|
|
78
|
+
onChange();
|
|
76
79
|
visible.value = true;
|
|
77
80
|
}
|
|
78
81
|
function onChange() {
|
|
@@ -80,6 +83,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
83
|
if (v) {
|
|
81
84
|
options.value = replaceAfter(options.value, v, "", true);
|
|
82
85
|
}
|
|
86
|
+
emit("update:modelValue", v);
|
|
83
87
|
emit("change", v);
|
|
84
88
|
}
|
|
85
89
|
function onClean(v) {
|
|
@@ -108,17 +112,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
108
112
|
trigger: "click",
|
|
109
113
|
"popper-class": unref(cs).z("popper"),
|
|
110
114
|
visible: visible.value,
|
|
111
|
-
disabled: unref(
|
|
115
|
+
disabled: unref(disabled) || unref(options).length == 0,
|
|
112
116
|
width: width.value
|
|
113
117
|
}, {
|
|
114
118
|
reference: withCtx(() => [
|
|
115
|
-
createVNode(unref(Inputs), mergeProps({
|
|
119
|
+
createVNode(unref(Inputs), mergeProps(unref(attrs).assem, {
|
|
116
120
|
ref_key: "refInput",
|
|
117
121
|
ref: refInput,
|
|
118
122
|
modelValue: value.value,
|
|
119
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
120
|
-
|
|
121
|
-
disabled: unref(
|
|
123
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
124
|
+
class: [unref(cs).z("input")],
|
|
125
|
+
disabled: unref(disabled),
|
|
122
126
|
onInput,
|
|
123
127
|
onFocus,
|
|
124
128
|
onBlur,
|
|
@@ -130,15 +134,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
130
134
|
)),
|
|
131
135
|
onClear
|
|
132
136
|
}), createSlots({ _: 2 }, [
|
|
133
|
-
renderList(Object.keys(unref(slots)), (k
|
|
137
|
+
renderList(Object.keys(unref(slots)), (k) => {
|
|
134
138
|
return {
|
|
135
139
|
name: k,
|
|
136
|
-
fn: withCtx(() => [
|
|
137
|
-
renderSlot(_ctx.$slots, k)
|
|
140
|
+
fn: withCtx((scope) => [
|
|
141
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope || {})))
|
|
138
142
|
])
|
|
139
143
|
};
|
|
140
144
|
})
|
|
141
|
-
]), 1040, ["modelValue", "disabled"])
|
|
145
|
+
]), 1040, ["modelValue", "class", "disabled"])
|
|
142
146
|
]),
|
|
143
147
|
default: withCtx(() => [
|
|
144
148
|
unref(options).length > 0 ? (openBlock(), createElementBlock("div", {
|
|
@@ -22,6 +22,34 @@
|
|
|
22
22
|
line-height: var(--lable-array-height);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
.icon {
|
|
26
|
+
--color: inherit;
|
|
27
|
+
height: 1em;
|
|
28
|
+
width: 1em;
|
|
29
|
+
line-height: 1em;
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
align-items: center;
|
|
33
|
+
position: relative;
|
|
34
|
+
fill: currentColor;
|
|
35
|
+
color: var(--color);
|
|
36
|
+
font-size: inherit;
|
|
37
|
+
}
|
|
38
|
+
.icon-cont {
|
|
39
|
+
border: 0;
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
object-fit: contain;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
font-size: inherit !important;
|
|
45
|
+
width: inherit !important;
|
|
46
|
+
height: inherit !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.input-select {
|
|
50
|
+
height: 100%;
|
|
51
|
+
width: 100%;
|
|
52
|
+
}
|
|
25
53
|
.input-select-select-icon {
|
|
26
54
|
margin-left: 8px;
|
|
27
55
|
display: inline-flex;
|
|
@@ -35,13 +63,13 @@
|
|
|
35
63
|
.input-select-select-icon.is-reverse {
|
|
36
64
|
transform: rotate(-180deg);
|
|
37
65
|
}
|
|
38
|
-
.input-select-select-icon svg {
|
|
39
|
-
width: 1rem;
|
|
40
|
-
height: 1rem;
|
|
41
|
-
}
|
|
42
66
|
.input-select.is-disabled .input-select-select-icon {
|
|
43
67
|
cursor: not-allowed;
|
|
44
68
|
}
|
|
69
|
+
.input-select-input {
|
|
70
|
+
height: 100%;
|
|
71
|
+
width: 100%;
|
|
72
|
+
}
|
|
45
73
|
.input-select-popper {
|
|
46
74
|
padding: 6px 0 !important;
|
|
47
75
|
}
|
|
@@ -69,11 +97,11 @@
|
|
|
69
97
|
cursor: pointer;
|
|
70
98
|
}
|
|
71
99
|
.input-select-popper .input-select-select .input-select-select-li.hover, .input-select-popper .input-select-select .input-select-select-li:hover {
|
|
72
|
-
background-color:
|
|
100
|
+
background-color: var(--el-fill-color-light);
|
|
73
101
|
}
|
|
74
102
|
.input-select-popper .input-select-select .input-select-select-li.selected {
|
|
75
|
-
color: var(--
|
|
76
|
-
font-weight:
|
|
103
|
+
color: var(--el-color-primary);
|
|
104
|
+
font-weight: bold;
|
|
77
105
|
}
|
|
78
106
|
.input-select-popper .input-select-select .input-select-select-li.is-disabled {
|
|
79
107
|
background-color: #ffffff;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
@use '../scss/common.scss' as *;
|
|
2
|
+
@use '../icon/index.scss' as *;
|
|
2
3
|
|
|
3
4
|
$input-select: 'input-select';
|
|
4
5
|
@include b($input-select) {
|
|
6
|
+
height: 100%;
|
|
7
|
+
width: 100%;
|
|
5
8
|
&-select-icon {
|
|
6
9
|
margin-left: 8px;
|
|
7
10
|
display: inline-flex;
|
|
@@ -14,16 +17,16 @@ $input-select: 'input-select';
|
|
|
14
17
|
&.is-reverse {
|
|
15
18
|
transform: rotate(-180deg);
|
|
16
19
|
}
|
|
17
|
-
svg {
|
|
18
|
-
width: 1rem;
|
|
19
|
-
height: 1rem;
|
|
20
|
-
}
|
|
21
20
|
}
|
|
22
21
|
&.is-disabled {
|
|
23
22
|
.#{$input-select}-select-icon {
|
|
24
23
|
cursor: not-allowed;
|
|
25
24
|
}
|
|
26
25
|
}
|
|
26
|
+
&-input {
|
|
27
|
+
height: 100%;
|
|
28
|
+
width: 100%;
|
|
29
|
+
}
|
|
27
30
|
&-popper {
|
|
28
31
|
padding: 6px 0 !important;
|
|
29
32
|
.#{$input-select}-select {
|
|
@@ -49,11 +52,11 @@ $input-select: 'input-select';
|
|
|
49
52
|
cursor: pointer;
|
|
50
53
|
&.hover,
|
|
51
54
|
&:hover {
|
|
52
|
-
background-color:
|
|
55
|
+
background-color: var(ve('fill-color-light'));
|
|
53
56
|
}
|
|
54
57
|
&.selected {
|
|
55
|
-
color: var(
|
|
56
|
-
font-weight:
|
|
58
|
+
color: var(#{ve('color-primary')});
|
|
59
|
+
font-weight: bold;
|
|
57
60
|
}
|
|
58
61
|
&.is-disabled {
|
|
59
62
|
background-color: #ffffff;
|
|
@@ -1,17 +1,19 @@
|
|
|
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$6 = require("../../icon/index.cjs");
|
|
5
5
|
const clear = require("../../../icons/vue/clear.cjs");
|
|
6
6
|
const below = require("../../../icons/vue/below.cjs");
|
|
7
7
|
const data = require("./data.cjs");
|
|
8
|
-
const index$
|
|
9
|
-
const index$
|
|
8
|
+
const index$5 = require("../../inputs/index.cjs");
|
|
9
|
+
const index$4 = require("../../popover/index.cjs");
|
|
10
10
|
const index = require("../../../hooks/inherit/index.cjs");
|
|
11
11
|
const use = require("../../common/use.cjs");
|
|
12
12
|
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
13
13
|
const getCss = require("@fangzhongya/utils/css/getCss");
|
|
14
|
+
require("../../form/index.cjs");
|
|
14
15
|
const index$2 = require("../../../hooks/props-default/index.cjs");
|
|
16
|
+
const index$3 = require("element-plus/es/components/form/index");
|
|
15
17
|
const _hoisted_1 = ["onClick"];
|
|
16
18
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
19
|
...{ inheritAttrs: false },
|
|
@@ -25,6 +27,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
27
|
const prs = __props;
|
|
26
28
|
const props = index$2.usePropsDefault(data.name, prs, data.dataProps);
|
|
27
29
|
const emit = __emit;
|
|
30
|
+
const disabled = index$3.useDisabled();
|
|
28
31
|
const visible = vue.ref(false);
|
|
29
32
|
const width = vue.ref(200);
|
|
30
33
|
const refInput = vue.ref();
|
|
@@ -118,24 +121,25 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
118
121
|
...data.dataExpose
|
|
119
122
|
});
|
|
120
123
|
return (_ctx, _cache) => {
|
|
121
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
124
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$4.Popover), {
|
|
122
125
|
trigger: "click",
|
|
123
126
|
"popper-class": vue.unref(cs).z("popper"),
|
|
124
127
|
visible: visible.value,
|
|
125
|
-
disabled: vue.unref(
|
|
128
|
+
disabled: vue.unref(disabled) || !(options.value && options.value.length > 0),
|
|
126
129
|
width: width.value
|
|
127
130
|
}, {
|
|
128
131
|
reference: vue.withCtx(() => [
|
|
129
132
|
vue.createElementVNode("div", vue.mergeProps({
|
|
130
|
-
class: [vue.unref(cs).z(), vue.unref(cs).is("disabled", vue.unref(
|
|
133
|
+
class: [vue.unref(cs).z(), vue.unref(cs).is("disabled", vue.unref(disabled))]
|
|
131
134
|
}, vue.unref(attrs).root, { onClick }), [
|
|
132
|
-
vue.createVNode(vue.unref(index$
|
|
135
|
+
vue.createVNode(vue.unref(index$5.Inputs), vue.mergeProps({
|
|
133
136
|
ref_key: "refInput",
|
|
134
137
|
ref: refInput,
|
|
135
138
|
modelValue: value.value,
|
|
136
139
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
137
140
|
}, vue.unref(attrs).assem, {
|
|
138
|
-
|
|
141
|
+
class: vue.unref(cs).z("input"),
|
|
142
|
+
disabled: vue.unref(disabled),
|
|
139
143
|
readonly: vue.unref(props).readonly,
|
|
140
144
|
onInput,
|
|
141
145
|
onFocus,
|
|
@@ -143,7 +147,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
143
147
|
clearable: false
|
|
144
148
|
}), vue.createSlots({
|
|
145
149
|
suffix: vue.withCtx(() => [
|
|
146
|
-
isclear.value ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
150
|
+
isclear.value ? (vue.openBlock(), vue.createBlock(vue.unref(index$6.Icon), {
|
|
147
151
|
key: 0,
|
|
148
152
|
class: vue.normalizeClass([vue.unref(cs).z("select-icon"), "clear"]),
|
|
149
153
|
onClick: vue.withModifiers(onClear, ["stop"])
|
|
@@ -154,28 +158,31 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
154
158
|
_: 1
|
|
155
159
|
}, 8, ["class"])) : vue.createCommentVNode("", true),
|
|
156
160
|
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).suffix),
|
|
157
|
-
vue.
|
|
161
|
+
vue.createVNode(vue.unref(index$6.Icon), {
|
|
158
162
|
class: vue.normalizeClass([
|
|
159
163
|
vue.unref(cs).z("select-icon"),
|
|
160
164
|
vue.unref(cs).is("reverse", visible.value)
|
|
161
165
|
])
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
vue.
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
}, {
|
|
167
|
+
default: vue.withCtx(() => [
|
|
168
|
+
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).iconSelect, {}, () => [
|
|
169
|
+
vue.createVNode(below.default)
|
|
170
|
+
])
|
|
171
|
+
]),
|
|
172
|
+
_: 3
|
|
173
|
+
}, 8, ["class"])
|
|
167
174
|
]),
|
|
168
175
|
_: 2
|
|
169
176
|
}, [
|
|
170
|
-
vue.renderList(Object.keys(vue.unref(slots)), (k
|
|
177
|
+
vue.renderList(Object.keys(vue.unref(slots)), (k) => {
|
|
171
178
|
return {
|
|
172
179
|
name: k,
|
|
173
|
-
fn: vue.withCtx(() => [
|
|
174
|
-
vue.renderSlot(_ctx.$slots, k)
|
|
180
|
+
fn: vue.withCtx((scope) => [
|
|
181
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
175
182
|
])
|
|
176
183
|
};
|
|
177
184
|
})
|
|
178
|
-
]), 1040, ["modelValue", "disabled", "readonly"])
|
|
185
|
+
]), 1040, ["modelValue", "class", "disabled", "readonly"])
|
|
179
186
|
], 16)
|
|
180
187
|
]),
|
|
181
188
|
default: vue.withCtx(() => [
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { defineComponent, useAttrs, useSlots, ref, computed, onMounted, createBlock, openBlock, unref, withCtx, createElementVNode, normalizeClass, createElementBlock, Fragment, renderList, withModifiers, toDisplayString, mergeProps, createVNode, createSlots, createCommentVNode, renderSlot } from "vue";
|
|
1
|
+
import { defineComponent, useAttrs, useSlots, ref, computed, onMounted, createBlock, openBlock, unref, withCtx, createElementVNode, normalizeClass, createElementBlock, Fragment, renderList, withModifiers, toDisplayString, mergeProps, createVNode, createSlots, createCommentVNode, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
2
2
|
import { Icon } from "../../icon/index.js";
|
|
3
3
|
import Clear from "../../../icons/vue/clear.js";
|
|
4
4
|
import Below from "../../../icons/vue/below.js";
|
|
5
5
|
import { name, dataProps, dataExpose, dataSlot, dataEmits } from "./data.js";
|
|
6
|
-
import {
|
|
6
|
+
import { Inputs } from "../../inputs/index.js";
|
|
7
7
|
import { Popover } from "../../popover/index.js";
|
|
8
8
|
import { useInherit } from "../../../hooks/inherit/index.js";
|
|
9
9
|
import { useVueValue } from "../../common/use.js";
|
|
10
10
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
11
11
|
import { getCss } from "@fangzhongya/utils/css/getCss";
|
|
12
|
+
import "../../form/index.js";
|
|
12
13
|
import { usePropsDefault, getProps } from "../../../hooks/props-default/index.js";
|
|
14
|
+
import { useDisabled } from "element-plus/es/components/form/index";
|
|
13
15
|
const _hoisted_1 = ["onClick"];
|
|
14
16
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
17
|
...{ inheritAttrs: false },
|
|
@@ -23,6 +25,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
25
|
const prs = __props;
|
|
24
26
|
const props = usePropsDefault(name, prs, dataProps);
|
|
25
27
|
const emit = __emit;
|
|
28
|
+
const disabled = useDisabled();
|
|
26
29
|
const visible = ref(false);
|
|
27
30
|
const width = ref(200);
|
|
28
31
|
const refInput = ref();
|
|
@@ -120,20 +123,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
120
123
|
trigger: "click",
|
|
121
124
|
"popper-class": unref(cs).z("popper"),
|
|
122
125
|
visible: visible.value,
|
|
123
|
-
disabled: unref(
|
|
126
|
+
disabled: unref(disabled) || !(options.value && options.value.length > 0),
|
|
124
127
|
width: width.value
|
|
125
128
|
}, {
|
|
126
129
|
reference: withCtx(() => [
|
|
127
130
|
createElementVNode("div", mergeProps({
|
|
128
|
-
class: [unref(cs).z(), unref(cs).is("disabled", unref(
|
|
131
|
+
class: [unref(cs).z(), unref(cs).is("disabled", unref(disabled))]
|
|
129
132
|
}, unref(attrs).root, { onClick }), [
|
|
130
|
-
createVNode(unref(
|
|
133
|
+
createVNode(unref(Inputs), mergeProps({
|
|
131
134
|
ref_key: "refInput",
|
|
132
135
|
ref: refInput,
|
|
133
136
|
modelValue: value.value,
|
|
134
137
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
135
138
|
}, unref(attrs).assem, {
|
|
136
|
-
|
|
139
|
+
class: unref(cs).z("input"),
|
|
140
|
+
disabled: unref(disabled),
|
|
137
141
|
readonly: unref(props).readonly,
|
|
138
142
|
onInput,
|
|
139
143
|
onFocus,
|
|
@@ -152,28 +156,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
152
156
|
_: 1
|
|
153
157
|
}, 8, ["class"])) : createCommentVNode("", true),
|
|
154
158
|
renderSlot(_ctx.$slots, unref(dataSlot).suffix),
|
|
155
|
-
|
|
159
|
+
createVNode(unref(Icon), {
|
|
156
160
|
class: normalizeClass([
|
|
157
161
|
unref(cs).z("select-icon"),
|
|
158
162
|
unref(cs).is("reverse", visible.value)
|
|
159
163
|
])
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
164
|
+
}, {
|
|
165
|
+
default: withCtx(() => [
|
|
166
|
+
renderSlot(_ctx.$slots, unref(dataSlot).iconSelect, {}, () => [
|
|
167
|
+
createVNode(Below)
|
|
168
|
+
])
|
|
169
|
+
]),
|
|
170
|
+
_: 3
|
|
171
|
+
}, 8, ["class"])
|
|
165
172
|
]),
|
|
166
173
|
_: 2
|
|
167
174
|
}, [
|
|
168
|
-
renderList(Object.keys(unref(slots)), (k
|
|
175
|
+
renderList(Object.keys(unref(slots)), (k) => {
|
|
169
176
|
return {
|
|
170
177
|
name: k,
|
|
171
|
-
fn: withCtx(() => [
|
|
172
|
-
renderSlot(_ctx.$slots, k)
|
|
178
|
+
fn: withCtx((scope) => [
|
|
179
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope || {})))
|
|
173
180
|
])
|
|
174
181
|
};
|
|
175
182
|
})
|
|
176
|
-
]), 1040, ["modelValue", "disabled", "readonly"])
|
|
183
|
+
]), 1040, ["modelValue", "class", "disabled", "readonly"])
|
|
177
184
|
], 16)
|
|
178
185
|
]),
|
|
179
186
|
default: withCtx(() => [
|
|
@@ -428,6 +428,11 @@ const _sfc_main = vue.defineComponent({
|
|
|
428
428
|
globalThis.addEventListener("click", onClickTotal);
|
|
429
429
|
}
|
|
430
430
|
});
|
|
431
|
+
vue.onUnmounted(() => {
|
|
432
|
+
if (globalThis) {
|
|
433
|
+
globalThis.removeEventListener("click", onClickTotal);
|
|
434
|
+
}
|
|
435
|
+
});
|
|
431
436
|
return {
|
|
432
437
|
renderValue,
|
|
433
438
|
borderColor
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, shallowRef, computed, h, onMounted } from "vue";
|
|
1
|
+
import { defineComponent, ref, shallowRef, computed, h, onMounted, onUnmounted } from "vue";
|
|
2
2
|
import { setLabel, setSslot } from "./util.js";
|
|
3
3
|
import { setStyles } from "../../common/css.js";
|
|
4
4
|
import { getAttrValue } from "../../../utils/vues/getAttrValue.js";
|
|
@@ -426,6 +426,11 @@ const _sfc_main = defineComponent({
|
|
|
426
426
|
globalThis.addEventListener("click", onClickTotal);
|
|
427
427
|
}
|
|
428
428
|
});
|
|
429
|
+
onUnmounted(() => {
|
|
430
|
+
if (globalThis) {
|
|
431
|
+
globalThis.removeEventListener("click", onClickTotal);
|
|
432
|
+
}
|
|
433
|
+
});
|
|
429
434
|
return {
|
|
430
435
|
renderValue,
|
|
431
436
|
borderColor
|