npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jd-row

v1.1.1

Published

a grid layout component for Vue.js.

Downloads

12

Readme

可拖放和修改尺寸的流式网格布局


安装

npm i jd-row --save

使用

import JdRow from "jd-row";

const app = createApp(App);
app.use(JdRow).mount("#app");

使用

定义行高和列数,列宽自动
<template>
  <jd-row class="home-wrap" :rowSize="9" :rowHeight="60" :rowGap="16" :columnGap="16">
    <jd-col :rowSpan="5" :columnSpan="5" drag resize>1</jd-col>
    <jd-col :rowSpan="5" :columnSpan="4" drag resize>2</jd-col>
    <jd-col :rowSpan="3" :columnSpan="3" drag resize>3</jd-col>
    <jd-col :rowSpan="3" :columnSpan="3" drag resize>4</jd-col>
    <jd-col :rowSpan="6" :columnSpan="3" drag resize>5</jd-col>
    <jd-col :rowSpan="3" :columnSpan="3" drag resize>6</jd-col>
    <jd-col :rowSpan="3" :columnSpan="3" drag resize>7</jd-col>
  </jd-row>
</template>
预定义前3行的行高和前3列列宽,其余按照rowWidthrowHeight
<template>
  <jd-row class="home-wrap" :rowSize="9" :columns="['100px', '1fr', '10rem']" :rows="['80px', '1fr','5rem']" :rowWidth="100" :rowHeight="60">
    <jd-col :rowSpan="5" :columnSpan="5" drag resize>1</jd-col>
    <jd-col :rowSpan="5" :columnSpan="4" drag resize>2</jd-col>
    <jd-col :rowSpan="3" :columnSpan="3" drag resize>3</jd-col>
    <jd-col :rowSpan="3" :columnSpan="3" drag resize>4</jd-col>
    <jd-col :rowSpan="6" :columnSpan="3" drag resize>5</jd-col>
    <jd-col :rowSpan="3" :columnSpan="3" drag resize>6</jd-col>
    <jd-col :rowSpan="3" :columnSpan="3" drag resize>7</jd-col>
  </jd-row>
</template>

jd-row Attributes

| 参数 | 说明 | 类型 | 可选值 | 默认值 | |---------- |---------------|---------- |------------- |-------- | | rowWidth | 单列宽 | Number | — | 1fr | | rowHeight | 单列高 | Number | — | auto | | rowSize | 每行列数 | Number | — | 24 | | rowGap | 行间距 | Number | — | 0 | | columnGap | 列间距 | Number | — | 0 | | columns | 预定义的列宽(会覆盖rowWidth) | Array[String] | — | — | | rows | 预定义的行高(会覆盖rowHeight) | Array[String] | — | — |

jd-col Attributes

| 参数 | 说明 | 类型 | 可选值 | 默认值 | |---------- |-------- |---------- |------------- |-------- | | rowSpan | 跨行数 | Number | — | 1 | | columnSpan| 跨列数 | Number | — | 1 | | drag | 是否可拖放 | Boolean | — | false | | resize | 是否可改变尺寸 | Boolean | — | false |

Demo

Demo