forked from dcloudio/uni-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix : 修复 uni-rate 使用npm 的方式,图标不显示的问题
- Loading branch information
Showing
15 changed files
with
1,045 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<template> | ||
<!-- #ifdef APP-NVUE --> | ||
<cell> | ||
<!-- #endif --> | ||
<view class="uni-list-ad"> | ||
<view v-if="borderShow" :class="{'uni-list--border':border,'uni-list-item--first':isFirstChild}"></view> | ||
<ad style="width: 200px;height: 300px;border-width: 1px;border-color: red;border-style: solid;" adpid="1111111111" unit-id="" appid="" apid="" type="feed" @error="aderror" @close="closeAd"></ad> | ||
</view> | ||
<!-- #ifdef APP-NVUE --> | ||
</cell> | ||
<!-- #endif --> | ||
|
||
</template> | ||
|
||
<script> | ||
// #ifdef APP-NVUE | ||
const dom = uni.requireNativePlugin('dom'); | ||
// #endif | ||
export default { | ||
name: 'UniListAd', | ||
props: { | ||
title: { | ||
type: String, | ||
default: '', | ||
} | ||
}, | ||
inject: ['list'], | ||
data() { | ||
return { | ||
isFirstChild: false, | ||
border: false, | ||
borderShow: true, | ||
} | ||
}, | ||
mounted() { | ||
if (!this.list.firstChildAppend) { | ||
this.list.firstChildAppend = true | ||
this.isFirstChild = true | ||
} | ||
this.border = this.list.border | ||
}, | ||
methods: { | ||
aderror(e) { | ||
console.log("aderror: " + JSON.stringify(e.detail)); | ||
}, | ||
closeAd(e) { | ||
this.borderShow = false | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.uni-list-ad { | ||
position: relative; | ||
border: 1px red solid; | ||
} | ||
.uni-list--border { | ||
position: relative; | ||
padding-bottom: 1px; | ||
/* #ifdef APP-PLUS */ | ||
border-top-color: $uni-border-color; | ||
border-top-style: solid; | ||
border-top-width: 0.5px; | ||
/* #endif */ | ||
margin-left: $uni-spacing-row-lg; | ||
} | ||
/* #ifndef APP-NVUE */ | ||
.uni-list--border:after { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
left: 0; | ||
height: 1px; | ||
content: ''; | ||
-webkit-transform: scaleY(.5); | ||
transform: scaleY(.5); | ||
background-color: $uni-border-color; | ||
} | ||
.uni-list-item--first:after { | ||
height: 0px; | ||
} | ||
/* #endif */ | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/** | ||
* 这里是 uni-list 组件内置的常用样式变量 | ||
* 如果需要覆盖样式,这里提供了基本的组件样式变量,您可以尝试修改这里的变量,去完成样式替换,而不用去修改源码 | ||
* | ||
*/ | ||
|
||
// 背景色 | ||
$background-color : #fff; | ||
// 分割线颜色 | ||
$divide-line-color : #e5e5e5; | ||
|
||
// 默认头像大小,如需要修改此值,注意同步修改 js 中的值 const avatarWidth = xx ,目前只支持方形头像 | ||
// nvue 页面不支持修改头像大小 | ||
$avatar-width : 45px ; | ||
|
||
// 头像边框 | ||
$avatar-border-radius: 5px; | ||
$avatar-border-color: #eee; | ||
$avatar-border-width: 1px; | ||
|
||
// 标题文字样式 | ||
$title-size : 16px; | ||
$title-color : #3b4144; | ||
$title-weight : normal; | ||
|
||
// 描述文字样式 | ||
$note-size : 12px; | ||
$note-color : #999; | ||
$note-weight : normal; | ||
|
||
// 右侧额外内容默认样式 | ||
$right-text-size : 12px; | ||
$right-text-color : #999; | ||
$right-text-weight : normal; | ||
|
||
// 角标样式 | ||
// nvue 页面不支持修改圆点位置以及大小 | ||
// 角标在左侧时,角标的位置,默认为 0 ,负数左/下移动,正数右/上移动 | ||
$badge-left: 0px; | ||
$badge-top: 0px; | ||
|
||
// 显示圆点时,圆点大小 | ||
$dot-width: 10px; | ||
$dot-height: 10px; | ||
|
||
// 显示角标时,角标大小和字体大小 | ||
$badge-size : 18px; | ||
$badge-font : 12px; | ||
// 显示角标时,角标前景色 | ||
$badge-color : #fff; | ||
// 显示角标时,角标背景色 | ||
$badge-background-color : #ff5a5f; | ||
// 显示角标时,角标左右间距 | ||
$badge-space : 6px; | ||
|
||
// 状态样式 | ||
// 选中颜色 | ||
$hover : #f5f5f5; |
Oops, something went wrong.