Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qdleader-cj

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qdleader-cj

vue vue3 9宫格抽奖

  • 3.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

下载

npm install qdleader-cj

在mian.js中引入



import plug from 'qdleader-cj'
import 'qdleader-cj/lib/plugin.css'

createApp(App)
    .use(plug)
    .mount('#app')


在组件中使用

<drawBox /> 就是要引入的组件

<template>
  <div class="list">
    <drawBox  :imgArr="newArr1" :awardNum="2"/>

  </div>
</template>

<script>
import {ref , onMounted} from 'vue';

import logo from './logo.png';
let newArr = [
    {
        img:logo,
        title:'草莓'
    },
        {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    },    {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    },    {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    },    {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    },    {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    },    {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    }, {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    }
]
export default {
  name: 'HelloWorld11',
  props: {
    msg: String
  },

  setup() {
      let newArr1 = ref(newArr)
      return {
          newArr1
      }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.list {
    width: 98%;
    margin: 0 auto;
}

</style>

可配置参数

参数名称type描述
imgArrArray中奖图片信息配置
awardNumNumber中奖奖项配置

imgArr格式:

[{
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    },  
    {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    },    {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    },    {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    },    {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    },    {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    },    {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    }, {
        img:'https://img2.baidu.com/it/u=3758616094,217032655&fm=26&fmt=auto&gp=0.jpg',
        title:'草莓'
    }]

有问题可联系 https://github.com/qdleader/qdleader

Keywords

FAQs

Package last updated on 25 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc