0.1.3 • Published 3 years ago

hj-components v0.1.3

Weekly downloads
14
License
-
Repository
-
Last release
3 years ago

hj-components

一、使用方式

  • 1、安装

    npm install hj-components
  • 2、在项目中的main.js文件中引入

    import HjComponents from 'hj-components';
    import 'hj-components/lib/hj-components.css';
    Vue.use(HjComponents);
  • 3、组件中使用

    <button @click="openModel">点击打开弹框</button>
    <hj-dialog v-model="model" draggable>内容</hj-dialog>
    export default {
      data() {
        return {
          model: false,
        };
      },
      methods: {
        openModel() {
          this.model = true;
        },
      },
    };

二、主要的API

参数类型说明默认值
titleString标题
isHideHeaderBoolean是否隐藏头部false
isHideFooterBoolean是否隐藏底部false
closeFuncFunction关闭按钮的回调函数
closeTextString关闭按钮的文字取消
confirmFuncFunction确认按钮的回调函数
confirmTextFunction确认按钮的文字确认
renderFunction自定义底部,自己写一个jsx语法
widthNumber弹框的宽度450
heightNumber弹框的高度300
bodyStyleObject内容体的样式{}
draggableBoolean是否可拖拽false
isHideCloseBtnBoolean是否隐藏取消按钮false
isHideConfimBtnBoolean是否隐藏确认按钮false