Fix conflict

This commit is contained in:
qingwei.li 2016-10-03 08:06:55 +08:00
commit a8df9de2ee
9 changed files with 109 additions and 90 deletions

View File

@ -6,6 +6,7 @@
- 修复 Tabs 切换后 Tab-panel 被销毁的问题
- 修复 TimePicker 错误的隐藏面板
- 修复 Table Cell 的样式, #204
### 1.0.0-rc.5

View File

@ -0,0 +1,22 @@
/**
* button
* @module components/basic/menu
* @desc 用于按钮组
* @param {string} label - 名称
*/
export default {
name: 'ElButtonGroup',
functional: true,
render(h, { slots, data }) {
return (
<div
class="el-button-group"
{ ...data }
{ ...{ on: data.nativeOn } }>
{ slots().default }
</div>
);
}
};

View File

@ -1,16 +0,0 @@
<template>
<div class="el-button-group">
<slot></slot>
</div>
</template>
<script>
/**
* button
* @module components/basic/menu
* @desc 用于按钮组
* @param {string} label - 名称
*/
export default {
name: 'ElButtonGroup'
};
</script>

View File

@ -0,0 +1,65 @@
export default {
name: 'ElButton',
functional: true,
props: {
type: {
type: String,
default: 'default'
},
size: String,
icon: {
type: String,
default: ''
},
nativeType: {
type: String,
default: 'button'
},
loading: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
},
plain: {
type: Boolean,
default: false
}
},
render(h, { props, slots, data }) {
return (
<button
disabled={ props.disabled }
type={ props.nativeType }
class={[
'el-button',
props.type ? 'el-button-' + props.type : '',
props.size ? 'el-button-' + props.size : '',
{
'is-disabled': props.disabled,
'is-loading': props.loading,
'is-plain': props.plain
}
]}
{ ...data }
{ ...{ on: data.nativeOn } }>
{
[
props.loading
? <i class="el-icon-loading"></i>
: {},
props.icon && !props.loading
? <i class={ 'el-icon-' + props.icon }></i>
: {}
]
}
{ slots().default }
</button>
);
}
};

View File

@ -1,54 +0,0 @@
<template>
<button :disabled="disabled" class="el-button"
:type="nativeType"
:class="[
type ? 'el-button-' + type : '',
size ? 'el-button-' + size : '',
{
'is-disabled': disabled,
'is-loading': loading,
'is-plain': plain
}
]"
>
<i class="el-icon-loading" v-if="loading"></i>
<i :class="'el-icon-' + icon" v-if="icon && !loading"></i>
<slot></slot>
</button>
</template>
<script>
/**
* button
*/
export default {
name: 'ElButton',
props: {
type: {
type: String,
default: 'default'
},
size: String,
icon: {
type: String,
default: ''
},
nativeType: {
type: String,
default: 'button'
},
loading: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
},
plain: {
type: Boolean,
default: false
}
}
};
</script>

View File

@ -1 +1 @@
module.exports = require('./src/icon.vue');
module.exports = require('./src/icon');

19
packages/icon/src/icon.js Normal file
View File

@ -0,0 +1,19 @@
export default {
name: 'ElIcon',
functional: true,
props: {
name: String
},
render(h, { props, data }) {
return (
<i
class={ 'el-icon' + props.name }
{ ...data }
{ ...{ on: data.nativeOn } }>
</i>
);
}
};

View File

@ -1,13 +0,0 @@
<template>
<i :class="'el-icon-' + name"></i>
</template>
<script>
export default {
name: 'ElIcon',
props: {
name: String
}
};
</script>

View File

@ -50,6 +50,7 @@
& th {
white-space: nowrap;
overflow: hidden;
}
& th, td {
@ -57,7 +58,6 @@
max-width: 250px;
min-width: 0;
box-sizing: border-box;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
position: relative;
@ -102,10 +102,6 @@
box-sizing: border-box;
}
& td div {
display: block;
}
@e fixed {
position: absolute;
top: 0;
@ -180,7 +176,6 @@
& th > .cell {
position: relative;
word-wrap: normal;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
line-height: 20px;