# web-component-plus **Repository Path**: mirrors_singod/web-component-plus ## Basic Information - **Project Name**: web-component-plus - **Description**: 采用WebComponent方式重写ElementUI, 仓库中包含核心包以及UI组件库,包括底层逻辑npm包以及UI实现 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-09-11 - **Last Updated**: 2026-02-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## web-component-ui web-plus-ui 是一套基于 webComponent 的 UI 组件库,目前尚在开发阶段,其中样式基于 elementUI。 web-core-plus 是核心代码包,其中利用虚拟dom 实现了 WebComponent 的渲染; ### 如何使用 #### 自定义标签 ```tsx import { h, Component, Prop } from "@canyuegongzi/web-core-plus"; import css from './index.scss'; import { UISize } from "@/interface"; import { extractClass } from "@/common"; type WuButtonType = 'primary' | 'success' | 'warning' | 'danger' | 'info' type NativeType = 'button' | 'submit' | 'reset' @Component({ name: 'wu-plus-button', css: css }) export class WuButton extends HTMLElement { constructor() { super(); } @Prop({ default: 'primary', type: String }) public type: WuButtonType; @Prop({ default: 'mini', type: String }) public size: UISize; @Prop({ default: false, type: Boolean }) public plain: boolean; @Prop({ default: false, type: Boolean }) public round: boolean; @Prop({ default: false, type: Boolean }) public circle: boolean; @Prop({ default: false, type: Boolean }) public loading: boolean; @Prop({ default: false, type: Boolean }) public disabled: boolean; @Prop({ default: '', type: String }) public icon: string; @Prop({ default: 'button', type: String }) public nativeType: NativeType; @Prop({ default: '', type: String }) public text: string; public render(_renderProps= {}, _store = {}) { return( ); } } ``` #### 使用标签 ```html
按钮 按钮 按钮
```