Compare commits

...

2 Commits

Author SHA1 Message Date
xiao-fajia
7659142621 Merge branch 'main' of http://122.51.230.86:3000/dianliang/school_website 2024-08-02 20:01:13 +08:00
xiao-fajia
258a1c653d 更新代码,封装分页组件 2024-08-02 20:01:04 +08:00
3 changed files with 99 additions and 7 deletions

View File

@ -25905,6 +25905,12 @@ UE.plugins["audio"] = function () {
td.style.borderWidth = "1px";
td.style.borderStyle = "solid";
});
//增加下面一段
utils.each(domUtils.getElementsByTagName(table,'th'),function(th){
th.style.borderWidth = domUtils.getComputedStyle(th, "border-width");
th.style.borderStyle = 'solid';
th.style.borderColor = "black";
});
}
};
@ -26078,9 +26084,11 @@ UE.plugins["table"] = function () {
"table.noBorderTable td,table.noBorderTable th,table.noBorderTable caption{border:1px dashed #ddd !important}" +
//插入的表格的默认样式
"table{margin-bottom:10px;border-collapse:collapse;display:table;}" +
"td,th{padding: 5px 10px;border: 1px solid #DDD;}" +
// "td,th{padding: 5px 10px;border: 1px solid #DDD;}" +
"td,th{padding: 5px 10px;border: 1px dashed black}" +
"caption{border:1px dashed #DDD;border-bottom:0;padding:3px;text-align:center;}" +
"th{border-top:1px solid #BBB;background-color:#F7F7F7;}" +
// "th{border-top:1px solid #BBB;background-color:#F7F7F7;}" +
"th{border-top:1px dashed black;background-color:#F7F7F7;}" +
"table tr.firstRow th{border-top-width:2px;}" +
".ue-table-interlace-color-single{ background-color: #fcfcfc; } .ue-table-interlace-color-double{ background-color: #f7faff; }" +
"td p{margin:0;padding:0;}",
@ -26385,7 +26393,8 @@ UE.plugins["table"] = function () {
} else {
utils.each(tables, function (table) {
removeStyleSize(table, true);
domUtils.removeAttributes(table, ["style", "border"]);
// domUtils.removeAttributes(table, ["style", "border"]);
domUtils.removeAttributes(table, ["style"]);
utils.each(domUtils.getElementsByTagName(table, "td"), function (
td
) {

View File

@ -0,0 +1,70 @@
<template>
<div class="container">
<div class="page-box">
<el-pagination
background
layout="prev, pager, next"
v-show="total>0"
:total="total"
:current-page.sync="queryParams.pageNum"
:page-size.sync="queryParams.pageSize"
@size-change="initPageData"
@current-change="initPageData">
</el-pagination>
</div>
</div>
</template>
<script>
import {getPageData} from "@/api/officialWebsite/getPageData";
export default {
name: "index",
props:{
categoryId: {
type: String,
defaultValue: undefined,
required: false
},
},
watch: {
categoryId(newVal) {
this.queryParams = {
pageNum: 1,
pageSize: 10,
categoryId: newVal,
}
this.initPageData()
},
},
data () {
return{
queryParams: {
categoryId:"",
pageNum: 1,
pageSize: 10,
},
total: 0
}
},
methods : {
initPageData() {
// console.log(1, this.queryParams)
getPageData(this.queryParams).then(res => {
// console.log('',res)
this.listinfo = res.data.list;
this.total =res.data.total;
this.$emit('event-message', this.listinfo)
})
},
},
}
</script>
<style scoped>
.page-box{
width: 80%;
margin: 10px auto;
text-align: center;
}
</style>

View File

@ -127,6 +127,9 @@
</div>
</div>
</div>
<div v-show="currentActive == 2 || currentActive ==4" >
<page-util :category-id="categoryId" @event-message="handleDataFromPage" />
</div>
<!-- <div class="news">
<div class="news-list">
<div class="item" v-for="(item, index) in 8">
@ -155,12 +158,14 @@ import "swiper/css/swiper.min.css";
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
import footers from '@/views/officialWebsite/Components/footer.vue'
import headers from '@/views/officialWebsite/Components/header.vue'
import PageUtil from '@/views/officialWebsite/Components/page'
export default {
components: {
headers,
footers,
Swiper,
SwiperSlide,
"page-util": PageUtil
},
name: 'HelloWorld',
props: {
@ -195,7 +200,8 @@ export default {
],
currentActive: 0,
isMounted: false,
input4: ""
input4: "",
categoryId: "",
}
},
mounted() {
@ -208,7 +214,7 @@ export default {
methods: {
goDeatail(data){
console.log(data)
// console.log(data)
if(data.linkType == 0){
this.$router.push({
name: 'details',
@ -225,10 +231,12 @@ export default {
return
}
this.currentActive = value
console.log(this.nav,'nav' )
this.categoryId = this.nav[value].id
// console.log(this.nav,'nav' )
},
initPageData() {
this.categoryId = this.$route.query.id
// console.log(this.$route.query.id, this.categoryId)
let routeParam = {
"categoryId": this.$route.query.id,
"pageNum": 1,
@ -252,6 +260,11 @@ export default {
},
handleDataFromPage(data){
if (this.currentActive === 2 || this.currentActive == 4){
this.nav[this.currentActive].children.list = data
}
}
}
}