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.
@@ -262,10 +262,10 @@ function previewAdjust(itemObj) {
262
262
 
263
263
  // 選中的值的顯示
264
264
  const selectedPreviewText = computed(() => {
265
- if (selectedItem.value || (typeof selectedItem.value === 'object' && selectedItem.value !== null && Object.keys(selectedItem.value).length > 0)) {
266
- return previewAdjust(selectedItem.value)
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 props.placeholder
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 (!v) {
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)))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jobdone-shared-files",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "description": "Shared JS and SCSS for Jobdone Enterprise.",
5
5
  "main": "index.js",
6
6
  "scripts": {