提交 b76383ab 编写于 作者: KK's avatar KK

表单分组样式

上级 65a48640
<template> <template>
<ion-row class="app-form-group">
<ion-row class="app-form-group" >
<ion-item-divider v-if="isShowCaption" :style="{minHeight:caption?'':'10px'}" @click="clickCollapse"> <ion-item-divider v-if="isShowCaption" :style="{minHeight:caption?'':'10px'}" @click="clickCollapse">
<ion-label> <ion-label>
<span :class="titleClass">{{caption}}</span> <span :class="titleClass">{{caption}}</span>
</ion-label> </ion-label>
<ion-icon v-show="titleBarCloseMode !== 0" class="group-collapse" :name="collapseContant ? 'chevron-back-outline' : 'chevron-down-outline'"></ion-icon> <ion-icon v-show="titleBarCloseMode !== 0" class="group-collapse" :name="collapseContant ? 'chevron-back-outline' : 'chevron-down-outline'"></ion-icon>
</ion-item-divider> </ion-item-divider>
<ion-row v-show="!collapseContant" class="form-group-content"> <ion-row ref="group" v-show="!collapseContant" class="form-group-content">
<slot></slot> <slot></slot>
</ion-row> </ion-row>
</ion-row> </ion-row>
</template> </template>
<script lang="ts"> <script lang="ts">
...@@ -150,6 +153,19 @@ export default class AppFormGroup extends Vue { ...@@ -150,6 +153,19 @@ export default class AppFormGroup extends Vue {
public doUIAction($event: any, item: any): void { public doUIAction($event: any, item: any): void {
this.$emit('groupuiactionclick', { event: $event, item: item }); this.$emit('groupuiactionclick', { event: $event, item: item });
} }
/**
* 生命周期
*
* @type {string}
* @memberof AppFormGroup
*/
public mounted(){
let groupList :any= this.$refs.group;
if(groupList){
groupList.lastElementChild.classList.add("item-last-item")
}
}
} }
</script> </script>
<style lang='less'> <style lang='less'>
......
...@@ -46,4 +46,7 @@ ...@@ -46,4 +46,7 @@
.app-form-item-textarea{ .app-form-item-textarea{
--padding-end: 26px; --padding-end: 26px;
} }
}
.app-form-item.item-last-item {
--inner-border-width: 0;
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册