2.0.53 • Published 2 months ago

yy-org-switch v2.0.53

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

yy多级管控组织切换

14a6c6df-8c72-48a3-8399-884b1f6fc1ec.gif

Install

安装方法:
npm安装:
npm: npm install yy-org-switch
yarn安装:
yarn add yy-org-switch

Quick Start

<template>
<YYOrgSwitch
      @select="onSelect"
      @err="errorFunc"
      :name="nameTag"
      :id="idTag"
      :defaultText="defaultText"
      :onlyOneLevel="onlyOneLevel"
      :noSearch="noSearch"
      :canNotBeEmpty="canNotBeEmpty"
      :lang="lang"
      :yySelectDialogTitle="yySelectDialogTitle"
      />
</template>
import YYOrgSwitch from 'yy-org-switch'
...,
components: {YYOrgSwitch},
methods:{
  yyOrgSelectLoadData(parent_id) {

  }
  yyOrgSelectSearchData(keyword){

  }
  errorFunc(msg) {

  },
  onSelect(org){

  }
}

Params

  yyOrgSelectLoadData      不需要传递该方法,父组件内部要有这个函数就行,该组件会调用,用于加载树形组件的初始数据 或者 请求树形组件的下级数据,参数以parent_id传递
  yyOrgSelectSearchData    不需要传递该方法,父组件内部要有这个函数,该组件会调用,用于搜索数据, 搜索的关键字以 keyword 传递
  @select        触发最后的选择
  @err             获取到错误信息,一般以dialog弹出来
  :name           搜索出来展示的信息,一般是name, 比如:如果要展示 fileName, 就传递 'fileName'
  :id                 用在树形结构请求下级数据的,一般是id,比如:如果用fileId请求下级数据,就传递fileId
  :defaultText  展示的默认值
  :onlyOneLevel  布尔类型,树形组件是否只有一级,true是, false不是
  :noSearch  布尔类型,如果不需要搜索功能,就传true, 需要就传false,或者不传此参数
  :canNotBeEmpty  布尔类型,如果不允许input框输入,不允许显示删除按钮,(即不让用户置空输入框) 传递 true 即可
  :lang   字符串类型, 控制显示的语言类型, 不传默认就是汉语, 英语则传递 'en' 繁体传递 'zh-TW'
  :yySelectDialogTitle   字符串类型, 弹框的title
  :bg   布尔类型, 默认弹框有背景,如果不需要背景可以设置false
  :disableKey 字符串类型, checkbox 禁选key
  :hasCheck 布尔类型 默认false 是否显示checkbox
特殊说明: yyOrgSelectLoadData    yyOrgSelectSearchData  返回的结果需要是promise对象,并且resolve的结果是要展示的数组数据,示例如下:
yyOrgSelectLoadData(parentId) {
      return new Promise((resolve, reject) => {
          axios.get(url).then((res)=> {
            resolve(res.data.data.dept_list)
        })
      })
    },
 yyOrgSelectSearchData(keyword) {
      return new Promise((resolve, reject) => {
          axios.get(url).then((res)=> {
            resolve(res.data.data.dept_list)
        })
      })
    }
2.0.53

2 months ago

2.0.52

2 months ago

2.0.51

3 months ago

2.0.48

10 months ago

2.0.49

10 months ago

2.0.46

11 months ago

2.0.47

11 months ago

2.0.45

11 months ago

2.0.44

12 months ago

2.0.43

12 months ago

2.0.42

12 months ago

2.0.41

1 year ago

2.0.40

2 years ago

2.0.39

2 years ago

2.0.38

2 years ago

2.0.37

2 years ago

2.0.36

2 years ago

2.0.35

2 years ago

2.0.34

2 years ago

2.0.33

2 years ago

2.0.32

2 years ago

2.0.31

2 years ago

2.0.30

2 years ago

2.0.29

2 years ago

2.0.28

2 years ago

2.0.27

2 years ago

2.0.26

2 years ago

2.0.25

2 years ago

2.0.24

2 years ago

2.0.23

2 years ago

2.0.22

2 years ago

2.0.21

2 years ago

2.0.20

2 years ago

2.0.19

2 years ago

2.0.18

2 years ago

2.0.17

2 years ago

2.0.16

2 years ago

2.0.15

2 years ago

2.0.14

2 years ago

2.0.13

2 years ago

2.0.12

2 years ago

2.0.11

2 years ago

2.0.10

2 years ago

2.0.9

2 years ago

2.0.8

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

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