Skip to content

Based on the ruoyi-framework, the page is divided into search layer, operation layer and display layer to quickly realize the various functions of the page.

License

Notifications You must be signed in to change notification settings

lakei-edward/ry-layer-page

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

安装

📦 下载

$ npm install ry-layer-page -S
# 或者
$ pnpm install ry-layer-page -S

🔨 使用

main.js中写入以下内容

参数http为若依框架中调取请求方法

import request from '@/utils/request'
import ryLayerPage from 'ry-layer-page'
import 'ry-layer-page/lib/ry-layer-page.css'
Vue.use(ryLayerPage, {
  http: request
})

🎨 选用dict字典

main.js中写入以下内容

如果当前项目中没有配置$options.dicts方式引入字典,可进行选配安装dict,参数dict为若依框架中调取字典的接口

import { getDicts } from '@/api/system/dict/data'
import request from '@/utils/request'
import ryLayerPage from 'ry-layer-page'

Vue.use(ryLayerPage, {
  http: request,
  dict: getDicts
})

dict使用示例

export default {
  dicts: ['sys_normal_disable', 'sys_show_hide'],
  data() {
    return {}
  }
}

使用以dict.type开头

<LayerFormItem
  :text="ifFyrText"
  :formParams="fyrform"
  :attrs="{
    model: 'sfnm_c',
    dict: dict.type.sys_yes_no,
    textModel: 'sfnmName',
    component: 'FormSelect',
    width: 260,
    change: handleIsShowName,
  }"
></LayerFormItem>

About

Based on the ruoyi-framework, the page is divided into search layer, operation layer and display layer to quickly realize the various functions of the page.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published