feat:优化时间范围的变量、方法的命名,和代码生成器进一步统一

This commit is contained in:
YunaiV
2025-12-17 21:22:15 +08:00
parent 9ae1cb9bdf
commit d6a50762bd
8 changed files with 234 additions and 159 deletions

View File

@@ -72,6 +72,10 @@ const emit = defineEmits<{
}>()
const visible = ref(false)
const formData = reactive<SearchFormData>({
name: undefined,
status: undefined,
})
/** 搜索条件 placeholder 拼接 */
const searchPlaceholder = computed(() => {
@@ -88,11 +92,6 @@ const searchPlaceholder = computed(() => {
return conditions.length > 0 ? conditions.join(' | ') : '搜索菜单'
})
const formData = reactive<SearchFormData>({
name: undefined,
status: undefined,
})
/** 监听弹窗打开,同步外部参数 */
watch(visible, (val) => {
if (val && props.searchParams) {

View File

@@ -60,6 +60,7 @@ function handleBack() {
}
/** 获取请求 URL */
// TODO @AI放在界面里这里不要这么搞
function getRequestUrl() {
if (formData.value?.requestMethod && formData.value?.requestUrl) {
return `${formData.value.requestMethod} ${formData.value.requestUrl}`