update
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<script setup>
|
||||
import {defineModel} from 'vue';
|
||||
import XSelect from '../XSelect/index.vue';
|
||||
|
||||
|
||||
const FROM_TYPE = {
|
||||
INPUT: 'input',
|
||||
@@ -8,10 +10,14 @@ const FROM_TYPE = {
|
||||
CUSTOM: 'custom',
|
||||
}
|
||||
const emits = defineEmits(['search']);
|
||||
const {config} = defineProps({
|
||||
const {config, title} = defineProps({
|
||||
config: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '查询任务'
|
||||
}
|
||||
});
|
||||
const from = defineModel('from');
|
||||
@@ -26,7 +32,7 @@ const reset = () => {
|
||||
|
||||
<template>
|
||||
<div class="title">
|
||||
查询任务
|
||||
{{ title }}
|
||||
</div>
|
||||
|
||||
<div class="flex">
|
||||
@@ -44,12 +50,12 @@ const reset = () => {
|
||||
</template>
|
||||
|
||||
<template v-if="item.type === FROM_TYPE.SELECT">
|
||||
<a-select
|
||||
<x-select
|
||||
class="w-full"
|
||||
v-model:model-value="from[item.key]"
|
||||
:options="item.options"
|
||||
:placeholder="item.placeholder">
|
||||
</a-select>
|
||||
:placeholder="item.placeholder"
|
||||
:api="item.api">
|
||||
</x-select>
|
||||
</template>
|
||||
|
||||
<template v-if="item.type === FROM_TYPE.DATETIME">
|
||||
@@ -95,6 +101,7 @@ const reset = () => {
|
||||
font-weight: 400;
|
||||
line-height: 28px;
|
||||
text-align: left;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.AFORM {
|
||||
:deep(.arco-row) {
|
||||
|
||||
Reference in New Issue
Block a user