Bläddra i källkod

Merge branch 'master' of http://192.168.1.41:3000/outaozhen/cldV2react

outaozhen 5 år sedan
förälder
incheckning
96570c5cbe
7 ändrade filer med 39 tillägg och 65 borttagningar
  1. 3 0
      .gitmodules
  2. 14 12
      .stylelintrc.js
  3. 8 53
      README.md
  4. 1 0
      package.json
  5. 1 0
      src/basic
  6. 6 0
      src/consts.js
  7. 6 0
      src/utils.js

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "src/basic"]
+	path = src/basic
+	url = http://192.168.1.41:3000/lanjianrong/basic.git

+ 14 - 12
.stylelintrc.js

@@ -2,16 +2,18 @@ const fabric = require('@umijs/fabric')
 
 module.exports = {
   ...fabric.stylelint,
-  'indentation': 2,
-  'block-no-empty': null,
-  'color-no-invalid-hex': true,
-  'declaration-colon-space-after': 'always',
-  'max-empty-lines': 2,
-  'rule-empty-line-before': null,
-  'unit-no-unknown': null,
-  'unit-whitelist': ['px', 'em', 'rem', 's', '%', 'vw', 'vh', 'deg'],
-  'selector-max-compound-selectors': 5,
-  'color-hex-length': 'long',
-  'at-rule-no-unknown': null,
-  'selector-pseudo-class-no-unknown': [true, { ignorePseudoClasses: ['global'] }],
+  rules: {
+    'indentation': 2,
+    'block-no-empty': null,
+    'color-no-invalid-hex': true,
+    'declaration-colon-space-after': 'always',
+    'max-empty-lines': 2,
+    'rule-empty-line-before': null,
+    'unit-no-unknown': null,
+    'unit-whitelist': ['px', 'em', 'rem', 's', '%', 'vw', 'vh', 'deg'],
+    'selector-max-compound-selectors': 5,
+    'color-hex-length': 'long',
+    'at-rule-no-unknown': null,
+    'selector-pseudo-class-no-unknown': [true, { ignorePseudoClasses: ['global'] }],
+  }
 }

+ 8 - 53
README.md

@@ -1,57 +1,12 @@
-# Ant Design Pro
+## 初始化
+git submodule init
+git submodule update
+cd src/basic && git checkout uni && cd ../../
+cd src/PiUI-basic && git checkout uni && cd ../../
 
-This project is initialized with [Ant Design Pro](https://pro.ant.design). Follow is the quick guide for how to use.
-
-## Environment Prepare
-
-Install `node_modules`:
-
-```bash
+## 安装依赖
 npm install
-```
-
-or
-
-```bash
-yarn
-```
+cnpm install
 
-## Provided Scripts
-
-Ant Design Pro provides some useful script to help you quick start and build with web project, code style check and test.
-
-Scripts provided in `package.json`. It's safe to modify or add additional script:
-
-### Start project
-
-```bash
+## 启动项目
 npm start
-```
-
-### Build project
-
-```bash
-npm run build
-```
-
-### Check code style
-
-```bash
-npm run lint
-```
-
-You can also use script to auto fix some lint error:
-
-```bash
-npm run lint:fix
-```
-
-### Test code
-
-```bash
-npm test
-```
-
-## More
-
-You can view full document on our [official website](https://pro.ant.design). And welcome any feedback in our [github](https://github.com/ant-design/ant-design-pro).

+ 1 - 0
package.json

@@ -82,6 +82,7 @@
     "@umijs/preset-ant-design-pro": "^1.2.0",
     "@umijs/preset-react": "^1.4.8",
     "@umijs/yorkie": "^2.0.3",
+    "agent-base": "^6.0.2",
     "carlo": "^0.9.46",
     "chalk": "^4.0.0",
     "cross-env": "^7.0.0",

+ 1 - 0
src/basic

@@ -0,0 +1 @@
+Subproject commit 27297630dbbfe995193822d8a3b3c3e898050dec

+ 6 - 0
src/consts.js

@@ -0,0 +1,6 @@
+import BASE_CONSTS from '@/basic/consts'
+
+export default {
+  ...BASE_CONSTS
+  // 自定义变量
+}

+ 6 - 0
src/utils.js

@@ -0,0 +1,6 @@
+import utils, { importAll } from '@/src/basic/utils'
+import merge from 'lodash/merge'
+
+const baseUtils = importAll(require.context('./utils', true, /\.js$/))
+
+export default merge(utils, baseUtils)