Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hairyf/naive-ui-pro-components
https://github.com/hairyf/naive-ui-pro-components
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hairyf/naive-ui-pro-components
- Owner: hairyf
- License: mit
- Created: 2023-05-25T02:49:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-31T13:38:26.000Z (about 2 months ago)
- Last Synced: 2024-10-31T14:34:55.529Z (about 2 months ago)
- Language: TypeScript
- Homepage: https://naiveui-pro.vercel.app/
- Size: 596 KB
- Stars: 12
- Watchers: 1
- Forks: 4
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# naive-ui-pro-components
See our website [naive-ui-pro-components](https://naiveui-pro.vercel.app/) for more information.
## InstallUsing pnpm:
```bash
pnpm install --save naive-ui-pro-components
```or using yarn:
```bash
yarn add naive-ui-pro-components
```## Usage
### Globals
```js
import { createApp } from 'vue'
import NaiveUIProComponents from 'naive-ui-pro-components'
import App from './App.vue'const app = createApp(App)
app.use(NaiveUIProComponents)
```## On-Demand Import (Recommended)
Install the `unplugin-vue-components` and `unplugin-auto-import` plugins, which will automatically import all components and APIs from `naive-ui-pro-components`.
```sh
npm install -D unplugin-vue-components unplugin-auto-import
```### Vite
```ts
// vite.config.ts
import { defineConfig } from 'vite'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import NaiveUIProResolver from 'naive-ui-pro-components/resolver'
import NaiveUIProImports from 'naive-ui-pro-components/imports'export default defineConfig({
// ...
plugins: [
// ...
AutoImport({
imports: [NaiveUIProImports()],
}),
Components({
resolvers: [NaiveUIProResolver()],
}),
],
})
```### Webpack
```js
// webpack.config.js
const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const NaiveUIProResolver = require('naive-ui-pro-components/resolver')
const NaiveUIProImports = require('naive-ui-pro-components/imports')module.exports = {
// ...
plugins: [
// ...
AutoImport({
imports: [NaiveUIProImports()],
}),
Components({
resolvers: [NaiveUIProResolver()],
}),
],
}
```