From 153404ffa0a9c6d23d2c2732b46fa6929e86294f Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 18 六月 2025 13:56:18 +0800
Subject: [PATCH] 111
---
admin/src/filters/index.js | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/admin/src/filters/index.js b/admin/src/filters/index.js
new file mode 100644
index 0000000..c5f193c
--- /dev/null
+++ b/admin/src/filters/index.js
@@ -0,0 +1,32 @@
+export default {
+ install (Vue) {
+ // 鎬у埆
+ Vue.filter('sex', (value) => {
+ if (value === '1') {
+ return '鐢�'
+ }
+ if (value === '0') {
+ return '濂�'
+ }
+ return '鏈煡'
+ })
+ // 鏄惁鏂囨锛圷es Or No锛�
+ Vue.filter('YONText', value => {
+ return value ? '鏄�' : '鍚�'
+ })
+ // 鏄惁鍚敤鏂囨
+ Vue.filter('enableText', value => {
+ return value ? '鍚敤' : '绂佺敤'
+ })
+ // 鏄惁绂佺敤鏂囨
+ Vue.filter('disabledText', value => {
+ return value ? '绂佺敤' : '鍚敤'
+ })
+ Vue.filter('disabledText1', (value) => {
+ if (value) {
+ return '鏅�氭枃鏈�'
+ }
+ return '瀵屾枃鏈�'
+ })
+ }
+}
--
Gitblit v1.9.3