style: lint格式化文件

This commit is contained in:
2025-10-21 18:04:02 +08:00
parent f9ca969fec
commit 7629120548
1092 changed files with 148218 additions and 157907 deletions

View File

@ -1,6 +1,6 @@
<template>
<div>
<!-- <TreeSelect
<div>
<!-- <TreeSelect
v-model:value="value"
show-search
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
@ -10,68 +10,58 @@
:fieldNames="fieldNames"
style="width: 100%"
/> -->
<a-select
v-model:value="value"
show-search
:disabled="disabled"
:placeholder="t('请选择数据选项')"
:options="data"
:filter-option="false"
:fieldNames="fieldNames"
style="width: 100%"
@search="handleSearch"
/>
</div>
<a-select v-model:value="value" show-search :disabled="disabled" :placeholder="t('请选择数据选项')" :options="data" :filter-option="false" :fieldNames="fieldNames" style="width: 100%" @search="handleSearch" />
</div>
</template>
<script lang="ts" setup>
import { onMounted, ref, unref, watch } from 'vue';
import { getDicItemList } from '/@/api/system/dic';
import { useI18n } from '/@/hooks/web/useI18n';
import { cloneDeep } from 'lodash-es';
const { t } = useI18n();
const emit = defineEmits(['update:value', 'change']);
import { onMounted, ref, unref, watch } from 'vue';
import { getDicItemList } from '/@/api/system/dic';
import { useI18n } from '/@/hooks/web/useI18n';
import { cloneDeep } from 'lodash-es';
const { t } = useI18n();
const emit = defineEmits(['update:value', 'change']);
const props = defineProps({
value: String,
disabled: { type: Boolean, default: () => false },
});
const value = ref(props.value);
const data = ref<Recordable[]>([]);
const options = ref<Recordable[]>([]);
const fieldNames = ref({
label: 'name',
value: 'id',
});
onMounted(() => {
fetch();
});
watch(
() => value,
() => {
emit('update:value', unref(value)?.toString());
emit('change', unref(value)?.toString());
},
{ deep: true },
);
async function fetch() {
data.value = await getDicItemList();
options.value = cloneDeep(data.value);
// data.value.map((item) => {
// item.disabled = true;
// item.value = item.id; //避免数字字典项没有value导致treeselect组件报错
// });
value.value = props.value;
}
function handleSearch(val) {
data.value = options.value.filter((item) => {
return item.name.includes(val);
const props = defineProps({
value: String,
disabled: { type: Boolean, default: () => false }
});
}
const value = ref(props.value);
const data = ref<Recordable[]>([]);
const options = ref<Recordable[]>([]);
const fieldNames = ref({
label: 'name',
value: 'id'
});
onMounted(() => {
fetch();
});
watch(
() => value,
() => {
emit('update:value', unref(value)?.toString());
emit('change', unref(value)?.toString());
},
{ deep: true }
);
async function fetch() {
data.value = await getDicItemList();
options.value = cloneDeep(data.value);
// data.value.map((item) => {
// item.disabled = true;
// item.value = item.id; //避免数字字典项没有value导致treeselect组件报错
// });
value.value = props.value;
}
function handleSearch(val) {
data.value = options.value.filter((item) => {
return item.name.includes(val);
});
}
</script>