mirror of
https://github.com/yangzongzhuan/RuoYi-App.git
synced 2025-09-27 22:52:40 +00:00
升级uni-ui到最新版本1.4.23
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
## 1.2.1(2022-09-05)
|
||||
- 新增 属性 fontSize,可修改文字大小。
|
||||
## 1.2.0(2021-11-19)
|
||||
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
|
||||
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-notice-bar](https://uniapp.dcloud.io/component/uniui/uni-notice-bar)
|
||||
|
@@ -1,24 +1,47 @@
|
||||
<template>
|
||||
<view v-if="show" class="uni-noticebar" :style="{ backgroundColor: backgroundColor }" @click="onClick">
|
||||
<view v-if="show" class="uni-noticebar" :style="{ backgroundColor }" @click="onClick">
|
||||
<uni-icons v-if="showIcon === true || showIcon === 'true'" class="uni-noticebar-icon" type="sound"
|
||||
:color="color" size="22" />
|
||||
:color="color" :size="fontSize * 1.5" />
|
||||
<view ref="textBox" class="uni-noticebar__content-wrapper"
|
||||
:class="{'uni-noticebar__content-wrapper--scrollable':scrollable, 'uni-noticebar__content-wrapper--single':!scrollable && (single || moreText)}">
|
||||
:class="{
|
||||
'uni-noticebar__content-wrapper--scrollable': scrollable,
|
||||
'uni-noticebar__content-wrapper--single': !scrollable && (single || moreText)
|
||||
}"
|
||||
:style="{ height: scrollable ? fontSize * 1.5 + 'px' : 'auto' }"
|
||||
>
|
||||
<view :id="elIdBox" class="uni-noticebar__content"
|
||||
:class="{'uni-noticebar__content--scrollable':scrollable, 'uni-noticebar__content--single':!scrollable && (single || moreText)}">
|
||||
<text :id="elId" ref="animationEle" class="uni-noticebar__content-text"
|
||||
:class="{'uni-noticebar__content-text--scrollable':scrollable,'uni-noticebar__content-text--single':!scrollable && (single || showGetMore)}"
|
||||
:style="{color:color, width:wrapWidth+'px', 'animationDuration': animationDuration, '-webkit-animationDuration': animationDuration ,animationPlayState: webviewHide?'paused':animationPlayState,'-webkit-animationPlayState':webviewHide?'paused':animationPlayState, animationDelay: animationDelay, '-webkit-animationDelay':animationDelay}">{{text}}</text>
|
||||
:class="{
|
||||
'uni-noticebar__content--scrollable': scrollable,
|
||||
'uni-noticebar__content--single': !scrollable && (single || moreText)
|
||||
}"
|
||||
>
|
||||
<text :id="elId" ref="animationEle" class="uni-noticebar__content-text"
|
||||
:class="{
|
||||
'uni-noticebar__content-text--scrollable': scrollable,
|
||||
'uni-noticebar__content-text--single': !scrollable && (single || showGetMore)
|
||||
}"
|
||||
:style="{
|
||||
color: color,
|
||||
fontSize: fontSize + 'px',
|
||||
lineHeight: fontSize * 1.5 + 'px',
|
||||
width: wrapWidth + 'px',
|
||||
'animationDuration': animationDuration,
|
||||
'-webkit-animationDuration': animationDuration,
|
||||
animationPlayState: webviewHide ? 'paused' : animationPlayState,
|
||||
'-webkit-animationPlayState': webviewHide ? 'paused' : animationPlayState,
|
||||
animationDelay: animationDelay,
|
||||
'-webkit-animationDelay': animationDelay
|
||||
}"
|
||||
>{{text}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="showGetMore === true || showGetMore === 'true'" class="uni-noticebar__more uni-cursor-point"
|
||||
<view v-if="isShowGetMore" class="uni-noticebar__more uni-cursor-point"
|
||||
@click="clickMore">
|
||||
<text v-if="moreText.length > 0" :style="{ color: moreColor }" class="uni-noticebar__more-text">{{ moreText }}</text>
|
||||
<uni-icons v-else type="right" :color="moreColor" size="16" />
|
||||
<text v-if="moreText.length > 0" :style="{ color: moreColor, fontSize: fontSize + 'px' }">{{ moreText }}</text>
|
||||
<uni-icons v-else type="right" :color="moreColor" :size="fontSize * 1.1" />
|
||||
</view>
|
||||
<view class="uni-noticebar-close uni-cursor-point" v-if="(showClose === true || showClose === 'true') && (showGetMore === false || showGetMore === 'false')">
|
||||
<uni-icons
|
||||
type="closeempty" :color="color" size="16" @click="close" />
|
||||
<view class="uni-noticebar-close uni-cursor-point" v-if="isShowClose">
|
||||
<uni-icons type="closeempty" :color="color" :size="fontSize * 1.1" @click="close" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -74,6 +97,10 @@
|
||||
type: String,
|
||||
default: '#FF9A43'
|
||||
},
|
||||
fontSize: {
|
||||
type: Number,
|
||||
default: 14
|
||||
},
|
||||
moreColor: {
|
||||
type: String,
|
||||
default: '#FF9A43'
|
||||
@@ -123,6 +150,15 @@
|
||||
animationDelay: '0s'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isShowGetMore() {
|
||||
return this.showGetMore === true || this.showGetMore === 'true'
|
||||
},
|
||||
isShowClose() {
|
||||
return (this.showClose === true || this.showClose === 'true')
|
||||
&& (this.showGetMore === false || this.showGetMore === 'false')
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// #ifdef APP-PLUS
|
||||
var pages = getCurrentPages();
|
||||
@@ -262,7 +298,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" >
|
||||
<style lang="scss" scoped>
|
||||
.uni-noticebar {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
@@ -310,7 +346,6 @@
|
||||
/* #ifndef APP-NVUE */
|
||||
.uni-noticebar__content-wrapper--scrollable {
|
||||
position: relative;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
@@ -383,10 +418,6 @@
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.uni-noticebar__more-text {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@keyframes notice {
|
||||
100% {
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "uni-notice-bar",
|
||||
"displayName": "uni-notice-bar 通告栏",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.1",
|
||||
"description": "NoticeBar 通告栏组件,常用于展示公告信息,可设为滚动公告",
|
||||
"keywords": [
|
||||
"uni-ui",
|
||||
@@ -17,11 +17,7 @@
|
||||
"directories": {
|
||||
"example": "../../temps/example_temps"
|
||||
},
|
||||
"dcloudext": {
|
||||
"category": [
|
||||
"前端组件",
|
||||
"通用组件"
|
||||
],
|
||||
"dcloudext": {
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
@@ -38,7 +34,8 @@
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
||||
"type": "component-vue"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [
|
||||
|
Reference in New Issue
Block a user