1.1.9 • Published 11 months ago

vue-fuzzy v1.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

npm.io npm.io

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)
        },
      },
    ],
  },
]
1.1.9

11 months ago

1.1.8

11 months ago

1.1.7

11 months ago

1.1.6

11 months ago

1.1.5

12 months ago

1.0.22

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.33

2 years ago

1.0.32

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.37

2 years ago

1.0.36

2 years ago

1.0.35

2 years ago

1.0.34

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.39

2 years ago

1.0.38

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.40

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.48

2 years ago

1.0.47

2 years ago

1.0.46

2 years ago

1.0.45

2 years ago

1.0.49

2 years ago

1.0.51

2 years ago

1.0.50

2 years ago

1.0.55

2 years ago

1.0.54

2 years ago

1.0.53

2 years ago

1.0.52

2 years ago

1.0.57

2 years ago

1.0.56

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago