|
@@ -70,6 +70,9 @@
|
|
|
options: {
|
|
|
type: Object,
|
|
|
},
|
|
|
+ gradeTerm: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
})
|
|
|
const isVip = getUserIdentity();
|
|
|
const gradeMapping = {
|
|
@@ -90,6 +93,7 @@
|
|
|
let isSliding = ref(false);
|
|
|
let endX = ref(0);
|
|
|
let gradeTerm = ref('');
|
|
|
+
|
|
|
|
|
|
function clickGradeTerm() {
|
|
|
$emit('clickGradeTerm');
|
|
@@ -132,10 +136,6 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- function translateData(data) {
|
|
|
- return gradeMapping[data.nianji] + termMapping[data.cardId]
|
|
|
- }
|
|
|
-
|
|
|
function handleCheckCatalogue() {
|
|
|
$emit('handleCheckCatalogue');
|
|
|
}
|
|
@@ -196,12 +196,22 @@
|
|
|
// console.log('New options:', newVal);
|
|
|
// console.log('Old options:', oldVal);
|
|
|
// 在这里可以根据新的 options 做一些操作,比如发起请求等
|
|
|
- gradeTerm.value = translateData(newVal);
|
|
|
+
|
|
|
dataRecom(newVal)
|
|
|
}, {
|
|
|
deep: true,
|
|
|
immediate: true
|
|
|
});
|
|
|
+ watch(() => props.gradeTerm, (newVal, oldVal) => {
|
|
|
+ // console.log('New options:', newVal);
|
|
|
+ // console.log('Old options:', oldVal);
|
|
|
+ // 在这里可以根据新的 options 做一些操作,比如发起请求等
|
|
|
+ gradeTerm.value = newVal
|
|
|
+
|
|
|
+ }, {
|
|
|
+ deep: true,
|
|
|
+ immediate: true
|
|
|
+ });
|
|
|
</script>
|
|
|
|
|
|
<style>
|