@ls-design/core
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

基于 quarkccore

提供了对 @ls-design/ui的底层支持, 以更友好的姿态实现了Web Components

⚙️ 安装

npm install @ls-design/core --save

🚀 使用示例

import { Property, CustomElement, createRef, LSElement } from '@ls-design/core';
import style from './style.css';

@CustomElement({
  tag: "ls-button",
  style,
})
class Button extends LSElement {
  @Property() // @Property提供响应式外部属性
  type = '';

  @Property({
    type: Boolean,
  })
  disabled = false;

  @State // 组件内部响应式元素
  isShow = false,

  slotRef: any = createRef(); // 创建ref

  render() {
    ...
  }
}

除了上述 使用示例 外的能力基本参考了quarkc,可直接其阅读文档

Package Sidebar

Install

npm i @ls-design/core

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

54.9 kB

Total Files

20

Last publish

Collaborators

  • luoge