Skip to content

Commit

Permalink
build v2.3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
smallweis committed Jan 21, 2020
1 parent 88b7435 commit 17d052c
Show file tree
Hide file tree
Showing 21 changed files with 488 additions and 235 deletions.
11 changes: 10 additions & 1 deletion examples/element-ui/crud/cell.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,14 @@
type: "datetime",
format: "yyyy-MM-dd hh:mm:ss",
valueFormat: "timestamp",
cell: true
cell: true,
rules: [
{
required: true,
message: '请选择日期',
trigger: 'blur'
}
]
}, {
label: '地址',
prop: 'textarea',
Expand Down Expand Up @@ -319,6 +326,7 @@
area: '130202',
datetime: '2019-01-01 00:00:00',
switch1: false,
$cellEdit: true,
switch2: false
},
{
Expand All @@ -334,6 +342,7 @@
area: '110101',
datetime: '2019-01-01 00:00:00',
switch1: true,
$cellEdit: true,
switch2: false
}
]
Expand Down
5 changes: 3 additions & 2 deletions examples/element-ui/crud/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,9 @@
this.data = data
this.$message.success('page' + JSON.stringify(page))
},
searchChange(params) {
searchChange(params,done) {
this.$message.success('search callback' + JSON.stringify(Object.assign(params, this.searchForm)))
done()
},
searchReset() {
this.searchForm = {};
Expand All @@ -512,4 +513,4 @@
})
</script>

</html>
</html>
40 changes: 22 additions & 18 deletions examples/element-ui/crud/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@

<body>
<div id="app">
{{page}}
<avue-crud ref="crud" :option="option" @size-change="sizeChange" @current-change="currentChange" :data="data"
:page="page" @on-load="onLoad"></avue-crud>
:page.sync="page" @on-load="onLoad"></avue-crud>
</div>
</body>
<script>
Expand All @@ -36,6 +37,7 @@
},
data: [],
option: {
index: true,
height: 'auto',
align: 'center',
menuAlign: 'center',
Expand All @@ -62,23 +64,25 @@
},
onLoad(page) {
this.$message.success('分页信息:' + JSON.stringify(page))
this.page.total = 40
//模拟分页
if (page.currentPage === 1) {
this.data = [
{
name: '张三',
sex: '男'
}
]
} else if (page.currentPage == 2) {
this.data = [
{
name: '李四',
sex: '女'
}
]
}
setTimeout(() => {
this.page.total = 40
//模拟分页
if (page.currentPage === 1) {
this.data = [
{
name: '张三',
sex: '男'
}
]
} else if (page.currentPage == 2) {
this.data = [
{
name: '李四',
sex: '女'
}
]
}
}, 2000)
}
}
})
Expand Down
4 changes: 4 additions & 0 deletions examples/element-ui/crud/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
}
},
mounted() {
setTimeout(() => {
console.log('clear')
this.$refs.crud.searchReset()
}, 5000)
setTimeout(() => {
console.log('开始异步加载了')
this.option = {
Expand Down
21 changes: 20 additions & 1 deletion examples/element-ui/form/date.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@

<body>
<div id="app">
<avue-form v-model="form" :option="option" @submit="submit"></avue-form>
<avue-form v-model="form" :option="option" @submit="submit">
<template slot-scope="{}" slot="daterangeLabel">
<span>姓名&nbsp;&nbsp;</span>
<el-tooltip class="item" effect="dark" content="文字提示" placement="top-start">
<i class="el-icon-warning"></i>
</el-tooltip>
</template>
<template slot-scope="{error}" slot="daterangeError">
<p style="color:green">自定义提示</p>
</template>
</avue-form>
</div>
</body>
<script>
Expand All @@ -33,9 +43,18 @@
option: {
labelWidth: 110,
column: [{
rules: [
{
required: true,
message: '请输入数字',
trigger: 'blur'
}
],
label: "日期范围",
prop: "daterange",
type: "daterange",
labelslot: true,
errorslot: true,
startPlaceholder: '日期开始范围自定义',
endPlaceholder: '日期结束范围自定义',
}, {
Expand Down
4 changes: 2 additions & 2 deletions examples/element-ui/form/tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
data() {
return {
data: {
shenfeng: [6],
shenfeng1: 6
shenfeng: [],
shenfeng1: ''
},
option: {
column: [{
Expand Down
1 change: 1 addition & 0 deletions examples/element-ui/tree/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
}
],
option: {
defaultExpandAll: true,
nodeKey: 'id',
dialogWidth: '60%',
formOption: {
Expand Down
Loading

0 comments on commit 17d052c

Please sign in to comment.