@funcho/ui 1.1.23 → 1.1.24
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.
|
@@ -111,8 +111,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
111
111
|
const formRef = vue.ref();
|
|
112
112
|
const { height: formHeight } = core.useElementSize(formRef);
|
|
113
113
|
const hasMoreContent = vue.computed(() => {
|
|
114
|
-
return
|
|
114
|
+
return formRows.value > 1;
|
|
115
115
|
});
|
|
116
|
+
const getGridRowCount = (container) => {
|
|
117
|
+
if (!container) return { count: 0, height: 0 };
|
|
118
|
+
const style = window.getComputedStyle(container);
|
|
119
|
+
const rows = style.getPropertyValue("grid-template-rows");
|
|
120
|
+
if (!rows || rows === "none") return { count: 0, height: 0 };
|
|
121
|
+
const rowHeights = rows.split(/\s+/).filter(Boolean);
|
|
122
|
+
const rowCount = rowHeights.length;
|
|
123
|
+
return {
|
|
124
|
+
count: rowCount,
|
|
125
|
+
height: rowCount > 0 ? parseFloat(rowHeights[0] || "0") : 0
|
|
126
|
+
};
|
|
127
|
+
};
|
|
116
128
|
const isExpanded = vue.ref(false);
|
|
117
129
|
const props = __props;
|
|
118
130
|
const renderTools = (tools) => {
|
|
@@ -167,6 +179,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
167
179
|
const handleSearchClick = () => {
|
|
168
180
|
emits("search", formRef.value?.model || {});
|
|
169
181
|
};
|
|
182
|
+
const formRows = vue.ref(0);
|
|
183
|
+
const formFirstRowHeight = vue.ref(0);
|
|
184
|
+
core.useResizeObserver(formRef, () => {
|
|
185
|
+
if (formRef.value) {
|
|
186
|
+
const { count, height } = getGridRowCount(formRef.value.$el);
|
|
187
|
+
formRows.value = count;
|
|
188
|
+
formFirstRowHeight.value = height;
|
|
189
|
+
}
|
|
190
|
+
});
|
|
170
191
|
__expose(
|
|
171
192
|
new Proxy(
|
|
172
193
|
{},
|
|
@@ -186,7 +207,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
186
207
|
ref_key: "queryBoxRef",
|
|
187
208
|
ref: queryBoxRef,
|
|
188
209
|
class: vue.normalizeClass({ [vue.unref(ns).e("query-box")]: true, [vue.unref(ns).is("expanded")]: isExpanded.value }),
|
|
189
|
-
style: vue.normalizeStyle({
|
|
210
|
+
style: vue.normalizeStyle({
|
|
211
|
+
"--query-box-max-height": vue.unref(formHeight) + 16 + "px",
|
|
212
|
+
"--query-box-first-row-height": formFirstRowHeight.value + 16 + "px"
|
|
213
|
+
})
|
|
190
214
|
}, [
|
|
191
215
|
vue.createVNode(ProForm_vue_vue_type_script_setup_true_lang.default, {
|
|
192
216
|
ref_key: "formRef",
|
|
@@ -79,7 +79,7 @@ import '../../components/LovText/index.mjs';
|
|
|
79
79
|
import '../../components/DotStatus/index.mjs';
|
|
80
80
|
import _sfc_main$1 from '../ProForm/ProForm.vue.mjs';
|
|
81
81
|
/* empty css */
|
|
82
|
-
import { useElementSize } from '@vueuse/core';
|
|
82
|
+
import { useElementSize, useResizeObserver } from '@vueuse/core';
|
|
83
83
|
import _sfc_main$2 from '../../components/VNodeRenderer/index.vue.mjs';
|
|
84
84
|
|
|
85
85
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -107,8 +107,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
107
107
|
const formRef = ref();
|
|
108
108
|
const { height: formHeight } = useElementSize(formRef);
|
|
109
109
|
const hasMoreContent = computed(() => {
|
|
110
|
-
return
|
|
110
|
+
return formRows.value > 1;
|
|
111
111
|
});
|
|
112
|
+
const getGridRowCount = (container) => {
|
|
113
|
+
if (!container) return { count: 0, height: 0 };
|
|
114
|
+
const style = window.getComputedStyle(container);
|
|
115
|
+
const rows = style.getPropertyValue("grid-template-rows");
|
|
116
|
+
if (!rows || rows === "none") return { count: 0, height: 0 };
|
|
117
|
+
const rowHeights = rows.split(/\s+/).filter(Boolean);
|
|
118
|
+
const rowCount = rowHeights.length;
|
|
119
|
+
return {
|
|
120
|
+
count: rowCount,
|
|
121
|
+
height: rowCount > 0 ? parseFloat(rowHeights[0] || "0") : 0
|
|
122
|
+
};
|
|
123
|
+
};
|
|
112
124
|
const isExpanded = ref(false);
|
|
113
125
|
const props = __props;
|
|
114
126
|
const renderTools = (tools) => {
|
|
@@ -163,6 +175,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
163
175
|
const handleSearchClick = () => {
|
|
164
176
|
emits("search", formRef.value?.model || {});
|
|
165
177
|
};
|
|
178
|
+
const formRows = ref(0);
|
|
179
|
+
const formFirstRowHeight = ref(0);
|
|
180
|
+
useResizeObserver(formRef, () => {
|
|
181
|
+
if (formRef.value) {
|
|
182
|
+
const { count, height } = getGridRowCount(formRef.value.$el);
|
|
183
|
+
formRows.value = count;
|
|
184
|
+
formFirstRowHeight.value = height;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
166
187
|
__expose(
|
|
167
188
|
new Proxy(
|
|
168
189
|
{},
|
|
@@ -182,7 +203,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
182
203
|
ref_key: "queryBoxRef",
|
|
183
204
|
ref: queryBoxRef,
|
|
184
205
|
class: normalizeClass({ [unref(ns).e("query-box")]: true, [unref(ns).is("expanded")]: isExpanded.value }),
|
|
185
|
-
style: normalizeStyle({
|
|
206
|
+
style: normalizeStyle({
|
|
207
|
+
"--query-box-max-height": unref(formHeight) + 16 + "px",
|
|
208
|
+
"--query-box-first-row-height": formFirstRowHeight.value + 16 + "px"
|
|
209
|
+
})
|
|
186
210
|
}, [
|
|
187
211
|
createVNode(_sfc_main$1, {
|
|
188
212
|
ref_key: "formRef",
|
package/dist/style.css
CHANGED
|
@@ -17078,6 +17078,7 @@ to {
|
|
|
17078
17078
|
display: grid;
|
|
17079
17079
|
grid-template-columns: repeat(var(--grid-columns, auto-fill), minmax(220px, 1fr));
|
|
17080
17080
|
column-gap: 24px;
|
|
17081
|
+
align-items: start;
|
|
17081
17082
|
}
|
|
17082
17083
|
.fc-mkui-pro-form__container.is-inline .fc-ui-form-item {
|
|
17083
17084
|
margin-right: 0;
|
|
@@ -17098,7 +17099,7 @@ to {
|
|
|
17098
17099
|
border-radius: 2px;
|
|
17099
17100
|
margin-bottom: 8px;
|
|
17100
17101
|
padding: 8px;
|
|
17101
|
-
max-height:
|
|
17102
|
+
max-height: var(--query-box-first-row-height);
|
|
17102
17103
|
overflow: hidden;
|
|
17103
17104
|
transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1);
|
|
17104
17105
|
}
|
|
@@ -17110,17 +17111,11 @@ to {
|
|
|
17110
17111
|
display: grid;
|
|
17111
17112
|
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
|
17112
17113
|
gap: 8px 24px;
|
|
17114
|
+
align-items: start;
|
|
17113
17115
|
}
|
|
17114
17116
|
.fc-mkui-query-form__query-form .fc-ui-form-item {
|
|
17115
17117
|
margin: 0;
|
|
17116
17118
|
}
|
|
17117
|
-
.fc-mkui-query-form__query-form .fc-ui-form-item .fc-ui-cascader .fc-ui-cascader__tags {
|
|
17118
|
-
display: inline-flex;
|
|
17119
|
-
flex-wrap: nowrap;
|
|
17120
|
-
}
|
|
17121
|
-
.fc-mkui-query-form__query-form .fc-ui-form-item .fc-ui-cascader .fc-ui-cascader__tags .fc-ui-tag {
|
|
17122
|
-
max-width: calc(100% - 109px);
|
|
17123
|
-
}
|
|
17124
17119
|
.fc-mkui-query-form__tools {
|
|
17125
17120
|
margin-top: auto;
|
|
17126
17121
|
flex-shrink: 0;
|