[更新发现模块]
This commit is contained in:
0
uni_modules/oct-menu/changelog.md
Normal file
0
uni_modules/oct-menu/changelog.md
Normal file
115
uni_modules/oct-menu/components/oct-menu/oct-menu.vue
Normal file
115
uni_modules/oct-menu/components/oct-menu/oct-menu.vue
Normal file
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="menu--item" v-for="(item, index) in lists" :key="index" @click="$emit('onMenu', item)" :style="btnStyle">
|
||||
<view class="menu--block">
|
||||
<view class="menu--number" v-if="isNumber">
|
||||
{{ index + 1 }}
|
||||
</view>
|
||||
<image class="menu--picture" :src="item.cover ? item.cover : '/static/find/default_img.png'" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="menu--label">
|
||||
<view class="nowrap menu--name">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
<view class="nowrap menu--text">
|
||||
{{ isType ? item.weight + '克' : item.sub_title }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default{
|
||||
props:{
|
||||
lists: {
|
||||
type : Array,
|
||||
required: true,
|
||||
default : () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
// 列表底部距离
|
||||
btnStyle: {
|
||||
type : Object,
|
||||
default : () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 是否显示排行数字
|
||||
isNumber: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
// 是否是详情
|
||||
isType: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.menu--item {
|
||||
background-color: white;
|
||||
border-radius: $radius;
|
||||
position: relative;
|
||||
display: flex;
|
||||
margin-bottom: $margin - 10;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.menu--block {
|
||||
position: relative;
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: $radius;
|
||||
overflow: hidden;
|
||||
.menu--number {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
font-size: $title-size-sm;
|
||||
padding: 0 $padding - 20;
|
||||
background-color: $text-gray-m;
|
||||
border-radius: $radius 0 $radius 0;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.menu--picture {
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
&:nth-child(1) .menu--number,
|
||||
&:nth-child(2) .menu--number,
|
||||
&:nth-child(3) .menu--number{
|
||||
background-color: $text-price;
|
||||
}
|
||||
.menu--label {
|
||||
width: calc(100% - 140rpx);
|
||||
margin: 10rpx 0 0 30rpx;
|
||||
&:last-child {
|
||||
margin-bottom: 0!important;
|
||||
}
|
||||
.menu--name {
|
||||
font-size: $title-size-lg;
|
||||
margin-bottom: $margin - 20;
|
||||
font-weight: bold;
|
||||
color: $text-color;
|
||||
}
|
||||
.menu--text {
|
||||
color: $text-gray;
|
||||
font-size: $title-size-m;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
80
uni_modules/oct-menu/package.json
Normal file
80
uni_modules/oct-menu/package.json
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"id": "oct-menu",
|
||||
"displayName": "oct-menu",
|
||||
"version": "1.0.0",
|
||||
"description": "oct-menu",
|
||||
"keywords": [
|
||||
"oct-menu"
|
||||
],
|
||||
"repository": "",
|
||||
"engines": {
|
||||
"HBuilderX": "^3.1.0"
|
||||
},
|
||||
"dcloudext": {
|
||||
"category": [
|
||||
"前端组件",
|
||||
"通用组件"
|
||||
],
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "",
|
||||
"data": "",
|
||||
"permissions": ""
|
||||
},
|
||||
"npmurl": ""
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "u",
|
||||
"aliyun": "u"
|
||||
},
|
||||
"client": {
|
||||
"Vue": {
|
||||
"vue2": "u",
|
||||
"vue3": "u"
|
||||
},
|
||||
"App": {
|
||||
"app-vue": "u",
|
||||
"app-nvue": "u"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "u",
|
||||
"Android Browser": "u",
|
||||
"微信浏览器(Android)": "u",
|
||||
"QQ浏览器(Android)": "u"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "u",
|
||||
"IE": "u",
|
||||
"Edge": "u",
|
||||
"Firefox": "u",
|
||||
"Safari": "u"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "u",
|
||||
"阿里": "u",
|
||||
"百度": "u",
|
||||
"字节跳动": "u",
|
||||
"QQ": "u"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "u",
|
||||
"联盟": "u"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
uni_modules/oct-menu/readme.md
Normal file
1
uni_modules/oct-menu/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# oct-menu
|
||||
0
uni_modules/oct-topic/changelog.md
Normal file
0
uni_modules/oct-topic/changelog.md
Normal file
63
uni_modules/oct-topic/components/oct-topic/oct-topic.vue
Normal file
63
uni_modules/oct-topic/components/oct-topic/oct-topic.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="new-item" v-for="(item, index) in lists" :key="index" @click="$emit('onTopic', item)">
|
||||
<image class="new-cover" :src="item.cover" mode="aspectFill"></image>
|
||||
<view class="new-title">{{ item.title }}</view>
|
||||
<view class="new-tool">
|
||||
<text>阅读{{ item.read }}</text>
|
||||
<text>赞{{ item.praise }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default{
|
||||
props:{
|
||||
lists: {
|
||||
type : Array,
|
||||
required: true,
|
||||
default : () => {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.new-item {
|
||||
position: relative;
|
||||
margin-top: $margin - 10;
|
||||
background: #f5fdfa;
|
||||
border-radius: $radius;
|
||||
padding: $padding ($padding * 2 + 200rpx) $padding $padding;
|
||||
.new-cover {
|
||||
position: absolute;
|
||||
right: $padding;
|
||||
top: $padding;
|
||||
width: 200rpx;
|
||||
height: 150rpx;
|
||||
border-radius: $radius;
|
||||
}
|
||||
.new-title {
|
||||
font-size: $title-size-lg;
|
||||
line-height: 45rpx;
|
||||
min-height: 100rpx;
|
||||
margin-bottom: 10px;
|
||||
font-weight: bold;
|
||||
color: $text-color;
|
||||
}
|
||||
.new-tool {
|
||||
color: $text-gray;
|
||||
font-size: $title-size-sm;
|
||||
line-height: 40rpx;
|
||||
text {
|
||||
margin-right: $margin/2;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
80
uni_modules/oct-topic/package.json
Normal file
80
uni_modules/oct-topic/package.json
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"id": "oct-topic",
|
||||
"displayName": "oct-topic",
|
||||
"version": "1.0.0",
|
||||
"description": "oct-topic",
|
||||
"keywords": [
|
||||
"oct-topic"
|
||||
],
|
||||
"repository": "",
|
||||
"engines": {
|
||||
"HBuilderX": "^3.1.0"
|
||||
},
|
||||
"dcloudext": {
|
||||
"category": [
|
||||
"前端组件",
|
||||
"通用组件"
|
||||
],
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "",
|
||||
"data": "",
|
||||
"permissions": ""
|
||||
},
|
||||
"npmurl": ""
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "u",
|
||||
"aliyun": "u"
|
||||
},
|
||||
"client": {
|
||||
"Vue": {
|
||||
"vue2": "u",
|
||||
"vue3": "u"
|
||||
},
|
||||
"App": {
|
||||
"app-vue": "u",
|
||||
"app-nvue": "u"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "u",
|
||||
"Android Browser": "u",
|
||||
"微信浏览器(Android)": "u",
|
||||
"QQ浏览器(Android)": "u"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "u",
|
||||
"IE": "u",
|
||||
"Edge": "u",
|
||||
"Firefox": "u",
|
||||
"Safari": "u"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "u",
|
||||
"阿里": "u",
|
||||
"百度": "u",
|
||||
"字节跳动": "u",
|
||||
"QQ": "u"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "u",
|
||||
"联盟": "u"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
uni_modules/oct-topic/readme.md
Normal file
1
uni_modules/oct-topic/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# oct-topic
|
||||
Reference in New Issue
Block a user