Skip to content

Latest commit

 

History

History
73 lines (49 loc) · 2.82 KB

README.en-US.md

File metadata and controls

73 lines (49 loc) · 2.82 KB

@pureadmin/descriptions

Secondary encapsulation of element-plus Descriptions, providing flexible configuration items

NPM version NPM Downloads

English | 简体中文

🤔 Original intention of development

  • element-plus Descriptions Descriptions Item attribute can only be written in the <template></template> 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 and provide more Flexible configuration
  • Verification before code submission: Use husky to verify the rules before submitting code, enforce standard development process and prevent development mistakes

📦 Install

npm install @pureadmin/descriptions
or
pnpm add @pureadmin/descriptions

🦄 Usage

Partial registration (single file)

import { PureDescriptions } from "@pureadmin/descriptions";

<pure-descriptions :data="data" :columns="columns"></pure-descriptions>

Global registration (main.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

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)
// tsconfig.json
{
  "compilerOptions": {
    // ...
    "types": ["@pureadmin/descriptions/volar"]
  }
}

License

MIT © xiaoxian521-latest