<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                >[success] # 循環里初始化變量 ~~~ 1.有時候可能需要循環一個數組或者數組對象,這時候 往往在循環中有一些判斷邏輯需要對一些參數進行歸類 劃分,對這些參數進行清空重賦值狀況 ~~~ >[danger] ##### 舉個例子 ~~~ 1.下面錯誤的地方就是,雖然知道是因為每次循環后要重新, 去接收一些新的數據,但是每次循環就會創建一個新的let 對 應聲明的初始化變量,所以將這些初始化不要在for 中聲明, 直接在for 外面聲明一次即可 ~~~ * 錯誤代碼 ~~~ filtersDatasourceFields(datasourceFieldsList: { __t: 'FORM_NumbericElement'; [key: string]: any }[]) { this.dataSourceFieldsList = [] for (var i = 0; i < datasourceFieldsList.length; i++) { // 錯誤的地方 let filedTypeMap = null let filedTypeName = '' let groupRule = '' let name = '' filedTypeMap = this.filedsTypeMap[datasourceFieldsList[i].__t] if (typeof filedTypeMap === 'undefined') continue filedTypeName = filedTypeMap.name groupRule = filedTypeMap.type name = datasourceFieldsList[i].caption ? datasourceFieldsList[i].caption : datasourceFieldsList[i].name this.dataSourceFieldsList.push({ dataSourceId: '', // 數據源id dataSourceType: this.fromDataSource, // 數據源類型 fieldId: datasourceFieldsList[i].eleId, // 表單組件id sortType: 'DEFAULT', // 排序(默認排序方式) groupRule: groupRule, // 匯總方式(默認維度匯總方式) filedTypeName: filedTypeName, // 組件表單字段名稱 name: name, // 組件統稱 type: groupRule, // 類型 }) } } ~~~ * 正確 ~~~ filtersDatasourceFields(datasourceFieldsList: { __t: 'FORM_NumbericElement'; [key: string]: any }[]) { // 之聲明一次即可 let filedTypeMap = null let filedTypeName = '' let groupRule = '' let name = '' this.dataSourceFieldsList = [] for (var i = 0; i < datasourceFieldsList.length; i++) { filedTypeMap = this.filedsTypeMap[datasourceFieldsList[i].__t] if (typeof filedTypeMap === 'undefined') continue filedTypeName = filedTypeMap.name groupRule = filedTypeMap.type name = datasourceFieldsList[i].caption ? datasourceFieldsList[i].caption : datasourceFieldsList[i].name this.dataSourceFieldsList.push({ dataSourceId: '', // 數據源id dataSourceType: this.fromDataSource, // 數據源類型 fieldId: datasourceFieldsList[i].eleId, // 表單組件id sortType: 'DEFAULT', // 排序(默認排序方式) groupRule: groupRule, // 匯總方式(默認維度匯總方式) filedTypeName: filedTypeName, // 組件表單字段名稱 name: name, // 組件統稱 type: groupRule, // 類型 }) } } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看