forked from github/dataease
Merge pull request #7779 from dataease/pr@dev-v2@perf_log_tips
perf: 日志列表过滤条件文案
This commit is contained in:
commit
971f327994
@ -2,7 +2,8 @@
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { ElSelect, ElOption } from 'element-plus-secondary'
|
||||
import { computed, reactive } from 'vue'
|
||||
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
const { t } = useI18n()
|
||||
const props = defineProps({
|
||||
optionList: propTypes.arrayOf(
|
||||
propTypes.shape({
|
||||
@ -10,7 +11,13 @@ const props = defineProps({
|
||||
name: propTypes.string
|
||||
})
|
||||
),
|
||||
title: propTypes.string
|
||||
title: propTypes.string,
|
||||
property: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
placeholder: ''
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const state = reactive({
|
||||
@ -46,6 +53,7 @@ defineExpose({
|
||||
v-model="state.activeStatus"
|
||||
value-key="id"
|
||||
filterable
|
||||
:placeholder="t('common.please_select') + props.property.placeholder"
|
||||
multiple
|
||||
@change="selectStatus"
|
||||
>
|
||||
|
@ -1,8 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { ElTreeSelect } from 'element-plus-secondary'
|
||||
import { computed, reactive, ref } from 'vue'
|
||||
|
||||
import { computed, reactive, ref, PropType, toRefs } from 'vue'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
const { t } = useI18n()
|
||||
interface TreeConfig {
|
||||
checkStrictly: boolean
|
||||
showCheckbox: boolean
|
||||
checkOnClickNode: boolean
|
||||
placeholder: string
|
||||
}
|
||||
const props = defineProps({
|
||||
optionList: propTypes.arrayOf(
|
||||
propTypes.shape({
|
||||
@ -12,7 +19,22 @@ const props = defineProps({
|
||||
disabled: Boolean
|
||||
})
|
||||
),
|
||||
title: propTypes.string
|
||||
title: propTypes.string,
|
||||
property: Object as PropType<TreeConfig>
|
||||
})
|
||||
|
||||
const { property } = toRefs(props)
|
||||
const treeConfig = computed(() => {
|
||||
let obj = Object.assign(
|
||||
{
|
||||
checkStrictly: false,
|
||||
showCheckbox: true,
|
||||
checkOnClickNode: true,
|
||||
placeholder: t('user.role')
|
||||
},
|
||||
property.value
|
||||
)
|
||||
return obj
|
||||
})
|
||||
|
||||
const state = reactive({
|
||||
@ -58,9 +80,10 @@ defineExpose({
|
||||
:highlight-current="true"
|
||||
multiple
|
||||
:render-after-expand="false"
|
||||
:placeholder="$t('common.please_select') + $t('user.role')"
|
||||
show-checkbox
|
||||
check-on-click-node
|
||||
:placeholder="$t('common.please_select') + treeConfig.placeholder"
|
||||
:show-checkbox="treeConfig.showCheckbox"
|
||||
:check-strictly="treeConfig.checkStrictly"
|
||||
:check-on-click-node="treeConfig.checkOnClickNode"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -107,6 +107,7 @@ defineExpose({
|
||||
v-if="component.type === 'tree-select'"
|
||||
:option-list="component.option"
|
||||
:title="component.title"
|
||||
:property="component.property"
|
||||
@filter-change="v => filterChange(v, component.field, 'in')"
|
||||
/>
|
||||
<drawer-filter
|
||||
@ -114,6 +115,7 @@ defineExpose({
|
||||
v-if="component.type === 'select'"
|
||||
:option-list="component.option"
|
||||
:title="component.title"
|
||||
:property="component.property"
|
||||
@filter-change="v => filterChange(v, component.field, 'in')"
|
||||
/>
|
||||
<drawer-enum-filter
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 217f54b5a74178cb1de0b9daed983ea78bf48578
|
||||
Subproject commit 62f9e14297af537ce48f32571d97e3e90ba60796
|
Loading…
Reference in New Issue
Block a user