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-time-line

v1.0.5

Published

TuniaoUI vue3 uniapp 插件

Downloads

117

Readme

图鸟 UI vue3 uniapp Plugins - 时间轴

TuniaoUI vue3 uniapp

Tuniao UI vue3官方仓库

该组件用于展示与时间相关的信息,如日志、签到记录等。

安装

npm install tnuiv3p-tn-time-line

组件位置

tnuiv3p-tn-timeline/time-line.vue
tnuiv3p-tn-timeline/time-line-item.vue
tnuiv3p-tn-timeline/time-line-data.vue

平台差异说明

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

基础使用

TnTimeLineData组件中自定义当前事件节点的内容,节点的内容放在默认的插槽中

使用TnTimeLineItem包裹TnTimeLineData组件,该组件可以设置大节点的标题信息,也可以通过slot="title"插槽自定义标题内容

使用TnTimeLine包裹着全部TnTimeLineItem节点

<script setup lang="ts">
import TnTimeLine from 'tnuiv3p-tn-time-line/time-line.vue'
import TnTimeLineItem from 'tnuiv3p-tn-time-line/time-line-item.vue'
import TnTimeLineData from 'tnuiv3p-tn-time-line/time-line-data.vue'

interface TimeLineDataItem {
  date?: string
  version?: string
  content: string
}

interface TimeLineData {
  month: string
  icon?: string
  data: TimeLineDataItem[]
}

// 时间轴数据
const timeLineData: TimeLineData[] = [
  {
    month: '2023-07',
    icon: 'moments',
    data: [
      {
        date: '1',
        version: '1.0.0',
        content:
          '图鸟科技,图鸟UI vue3 uniapp版本全新发布,欢迎各位开发者进行使用',
      },
      {
        content:
          '图鸟科技,图鸟UI vue3 uniapp版本全新发布,欢迎各位开发者进行使用',
      },
    ],
  },
  {
    month: '2023-08',
    icon: 'creative',
    data: [
      {
        content:
          '图鸟科技,图鸟UI vue3 uniapp版本全新发布,欢迎各位开发者进行使用',
      },
      {
        date: '2',
        version: '1.0.0',
        content:
          '图鸟科技,图鸟UI vue3 uniapp版本全新发布,欢迎各位开发者进行使用',
      },
    ],
  },
]
</script>

<template>
  <view class="content">
    <TnTimeLine>
      <TnTimeLineItem
        v-for="(item, index) in timeLineData"
        :key="index"
        :title="item.month"
        :title-icon="item.icon !== undefined ? item.icon : ''"
      >
        <TnTimeLineData
          v-for="(dataItem, dataIndex) in item.data"
          :key="dataIndex"
        >
          <view
            v-if="dataItem?.date"
            class="time-line__title tn-flex justify-between items-center tn-gray-dark_text"
          >
            <view class="date">{{ dataItem?.date || '' }}</view>
            <view class="version">{{ dataItem?.version || '' }}</view>
          </view>
          <view class="time-line__data">
            {{ dataItem.content }}
          </view>
        </TnTimeLineData>
      </TnTimeLineItem>
    </TnTimeLine>
  </view>
</template>

<style lang="scss" scoped>
.content {
  position: relative;
  width: 100%;
  padding: 30rpx;

  .time-line {
    &__title {
      font-size: 32rpx;
      margin-bottom: 20rpx;
    }
  }
}
</style>

API

TnTimeLine Props

| 属性名 | 说明 | 类型 | 默认值 | 可选值 | | --------- | -------- | ------- | ------ | ------- | | show-line | 显示竖线 | Boolean | true | false |

TnTimeLine Slots

| 插槽名 | 说明 | 子标签 | | ------- | -------- | -------------- | | default | 时间节点 | TnTimeLineItem |

TnTimeLineItem Props

| 属性名 | 说明 | 类型 | 默认值 | 可选值 | | -------------- | --------------------------------------------------------------------------------------------------------------------- | ------ | ------ | ----------------------------------------------------------------- | | title | 标题 | String | - | - | | title-icon | 标题icon | String | - | 图标有效值 | | dot-bg-color | 左边小点背景,可以使用图鸟内置的背景色、hex、rgb、rgba | String | - | - | | dot-text-color | 左边小点字体颜色,支持图鸟内置的颜色值、hex、rgb、rgba | String | - | - |

TnTimeLineItem Emits

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

TnTimeLineItem Slots

| 插槽名 | 说明 | 子标签 | | ------- | -------------- | -------------- | | default | 时间节点数据 | TnTimeLineData | | title | 自定义标题数据 | - |

TnTimeLineData Props

| 属性名 | 说明 | 类型 | 默认值 | 可选值 | | --------- | ------------------------------------------------------------------------------------------------------------- | ------ | ----------- | ----------------------------------------------------------------- | | dot-icon | 节点图标 | String | circle-fill | 图标有效值 | | dot-color | 左边节点点颜色,支持图鸟内置的颜色值、hex、rgb、rgba | String | - | - |

TnTimeLineItem Emits

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

TnTimeLineItem Slots

| 插槽名 | 说明 | | ------- | ---------------- | | default | 时间节点数据内容 |