https://github.com/pure-admin/pure-admin-descriptions
使用tsx语法二次封装element-plus的Descriptions,提供灵活的配置项
https://github.com/pure-admin/pure-admin-descriptions
el-descriptions element-plus pure-admin-descriptions
Last synced: 12 months ago
JSON representation
使用tsx语法二次封装element-plus的Descriptions,提供灵活的配置项
- Host: GitHub
- URL: https://github.com/pure-admin/pure-admin-descriptions
- Owner: pure-admin
- License: mit
- Created: 2022-06-23T02:38:09.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-12T17:48:54.000Z (over 2 years ago)
- Last Synced: 2025-06-22T20:38:07.675Z (12 months ago)
- Topics: el-descriptions, element-plus, pure-admin-descriptions
- Language: TypeScript
- Homepage: https://pure-admin.github.io/pure-admin-descriptions
- Size: 1.52 MB
- Stars: 14
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.en-US.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
@pureadmin/descriptions
Secondary encapsulation of element-plus Descriptions, providing flexible configuration items
English | [简体中文](./README.md)
- [Preview](https://pure-admin.github.io/pure-admin-descriptions)
## 🤔 Original intention of development
- `element-plus` [Descriptions](https://element-plus.org/en-US/component/descriptions.html#descriptions-item-attributes) `Descriptions Item` attribute can only be written in the `` template at present, which is not very flexible. If there are enough `Item` describing the list, the code is written and looks bloated, so I developed this library, Let's explore together
## 🚀 Features
- 🦾 **High flexibility**: Written using `tsx` syntax, while ensuring the type, it provides developers with more flexible writing methods and provides users with more convenient configuration
- ⚡ **Fully tree-shaking**: Comes with Tree-shaking, only packages the imported code
- 🫶 **Code Zero Intrusion**: Keep all attributes and slots of `element-plus` [Descriptions](https://element-plus.org/en-US/component/descriptions.html) and provide more Flexible configuration
- ⚓ **Verification before code submission**: Use [husky](https://typicode.github.io/husky/#/) to verify the rules before submitting code, enforce standard development process and prevent development mistakes
## 📦 Install
```bash
npm install @pureadmin/descriptions
or
pnpm add @pureadmin/descriptions
```
## 🦄 Usage
### Partial registration (single file)
```ts
import { PureDescriptions } from "@pureadmin/descriptions";
```
### Global registration (main.ts)
```ts
import { createApp } from "vue";
import App from "./App.vue";
import PureDescriptions from "@pureadmin/descriptions";
const app = createApp(App);
app.use(PureDescriptions).mount("#app");
```
[Click to view the specific usage](https://github.com/pure-admin/pure-admin-descriptions/blob/main/src/App.vue)
## Volar support
- If you are using `Volar`, you can configure compilerOptions.types in tsconfig.json to specify the global component type (especially if you want to get type hints during global registration, you need to add the following configuration)
```js
// tsconfig.json
{
"compilerOptions": {
// ...
"types": ["@pureadmin/descriptions/volar"]
}
}
```
## License
[MIT © xiaoxian521-latest](./LICENSE)