fix:修改公告内容

This commit is contained in:
lixg
2022-12-19 21:44:20 +08:00
parent 23f3d134c5
commit 360b068a1b
4 changed files with 57 additions and 32 deletions

View File

@@ -12,9 +12,9 @@
<div class="itemtime">{{ item.pubtime }}</div>
</div>
</div>
</template>s
</template>
<script>
import { reactive, toRefs, onMounted } from "vue";
import { reactive, toRefs, onMounted, watch } from "vue";
import { getTask } from "../../api/indexTaskadd";
import { noticeList } from "../../api/indexNotice";
import emitter from "../../utils/bus";
@@ -26,6 +26,10 @@ export default {
type: Number,
default: null,
},
show: {
type: String,
default: null,
},
},
setup(props) {
@@ -89,6 +93,19 @@ export default {
getTaskInfo();
getNotice();
});
watch(
() => props.show,
() => {
console.log("props.show", props.show);
if (props.show == 12) {
getTaskInfo();
getNotice();
}
},
{
deep: true,
}
);
return {
...toRefs(state),
getTaskInfo,