Browse Source

fix(frontend): 修复资金流向与资金快转选择对象占位文字不显示

cc 1 day ago
parent
commit
e3f08b631a

+ 3 - 2
ai-electron/frontend/src/trans/views/capitalFlow/index.vue

@@ -325,7 +325,8 @@
   }));
 
   const filters = ref({
-    target: '',
+    // undefined 才能让 antd Select 显示 placeholder(空字符串会被当成已选中空值)
+    target: undefined as string | undefined,
     amountOp: 'GT' as CompareOperator,
     amountValue: '',
     dateRange: undefined as RangeValue,
@@ -1249,7 +1250,7 @@
 
   const handleReset = () => {
     filters.value = {
-      target: '',
+      target: undefined,
       amountOp: 'GT' as CompareOperator,
       amountValue: '',
       dateRange: undefined,

+ 3 - 2
ai-electron/frontend/src/trans/views/fastTransfer/index.vue

@@ -220,7 +220,8 @@
   type RangeValue = [string, string] | undefined;
 
   const filters = ref({
-    target: '',
+    // undefined 才能让 antd Select 显示 placeholder(空字符串会被当成已选中空值)
+    target: undefined as string | undefined,
     intervalValue: '24',
     amountOp: DEFAULT_COMPARE_OPERATOR,
     amountValue: '10000',
@@ -495,7 +496,7 @@
 
   const handleReset = async () => {
     filters.value = {
-      target: '',
+      target: undefined,
       intervalValue: '24',
       amountOp: DEFAULT_COMPARE_OPERATOR,
       amountValue: '10000',