|
@@ -4,12 +4,12 @@
|
|
|
<template v-for="(item, index) in option.filters" :key="index">
|
|
<template v-for="(item, index) in option.filters" :key="index">
|
|
|
<slot :name="item.field" :item="item">
|
|
<slot :name="item.field" :item="item">
|
|
|
<el-form-item :label="item.label" :prop="item.field">
|
|
<el-form-item :label="item.label" :prop="item.field">
|
|
|
- <el-select :placeholder="item.placeholder ?? '请选择'" v-model="item.value" :multiple="item.multiple"
|
|
|
|
|
|
|
+ <el-select :placeholder="item.placeholder ?? t('common.pleasechoice')" v-model="item.value" :multiple="item.multiple"
|
|
|
collapse-tags clearable @change="item.onChange" v-if="item.options">
|
|
collapse-tags clearable @change="item.onChange" v-if="item.options">
|
|
|
<el-option v-for="option in item.options()" :key="option.value" :value="option.value"
|
|
<el-option v-for="option in item.options()" :key="option.value" :value="option.value"
|
|
|
:label="option.label" />
|
|
:label="option.label" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
- <el-input :placeholder="item.placeholder ?? '请输入'" v-model="item.value" v-else />
|
|
|
|
|
|
|
+ <el-input :placeholder="item.placeholder ?? t('common.pleaseenter')" v-model="item.value" v-else />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</slot>
|
|
</slot>
|
|
|
</template>
|
|
</template>
|
|
@@ -27,6 +27,9 @@
|
|
|
import { shallowRef, PropType, computed } from 'vue'
|
|
import { shallowRef, PropType, computed } from 'vue'
|
|
|
import { FormInstance, FormRules } from 'element-plus'
|
|
import { FormInstance, FormRules } from 'element-plus'
|
|
|
import { FilterOption, ActionButton } from '@/hooks/datatable-v2/types'
|
|
import { FilterOption, ActionButton } from '@/hooks/datatable-v2/types'
|
|
|
|
|
+import { i18n } from '@/stores'
|
|
|
|
|
+
|
|
|
|
|
+const { global: { t } } = i18n
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
option: {
|
|
option: {
|