Browse Source

fix: 修复选择器组件未绑定数据集的情况下,预览态出现请求404的问题

wu.jian2 1 year ago
parent
commit
a45122e713
1 changed files with 1 additions and 1 deletions
  1. 1 1
      data-room-ui/packages/BasicComponents/Select/index.vue

+ 1 - 1
data-room-ui/packages/BasicComponents/Select/index.vue

@@ -73,7 +73,7 @@ export default {
     if (this.isPreview) {
       this.filterable = true
       document.querySelector(`.select-${this.config.code}`).style.pointerEvents = 'all'
-      if (window.dataSetFields.length === 0) {
+      if (this.config.dataSource.businessKey && window.dataSetFields.length === 0) {
         getDataSetDetails(this.config.dataSource.businessKey).then(res => {
           window.dataSetFields = res.fields.map(field => {
             return {