Merge pull request #77 from QingWei-Li/master

Add homepage
pull/83/head
FuryBean 2016-09-18 17:14:08 +08:00 committed by GitHub
commit bc6d6940df
3 changed files with 9 additions and 14 deletions

View File

@ -25,13 +25,8 @@ dist: install
dist-all: dist-all:
npm run dist:all npm run dist:all
deploy: install deploy:
@npm run deploy @npm run deploy
@rm -rf fe.element/element-ui
@cp -r examples/element-ui fe.element
gh-docs:
@npm run gh-docs
pub: pub:
./node_modules/.bin/kp $(filter-out $@,$(MAKECMDGOALS)) ./node_modules/.bin/kp $(filter-out $@,$(MAKECMDGOALS))

View File

@ -8,12 +8,11 @@
"src" "src"
], ],
"scripts": { "scripts": {
"dev": "npm run bootstrap && (node bin/iconInit.js & node bin/build-entry.js) && cooking watch -c scripts/cooking.demo.js", "dev": "npm run bootstrap && (node bin/iconInit.js & node bin/build-entry.js) && cooking watch -c scripts/cooking.demo.js -p",
"dist": "npm run lint && del -f lib && cooking build -c scripts/cooking.conf.js,scripts/cooking.common.js -p && cooking build -c scripts/cooking.component.js -p && npm run build:theme", "dist": "npm run lint && del -f lib && cooking build -c scripts/cooking.conf.js,scripts/cooking.common.js -p && cooking build -c scripts/cooking.component.js -p && npm run build:theme",
"dist:all": "node bin/build-all.js && npm run build:theme", "dist:all": "node bin/build-all.js && npm run build:theme",
"build:theme": "gulp build --gulpfile packages/theme-default/gulpfile.js && cp-cli packages/theme-default/lib lib/theme-default", "build:theme": "gulp build --gulpfile packages/theme-default/gulpfile.js && cp-cli packages/theme-default/lib lib/theme-default",
"deploy": "cooking build -c scripts/cooking.demo.js -p", "deploy": "cooking build -c scripts/cooking.demo.js -p && echo element.eleme.io>>examples/element-ui/CNAME && gh-pages -d examples/element-ui --remote origin && del examples/element-ui",
"gh-docs": "cooking build -c scripts/cooking.demo.js -p && gh-pages -d examples/element-ui --remote origin",
"bootstrap": "npm i && lerna bootstrap --loglevel=error", "bootstrap": "npm i && lerna bootstrap --loglevel=error",
"pub": "npm run dist && kp", "pub": "npm run dist && kp",
"pub:all": "npm run dist:all && lerna publish", "pub:all": "npm run dist:all && lerna publish",
@ -23,6 +22,7 @@
"type": "git", "type": "git",
"url": "git@github.com:elemefe/element.git" "url": "git@github.com:elemefe/element.git"
}, },
"homepage": "http://element.eleme.io",
"keywords": [ "keywords": [
"eleme", "eleme",
"vue", "vue",
@ -40,7 +40,7 @@
"babel-preset-es2015": "^6.14.0", "babel-preset-es2015": "^6.14.0",
"cheerio": "^0.18.0", "cheerio": "^0.18.0",
"cooking": "^1.0.0", "cooking": "^1.0.0",
"cooking-lint": "^0.1.2", "cooking-lint": "^0.1.3",
"cooking-vue2": "^0.1.4", "cooking-vue2": "^0.1.4",
"cp-cli": "^1.0.2", "cp-cli": "^1.0.2",
"css-loader": "^0.24.0", "css-loader": "^0.24.0",

View File

@ -149,15 +149,15 @@
if (fit) { if (fit) {
let flexColumns = []; let flexColumns = [];
let definedWidthColumnsWidth = 0; // let definedWidthColumnsWidth = 0;
let definedMinWidthSum = 0; // let definedMinWidthSum = 0;
flattenColumns.forEach((column) => { flattenColumns.forEach((column) => {
definedMinWidthSum += column.minWidth || 80; // definedMinWidthSum += column.minWidth || 80;
bodyMinWidth += column.width || column.minWidth || 80; bodyMinWidth += column.width || column.minWidth || 80;
if (typeof column.width === 'number') { if (typeof column.width === 'number') {
definedWidthColumnsWidth += column.width; // definedWidthColumnsWidth += column.width;
} else { } else {
flexColumns.push(column); flexColumns.push(column);
} }