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-select-tu

v1.0.0

Published

A Vue.js plugin of select multiple images

Downloads

5

Readme

vue-select-tu

standard-readme compliant

一款基于vue的多元图形选择插件

Table of Contents

Security

Install

npm install vue-select-tu

Module

import vueSelectTu from 'vue-select-tu'
Vue.use(vueSelectTu)

Usage

<vue-select-tu v-model="select"
                   :require="true"
                   :multiple="true"
                   @change="changeData"
                   :imgData="imgData"
                   :label="yourlabel">
    </vue-select-tu>

Definition

| Props | Description | Type | Dafult | | :------------- | ------------------- | :-----: | ---------------------------- | | :multiple | 支持多选,默认false | Boolean | false | | :imgData | 数据源;默认 | Array | [] | | v-model/:model | 图片默认选定值 | Array | ["value"],默认选中第一个图片 | | :require | 是否为必选 | Boolean | false | | :label | 表单元素名称 | String | "" | | :width | 图片宽度 单位:px | String | "150",图片默认150px; | | :height | 图片高度 单位:px | String | "100",图片默认100px; | | v-on:change | 选中图片回调methods | method | Function(val) {} |

Example

<template>
  <div id="app">
    <vue-select-tu v-model="select"
                   :require="true"
                   :multiple="true"
                   @change="changeData"
                   :imgData="imgData"
                   label="请选择图片:">
    </vue-select-tu>
  </div>
</template>
<script>
export default {
  name: 'app',
  data() {
    return {
      select: ['1'],
      imgData: [
        {
          name: '流动星空',
          value: '1',
          url:
            'https://images.unsplash.com/photo-1436891620584-47fd0e565afb?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MTV8fHN0YXJ8ZW58MHx8MHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60',
          alt: '标签1'
        },
        {
          name: '深海蔚蓝',
          value: '2',
          url:
            'https://images.unsplash.com/photo-1505118380757-91f5f5632de0?ixid=MXwxMjA3fDB8MHxzZWFyY2h8Mnx8c2VhfGVufDB8fDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60',
          alt: '标签2'
        },
        {
          name: '黑色商务',
          value: '3',
          url:
            'https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixid=MXwxMjA3fDB8MHxzZWFyY2h8OXx8YnVzaW5lc3N8ZW58MHx8MHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60',
          alt: '标签3'
        }
      ]
    }
  },
  methods: {
    // val 为数组
    changeData(val) {
      console.log(val)
    }
  }
}
</script>

Affirm

​ demo中部分图片引自网络,如有雷同,请联系本人删除

​ WeChat: 735568868

Maintainers

@Kyle

Contributing

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2021/03/25 Kyle