You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.7 KiB
57 lines
1.7 KiB
new Vue({
|
|
el: '#news',
|
|
data: function () {
|
|
return {
|
|
// 标签页是否选择第一个
|
|
tabsIsActiveOne: true
|
|
};
|
|
|
|
},
|
|
methods: {
|
|
// 标签页切换选择
|
|
handlerTabs(e) {
|
|
console.log('单击');
|
|
e == 'recent' ? this.tabsIsActiveOne = true : this.tabsIsActiveOne = false
|
|
},
|
|
// 跳转详情页
|
|
goToDetail() {
|
|
location.href='../html/newsDetail.html'
|
|
}
|
|
},
|
|
mounted() {
|
|
|
|
}
|
|
})
|
|
|
|
// $(function(){
|
|
// $('#news .input-item').keyup( function(){
|
|
// if($('.userEmail').val() && $('.userPassword').val()){
|
|
// $('.submitBtn').removeClass('disabledSubmit').addClass('activeSubmit')
|
|
// }else{
|
|
// $('.submitBtn').removeClass('activeSubmit').addClass('disabledSubmit')
|
|
// }
|
|
// })
|
|
// $('#news .tabsIsActiveOne').on('click',function(){
|
|
// $('.tabsIsActiveOne').addClass('tabsActive')
|
|
// // location.href="securityCenter.html"
|
|
// })
|
|
// $('#news .tabsIsActiveOne').on('click',function(){
|
|
// $('.tabsIsActiveOne').addClass('tabsActive')
|
|
// // location.href="securityCenter.html"
|
|
// })
|
|
// });
|
|
|
|
layui.use('laypage', function () {
|
|
var laypage = layui.laypage;
|
|
//执行一个laypage实例
|
|
laypage.render({
|
|
elem: 'pagination', //注意,这里的 test1 是 ID,不用加 # 号
|
|
count: 50, //数据总数,从服务端得到
|
|
layout: ['count', 'prev', 'page', 'next'], //自定义分页布局
|
|
groups: 7, // 只显示 1 个连续页码
|
|
prev: '<',
|
|
next: '>',
|
|
first: false, //不显示首页
|
|
last: false //不显示尾页
|
|
});
|
|
});
|