提交
This commit is contained in:
@@ -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,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user