jobdone-shared-files 1.0.47 → 1.0.48
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/autocompleteSelect.vue +4 -4
- package/package.json +1 -1
package/autocompleteSelect.vue
CHANGED
|
@@ -262,10 +262,10 @@ function previewAdjust(itemObj) {
|
|
|
262
262
|
|
|
263
263
|
// 選中的值的顯示
|
|
264
264
|
const selectedPreviewText = computed(() => {
|
|
265
|
-
if (selectedItem.value ||
|
|
266
|
-
return
|
|
265
|
+
if (selectedItem.value === null || selectedItem.value === undefined || (typeof selectedItem.value === 'object' && Object.keys(selectedItem.value).length === 0)) {
|
|
266
|
+
return props.placeholder
|
|
267
267
|
}
|
|
268
|
-
return
|
|
268
|
+
return previewAdjust(selectedItem.value)
|
|
269
269
|
})
|
|
270
270
|
|
|
271
271
|
// 清除選擇內容
|
|
@@ -276,7 +276,7 @@ function clearSelected() {
|
|
|
276
276
|
|
|
277
277
|
// 選擇送出
|
|
278
278
|
function selectConfirm(v) {
|
|
279
|
-
if (
|
|
279
|
+
if (selectedItem.value === null || selectedItem.value === undefined || (typeof selectedItem.value === 'object' && Object.keys(selectedItem.value).length === 0)) {
|
|
280
280
|
return
|
|
281
281
|
}
|
|
282
282
|
emit('select', JSON.parse(JSON.stringify(v)))
|