Ver Fonte

修改formatValue

huangbin há 4 anos atrás
pai
commit
7538843317

+ 1 - 1
src/common/methods/format/index.ts

@@ -49,7 +49,7 @@ export function getGoodsDesc(param: string): string {
 /**
  * 格式化空字符情况,如果传入字符串且为空时候返回 --,传入数字且为空时候 返回 0,其它返回本身
  */
-export function formarValue(value: number | string) {
+export function formatValue(value: number | string) {
     if (typeof value === 'number') {
         return value ? value : 0;
     } else {

+ 2 - 2
src/common/methods/index.ts

@@ -1,6 +1,6 @@
-import { formarValue, formatTime, getGoodsDesc, getImg, getImgUrl } from './format/index';
+import { formatTime, formatValue, getGoodsDesc, getImg, getImgUrl } from './format/index';
 import { cacheInitData, initData, setLoadComplete } from './mixin/index';
 import { mybuystatus, mypackstatus, signStatus } from './statusfilter/index';
 
-export { getImg, getImgUrl, getGoodsDesc, initData, formatTime, formarValue, mybuystatus, mypackstatus, signStatus, cacheInitData, setLoadComplete };
+export { getImg, getImgUrl, getGoodsDesc, initData, formatTime, formatValue, mybuystatus, mypackstatus, signStatus, cacheInitData, setLoadComplete };
 

+ 4 - 4
src/views/information/custom/compoments/detail/index.vue

@@ -22,7 +22,7 @@
         </a-col>
         <a-col :span="12">
           <a-form-item label="企业名称">
-            <span class="white">{{ formarValue(selectedRow.customername)}}</span>
+            <span class="white">{{ formatValue(selectedRow.customername)}}</span>
           </a-form-item>
         </a-col>
       </a-row>
@@ -84,7 +84,7 @@
         </a-col>
         <a-col :span="12">
           <a-form-item label="状态">
-            <span class="green">{{ formarValue(getStatusName(selectedRow.status)) }}</span>
+            <span class="green">{{ formatValue(getStatusName(selectedRow.status)) }}</span>
           </a-form-item>
         </a-col>
       </a-row>
@@ -112,7 +112,7 @@ import { closeModal } from '@/common/setup/modal/index';
 import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { mergeObj } from '@/utils/objHandle';
 import { getStatusName } from '@/views/information/custom/setup';
-import { formarValue, formatTime } from '@/common/methods';
+import { formatValue, formatTime } from '@/common/methods';
 
 export default defineComponent({
     name: 'custom-detail',
@@ -156,7 +156,7 @@ export default defineComponent({
             submit,
             loading,
             detail,
-            formarValue,
+            formatValue,
             getStatusName,
         };
     },