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

vue-gutter-resize

v0.10.2

Published

resize adjacent dom by dragging the gutter

Downloads

254

Readme

vue-gutter-resize

言語 : en

vue-gutter-resizeは、gutterをドラッグすると両隣のdomのサイズを変更できます。

デモ

current npm version support vue version Codacy Badge Maintainability dependencies Status devDependencies Status install size npm bundle size (minified + gzip) License: MIT

Browsers support

| Chrome | Safari | | --------- | --------- | | last version| last version

使い方

インストール

yarn add vue-gutter-resize
# or
npm i vue-gutter-resize

全体import

import Vue from 'vue/dist/vue.esm.js'
import VueGutterResize from 'vue-gutter-resize'
import 'vue-gutter-resize/dist/vue-gutter-resize.css'
Vue.use(VueGutterResize)

必要な分だけimport

import { ColumnGutter } from 'vue-gutter-resize'
import 'vue-gutter-resize/dist/vue-gutter-resize.css'

module別import

// umd module
import { ColumnGutter } from 'vue-gutter-resize/dist/vue-gutter-resize.umd.js'
import 'vue-gutter-resize/dist/vue-gutter-resize.css'
// commonjs module
import { ColumnGutter } from 'vue-gutter-resize/dist/vue-gutter-resize.js'
import 'vue-gutter-resize/dist/vue-gutter-resize.css'

Column Gutter

<template>
  <column-gutter
    :column="column"
    :width="'100vw'"
    :height="'600px'"
    :gutter-sizes="['4px', '1rem', '1em']"
    :colors="colors"
    :column-sizes="[4, 1, 4, 1]"
    @resize="resize">
    <div slot="col-0">0</div>
    <div slot="col-1">1</div>
    <div slot="col-2">2</div>
    <div slot="col-3">3</div>
  </column-gutter>
</template>

<script>
import { ColumnGutter } from 'vue-gutter-resize'
import 'vue-gutter-resize/dist/vue-gutter-resize.css'

export default {
  components: {
    ColumnGutter
  },
  data () {
    return {
      column: 4,
      colors: ['red', 'blue', 'yellow']
    }
  },
  methods: {
    resize ({ col }) {
      console.log(col) // current col size (etc... [25, 25, 25, 25]
    }
  }
}
</script>

Row Gutter

<template>
  <row-gutter
    style="border: 1px solid #ccc;"
    :row="row"
    :width="'800px'"
    :height="'600px'"
    :gutter-size="'4px'"
    :colors="colors"
    :row-sizes="[1, 2, 3, 4]"
    @resize="resize">
    <div slot="row-0">0</div>
    <div slot="row-1">1</div>
    <div slot="row-2">2</div>
    <div slot="row-3">3</div>
  </row-gutter>
</template>

<script>
import { RowGutter } from 'vue-gutter-resize'
import 'vue-gutter-resize/dist/vue-gutter-resize.css'

export default {
  components: {
    RowGutter
  },
  data () {
    return {
      row: 4,
      colors: ['red', 'blue', 'yellow']
    }
  },
  methods: {
    resize ({ row }) {
      console.log(row) // current row size (etc... [25, 25, 25, 25]
    }
  }
}
</script>

全てのgutter

column-gutter

props

  • width: String
    • column-gutterの横幅
    • 必須
    • 例: :width="'800px'"
  • height : String
    • column-gutterの縦幅
    • 必須
    • 例: :height="'600px'"
  • gutter-size : String
    • 全gutterの幅
    • 例: :gutter-size="'4px'"
  • gutter-sizes : Array<String>
    • それぞれのgutterの幅
    • gutter-sizeが指定されている場合、gutter-sizeが優先される
    • 例: :gutter-sizes="['7px', '1rem']"
  • color : String
    • 全gutterの色
    • 例: :color="'green'"
  • colors : Array<String>
    • それぞれのgutterの色
    • colorが指定されている場合、colorが優先される
    • 例: :colors="['red', 'blue']"
  • column : Number
    • column数
    • 必須
    • 例: :column="3"
  • column-sizes: Array<Number>
    • columnのサイズ(合計で100)
    • 例: :column-sizes="[1, 2, 3]"

emit

  • resize({ col }): Object
    • col : Array<Number>
    • それぞれのcolumnの幅(合計で100)

slot

col-nで指定

<div slot="col-0">1つ目のcolumn</div>
<div slot="col-1">2つ目のcolumn</div>
<div slot="col-2">3つ目のcolumn</div>

row-gutter

props

  • width: String
    • row-gutterの横幅
    • 必須
    • 例: :width="'800px'"
  • height : String
    • row-gutterの縦幅
    • 必須
    • 例: :height="'600px'"
  • gutter-size : String
    • 全gutterの幅
    • 例: :gutter-size="'4px'"
  • gutter-sizes : Array<String>
    • それぞれのgutterの幅
    • gutter-sizeが指定されている場合、gutter-sizeが優先される
    • 例: :gutter-sizes="['7px', '1rem']"
  • color : String
    • 全gutterの色
    • 例: :color="'green'"
  • colors : Array<String>
    • それぞれのgutterの色
    • colorが指定されている場合、colorが優先される
    • 例: :colors="['red', 'blue']"
  • row : Number
    • row数
    • 必須
    • 例: :row="3"
  • row-sizes: Array<Number>
    • rowのサイズ(合計で100)
    • 例: :row-sizes="[1, 2, 3]"

emit

  • resize({ row }): Object
    • row : Array<Number>
    • それぞれのcolumnの幅(合計で100)

slot

row-nで指定

<div slot="row-0">1つ目のrow</div>
<div slot="row-1">2つ目のrow</div>
<div slot="row-2">3つ目のrow</div>

サンプル

https://github.com/tomatoaiu/vue-gutter-resize-example

ライセンス

MIT