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-fuzzy

v1.1.9

Published

On the background management system Fuzzy Provides one - stop add, delete, change and check configurable component

Downloads

44

Readme

Vue-Fuzzy

基于 vue3 | ts | element-plus | windcss 制作的一个的用于后台管理系统、 可通过配置提供增删改查一站式服务的组件

Install

import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import axios from 'axios'
import 'windi.css'
import { FuzzyInstall } from 'vue-fuzzy'
import App from './App.vue'

const axiosInstance = axios.create()


createApp(App)
  .use(ElementPlus)
  .use(FuzzyInstall, {
    componentName: 'VueFuzzy' // 可自定义组件名称
    request: axiosInstance, // 请求实例
    implResponse: (response: any): ResponseHandler => ({ // map响应对象
      data: response.data.data,
      success: response.status === 200,
      total: response.data.total,
    } as FuzzyOptions),
  })
  .mount('#app')

Quick Start

<template>
  <Fuzzy :config="config"/>
</template>

<script lang="ts">
import config from "./config.ts"
</script>

image

JS DOCX

文档地址

image

Config


import { FormItemEnum } from './types'

// 单页面配置
// 具体字段配置信息 查看 js docx
const config: TemplateConfiguration = [
  api: 'v1.api',
  title: 'Fuzzy',
  feature: { create: true, delete: true, update: true },
  pagination: {
    size: 10,
  },
  templates: [
    {
      label: '序号',
      value: 'serialNumber',
      visible: {
        table: true,
      },
    },
    {
      label: '姓名',
      value: 'name',
      defaultQueryValue: '我叫fuzzy',
      require: true,
      visible: {
        query: true,
        table: true,
        create: true,
        update: true,
      },
      render: (row: any) => h('div', { style: 'color: red' }, [row.$index]),
    },
    {
      label: '爱好',
      value: 'hobby',
      type: FormItemEnum.select,
      items: [{ label: '默认', value: 'initial'}],
      require: true,
      visible: {
        query: true,
        table: true,
        create: true,
        update: true,
      },
      fetchQuery() { // 支持异步加载items
        setTimeout(() => {
          this.items.push(...[{ label: '打篮球', value: 'bk' }, { label: '踢足球', value: 'bk' }])
        }, 500)
      },
    },
    {
      label: '时间',
      value: 'time',
      type: FormItemEnum.datePicker,
      visible: {
        query: true,
        table: true,
        create: true,
        update: true,
      },
    },
  ],
  tableOperation: {
    show: true,
    operator: [
      {
        label: '自定义',
        value: 'diy',
        onClick: (row: any) => {
          console.log('自定义按钮', row)
        },
      },
    ],
  },
]