(Translated by https://www.hiragana.jp/)
GitHub - pinky-pig/v3-bento: 拖拽方块布局
Skip to content

pinky-pig/v3-bento

Repository files navigation

V3-Bento

v3-bento

A simple bento layout component for Vue3.

Document: https://v3bento.mmeme.me/

🌸 Get Started

pnpm install v3-bento

🍄 Usage

<Bento
  :bentoCells="bentoCells"
  class="!h-[610px] overflow-y-auto overflow-x-hidden p-[10px] box-content"
  :size="140"
  :disabled="false"
  :gap="10"
  :maximum-cells="4"
  @drag-end="(e: any) => console.log(e)"
  @drag-start="(e: any) => console.log(e)"
>
  <BentoItem
    v-for="item in bentoCells"
    :key="item.id"
    :id="item.id"
    :x="item.x"
    :y="item.y"
    :width="item.width"
    :height="item.height"
  >
    <Cell :url="'./' + item.id + '.svg'" :bg="'#fff'" />
  </BentoItem>
</Bento>

Source Code

  1. Run code: npm run dev
  2. Package lib: npm run build:lib
  3. Release lib: npm run release:lib
  4. Package documents: npm run build
  5. Preview documents: npm run preview
ちゅうぶん
  1. 运行だい码: npm run dev
  2. つつみ lib : npm run build:lib
  3. 发包 lib : npm run release:lib
  4. つつみぶん档: npm run build
  5. 预览ぶん档: npm run preview