Merge pull request #155 from elfman/dev

Fix some error in omi-element-ui
This commit is contained in:
当耐特 2018-11-05 12:00:06 +08:00 committed by GitHub
commit 930f7db7ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 30 deletions

View File

@ -17,30 +17,29 @@ class MyApp extends WeElement {
close = item => {
this.data.tags = this.data.tags.filter(tag => {
return tag != item
})
this.update()
}
});
this.update()
}
render(props, data) {
return (
return (
<div>
<div>
<h3>基础用法</h3>
<div>
<h3>基础用法</h3>
<el-tag>标签一</el-tag>
<el-tag type="success">标签二</el-tag>
<el-tag type="info" >标签三</el-tag>
<el-tag type="waring" >标签四</el-tag>
<el-tag type="danger">标签五</el-tag>
<el-tag type="success">标签二</el-tag>
<el-tag type="info" >标签三</el-tag>
<el-tag type="waring" >标签四</el-tag>
<el-tag type="danger">标签五</el-tag>
</div>
<div>
<h3>可移除标签</h3>
<h3>可移除标签</h3>
<el-tag closable>标签一</el-tag>
<el-tag type="success" closable>标签二</el-tag>
<el-tag type="info" closable>标签三</el-tag>
<el-tag type="waring" closable>标签四</el-tag>
<el-tag type="danger" closable>标签五</el-tag>
</div>
<div>
<el-tag type="success" closable>标签二</el-tag>
<el-tag type="info" closable>标签三</el-tag>
<el-tag type="waring" closable>标签四</el-tag>
<el-tag type="danger" closable>标签五</el-tag>
</div>
<div>
<h3>动态编辑标签</h3>
{data.tags.map(item => {
@ -48,15 +47,14 @@ class MyApp extends WeElement {
this.close(item)
}}>{item}</el-tag>
})}
</div>
<div>
</div>
<div>
<h3>不同尺寸</h3>
<el-tag closable>标签一</el-tag>
<el-tag size="medium" closable>标签一</el-tag>
<el-tag size="small" closable>标签一</el-tag>
<el-tag size="mini" closable>标签一</el-tag>
</div>
<el-tag size="medium" closable>标签一</el-tag>
<el-tag size="small" closable>标签一</el-tag>
<el-tag size="mini" closable>标签一</el-tag>
</div>
</div>
);
}

View File

@ -1,2 +1,2 @@
//you can change this to debug your elemnts
location.href = 'dropdown.html'
location.href = 'alert.html'

View File

@ -77,7 +77,7 @@ class ElAlert extends WeElement {
</i>
)}
</div>
)
</div>
);
}
}

View File

@ -12,15 +12,15 @@ class ElPagination extends WeElement {
this.data = Object.assign(
{
total: 0,
pageSize: 10,
pageSize: 10,
numDisplay: 5,
currentPage: 0,
currentPage: 0,
numEdge: 3,
linkTo: "#",
prevText: "Prev",
nextText: "Next",
ellipseText: "...",
prevShow: true,
prevShow: true,
nextShow: true
},
this.props
@ -78,7 +78,7 @@ class ElPagination extends WeElement {
<ul class="el-pager">
{arr.map(p => {
return p
})
})}
</ul>{" "}
{opt.nextShow && this.getNext()}
</div>

View File

@ -16,7 +16,7 @@ class ElTable extends WeElement {
return (
<div
className="el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition"
style={{ width: "100%" }}
style={{ width: "100%" }}>
<div className="el-table__header-wrapper">
<table cellSpacing={0} cellPadding={0} border={0} className="el-table__header" >
>