소스 검색

移除货币转换字符方法

lxf 2 년 전
부모
커밋
3beddbaace
2개의 변경된 파일10개의 추가작업 그리고 23개의 파일을 삭제
  1. 4 2
      src/main.js
  2. 6 21
      src/utils/util.js

+ 4 - 2
src/main.js

@@ -44,7 +44,10 @@ import {
   selectDictLabels
 } from '@/utils/ruoyi'
 
-import { dictDataEcho, currencyGainSymbol } from '@/utils/util'
+import {
+  dictDataEcho
+}
+from '@/utils/util'
 
 // 分页组件
 import Pagination from '@/components/Pagination'
@@ -76,7 +79,6 @@ app.config.globalProperties.selectDictLabel = selectDictLabel
 app.config.globalProperties.selectDictLabels = selectDictLabels
 //字典回显
 app.config.globalProperties.dictDataEcho = dictDataEcho
-app.config.globalProperties.currencyGainSymbol = currencyGainSymbol
 
 
 

+ 6 - 21
src/utils/util.js

@@ -1,27 +1,12 @@
 //根据value值回显字典label值
 export function dictDataEcho(value, arr) {
   if (value && arr) {
-    value = value + "";
-    const current = arr.find((x) => x.dictKey === value);
+    value = value + ''
+    const current = arr.find(x => x.dictKey === value)
     if (current != undefined && current.dictValue) {
-      return current.dictValue;
+      return current.dictValue
     }
-    return "";
+    return ''
   }
-  return "";
-}
-
-// 货币前缀换算
-export function currencyGainSymbol(key) {
-  if (key === "1") {
-    return "¥";
-  } else if (key === "2") {
-    return "$";
-  } else if (key === "3") {
-    return "€";
-  } else if (key === "4") {
-    return "£";
-  } else {
-    return "";
-  }
-}
+  return ''
+}