From 9860e221460a0a4ac1903dad2c97160d0eed0e63 Mon Sep 17 00:00:00 2001 From: long <515897141@qq.com> Date: 星期五, 03 三月 2023 10:59:42 +0800 Subject: [PATCH] 初始化 --- src/filter/index.js | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/src/filter/index.js b/src/filter/index.js new file mode 100644 index 0000000..7de17dd --- /dev/null +++ b/src/filter/index.js @@ -0,0 +1,43 @@ +// 杩囨护鍣� + +import Vue from 'vue' + +function install(){ + // // 鍒嗚浆浠锋牸 + // Vue.filter('amount', function (number) { + // // var number = +val.replace(/[^\d.]/g, ''); + // return isNaN(number) ? 0.00 : parseFloat((number/100).toFixed(2)); + // }); + + // // 鐪佸拰鍩庡競涓�鏍风殑鏃跺�欙紝涓嶆樉绀哄煄甯� + // Vue.filter('city', function (city, province) { + // if (city == province) { + // return '' + // } else { + // return city + // } + // }) + + // // 闇�姹傛爣棰橈紝鍙樉绀哄垎绫荤浜岀骇绗笁绾� + // Vue.filter('serviceTypeTitle', function (serviceType) { + // var [type1, type2, type3] = serviceType.split('|')[0].split('-') + // return [type2, type3].join('-') + // }) + + // // 缂╁噺璁㈠崟缂栧彿 + // Vue.filter('shortNo', function (no) { + // if (no.length > 20) { + // return no.substring(no.length - 20, no.length) + // } + // return no + // }) + + // // 璁㈠崟銆佸笀鍌呰瘎鍒嗚浆鎹� + // Vue.filter('score', function (score) { + // return score / 100 + // }) +} + +export default { + install +} \ No newline at end of file -- Gitblit v1.8.0