@tmagic/form 1.2.5 → 1.2.6
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/tmagic-form.js +30 -19
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +29 -18
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/fields/Select.vue +29 -19
package/dist/tmagic-form.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toRaw, defineComponent, inject, ref, computed, resolveComponent, watchEffect, openBlock, createElementBlock, normalizeStyle, normalizeClass, unref, createBlock, resolveDynamicComponent, Fragment, createVNode, withCtx, createElementVNode, createCommentVNode, renderList, createTextVNode, toDisplayString, watch, withDirectives, vShow, renderSlot, onMounted, toRefs, getCurrentInstance, reactive, onBeforeUnmount, vModelText, provide, onBeforeMount,
|
|
1
|
+
import { toRaw, defineComponent, inject, ref, computed, resolveComponent, watchEffect, openBlock, createElementBlock, normalizeStyle, normalizeClass, unref, createBlock, resolveDynamicComponent, Fragment, createVNode, withCtx, createElementVNode, createCommentVNode, renderList, createTextVNode, toDisplayString, watch, withDirectives, vShow, renderSlot, onMounted, toRefs, getCurrentInstance, reactive, onBeforeUnmount, vModelText, provide, onBeforeMount, resolveDirective, createSlots, withModifiers } from 'vue';
|
|
2
2
|
import { WarningFilled, CaretBottom, CaretRight, Delete, CaretTop, Grid, ArrowUp, ArrowDown, FullScreen } from '@element-plus/icons-vue';
|
|
3
3
|
import { TMagicFormItem, TMagicTooltip, TMagicIcon, TMagicButton, TMagicCheckbox, TMagicCard, TMagicCol, TMagicRow, TMagicSteps, TMagicStep, TMagicTable, TMagicTableColumn, TMagicUpload, TMagicPagination, tMagicMessage, getConfig as getConfig$1, TMagicTabs, TMagicCascader, TMagicCheckboxGroup, TMagicColorPicker, TMagicDatePicker, TMagicForm, TMagicInput, TMagicDialog, TMagicInputNumber, TMagicRadioGroup, TMagicRadio, TMagicOptionGroup, TMagicOption, TMagicSelect, TMagicSwitch, TMagicTimePicker } from '@tmagic/design';
|
|
4
4
|
import { cloneDeep } from 'lodash-es';
|
|
@@ -3311,25 +3311,36 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3311
3311
|
}
|
|
3312
3312
|
});
|
|
3313
3313
|
}
|
|
3314
|
-
props.config.remote
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3314
|
+
if (props.config.remote) {
|
|
3315
|
+
const unWacth = watch(
|
|
3316
|
+
() => tMagicSelect.value?.scrollbarWrap,
|
|
3317
|
+
(scrollbarWrap) => {
|
|
3318
|
+
if (!scrollbarWrap) {
|
|
3319
|
+
return;
|
|
3320
|
+
}
|
|
3321
|
+
scrollbarWrap.addEventListener("scroll", async (e) => {
|
|
3322
|
+
const el = e.currentTarget;
|
|
3323
|
+
if (moreLoadingVisible.value) {
|
|
3324
|
+
return;
|
|
3325
|
+
}
|
|
3326
|
+
if (el.scrollHeight - el.clientHeight - el.scrollTop > 1) {
|
|
3327
|
+
return;
|
|
3328
|
+
}
|
|
3329
|
+
if (total.value <= options.value.length) {
|
|
3330
|
+
return;
|
|
3331
|
+
}
|
|
3332
|
+
moreLoadingVisible.value = true;
|
|
3333
|
+
pgIndex.value += 1;
|
|
3334
|
+
options.value = await getOptions();
|
|
3335
|
+
moreLoadingVisible.value = false;
|
|
3336
|
+
});
|
|
3337
|
+
unWacth();
|
|
3338
|
+
},
|
|
3339
|
+
{
|
|
3340
|
+
immediate: true
|
|
3326
3341
|
}
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
options.value = await getOptions();
|
|
3330
|
-
moreLoadingVisible.value = false;
|
|
3331
|
-
});
|
|
3332
|
-
});
|
|
3342
|
+
);
|
|
3343
|
+
}
|
|
3333
3344
|
const popperClass = mForm?.popperClass;
|
|
3334
3345
|
const changeHandler = (value) => {
|
|
3335
3346
|
emit("change", value);
|