MyGit

vueuse/vueuse

Fork: 2577 Star: 20309 (更新于 2024-12-26 09:59:51)

license: MIT

Language: TypeScript .

Collection of essential Vue Composition Utilities for Vue 2 and 3

最后发布版本: v11.1.0 ( 2024-09-16 17:09:03)

官方网址 GitHub网址

VueUse - Collection of essential Vue Composition Utilities VueUse - Collection of essential Vue Composition Utilities
Collection of essential Vue Composition Utilities

NPM version NPM Downloads Docs & Demos Function Count
GitHub stars

🚀 Features

  • 🎪 Interactive docs & demos
  • Fully tree shakeable: Only take what you want, bundle size
  • 🦾 Type Strong: Written in TypeScript, with TS Docs
  • 🔋 SSR Friendly
  • 🌎 No bundler required: Usable via CDN
  • 🔩 Flexible: Configurable event filters and targets
  • 🔌 Optional Add-ons: Router, Firebase, RxJS, etc.

🦄 Usage

import { useLocalStorage, useMouse, usePreferredDark } from '@vueuse/core'

export default {
  setup() {
    // tracks mouse position
    const { x, y } = useMouse()

    // if user prefers dark theme
    const isDark = usePreferredDark()

    // persist state in localStorage
    const store = useLocalStorage(
      'my-storage',
      {
        name: 'Apple',
        color: 'red',
      },
    )

    return { x, y, isDark, store }
  },
}

Refer to functions list or documentations for more details.

📦 Install

From v12.0, VueUse no longer supports Vue 2. Please use v11.x for Vue 2 support.

npm i @vueuse/core

Add ons | Nuxt Module

Demos

CDN

<script src="https://unpkg.com/@vueuse/shared"></script>

<script src="https://unpkg.com/@vueuse/core"></script>

It will be exposed to global as window.VueUse

🪴 Project Activity

Alt

🧱 Contribute

See the Contributing Guide

🌸 Thanks

This project is heavily inspired by the following awesome projects.

And thanks to all the contributors on GitHub!

👨‍🚀 Contributors

Financial Contributors on Open Collective

📄 License

MIT License © 2019-PRESENT Anthony Fu

最近版本更新:(数据更新于 2024-10-15 22:09:13)

2024-09-16 17:09:03 v11.1.0

2024-08-25 01:31:30 v11.0.3

2024-08-19 18:10:28 v11.0.1

2024-08-16 04:17:28 v11.0.0

2024-08-15 02:16:11 v11.0.0-beta.3

2024-08-08 23:49:09 v10.11.1

2024-07-17 22:30:15 v11.0.0-beta.2

2024-06-13 06:21:20 v11.0.0-beta.1

2024-06-12 19:49:23 v10.11.0

2024-06-11 21:33:18 v10.10.1

主题(topics):

composable, utility-library, vue, vue-composition-api, vue-next, vue-use, vue3

vueuse/vueuse同语言 TypeScript最近更新仓库

2024-12-26 19:57:33 gitroomhq/postiz-app

2024-12-26 14:44:31 lobehub/lobe-chat

2024-12-26 06:06:16 RSSNext/Follow

2024-12-24 21:00:18 siyuan-note/siyuan

2024-12-24 18:12:11 MetaCubeX/metacubexd

2024-12-24 09:50:10 vitejs/vite