Merge branch 'ymf' of https://e.coding.net/g-cphe0354/cashier/cashier-web
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
</template>
|
||||
<!-- textarea 输入框 -->
|
||||
|
||||
<template v-else-if="item.type === 'textarea' || item.type === undefined">
|
||||
<template v-else-if="item.type === 'textarea'">
|
||||
<el-input v-model="formData[item.prop]" type="textarea" v-bind="item.attrs" />
|
||||
</template>
|
||||
<!-- Select 选择器 -->
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
<el-input v-model="formData[item.prop]" v-bind="item.attrs" />
|
||||
</template>
|
||||
<!-- textarea 输入框 -->
|
||||
<template v-if="item.type === 'textarea' || item.type === undefined">
|
||||
<el-input v-model="formData[item.prop]" v-bind="item.attrs" />
|
||||
<template v-if="item.type === 'textarea'">
|
||||
<el-input v-model="formData[item.prop]" v-bind="item.attrs" type="textarea" />
|
||||
</template>
|
||||
<!-- Select 选择器 -->
|
||||
<template v-else-if="item.type === 'select'">
|
||||
@@ -123,6 +123,10 @@
|
||||
<template v-if="item.type === 'input' || item.type === undefined">
|
||||
<el-input v-model="formData[item.prop]" v-bind="item.attrs" />
|
||||
</template>
|
||||
<!-- textarea 输入框 -->
|
||||
<template v-if="item.type === 'textarea'">
|
||||
<el-input v-model="formData[item.prop]" v-bind="item.attrs" type="textarea" />
|
||||
</template>
|
||||
<!-- Select 选择器 -->
|
||||
<template v-else-if="item.type === 'select'">
|
||||
<el-select v-model="formData[item.prop]" v-bind="item.attrs">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
shadow="never"
|
||||
class="mb-[10px]"
|
||||
>
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="inline">
|
||||
<template v-for="(item, index) in formItems" :key="item.prop">
|
||||
<el-form-item
|
||||
v-show="isExpand ? true : index < showNumber"
|
||||
@@ -36,6 +36,14 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</template>
|
||||
<!-- radio-button radio按钮组 -->
|
||||
<template v-if="item.type === 'radio-button'">
|
||||
<el-radio-group v-model="queryParams[item.prop]" v-bind="item.attrs">
|
||||
<template v-for="option in item.options" :key="option.value">
|
||||
<el-radio-button :label="option.label" :value="option.value" />
|
||||
</template>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
<!-- InputTag 标签输入框 -->
|
||||
<template v-if="item.type === 'input-tag'">
|
||||
<div class="flex-center">
|
||||
@@ -131,6 +139,10 @@ const emit = defineEmits<{
|
||||
}>();
|
||||
|
||||
const queryFormRef = ref<FormInstance>();
|
||||
//form表单展示形式
|
||||
const inline = ref<boolean>(
|
||||
props.searchConfig.inline === undefined ? true : !!props.searchConfig.inline
|
||||
);
|
||||
// 是否显示
|
||||
const visible = ref(true);
|
||||
// 响应式的formItems
|
||||
|
||||
@@ -29,10 +29,11 @@ export interface IOperatData {
|
||||
export interface ISearchConfig {
|
||||
// 页面名称(参与组成权限标识,如sys:user:xxx)
|
||||
pageName: string;
|
||||
inline?: Boolean;
|
||||
// 表单项
|
||||
formItems: Array<{
|
||||
// 组件类型(如input,select等)
|
||||
type?: "input" | "select" | "tree-select" | "date-picker" | "input-tag";
|
||||
type?: "input" | "select" | "tree-select" | "date-picker" | "input-tag" | "radio-button";
|
||||
// 标签文本
|
||||
label: string;
|
||||
// 标签提示
|
||||
|
||||
Reference in New Issue
Block a user