自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

吹爆! 這個Vue組件就很實(shí)用了!

開發(fā)
??UndrawUI???是一個基于??Vue??的UI組件,主要功能有評論,聊天,搜索,錨點(diǎn)。

今天給大家推薦一個基于vue3的UI組件,比較小眾,先收藏一起,萬一用得上呢!

UndrawUI

UndrawUI是一個基于Vue的UI組件,主要功能有評論,聊天,搜索,錨點(diǎn)。

功能介紹

1.折疊和展開

使用屬性 unfold 實(shí)現(xiàn)展開和折疊功能。

<template>
  <u-fold unfold line="1">
    <p>
      時間不是某種從我們身上流過的東西,而就是我的生命。棄我而去的不是日歷上的一個個日子,而是我生命中的歲月;甚至也不僅僅是我的歲月,而就是我自己。我不但找不回逝去的歲月,而且也找不回從前的我了。
    </p>
  </u-fold>
</template>

2.Comment 評論

使用屬性 comment ,通過 Comment 事件實(shí)現(xiàn)評論回復(fù)、點(diǎn)贊、支持表情包、刪除評論、圖片上傳等功能。

圖片

<template>
  <div class="comment-view" style="padding: 0px">
    <u-comment :cnotallow="config" @submit="submit" @like="like" @remove="remove" @report="report">
      <!-- <template #list-title>全部評論</template> -->
    </u-comment>
  </div>
</template>

... 省略 ...

圖片

3.錨點(diǎn)

使用屬性 anchor 提取標(biāo)題元素到導(dǎo)航欄,通過導(dǎo)航欄快速跳轉(zhuǎn)到目標(biāo)位置。

<template>
  <div class="view">
    <div class="ac">
      <div id="article" class="article">
        <h2>人和植物一樣</h2>
        <p>內(nèi)容1</p>
        <h2>文明與野蠻</h2>
        <p>內(nèi)容2</p>
        <h2>村莊的時間</h2>
        <p>內(nèi)容3</p>
      </div>
    </div>
    <!-- container參數(shù)指定監(jiān)聽的容器 -->
    <div class="article-catalog">
      <u-anchor style="position: fixed" cnotallow="#article"></u-anchor>
    </div>
  </div>
</template>

4.Search搜索

使用 search屬性,通過config設(shè)置搜索配置,submit搜索提交事件。

圖片

<template>
  <u-search :cnotallow="config" style="margin-left: 20px" @submit="submit"></u-search>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { SearchConfig } from 'undraw-ui'

const config = ref<SearchConfig>({
  keywords: ['斗羅大陸', '斗破蒼穹', '吞噬星空', '凡人修仙傳', '一念永恒'], // 搜索框關(guān)鍵字滾動
  hotSearchList: [
    '斗羅大陸',
    '斗破蒼穹',
    '吞噬星空',
    '凡人修仙傳',
    '一念永恒',
    '完美世界',
    '鬼滅之刃',
    '間諜過家家',
    '武動乾坤',
    '神印王座'
  ] // top10 熱門搜索 最多顯示10條數(shù)據(jù)
})

const submit = (val: string) => {
  console.log(val)
  window.open('/all?keyword=' + val)
}
</script>

<style lang="scss" scoped></style>

還有NoticeBar 通知欄、Tags標(biāo)簽頁等功能,大家可以自行下載區(qū)體驗(yàn)噢~

使用介紹

1.使用npm安裝

npm i undraw-ui

2.依賴:在 main.ts 中引入組件

import { createApp } from 'vue'
import App from './App.vue'

import UndrawUi from 'undraw-ui'
import 'undraw-ui/dist/style.css'

const app = createApp(App)
app.use(UndrawUi)
app.mount('#app')

項(xiàng)目地址

https://github.com/readpage/undraw-ui

https://undraw.gitee.io/undraw-ui

責(zé)任編輯:趙杰 來源: 前端實(shí)驗(yàn)室
相關(guān)推薦

2022-12-12 09:01:03

2019-10-31 10:25:19

算法Java數(shù)據(jù)結(jié)構(gòu)

2020-12-08 22:05:37

Python編程語言開發(fā)

2023-03-29 14:58:04

GPT-4技術(shù)

2022-08-02 20:21:00

SaaS驅(qū)動PLG

2022-08-26 10:01:48

Vue3TS

2020-04-07 09:43:17

vue.js進(jìn)度組件開發(fā)

2021-03-23 17:27:55

區(qū)塊鏈數(shù)字化轉(zhuǎn)型幣圈

2024-12-20 17:29:34

SpringBootAOP開發(fā)

2022-04-19 13:07:25

SchedulePython

2019-03-25 10:47:41

5G網(wǎng)速4G

2021-04-22 09:56:32

MYSQL開發(fā)數(shù)據(jù)庫

2024-12-27 08:43:17

2021-11-15 10:02:16

Python命令技巧

2023-04-26 00:34:36

Python技巧程序員

2019-05-27 13:42:33

Python編程語言代碼

2025-04-23 08:02:44

2022-03-18 09:25:49

Python圖片PDF

2021-05-19 15:06:44

MySQL數(shù)據(jù)庫命令
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號