提交 4bbbfb2b authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 4751f942
...@@ -35,23 +35,11 @@ export default { ...@@ -35,23 +35,11 @@ export default {
prev: { to: { query: { active: 'application_info', tab: 'application_info_honor' } } }, prev: { to: { query: { active: 'application_info', tab: 'application_info_honor' } } },
next: { to: { query: { active: 'application_wfzzm' } } }, next: { to: { query: { active: 'application_wfzzm' } } },
hasAdd: true, hasAdd: true,
renderAside(h, data, _that) {
// console.log(this, _that)
_that.$slots.aside = (
<div>
<p style='color:#33C011;'>推荐人已完成</p>
<el-button
type='primary'
onClick={() => {
console.log(this, data)
}}>
再次邀请
</el-button>
<el-button type='primary'>更换推荐人</el-button>
</div>
)
},
aside: { aside: {
visible(data) {
console.log(data)
return !!data.letter_content
},
prepend: '<p style="color:#33C011;">推荐人已完成</p>', prepend: '<p style="color:#33C011;">推荐人已完成</p>',
buttons: [ buttons: [
{ {
......
{ {
"name": "@ezijing/vue-form", "name": "@ezijing/vue-form",
"version": "0.2.5", "version": "0.2.7",
"private": false, "private": false,
"description": "基于Vue Element-UI的表单", "description": "基于Vue Element-UI的表单",
"scripts": { "scripts": {
......
...@@ -7,15 +7,30 @@ ...@@ -7,15 +7,30 @@
<template v-if="form.hasAdd && isMultiple"> <template v-if="form.hasAdd && isMultiple">
<template v-for="(item, index) in model"> <template v-for="(item, index) in model">
<div class="v-form-group" :key="index"> <div class="v-form-group" :key="index">
<v-form <div class="v-form-group__inner">
:options="form.options" <v-form
:items="form.items" :options="form.options"
:model="item" :items="form.items"
:hasButton="false" :model="item"
:submitText="form.submitText" :hasButton="false"
v-on="$listeners" :submitText="form.submitText"
ref="form" v-on="$listeners"
></v-form> ref="form"
class="v-form-group__content"
></v-form>
<template v-if="form.aside">
<div class="v-form-group__aside" v-if="form.aside.visible(item)">
<div v-html="form.aside.prepend"></div>
<div>
<div v-for="(button, index) in form.aside.buttons" :key="index">
<el-button type="primary" size="medium" plain @click="button.onClick(item)">{{
button.text
}}</el-button>
</div>
</div>
</div>
</template>
</div>
<div class="v-form-group__remove" @click="handleRemove(index)">删除</div> <div class="v-form-group__remove" @click="handleRemove(index)">删除</div>
</div> </div>
</template> </template>
...@@ -190,6 +205,23 @@ export default { ...@@ -190,6 +205,23 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
border-bottom: 1px solid #f1f1f1; border-bottom: 1px solid #f1f1f1;
} }
.v-form-group__inner {
display: flex;
}
.v-form-group__content {
flex: 1;
}
.v-form-group__aside {
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: space-between;
padding-bottom: 60px;
.el-button {
width: 108px;
margin-top: 20px;
}
}
.v-form-group__remove { .v-form-group__remove {
position: absolute; position: absolute;
bottom: 20px; bottom: 20px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论