This commit is contained in:
A1300399510
2023-07-07 19:38:21 +08:00
parent 93fb0c1c98
commit 444c6bb486
7 changed files with 347 additions and 93 deletions

View File

@@ -28,7 +28,6 @@ export default {
props: ['popState', "intermediary"],
setup(props) {
const { proxy } = getCurrentInstance()
const tabList = {
@@ -37,37 +36,27 @@ export default {
more: "更多说明",
};
const tab = ref("person"); // person intermediary more
computed(() => {
if (props['intermediary'] == 1) tab = "intermediary"
else tab = "person"
})
let tab = ref("person"); // person intermediary more
if (props['intermediary'] == 1) tab.value = "intermediary"
else tab.value = "person"
const cutTabArray = reactive({});
// 监听 prop 变化
watch(() => props.popState, (newValue) => {
watch(() => props.popState, newValue => {
if (newValue && Object.keys(cutTabArray).length === 0) init();
});
onMounted(() => {
});
const init = () => {
proxy.$post("/tenement/forum/about").then((res) => {
proxy.$post("/tenement/forum/about").then(res => {
cutTabArray['person'] = res.data['person']
cutTabArray['intermediary'] = res.data['intermediary']
cutTabArray['more'] = res.data['more']
});
};
const cutTab = (tabvalue) => {
tab.value = tabvalue;
};
const cutTab = tabvalue => tab.value = tabvalue;;
return {
tabList,
@@ -75,7 +64,6 @@ export default {
cutTabArray,
init,
cutTab,
// popState,
};
},
};