小编viz*_*lux的帖子

React Native Card Carousel查看?

在此输入图像描述

有谁知道我们如何才能在React Native中实现这种视图,或者是否有任何可用的组件可以帮助解决这个问题?

我也在F8 2016 app中看过,一直在寻找如何通过水平滚动来实现过渡和旋转木马般的视图.

javascript facebook ios react-native

12
推荐指数
2
解决办法
2万
查看次数

MaterialiseCSS卡设计

我正在尝试使用materializecss.com在我的个人网站中调整Material Design,但是框架仅提供了在CARD设计之上排除其他图像的选项.

我希望在链接[第2行,第2列/最后图像]中显示如下所示的内容,其中图像位于主要内容旁边的左侧,想知道是否有人可以帮助我,我真的很感谢您对此的帮助.谢谢!

卡片材料设计实例

html css materialize web material-design

5
推荐指数
1
解决办法
6821
查看次数

如何在Jest和Enzyme中验证React道具?

所以,我试图了解在测试做出反应,我有这样的:Button.jsButton.test.js

该问题连同以下代码一起注释:

// Button.js
import React from 'react';
import { string, bool, func } from 'prop-types';
import { StyledButton } from './styled'

const Button = ({
  size,
  text,
}) => (
  <StyledButton
    size={size}
    // the test will alway fail with result:
    // Expected value to be: "Join us"
    // Received: undefined
    // Unless I add add this line below
    text={text}
  >
    {text} // but the text props is here. That is my current practice of passing the …
Run Code Online (Sandbox Code Playgroud)

javascript unit-testing reactjs jestjs enzyme

5
推荐指数
2
解决办法
9745
查看次数

如何在 Ant Design 中禁用模态遮罩背景

我想禁用某些组件中的模态遮罩背景,但 API 没有这样的选项。有人对这种情况有解决方案吗?

reactjs antd

4
推荐指数
1
解决办法
9768
查看次数

如何使用lodash根据值对嵌套数组进行排序?

我正在学习如何使用lodash库,但是遇到了一个我认为不知道如何解决的问题。我想用lodash对看起来像这样的嵌套数组进行排序:

"results": [
  {
        "id": "12345",
        "name": "toy123",
        "date_created": "2017-08-29T16:10:37Z",
        "date_last_modified": "2019-01-29T17:19:36Z",
        "prices": [
            {
                "currency": "USD",
                "amount": "100.00"
            },
            {
                "currency": "EUR",
                "amount": "88.23"
            },
        ]
    },
    {
        "id": "54321",
        "name": "toy321",
        "date_created": "2017-08-29T16:10:37Z",
        "date_last_modified": "2019-01-29T17:19:36Z",
        "prices": [
            {
                "currency": "USD",
                "amount": "80.00"
            },
            {
                "currency": "EUR",
                "amount": "70.58"
            },
        ]
    },
]
Run Code Online (Sandbox Code Playgroud)

我想基于prices嵌套在给定数组中的数组对数组进行排序。排序将考虑prices.currency和,prices.amount并产生以下输出,其中基于USD和对给定数组进行升序排序amount。我prices.amount遇到的另一个问题是,它是一个字符串,而不是数字。

[
    {
        "id": "54321",
        "name": "toy321",
        "date_created": "2017-08-29T16:10:37Z",
        "date_last_modified": "2019-01-29T17:19:36Z",
        "prices": [
            { …
Run Code Online (Sandbox Code Playgroud)

javascript arrays sorting filter lodash

3
推荐指数
1
解决办法
89
查看次数