npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tnuiv3p-tn-suspend-button

v1.0.0

Published

TuniaoUI vue3 uniapp 插件

Downloads

52

Readme

图鸟 UI vue3 uniapp Plugins - 悬浮按钮

TuniaoUI vue3 uniapp

Tuniao UI vue3官方仓库

该组件一般用于将按钮现在是页面的指定位置,方便用户进行跳转等操作

组件安装

npm install tnuiv3p-tn-suspend-button

组件位置

import TnSuspendButton from 'tnuiv3p-tn-suspend-button/index.vue'

平台差异说明

| App(vue) | H5 | 微信小程序 | 支付宝小程序 | ... | | :------: | :-: | :--------: | :----------: | :----: | | √ | √ | √ | √ | 适配中 |

基础使用

  • 通过icon属性可以设置按钮显示的图标,可以在默认的插槽中设置按钮的内容
<script setup lang="ts"></script>

<template>
  <TnSuspendButton icon="logo-tuniao" />
</template>

修改按钮的位置

  • 通过topright属性可以设置悬浮按钮距离顶部和右边的距离, 默认单位为rpx, 也可以是一个具体的值
<script setup lang="ts"></script>

<template>
  <TnSuspendButton icon="logo-tuniao" top="90%" right="30" />
</template>

修改按钮的样式

  • 通过bg-color属性可以修改按钮的背景颜色
  • 通过text-color属性可以修改按钮的文字颜色
  • 通过size属性可以设置按钮的大小,默认单位为rpx, 内置smlgxl
<script setup lang="ts"></script>

<template>
  <TnSuspendButton icon="logo-tuniao" size="sm" />
</template>
<script setup lang="ts"></script>

<template>
  <TnSuspendButton icon="logo-tuniao" size="140" />
</template>

修改按钮的形状

  • 通过shape属性可以修改按钮的形状,默认为circle,内置circlesquare
<script setup lang="ts"></script>

<template>
  <TnSuspendButton icon="logo-tuniao" shaepe="square" />
</template>

修改按钮的定位方式

  • 通过fixed参数可以设置按钮是相对于页面还是相对于父元素进行定位,默认为true,即相对于页面进行定位
<script setup lang="ts"></script>

<template>
  <TnSuspendButton icon="logo-tuniao" :fixed="false" />
</template>

API

Props

| 属性名 | 说明 | 类型 | 默认值 | 可选值 | | ---------- | ------------------------------------------------------------ | ------- | ----------------- | ------------------------------------------------------------ | | icon | 按钮显示的图标 | String | - | 图标有效值 | | top | 按钮距离顶部的距离,默认单位为rpx | String | 80% | - | | right | 按钮距离右边的距离,默认单位为rpx | String | 5% | - | | bg-color | 按钮背景颜色,可以使用图鸟内置的背景色、hex、rgb、rgba | String | tn-type-primary | - | | text-color | 按钮文字的颜色,支持图鸟内置的颜色值、hex、rgb、rgba | String | tn-color-white | - | | size | 按钮的尺寸,默认单位为rpx,内置了smlgxl | String | - | smlgxl | | shape | 按钮的形状 | String | circle | shape | | opacity | 按钮的透明度 | Number | 0.9 | - | | shadow | 是否显示阴影 | Boolean | true | false | | float | 是否显示漂浮的动画 | Boolean | true | false | | fixed | 是否固定位置 | Boolean | true | false |

Slots

| 插槽名 | 说明 | | ------- | ---------- | | default | 按钮的内容 |

Emits

| 事件名 | 说明 | 类型 | | ------ | ------------ | ------------ | | click | 按钮点击事件 | () => void |