mirror of
https://github.com/Dichgrem/Vue.git
synced 2026-02-05 12:51:56 -05:00
fix:select
This commit is contained in:
@@ -23,9 +23,18 @@
|
||||
import moment from "moment";
|
||||
|
||||
export default {
|
||||
props: ["data"],
|
||||
props: ["data", "isMyApply"],
|
||||
data() {
|
||||
return {
|
||||
applyStatusMap: ["", "审核中", "审核通过", "审核拒绝"],
|
||||
bgColorMap: ["", "#1989fa", "#07c160", "#f6352c"],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getTagStyle(data) {
|
||||
if (this.isMyApply && data.applyStatus !== undefined) {
|
||||
return { backgroundColor: this.bgColorMap[data.applyStatus] };
|
||||
}
|
||||
return { backgroundColor: data.canApply ? "#07c160" : "#999" };
|
||||
},
|
||||
formatDate(value) {
|
||||
@@ -35,6 +44,9 @@ export default {
|
||||
this.$emit("goDetails", id);
|
||||
},
|
||||
getTagTxt(data) {
|
||||
if (this.isMyApply && data.applyStatus !== undefined) {
|
||||
return this.applyStatusMap[data.applyStatus];
|
||||
}
|
||||
return data.canApply ? "进行中" : "已结束";
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user