= { 100 | [K in keyof Pick
]: K extends keyof D ? P[K] & {
101 | default: D[K];
102 | } : P[K];
103 | };
104 |
--------------------------------------------------------------------------------
/example/src/components/Demo.vue:
--------------------------------------------------------------------------------
1 |
104 |
105 |
106 |
2 |
3 |
4 |
13 | 14 | 一款轻量可视的 Vue3 音频播放插件 15 | 16 |
17 | 18 | ## 描述 19 | 20 | 该组件是使用原生的 [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API) 编写的,在生产环境中除了依赖于 Vue 3 之外没有使用任何其他依赖。当然,这意味着:如果您的目标浏览器不支持 Web Audio API 的功能,那么我的插件也将无法应用。您可以前往 [浏览器兼容性](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#audiocontext_2) 页面查看 AudioContext 一行,以检查它是否与目标浏览器兼容。 21 | 22 | **样本** - [Live Demo](https://codeacme17.github.io/1llest-waveform-vue/) 23 | 24 | ## 开始 25 | 26 | ### 下载 27 | 28 | ```bash 29 | npm install 1llest-waveform-vue 30 | ``` 31 | 32 | ### 使用 33 | 34 | 全局组件使用 35 | 36 | ```javascript 37 | // main.ts 38 | import { createApp } from 'vue' 39 | import App from './App.vue' 40 | 41 | import IllestWaveform from '1llest-waveform-vue' 42 | import '1llest-waveform-vue/lib/style.css' 43 | 44 | const app = createApp(App) 45 | 46 | app.use(IllestWaveform) 47 | app.mount('#app') 48 | ``` 49 | 50 | 本地组件使用 51 | 52 | ```js 53 | // example.vue 54 | import { IllestWaveform } from '1llest-waveform-vue' 55 | import '1llest-waveform-vue/lib/style.css' 56 | ``` 57 | 58 | ### 组件使用方式 59 | 60 | ```vue 61 | 62 |
3 |
4 |
13 | 14 | A lightweight and controllable audio visualization vue3 plugin 15 | 16 |
17 |21 | 22 | English | [简写中文](docs/cn-readme.md) 23 | 24 |
25 | 26 | This component is written using the native [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API), and does not use any dependencies other than vue3 in the production environment. Of course, this means: if your target browser does not support the features of the web audio api, then my Plugins will also not apply. You can go to [Browser compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#audiocontext_2) to see the `AudioContext` line to check whether it is compatible with the target browser 27 | 28 | **Example** - [Live Demo](https://codeacme17.github.io/1llest-waveform-vue/) 29 | 30 | 31 | ## Start 32 | ### Install 33 | ```bash 34 | npm install 1llest-waveform-vue 35 | ``` 36 | 37 | ### Usage 38 | Global component 39 | ```javascript 40 | // main.ts 41 | import { createApp } from "vue" 42 | import App from "./App.vue" 43 | 44 | import IllestWaveform from "1llest-waveform-vue" 45 | import "1llest-waveform-vue/lib/style.css" 46 | 47 | const app = createApp(App) 48 | 49 | app.use(IllestWaveform) 50 | app.mount("#app") 51 | ``` 52 | Local component 53 | ```js 54 | // example.vue 55 | import { IllestWaveform } from "1llest-waveform-vue" 56 | import "1llest-waveform-vue/lib/style.css" 57 | ``` 58 | ### Component 59 | ```vue 60 | 61 |