qidian-vue-ui 1.2.98 → 1.2.100
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/crud/table/props.d.ts +1 -0
- package/dist/components/crud/tabs-table/props.d.ts +1 -0
- package/dist/components/dict/select/index.vue.d.ts +2 -0
- package/dist/components/dict/select/index.vue.mjs +51 -3
- package/dist/components/dict/select/types.d.ts +1 -0
- package/dist/components/service/table/props.d.ts +1 -0
- package/dist/components/service/table/props.mjs +2 -1
- package/dist/components/service-dialog-table-select/props.d.ts +1 -0
- package/dist/components/service-popup-table-select/props.d.ts +1 -0
- package/package.json +2 -2
|
@@ -5,10 +5,12 @@ type __VLS_Slots = {} & {
|
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<QdDictSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
7
|
"update:modelValue": (args_0: import("tdesign-vue-next").SelectValue<import("tdesign-vue-next").SelectOption> | undefined) => any;
|
|
8
|
+
"update:valueLabel": (args_0: string | string[] | undefined) => any;
|
|
8
9
|
"update:inputValue": (args_0: string | undefined) => any;
|
|
9
10
|
"update:popupVisible": (args_0: boolean | undefined) => any;
|
|
10
11
|
}, string, import("vue").PublicProps, Readonly<QdDictSelectProps> & Readonly<{
|
|
11
12
|
"onUpdate:modelValue"?: ((args_0: import("tdesign-vue-next").SelectValue<import("tdesign-vue-next").SelectOption> | undefined) => any) | undefined;
|
|
13
|
+
"onUpdate:valueLabel"?: ((args_0: string | string[] | undefined) => any) | undefined;
|
|
12
14
|
"onUpdate:inputValue"?: ((args_0: string | undefined) => any) | undefined;
|
|
13
15
|
"onUpdate:popupVisible"?: ((args_0: boolean | undefined) => any) | undefined;
|
|
14
16
|
}>, {
|
|
@@ -15,6 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
defaultSelectFirst: { type: Boolean },
|
|
16
16
|
onDefaultSelectFirst: { type: Function },
|
|
17
17
|
convStr: { type: [Boolean, String] },
|
|
18
|
+
valueLabel: {},
|
|
18
19
|
dedupe: { type: Boolean },
|
|
19
20
|
strict: { type: Boolean },
|
|
20
21
|
autoWidth: { type: Boolean },
|
|
@@ -73,11 +74,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
73
74
|
onRemove: { type: Function },
|
|
74
75
|
onSearch: { type: Function }
|
|
75
76
|
}, qdDictSelectProps),
|
|
76
|
-
emits: ["update:modelValue", "update:inputValue", "update:popupVisible"],
|
|
77
|
+
emits: ["update:modelValue", "update:valueLabel", "update:inputValue", "update:popupVisible"],
|
|
77
78
|
setup(__props, { emit: __emit }) {
|
|
78
79
|
const props = __props;
|
|
79
80
|
const emit = __emit;
|
|
80
|
-
const { modelValue, inputValue, popupVisible } = useVModels(props, emit, {
|
|
81
|
+
const { modelValue, valueLabel, inputValue, popupVisible } = useVModels(props, emit, {
|
|
82
|
+
passive: true
|
|
83
|
+
});
|
|
81
84
|
const reModelValue = computed({
|
|
82
85
|
get: () => {
|
|
83
86
|
const { convStr, strict, selectOptions } = reProps.value;
|
|
@@ -118,6 +121,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
123
|
});
|
|
124
|
+
const reValueLabel = computed({
|
|
125
|
+
get: () => {
|
|
126
|
+
const { convStr, selectOptions } = reProps.value;
|
|
127
|
+
const { multiple, valueType } = selectOptions;
|
|
128
|
+
if (!multiple || valueType === "object") return valueLabel.value;
|
|
129
|
+
if (isEmpty(valueLabel.value)) return [];
|
|
130
|
+
if (typeof valueLabel.value === "string") {
|
|
131
|
+
return valueLabel.value.split(
|
|
132
|
+
(typeof convStr === "string" ? convStr : "") || qdDictConvStrSeparator
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
return valueLabel.value;
|
|
136
|
+
},
|
|
137
|
+
set: (val) => {
|
|
138
|
+
const { convStr, selectOptions } = reProps.value;
|
|
139
|
+
const { multiple, valueType } = selectOptions;
|
|
140
|
+
if (!multiple || valueType === "object") {
|
|
141
|
+
valueLabel.value = val;
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (convStr && Array.isArray(val)) {
|
|
145
|
+
valueLabel.value = val.join(
|
|
146
|
+
(typeof convStr === "string" ? convStr : "") || qdDictConvStrSeparator
|
|
147
|
+
);
|
|
148
|
+
} else {
|
|
149
|
+
valueLabel.value = val;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
});
|
|
121
153
|
const dictType = toRef(props, "dictType");
|
|
122
154
|
let hasAutoSelected = false;
|
|
123
155
|
let unWatchAutoSelected;
|
|
@@ -128,14 +160,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
128
160
|
modelValue: modelValue2,
|
|
129
161
|
inputValue: inputValue2,
|
|
130
162
|
popupVisible: popupVisible2,
|
|
163
|
+
valueLabel: valueLabel2,
|
|
131
164
|
dictType: dictType2,
|
|
132
165
|
loading,
|
|
133
166
|
defaultSelectFirst,
|
|
134
167
|
onDefaultSelectFirst,
|
|
135
168
|
dedupe,
|
|
136
169
|
options,
|
|
170
|
+
onChange,
|
|
137
171
|
...selectOptions
|
|
138
172
|
} = props;
|
|
173
|
+
const labelKey = selectOptions.keys?.label || "label";
|
|
174
|
+
const reOnChange = (value, context) => {
|
|
175
|
+
onChange?.(value, context);
|
|
176
|
+
const { multiple } = selectOptions;
|
|
177
|
+
if (multiple) {
|
|
178
|
+
const selectedLabels = context.selectedOptions?.map((option) => option[labelKey]).filter(Boolean) || [];
|
|
179
|
+
reValueLabel.value = selectedLabels;
|
|
180
|
+
} else {
|
|
181
|
+
reValueLabel.value = context.option?.[labelKey] || "";
|
|
182
|
+
}
|
|
183
|
+
};
|
|
139
184
|
return {
|
|
140
185
|
convStr,
|
|
141
186
|
strict,
|
|
@@ -145,7 +190,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
145
190
|
onDefaultSelectFirst,
|
|
146
191
|
dedupe,
|
|
147
192
|
options,
|
|
148
|
-
selectOptions
|
|
193
|
+
selectOptions: {
|
|
194
|
+
...selectOptions,
|
|
195
|
+
onChange: reOnChange
|
|
196
|
+
},
|
|
149
197
|
models: {
|
|
150
198
|
modelValue: modelValue2,
|
|
151
199
|
inputValue: inputValue2,
|
|
@@ -29,6 +29,7 @@ export declare const qdServiceTableProps: {
|
|
|
29
29
|
readonly pagination: undefined;
|
|
30
30
|
readonly headerBg: true;
|
|
31
31
|
readonly loadingWithData: true;
|
|
32
|
+
readonly activeRowType: "single";
|
|
32
33
|
};
|
|
33
34
|
export declare const qdServiceTableTreeConfig: {
|
|
34
35
|
readonly checkStrictly: true;
|
|
@@ -29,6 +29,7 @@ export declare const qdServicePopupTableSelectProps: {
|
|
|
29
29
|
readonly pagination: undefined;
|
|
30
30
|
readonly headerBg: true;
|
|
31
31
|
readonly loadingWithData: true;
|
|
32
|
+
readonly activeRowType: "single";
|
|
32
33
|
};
|
|
33
34
|
export declare const qdServicePopupProps: {
|
|
34
35
|
readonly placement: "bottom-left";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qidian-vue-ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.100",
|
|
4
4
|
"description": "基于 TDesign 的 QiDian Vue UI 组件库",
|
|
5
5
|
"author": "qidian",
|
|
6
6
|
"license": "MIT",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"vue-echarts": "^8.0.1",
|
|
129
129
|
"vue-stream-markdown": "^0.6.5",
|
|
130
130
|
"@flyfish-group/file-viewer3": "^1.0.18",
|
|
131
|
-
"qidian-shared": "1.0.
|
|
131
|
+
"qidian-shared": "1.0.74"
|
|
132
132
|
},
|
|
133
133
|
"scripts": {
|
|
134
134
|
"clean": "rm -rf dist",
|