From 2af5f043b60c1f7ac38ecccc8f5bf44743134325 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 12 十二月 2025 18:08:00 +0800
Subject: [PATCH] test
---
pages/teaching/list.vue | 29 ++++++++++++++++++++---------
1 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/pages/teaching/list.vue b/pages/teaching/list.vue
index 7d62a86..9230d0c 100644
--- a/pages/teaching/list.vue
+++ b/pages/teaching/list.vue
@@ -10,7 +10,8 @@
<view class="item-title">{{item.name}}</view>
<view class="item-text">{{getTeachingSrcDst(item)}}</view>
<template v-slot:right>
- <view class="btn-del" @click="clickDelTeachingMode('Public',item)">鍒犻櫎</view>
+ <view class="btn-del" @click="clickDelTeachingMode('Public',item)">{{translate("delete")}}
+ </view>
</template>
</uni-swipe-action-item>
<uni-swipe-action-item class="list-item"
@@ -20,7 +21,8 @@
<view class="item-title">{{item.name}}</view>
<view class="item-text">{{getTeachingSrcDst(item)}}</view>
<template v-slot:right>
- <view class="btn-del" @click="clickDelTeachingMode('Stations',item)">鍒犻櫎</view>
+ <view class="btn-del" @click="clickDelTeachingMode('Stations',item)">{{translate("delete")}}
+ </view>
</template>
</uni-swipe-action-item>
</uni-swipe-action>
@@ -131,7 +133,7 @@
} catch (ex) {
- showError(ex)
+ showError(ex, this.translate('error'))
}
},
@@ -143,7 +145,7 @@
this.teachingPublic = data?.Public || []
this.teachingStation = data?.Stations || []
} catch (ex) {
- showError(ex)
+ showError(ex, this.translate('error'))
}
},
clickAddTeaching() {
@@ -219,7 +221,8 @@
const list = item.pos_list || []
let tip = ""
if (list.length > 1) {
- tip = `(${Number(list[0].x).toFixed(2)},${Number(list[0].y).toFixed(2)}) (${Number(list[1].x).toFixed(2)},${Number(list[1].y).toFixed(2)})`
+ tip =
+ `(${Number(list[0].x).toFixed(2)},${Number(list[0].y).toFixed(2)}) (${Number(list[1].x).toFixed(2)},${Number(list[1].y).toFixed(2)})`
}
if (list.length == 1) {
tip = `(${Number(list[0].x).toFixed(2)},${Number(list[0].y).toFixed(2)})`
@@ -227,7 +230,12 @@
return tip
},
clickDelTeachingMode(mode, item) {
- showModal("纭鍒犻櫎绀烘暀", "璀﹀憡",true,"纭畾","鍙栨秷").then((res) => {
+ showModal({
+ title: "",
+ content: `${this.translate('ask_deleting_teaching')}`,
+ confirmText: this.translate('ok'),
+ cancelText: this.translate('cancel'),
+ }).then((res) => {
if (res) {
this.deleteTeachingMode(mode, item)
}
@@ -261,11 +269,14 @@
}
} catch (ex) {
- showError(ex)
+ showError(ex, this.translate('error'))
}
},
-
+ translate(t) {
+ if (typeof this.$t == "function") return this.$t(`page.${t}`)
+ else return t;
+ },
}
@@ -363,7 +374,7 @@
.item-title {
font-size: 32rpx;
- padding: 10rpx 20rpx;
+ padding: 10rpx 20rpx;
}
--
Gitblit v1.9.1