mirror of
https://github.com/yangzongzhuan/RuoYi-App.git
synced 2025-09-27 22:52:40 +00:00
升级uni-ui到最新版本1.5.7
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
## 0.2.4(2024-04-23)
|
||||
- 修复 弹出位置默认值不一致导致的错位
|
||||
## 0.2.3(2024-03-20)
|
||||
- 修复 弹出位置修正
|
||||
## 0.2.2(2024-01-15)
|
||||
- 新增 placement支持设置四个方向:top bottom left right
|
||||
## 0.2.1(2022-05-09)
|
||||
- 修复 content 为空时仍然弹出的bug
|
||||
## 0.2.0(2022-05-07)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="uni-tooltip">
|
||||
<slot></slot>
|
||||
<view v-if="content || $slots.content" class="uni-tooltip-popup">
|
||||
<view v-if="content || $slots.content" class="uni-tooltip-popup" :style="initPlacement">
|
||||
<slot name="content">
|
||||
{{content}}
|
||||
</slot>
|
||||
@@ -16,10 +16,8 @@
|
||||
* @description 常用于展示鼠标 hover 时的提示信息。
|
||||
* @tutorial https://uniapp.dcloud.io/component/uniui/uni-tooltip
|
||||
* @property {String} content 弹出层显示的内容
|
||||
* @property {String} placement出现位置, 目前只支持 left
|
||||
* @property {String} placement出现位置, 目前支持:left right top bottom
|
||||
*/
|
||||
|
||||
|
||||
export default {
|
||||
name: "uni-tooltip",
|
||||
data() {
|
||||
@@ -27,6 +25,47 @@
|
||||
|
||||
};
|
||||
},
|
||||
methods: {},
|
||||
computed: {
|
||||
initPlacement() {
|
||||
let style = {};
|
||||
switch (this.placement) {
|
||||
case 'left':
|
||||
style = {
|
||||
top: '50%',
|
||||
transform: 'translateY(-50%)',
|
||||
right: '100%',
|
||||
"margin-right": '10rpx',
|
||||
}
|
||||
break;
|
||||
case 'right':
|
||||
style = {
|
||||
top: '50%',
|
||||
transform: 'translateY(-50%)',
|
||||
left: '100%',
|
||||
"margin-left": '10rpx',
|
||||
}
|
||||
break;
|
||||
case 'top':
|
||||
style = {
|
||||
bottom: '100%',
|
||||
transform: 'translateX(-50%)',
|
||||
left: '50%',
|
||||
"margin-bottom": '10rpx',
|
||||
}
|
||||
break;
|
||||
case 'bottom':
|
||||
style = {
|
||||
top: '100%',
|
||||
transform: 'translateX(-50%)',
|
||||
left: '50%',
|
||||
"margin-top": '10rpx',
|
||||
}
|
||||
break;
|
||||
}
|
||||
return style;
|
||||
}
|
||||
},
|
||||
props: {
|
||||
content: {
|
||||
type: String,
|
||||
@@ -45,13 +84,13 @@
|
||||
.uni-tooltip {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.uni-tooltip-popup {
|
||||
z-index: 1;
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
background-color: #333;
|
||||
border-radius: 8px;
|
||||
color: #fff;
|
||||
@@ -59,6 +98,7 @@
|
||||
text-align: left;
|
||||
line-height: 16px;
|
||||
padding: 12px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "uni-tooltip",
|
||||
"displayName": "uni-tooltip 提示文字",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.4",
|
||||
"description": "Tooltip 提示文字",
|
||||
"keywords": [
|
||||
"uni-tooltip",
|
||||
@@ -9,7 +9,7 @@
|
||||
"tooltip",
|
||||
"tip",
|
||||
"文字提示"
|
||||
],
|
||||
],
|
||||
"repository": "https://github.com/dcloudio/uni-ui",
|
||||
"engines": {
|
||||
"HBuilderX": ""
|
||||
@@ -17,11 +17,7 @@
|
||||
"directories": {
|
||||
"example": "../../temps/example_temps"
|
||||
},
|
||||
"dcloudext": {
|
||||
"category": [
|
||||
"前端组件",
|
||||
"通用组件"
|
||||
],
|
||||
"dcloudext": {
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
@@ -38,7 +34,8 @@
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": ""
|
||||
"npmurl": "",
|
||||
"type": "component-vue"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [],
|
||||
@@ -46,7 +43,8 @@
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y"
|
||||
"aliyun": "y",
|
||||
"alipay": "n"
|
||||
},
|
||||
"client": {
|
||||
"Vue": {
|
||||
|
Reference in New Issue
Block a user