qidian-vue-ui 2.7.3 → 2.7.4
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/dict/select/index.vue.mjs +2 -1
- package/dist/components/service-select/index.css +1 -1
- package/dist/components/service-select/index.vue.mjs +1 -1
- package/dist/components/service-select/index.vue2.mjs +2 -1
- package/dist/hooks/useDict/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -239,7 +239,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
239
239
|
}
|
|
240
240
|
function setDefaultSelectFirst(data) {
|
|
241
241
|
if (!hasAutoSelected && reProps.value.defaultSelectFirst && isEmpty(reModelValue.value) && data.length) {
|
|
242
|
-
const firstOption = data
|
|
242
|
+
const firstOption = data.find((option) => !option.disabled);
|
|
243
|
+
if (!firstOption) return;
|
|
243
244
|
const { multiple, valueType } = reProps.value.selectOptions;
|
|
244
245
|
const firstValue = valueType === "object" ? firstOption : firstOption.value;
|
|
245
246
|
const value = multiple ? [firstValue] : firstValue;
|
|
@@ -4,7 +4,7 @@ import _sfc_main from "./index.vue2.mjs";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
7
|
-
const QdServiceSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
7
|
+
const QdServiceSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-893f4675"]]);
|
|
8
8
|
export {
|
|
9
9
|
QdServiceSelect as default
|
|
10
10
|
};
|
|
@@ -404,7 +404,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
404
404
|
}
|
|
405
405
|
function setDefaultSelectFirst(data2) {
|
|
406
406
|
if (!hasAutoSelected && reProps.value.defaultSelectFirst && isEmpty(reModelValue.value) && data2.length) {
|
|
407
|
-
const firstOption = data2
|
|
407
|
+
const firstOption = data2.find((option) => !option.disabled);
|
|
408
|
+
if (!firstOption) return;
|
|
408
409
|
const { keys, multiple, valueType } = reProps.value.selectOptions;
|
|
409
410
|
const firstValue = valueType === "object" ? firstOption : firstOption[keys?.value || qdServiceSelectKeys.value];
|
|
410
411
|
reModelValue.value = multiple ? [firstValue] : firstValue;
|