button.md 1.34 KB

GLButton 按钮

基于"element-ui": "2.15.6",将 Button 组件进行了封装。根据业务需求,增加了权限校验,提高了工作效率。

使用方式

在你想要使用的组件内,如下使用

(注:Button,渲染函数封装,如果你不了解渲染函数,请移步vue的渲染函数文档查阅相关资料)

  <template>
    <GLButton @click="click" 
      fn="1-1-1-11" 
      mode="el-button" 
      display="disabled">
        232321321
    </GLButton>
  </template>
  <script>
    import { GLButton } from 'glsx-components';
    import 'glsx-components/dist/glsx-components.css';

    export default {
      name:'demo',
      data(){
        return {
          visible:false
        }
      },
      components:{
        GLButton
      },
      methods:{
          click() {
            console.log(111111111111)
            this.visible = true
          }
      }
    }

  </script>

Props

Name Description Type Required Default
fn 权限 String 否 null
mode 要渲染的元素 String 否 el-button
display 是否禁用 String 否 null

更多详情参考 Element Button Attributes