@weitutech/by-components-v3 1.1.15 → 1.1.17
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/by-component-v3.css +1 -1
- package/dist/by-component-v3.js +14 -11
- package/dist/by-component-v3.umd.cjs +1 -1
- package/dist/types/packages/common-selector/index.d.ts +1 -2
- package/dist/types/packages/common-selector/src/index.vue.d.ts +4 -1
- package/dist/types/packages/common-selector/src/types.d.ts +10 -2
- package/package.json +1 -1
package/dist/by-component-v3.js
CHANGED
|
@@ -28482,7 +28482,8 @@ const _hoisted_6$3 = { class: "by_page-info" };
|
|
|
28482
28482
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
28483
28483
|
__name: "index",
|
|
28484
28484
|
props: {
|
|
28485
|
-
|
|
28485
|
+
modelValue: { default: "" },
|
|
28486
|
+
value: {},
|
|
28486
28487
|
type: { default: "select" },
|
|
28487
28488
|
options: { default: () => [] },
|
|
28488
28489
|
loadOptions: { type: Function, default: void 0 },
|
|
@@ -28494,13 +28495,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
28494
28495
|
pagination: { type: Boolean, default: false },
|
|
28495
28496
|
pageSize: { default: 50 },
|
|
28496
28497
|
needShowLoading: { type: Boolean, default: false },
|
|
28498
|
+
forceNoExpand: { type: Boolean, default: false },
|
|
28497
28499
|
showSuffixInput: { type: Boolean, default: false },
|
|
28498
28500
|
suffixInputPlaceholder: { default: "请输入" },
|
|
28499
28501
|
suffixInputValue: { default: "" },
|
|
28500
28502
|
suffixInputUnit: { default: "" },
|
|
28501
28503
|
suffixInputOptions: { default: () => ({}) }
|
|
28502
28504
|
},
|
|
28503
|
-
emits: ["input", "update:suffixInputValue", "suffix-input-change"],
|
|
28505
|
+
emits: ["update:modelValue", "input", "update:suffixInputValue", "suffix-input-change"],
|
|
28504
28506
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
28505
28507
|
const props = __props;
|
|
28506
28508
|
const emit = __emit;
|
|
@@ -28563,7 +28565,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
28563
28565
|
};
|
|
28564
28566
|
const checkNeedExpand = () => {
|
|
28565
28567
|
var _a2;
|
|
28566
|
-
if (props.type === "select") {
|
|
28568
|
+
if (props.type === "select" || props.forceNoExpand) {
|
|
28567
28569
|
needExpand.value = false;
|
|
28568
28570
|
return;
|
|
28569
28571
|
}
|
|
@@ -28632,13 +28634,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
28632
28634
|
const initData = () => {
|
|
28633
28635
|
dataList.value = [...localOptions.value];
|
|
28634
28636
|
buildLatterList();
|
|
28635
|
-
if (props.multiple && Array.isArray(props.
|
|
28636
|
-
checkAll.value = props.
|
|
28637
|
+
if (props.multiple && Array.isArray(props.modelValue)) {
|
|
28638
|
+
checkAll.value = props.modelValue.length <= 0;
|
|
28637
28639
|
} else {
|
|
28638
|
-
checkAll.value = !props.
|
|
28640
|
+
checkAll.value = !props.modelValue;
|
|
28639
28641
|
}
|
|
28640
|
-
if (props.
|
|
28641
|
-
selectedValue.value = props.
|
|
28642
|
+
if (props.modelValue) {
|
|
28643
|
+
selectedValue.value = props.modelValue;
|
|
28642
28644
|
} else {
|
|
28643
28645
|
selectedValue.value = props.multiple ? [] : "";
|
|
28644
28646
|
}
|
|
@@ -28791,6 +28793,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
28791
28793
|
search();
|
|
28792
28794
|
};
|
|
28793
28795
|
const emitChange = (value) => {
|
|
28796
|
+
emit("update:modelValue", value);
|
|
28794
28797
|
emit("input", value);
|
|
28795
28798
|
};
|
|
28796
28799
|
const handleSuffixInputChange = (value) => {
|
|
@@ -28799,7 +28802,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
28799
28802
|
emit("update:suffixInputValue", value);
|
|
28800
28803
|
};
|
|
28801
28804
|
watch(
|
|
28802
|
-
() => props.
|
|
28805
|
+
() => props.modelValue,
|
|
28803
28806
|
(value) => {
|
|
28804
28807
|
selectedValue.value = value;
|
|
28805
28808
|
if (props.multiple) {
|
|
@@ -29078,7 +29081,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
29078
29081
|
], 2)
|
|
29079
29082
|
], 2)
|
|
29080
29083
|
], 64)),
|
|
29081
|
-
_ctx.type !== "select" && needExpand.value ? (openBlock(), createBlock(_component_el_button, {
|
|
29084
|
+
_ctx.type !== "select" && needExpand.value && !_ctx.forceNoExpand ? (openBlock(), createBlock(_component_el_button, {
|
|
29082
29085
|
key: 2,
|
|
29083
29086
|
type: "text",
|
|
29084
29087
|
class: "by_openShrink",
|
|
@@ -29090,7 +29093,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
29090
29093
|
]),
|
|
29091
29094
|
_: 1
|
|
29092
29095
|
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
29093
|
-
_ctx.type !== "select" && !needExpand.value && _ctx.needShowLoading && loading2.value ? (openBlock(), createBlock(_component_el_button, {
|
|
29096
|
+
_ctx.type !== "select" && !needExpand.value && _ctx.needShowLoading && loading2.value && !_ctx.forceNoExpand ? (openBlock(), createBlock(_component_el_button, {
|
|
29094
29097
|
key: 3,
|
|
29095
29098
|
type: "text",
|
|
29096
29099
|
class: "by_openShrink",
|