应付账单初始化
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</slot>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item v-if="$slots.default" :label-width="actionLabelWidth" :class="actionAlign === 'center' ? 'basic-form-action--center' : ''">
|
||||
<el-form-item v-if="$slots.default" :label-width="actionLabelWidth" :class="actionClass">
|
||||
<slot />
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -51,7 +51,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="actionSpan" v-if="$slots.default">
|
||||
<el-form-item :label-width="actionLabelWidth" :class="actionAlign === 'center' ? 'basic-form-action--center' : ''">
|
||||
<el-form-item :label-width="actionLabelWidth" :class="actionClass">
|
||||
<slot />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -159,13 +159,19 @@ const props = defineProps({
|
||||
type: [String, Number],
|
||||
default: '0'
|
||||
},
|
||||
// 操作区(默认插槽)对齐方式:left / center(center 时独占一行并水平居中)
|
||||
// 操作区(默认插槽)对齐方式:left / center / right
|
||||
actionAlign: {
|
||||
type: String,
|
||||
default: 'left'
|
||||
}
|
||||
})
|
||||
|
||||
const actionClass = computed(() => {
|
||||
if (props.actionAlign === 'center') return 'basic-form-action--center'
|
||||
if (props.actionAlign === 'right') return 'basic-form-action--right'
|
||||
return ''
|
||||
})
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const formRef = ref()
|
||||
|
||||
@@ -276,4 +282,17 @@ defineExpose({
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
/* 操作区靠右:独占整行,按钮贴在右侧 */
|
||||
.basic-form--perrow .basic-form-action--right {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.basic-form .basic-form-action--right {
|
||||
width: 100%;
|
||||
flex: 0 0 100%;
|
||||
margin-right: 0;
|
||||
}
|
||||
.basic-form-action--right :deep(.el-form-item__content) {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -208,7 +208,7 @@ const props = defineProps({
|
||||
type: [String, Number],
|
||||
default: 'auto'
|
||||
},
|
||||
// 搜索按钮区对齐:left / center(搜索项较多按钮换行时可用 center 让按钮居中)
|
||||
// 搜索按钮区对齐:left / center / right
|
||||
searchActionAlign: {
|
||||
type: String,
|
||||
default: 'left'
|
||||
|
||||
Reference in New Issue
Block a user