Skip to content

Instantly share code, notes, and snippets.

@xyzdata
Last active August 11, 2022 15:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xyzdata/f2b41a63feb21081e9f51d464d7434d7 to your computer and use it in GitHub Desktop.
Save xyzdata/f2b41a63feb21081e9f51d464d7434d7 to your computer and use it in GitHub Desktop.
Ant-Design
@xgqfrms-GitHub
Copy link

@xgqfrms-GitHub
Copy link

xgqfrms-GitHub commented Jul 6, 2017

// 连字符转驼峰
String.prototype.hyphenToHump = function() {
    return this.replace(/-(\w)/g, function() {
        return arguments[1].toUpperCase()
    });
};

// 驼峰转连字符
String.prototype.humpToHyphen = function() {
    return this.replace(/([A-Z])/g, '-$1').toLowerCase();
};

@xgqfrms-GitHub
Copy link

xgqfrms-GitHub commented Jul 21, 2017

eslint error

jsx-eslint/eslint-plugin-react#447

// redux constants

export const PAGE_SIZE = 3;

// [eslint] Parsing error: The keyword 'export' is reserved

.eslintrc

{
    "parserOptions": {
        "ecmaVersion": 6,
        "sourceType": "module",
        "ecmaFeatures": {
            "jsx": true,
            "modules": true,
            "experimentalObjectRestSpread": true
        }
    },
    "plugins": [
        "react"
    ],
    "extends": ["eslint:recommended", "plugin:react/recommended"],
    "rules": {
        "comma-dangle": 0
    },
    "settings": {
        "react": {
            "pragma": "React",
            "version": "15.4.2"
        }
    }
}

@xgqfrms-GitHub
Copy link

form layout

https://ant.design/components/form-cn/#components-form-demo-layout

inline

// Form 
mode="inine" ???

@xgqfrms-GitHub
Copy link

in brief

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment