ecmascript-6

    0熱度

    1回答

    我試圖在導航欄右上角保持可觸摸不透明度,對於onPress的可觸摸不透明度。我想把用戶帶到主頁。 constructor(props) { super(props); this.state = { stAccntList: [], stUserAccountNo: '', stCustNo: '', resp: '',

    0熱度

    1回答

    我得到預計在箭頭函數數組回調返回結束返回一個值 我正在刪除使用Axios公司和JSON服務器的選擇後的警告作爲,刪除的每篇文章之後,我馬上就返回新數組 .then(() => { const remainingPosts = this.props.posts.filter((post) => { if (post.id !== this.state.loadedPost.

    3熱度

    1回答

    的任意屬性我有一個類,看起來像這樣 export default class { constructor() { this.store = {} } setX (x, y) { this.store[x] = y } } 我如何定義上this.store一個getter得到一個未定義的值時返回0? 讓我舉一個例子: setX('a

    0熱度

    2回答

    比方說,你有以下功能(或更多): function hasValue(element) { return (element.value && element.value.length); } function isLongerThan(element, minLength){ return element.value.length > minLength; } 你如

    0熱度

    3回答

    我需要創建一個const組件來呈現選項及其選項,但是由於代碼返回的選項沒有任何選項,因此無法呈現選項字段。問題在哪裏? 謝謝你的建議。 import React from "react"; const FilterSelect = (props) => { const {title, name, selectedValue, optionsValue, onChange} = {..

    -1熱度

    5回答

    我有具有以下結構的 { cardControlItem: 'Tidak', cardDirectUseItem: 'Tidak', kbUnspscUuid: '6a564b8e-2976-4fde-8759-7951970d7500', substoreUuid: '2f2b04bb-8b80-4b1f-b827-bf20311e31ee', cardDe

    0熱度

    2回答

    我已經提取對象的數組,從下面的原始數據:https://gist.githubusercontent.com/Miserlou/c5cd8364bf9b2420bb29/raw/2bf258763cdddd704f8ffd3ea9a3e81d25e2c6f6/cities.json 我只想說,數據看起來是這樣的: [0 ... 99] : 城市 : 「紐約」 growth_from_2000_to

    0熱度

    3回答

    我有對象數組以這種形式: [ {id : #mixed char and num , title : #string }, {id : #mixed char and num , title : #string } ...] 我想來遍歷它並刪除重複的對象中,我使用設置結構這樣做,但問題是,設置運營方將接受複製的對象 我試圖 let Unique = new Set([], X => x.i

    -3熱度

    1回答

    在JavaScript對象中將數組存儲在數組中的正確表示法是什麼? 事情是這樣的: let playfield = { rows: [ boxes: [] ], } 感謝您的幫助。

    3熱度

    3回答

    我已經通過其他stackoverflow答案看了,似乎無法找到答案。 實際上,我正在寫一個模塊來驗證一些數據,然後如果沒有錯誤將它傳遞給第三方api。 我的問題是,如果Promise.all拒絕,那麼我的初始呼叫承諾仍然移動到下一個。 ------my main app--------- const data = [1,0,1] api.sendData(data) .then((