<div id="wyy">
<h2 class="h5-hotmore-h">我的分类</h2>
<div class="h5-hotmore-con" :class="{'h5-hcon-edit':edit}">
<a @click="clickChannel(weibo, $index, c)" class="h5-hcon-btn disabled" v-for="c in weibo" v-if="c.default_add" transition="show-channel">
<span class="m-text-cut">{{c.name}}<i class="m-font m-font-close" v-if="!c.must_show"></i>
</span>
</a>
</div>
<h2 class="h5-hotmore-h">点击添加分类</h2>
<div class="h5-hotmore-con">
<a @click="clickChannel(weibo, $index, c)" class="h5-hcon-btn" v-for="c in weibo" v-if="!c.default_add" transition="show-channel">
<span class="m-text-cut">{{c.name}}<i class="m-font m-font-close"></i></span>
</a>
</div>
</div>
xxxxxxxxxx
.m-top-nav .nav-item.center {
text-align:center;
}
.show-channel-list-transition {
transition:all .3s ease;
overflow:hidden;
}
.show-channel-list-enter,.show-channel-list-leave {
opacity:0;
transform:translateY(-100%);
}
.show-channel-transition {
transition:all .3s ease;
}
.show-channel-enter,.show-channel-leave {
opacity:0;
}
/*更多面板*/
.h5-more-edit {
height:100%;
background-color:rgba(255,255,255,1);
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
z-index:9;
}
.h5-hotmorebox {
position:relative;
z-index:10;
padding-top:2.25rem;
}
.h5-hotmore-top {
position:fixed;
left:0;
top:0;
width:100%;
box-sizing:border-box;
display:block;
line-height:1.25rem;
overflow:hidden;
padding:0.5rem 0.75rem;
}
.h5-hotmore-top .m-font {
float:right;
}
.h5-hotmore-top .m-font {
color:#c9c9c9;
}
.h5-arrow-up {
transform:rotate(45deg);
transform:rotate(45deg);
}
.h5-hm-btn {
width:2.625rem;
height:1.125rem;
border:solid 1px #ff8200;
text-align:center;
line-height:1.125rem;
color:#ff8200;
font-size:0.75rem;
border-radius:50px;
margin:-0.1875rem .3125rem 0 0;
float:right;
}
.h5-hotmore-con {
font-size:0;
letter-spacing:-6px;
padding:0.8125rem 1.125rem;
}
a.h5-hcon-btn,.h5-hcon-btn,.h5-hcon-fbtn {
width:25%;
display:inline-block;
font-size:0.875rem;
color:#333333;
text-align:center;
height:1.875rem;
line-height:1.875rem;
letter-spacing:normal;
box-sizing:border-box;
padding:0 0.3125rem;
margin-bottom:0.9375rem;
position:relative;
}
.h5-hcon-btn.m-cur span,.h5-hcon-fbtn.m-cur span,.h5-hcon-btn.m-cur.disabled span {
color:#ff8200;
}
.h5-hcon-btn span,.h5-hcon-fbtn span {
border:solid 1px #cccccc;
border-radius:0.1875rem;
display:block;
}
.h5-hcon-edit .h5-hcon-btn span {
border:dashed 1px #ccc;
}
.h5-hcon-edit .disabled span {
color:#aeaeae;
}
.h5-hcon-btn .m-font-close {
position:absolute;
cursor:pointer;
top:0;
left:0.3125rem;
display:block;
width:0.71875rem;
height:0.71875rem;
line-height:0.71875rem;
background-color:#ccc;
font-size:0.5rem;
text-align:center;
overflow:hidden;
display:none;
}
.h5-hcon-btn .m-font-close::before {
font-size:1em;
color:#fff;
}
.h5-hcon-edit .h5-hcon-btn .m-font-close {
display:block;
}
.h5-hotmore-h {
padding:0 1.125rem 0 .75rem;
font-size:0.875rem;
color:#636363;
}
xxxxxxxxxx
new Vue({
el: "#wyy",
methods: {
clickChannel($list, $index, $this) {
if (!$this.default_add || !$this.must_show) {
const temp = $list.splice($index, 1)[0];
temp.default_add = (temp.default_add + 1) % 2;
Vue.nextTick(function () {
$list.push(temp);
})
}
},
},
data: {
weibo: [{
"id": "100803",
"name": "推荐",
"containerid": "100803",
"scheme": "",
"must_show": 1,
"default_add": 1
},
{
"id": "page_hot_list",
"name": "榜单",
"containerid": "100803_-_page_hot_list",
"scheme": "",
"must_show": 1,
"default_add": 1
},
{
"id": 128,
"name": "萌宠",
"containerid": "100803_ctg1_128_-_page_topics_ctg1__128",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 131,
"name": "数码",
"containerid": "100803_ctg1_131_-_page_topics_ctg1__131",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 93,
"name": "旅游",
"containerid": "100803_ctg1_93_-_page_topics_ctg1__93",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 91,
"name": "美食",
"containerid": "100803_ctg1_91_-_page_topics_ctg1__91",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 113,
"name": "健康",
"containerid": "100803_ctg1_113_-_page_topics_ctg1__113",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 5,
"name": "情感",
"containerid": "100803_ctg1_5_-_page_topics_ctg1__5",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 145,
"name": "星座",
"containerid": "100803_ctg1_145_-_page_topics_ctg1__145",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 102,
"name": "综艺",
"containerid": "100803_ctg1_102_-_page_topics_ctg1__102",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 97,
"name": "动漫",
"containerid": "100803_ctg1_97_-_page_topics_ctg1__97",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 2,
"name": "明星",
"containerid": "100803_ctg1_2_-_page_topics_ctg1__2",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 94,
"name": "读书",
"containerid": "100803_ctg1_94_-_page_topics_ctg1__94",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 144,
"name": "军事",
"containerid": "100803_ctg1_144_-_page_topics_ctg1__144",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 114,
"name": "时尚美妆",
"containerid": "100803_ctg1_114_-_page_topics_ctg1__114",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 146,
"name": "音乐",
"containerid": "100803_ctg1_146_-_page_topics_ctg1__146",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 3,
"name": "科普",
"containerid": "100803_ctg1_3_-_page_topics_ctg1__3",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 120,
"name": "生活记录",
"containerid": "100803_ctg1_120_-_page_topics_ctg1__120",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 100,
"name": "电影",
"containerid": "100803_ctg1_100_-_page_topics_ctg1__100",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 111,
"name": "运动健身",
"containerid": "100803_ctg1_111_-_page_topics_ctg1__111",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 200000,
"name": "北京",
"containerid": "100803_ctg1_200000_-_page_topics_ctg1__200000",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 9,
"name": "创意征集",
"containerid": "100803_ctg1_9_-_page_topics_ctg1__9",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 7,
"name": "财经",
"containerid": "100803_ctg1_7_-_page_topics_ctg1__7",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 123,
"name": "美图",
"containerid": "100803_ctg1_123_-_page_topics_ctg1__123",
"scheme": "",
"must_show": 0,
"default_add": 0
},
{
"id": 116,
"name": "育儿",
"containerid": "100803_ctg1_116_-_page_topics_ctg1__116",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 133,
"name": "校园",
"containerid": "100803_ctg1_133_-_page_topics_ctg1__133",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 98,
"name": "体育",
"containerid": "100803_ctg1_98_-_page_topics_ctg1__98",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 1,
"name": "社会",
"containerid": "100803_ctg1_1_-_page_topics_ctg1__1",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 117,
"name": "汽车",
"containerid": "100803_ctg1_117_-_page_topics_ctg1__117",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 147,
"name": "政务",
"containerid": "100803_ctg1_147_-_page_topics_ctg1__147",
"scheme": "",
"must_show": 0,
"default_add": 0
},
{
"id": 138,
"name": "科技",
"containerid": "100803_ctg1_138_-_page_topics_ctg1__138",
"scheme": "",
"must_show": 0,
"default_add": 0
},
{
"id": 137,
"name": "房产家居",
"containerid": "100803_ctg1_137_-_page_topics_ctg1__137",
"scheme": "",
"must_show": 0,
"default_add": 0
},
{
"id": 101,
"name": "电视剧",
"containerid": "100803_ctg1_101_-_page_topics_ctg1__101",
"scheme": "",
"must_show": 0,
"default_add": 0
},
{
"id": 126,
"name": "游戏",
"containerid": "100803_ctg1_126_-_page_topics_ctg1__126",
"scheme": "",
"must_show": 0,
"default_add": 0
},
{
"id": 140,
"name": "笑话",
"containerid": "100803_ctg1_140_-_page_topics_ctg1__140",
"scheme": "",
"must_show": 0,
"default_add": 1
},
{
"id": 142,
"name": "文化艺术",
"containerid": "100803_ctg1_142_-_page_topics_ctg1__142",
"scheme": "",
"must_show": 0,
"default_add": 0
},
{
"id": 6,
"name": "公益",
"containerid": "100803_ctg1_6_-_page_topics_ctg1__6",
"scheme": "",
"must_show": 0,
"default_add": 0
}]
},
})