mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-08 01:58:52 +08:00
docs: ✏️ 修复 Tooltip 文档显示异常的问题
This commit is contained in:
parent
fc3d7ad6b7
commit
c89eb927a2
@ -149,15 +149,16 @@ const control = () => {
|
|||||||
## Tooltip Attributes
|
## Tooltip Attributes
|
||||||
|
|
||||||
| 参数 | 说明 | 类型 | 可选值 | 默认值 | 最低版本 |
|
| 参数 | 说明 | 类型 | 可选值 | 默认值 | 最低版本 |
|
||||||
| ------------- | ------------------------------------------ | -------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- |
|
|---------------|--------------------------------------------|-------------------|---------------------------------------------------------------------------------------------------------------------------------|--------------|----------|
|
||||||
| show | 状态是否可见 | boolean | - | false | - |
|
| show | 状态是否可见 | boolean | - | false | - |
|
||||||
| content | 显示的内容,也可以通过 `slot#content` 传入 | string / array | - | - | - |
|
| content | 显示的内容,也可以通过 `slot#content` 传入 | string / array | - | - | - |
|
||||||
| placement | Tooltip 的出现位置 | string | top / top-start / top-end / bottom / bottom-start / bottom-end / left / left-start / left-end / right / right-start / right-end | bottom | - |
|
| placement | Tooltip 的出现位置 | string | top / top-start / top-end / bottom / bottom-start / bottom-end / left / left-start / left-end / right / right-start / right-end | bottom | - |
|
||||||
| disabled | Tooltip 是否可用 | boolean | - | false | - |
|
| disabled | Tooltip 是否可用 | boolean | - | false | - |
|
||||||
| visible-arrow | 是否显示 Tooltip 箭头 | boolean | - | true | - |
|
| visible-arrow | 是否显示 Tooltip 箭头 | boolean | - | true | - |
|
||||||
| offset | 出现位置的偏移量 | number | number[] | {x:0, y:0} | - | 0 | 1.3.12 |
|
| offset | 出现位置的偏移量 | number / number[] | - | `{x:0, y:0}` | 1.3.12 |
|
||||||
| show-close | 是否显示 Tooltip 内部的关闭按钮 | boolean | - | false | - |
|
| show-close | 是否显示 Tooltip 内部的关闭按钮 | boolean | - | false | - |
|
||||||
|
|
||||||
|
|
||||||
## Events
|
## Events
|
||||||
|
|
||||||
| 事件名称 | 说明 | 回调参数 | 最低版本 |
|
| 事件名称 | 说明 | 回调参数 | 最低版本 |
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<page-wraper>
|
<page-wraper>
|
||||||
<wd-toast />
|
<view style="overflow: hidden" class="page-tooltip" @click.stop="closeOutside">
|
||||||
<view style="overflow: hidden" @click.stop="closeOutside">
|
|
||||||
<demo-block title="基本用法">
|
<demo-block title="基本用法">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<wd-tooltip placement="bottom-start" content="bottom-start 提示文字" @change="handleChange1">
|
<wd-tooltip placement="bottom-start" content="bottom-start 提示文字" @change="handleChange1">
|
||||||
@ -74,10 +73,10 @@
|
|||||||
</demo-block>
|
</demo-block>
|
||||||
<demo-block title="控制显隐">
|
<demo-block title="控制显隐">
|
||||||
<view @click.stop="control">
|
<view @click.stop="control">
|
||||||
<wd-button plain size="small" class="button-control">{{ show15 ? '关闭' : '打开' }}</wd-button>
|
<wd-button plain size="small" class="button-control">{{ show ? '关闭' : '打开' }}</wd-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="demo-left demo-control">
|
<view class="demo-left demo-control">
|
||||||
<wd-tooltip placement="top" content="控制显隐" v-model="show15">
|
<wd-tooltip placement="top" content="控制显隐" v-model="show">
|
||||||
<wd-button :round="false">top</wd-button>
|
<wd-button :round="false">top</wd-button>
|
||||||
</wd-tooltip>
|
</wd-tooltip>
|
||||||
</view>
|
</view>
|
||||||
@ -103,23 +102,7 @@
|
|||||||
import { useToast, useQueue } from '@/uni_modules/wot-design-uni'
|
import { useToast, useQueue } from '@/uni_modules/wot-design-uni'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
const show1 = ref<boolean>(false)
|
const show = ref<boolean>(false)
|
||||||
const show2 = ref<boolean>(false)
|
|
||||||
const show3 = ref<boolean>(false)
|
|
||||||
const show4 = ref<boolean>(false)
|
|
||||||
const show5 = ref<boolean>(false)
|
|
||||||
const show6 = ref<boolean>(false)
|
|
||||||
const show7 = ref<boolean>(false)
|
|
||||||
const show8 = ref<boolean>(false)
|
|
||||||
const show9 = ref<boolean>(false)
|
|
||||||
const show10 = ref<boolean>(false)
|
|
||||||
const show11 = ref<boolean>(false)
|
|
||||||
const show12 = ref<boolean>(false)
|
|
||||||
const show13 = ref<boolean>(false)
|
|
||||||
const show14 = ref<boolean>(false)
|
|
||||||
const show15 = ref<boolean>(false)
|
|
||||||
const show16 = ref<boolean>(false)
|
|
||||||
const show17 = ref<boolean>(false)
|
|
||||||
const content = ref<string>('显示内容')
|
const content = ref<string>('显示内容')
|
||||||
|
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
@ -127,8 +110,7 @@ const toast = useToast()
|
|||||||
const { closeOutside } = useQueue()
|
const { closeOutside } = useQueue()
|
||||||
|
|
||||||
function control() {
|
function control() {
|
||||||
show15.value = !show15.value
|
show.value = !show.value
|
||||||
// this.setData({ show15: !this.data.show15 })
|
|
||||||
}
|
}
|
||||||
function onShow() {
|
function onShow() {
|
||||||
console.log('显示')
|
console.log('显示')
|
||||||
@ -189,6 +171,13 @@ function handleChange17(event: any) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.page-tooltip {
|
||||||
|
:deep() {
|
||||||
|
.wd-button {
|
||||||
|
min-width: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.position-wrap {
|
.position-wrap {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user