v-nuxt-ui 0.2.10 → 0.2.12
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/module.json +1 -1
- package/dist/runtime/components/AsyncSelect.vue +14 -14
- package/dist/runtime/components/flow/FlowEditor.client.vue +20 -16
- package/dist/runtime/components/simple-table/index.d.vue.ts +1 -1
- package/dist/runtime/components/simple-table/index.vue.d.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/opr/index.vue +1 -8
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -40,13 +40,13 @@ const allModels = computed(() => {
|
|
|
40
40
|
[props.labelField]: "\u65E0"
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
newSearchedModel.push(searchedItem);
|
|
43
|
+
currentSelectedModels.value.forEach((currentModel) => {
|
|
44
|
+
const existInSearched = searchedModel.value.some((searched) => searched[props.valueField] === currentModel[props.valueField]);
|
|
45
|
+
if (!existInSearched) {
|
|
46
|
+
newSearchedModel.unshift(currentModel);
|
|
48
47
|
}
|
|
49
48
|
});
|
|
49
|
+
newSearchedModel.push(...searchedModel.value);
|
|
50
50
|
return newSearchedModel;
|
|
51
51
|
});
|
|
52
52
|
const items = computed(() => {
|
|
@@ -117,11 +117,14 @@ const onSelect = (values) => {
|
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
|
+
const dropdownOpen = ref(false);
|
|
120
121
|
const searchTerm = ref("");
|
|
121
122
|
const onDebounceFetchItems = useDebounceFn(onFetchItems, 512);
|
|
122
123
|
watch(searchTerm, (newVal) => {
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
if (dropdownOpen.value) {
|
|
125
|
+
onDebounceFetchItems(newVal);
|
|
126
|
+
}
|
|
127
|
+
}, { immediate: true });
|
|
125
128
|
const inputMenuRef = useTemplateRef("inputMenu");
|
|
126
129
|
defineExpose({
|
|
127
130
|
focus: () => {
|
|
@@ -133,8 +136,9 @@ defineExpose({
|
|
|
133
136
|
<template>
|
|
134
137
|
<UInputMenu
|
|
135
138
|
ref="inputMenu"
|
|
139
|
+
v-model:open="dropdownOpen"
|
|
140
|
+
v-model:search-term="searchTerm"
|
|
136
141
|
:model-value="modelValue.values"
|
|
137
|
-
:search-term="searchTerm"
|
|
138
142
|
:items="items"
|
|
139
143
|
:multiple="multiple"
|
|
140
144
|
:size="size"
|
|
@@ -143,7 +147,6 @@ defineExpose({
|
|
|
143
147
|
position: 'top',
|
|
144
148
|
when: 'always'
|
|
145
149
|
}"
|
|
146
|
-
:reset-search-term-on-select="false"
|
|
147
150
|
color="neutral"
|
|
148
151
|
delete-icon="i-lucide-trash"
|
|
149
152
|
value-key="value"
|
|
@@ -154,6 +157,7 @@ defineExpose({
|
|
|
154
157
|
:disabled="disabled"
|
|
155
158
|
open-on-focus
|
|
156
159
|
trailing
|
|
160
|
+
ignore-filter
|
|
157
161
|
:ui="{
|
|
158
162
|
root: 'min-w-32',
|
|
159
163
|
base: 'peer',
|
|
@@ -168,11 +172,7 @@ defineExpose({
|
|
|
168
172
|
onFetchItems(searchTerm);
|
|
169
173
|
}
|
|
170
174
|
}"
|
|
171
|
-
@update:model-value="
|
|
172
|
-
console.log(newValues);
|
|
173
|
-
onSelect(newValues);
|
|
174
|
-
inputMenuRef?.inputRef.focus();
|
|
175
|
-
}"
|
|
175
|
+
@update:model-value="onSelect"
|
|
176
176
|
@create="onCreateNew"
|
|
177
177
|
/>
|
|
178
178
|
</template>
|
|
@@ -75,7 +75,7 @@ const {
|
|
|
75
75
|
effectiveNodeHandleColor,
|
|
76
76
|
effectiveEdgeColor
|
|
77
77
|
} = useFlowStyles();
|
|
78
|
-
const { onConnect, onNodeDragStop, onEdgeUpdate, getSelectedNodes, getSelectedEdges, getViewport, fitView: vueFlowFitView } = useVueFlow();
|
|
78
|
+
const { onConnect, onNodeDragStop, onEdgeUpdate, getSelectedNodes, getSelectedEdges, getViewport, fitView: vueFlowFitView, onNodesInitialized } = useVueFlow();
|
|
79
79
|
const handleResizeEnd = async (nodeId, dimensions) => {
|
|
80
80
|
await updateNodeDimensions(nodeId, dimensions);
|
|
81
81
|
};
|
|
@@ -172,9 +172,6 @@ onMounted(() => {
|
|
|
172
172
|
document.addEventListener("keydown", handleKeyDown, true);
|
|
173
173
|
window.addEventListener("mousemove", handleGlobalMouseMove);
|
|
174
174
|
window.addEventListener("mouseup", handleMouseUp);
|
|
175
|
-
if (props.fitView) {
|
|
176
|
-
setTimeout(() => vueFlowFitView({ padding: props.fitViewPadding }), 100);
|
|
177
|
-
}
|
|
178
175
|
onBeforeUnmount(() => {
|
|
179
176
|
document.removeEventListener("keydown", handleKeyDown, true);
|
|
180
177
|
window.removeEventListener("mousemove", handleGlobalMouseMove);
|
|
@@ -224,23 +221,30 @@ const flowContainer = ref(null);
|
|
|
224
221
|
let resizeObserver = null;
|
|
225
222
|
let prevWidth = 0;
|
|
226
223
|
onMounted(() => {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
prevWidth
|
|
236
|
-
|
|
237
|
-
|
|
224
|
+
onNodesInitialized(() => {
|
|
225
|
+
const el = flowContainer.value?.$el ?? flowContainer.value;
|
|
226
|
+
if (!el) return;
|
|
227
|
+
prevWidth = el.clientWidth;
|
|
228
|
+
resizeObserver = new ResizeObserver((entries) => {
|
|
229
|
+
const entry = entries[0];
|
|
230
|
+
if (!entry) return;
|
|
231
|
+
const newWidth = entry.contentRect.width;
|
|
232
|
+
if (newWidth !== prevWidth) {
|
|
233
|
+
prevWidth = newWidth;
|
|
234
|
+
nextTick(() => vueFlowFitView({ padding: props.fitViewPadding }));
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
resizeObserver.observe(el);
|
|
238
238
|
});
|
|
239
|
-
resizeObserver.observe(el);
|
|
240
239
|
});
|
|
241
240
|
onBeforeUnmount(() => {
|
|
242
241
|
resizeObserver?.disconnect();
|
|
243
242
|
});
|
|
243
|
+
onNodesInitialized(() => {
|
|
244
|
+
if (props.fitView) {
|
|
245
|
+
vueFlowFitView({ padding: props.fitViewPadding });
|
|
246
|
+
}
|
|
247
|
+
});
|
|
244
248
|
const isValidConnection = () => true;
|
|
245
249
|
</script>
|
|
246
250
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { VTableProps } from '#v/types';
|
|
2
2
|
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<Pick<VTableProps<T>, "bizColumns" | "
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<Pick<VTableProps<T>, "bizColumns" | "singleColumn" | "hideLastRowBorder" | "singleRow"> & {
|
|
4
4
|
data: T[];
|
|
5
5
|
}> & (typeof globalThis extends {
|
|
6
6
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { VTableProps } from '#v/types';
|
|
2
2
|
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<Pick<VTableProps<T>, "bizColumns" | "
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<Pick<VTableProps<T>, "bizColumns" | "singleColumn" | "hideLastRowBorder" | "singleRow"> & {
|
|
4
4
|
data: T[];
|
|
5
5
|
}> & (typeof globalThis extends {
|
|
6
6
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -62,13 +62,6 @@ defineExpose({
|
|
|
62
62
|
v-model:where-query-item="whereQueryItem"
|
|
63
63
|
:disabled="fetching"
|
|
64
64
|
:trigger-fetching="triggerFetching"
|
|
65
|
-
|
|
66
|
-
:list-api="option.listApi"
|
|
67
|
-
:search-fields="option.searchFields"
|
|
68
|
-
:label-render-fn="option.labelRenderFn"
|
|
69
|
-
:label-field="option.labelField"
|
|
70
|
-
:value-field="option.valueField"
|
|
71
|
-
:multiple="option.multiple"
|
|
72
|
-
:placeholder="option.placeholder"
|
|
65
|
+
v-bind="option"
|
|
73
66
|
/>
|
|
74
67
|
</template>
|
package/package.json
CHANGED