1.2.4 • Published 3 years ago

lxj-ui v1.2.4

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago
本项目是本人在校期间完成的基于vue2的ui组件库

安装组件库 npm i lxj-ui

全局引入
   	import LxjUi from 'lxj-ui' 
   	import 'lxj-ui/dist/lxj-ui.css'  
   	Vue.use(LxjUi)

一、button组件

1.参数支持

参数名参数描述参数类型默认值
type按钮类型(primary/success/warning/danger/info)stringdefault
plain是否是朴素按钮booleanfalse
round是否是圆角按钮booleanfalse
circle是否是圆形按钮booleanfalse
disabled是否禁用按钮booleanfals

2.事件支持:

事件名事件描述
click点击事件

3.样式参考:

image-20220604161358746

二、dialog组件

1.参数支持

参数名参数描述参数类型默认值
title对话框标题string提示
width宽度string50%
top与顶部的距离string15vh
visible是否显示dialog(支持sync修饰符)booleanfalse

2.事件支持

事件名事件描述
opend模态框显示的事件
closed模态框关闭的事件

3.插槽的说明

插槽名称插槽描述
defaultdialog的内容
titledialog的标题
footerdialog的底部操作区

4.样式参考:

image-20220604161929593

三、input组件

1.参数支持

参数名称参数描述参数类型默认值
placeholder占位符string
type文本框类型(text/password)stringtext
disabled禁用booleanfalse
clearable是否显示清空按钮booleanfalse
show-password是否显示密码切换按钮booleanfalse
namename属性string

2.事件支持

事件名称事件描述
blur失去焦点事件
change内容改变事件
focus获取的焦点事件

3.样式参考:

image-20220604162005497

四、switch

1.参数支持

参数名称参数描述参数类型默认值
v-model双向绑定布尔类型false
namename属性stringtext
activeColor自定义的激活颜色string
inactiveColor自定义的不激活颜色string

2.事件支持

事件名称事件描述
changechange时触发的事件

3.样式参考

image-20220604162043087

五、radio组件

1.参数支持

参数名称参数描述参数类型默认值
v-model双向绑定布尔类型false
label单选框和value值string,num,Boolean' '
nameradio的name值String''

2.样式参考:

image-20220604162100835

六、radio-group组件

1.参数支持

参数名称参数描述参数类型默认值
v-model双向绑定布尔类型false

七、checkout组件

1.参数支持

参数名称参数描述参数类型默认值
v-model双向绑定布尔类型false
label单选框和value值string,num,Boolean' '
nameradio的name值String''

2.样式参考:

image-20220604162111752

八、checkout-group组件

1.参数支持

参数名称参数描述参数类型默认值
v-model双向绑定布尔类型false

九、form组件

1.参数支持

参数名称参数描述参数类型默认值
model表单数据对象object
label-width表单域标签的宽度string80px

十、form-item

参数名称参数描述参数类型默认值
label表单项内容string''

十一、progressBar

参数名称参数描述参数类型默认值
finishBg完成部分背景色string
unfinishBg未完成部分背景色String
sliderBg滑块背景色String
height进度条高度,传像素值String
percent百分数Number0

progressBar

十二、wordCloud

参数名称参数描述参数类型默认值
list需要展示的数据Array
width组件宽度Number400
height组件高度Number500
temp步频Number5
font-max最大文字大小Number80
font-min最小文字大小Number25

npm.io

十三、floatBall

参数名称参数描述参数类型默认值
x横坐标百分比Number1
y纵坐标百分比Number0.4
isShow是否显示悬浮球Booleantrue

floatBall

十四、slide

1.参数支持

参数名称参数描述参数类型默认值
width滑块宽度Number300
height滑块高度Number50
fontSize文字大小Number24
limit滑块的速率限制Number100

2.事件支持

事件名称事件描述
getMsg验证通过或不通过事件

3.样式参考

slide

demo

代码

<template>
  <div id="app">
    <xj-button type="primary"
               @click="visible = true">按钮</xj-button>
    <xj-dialog title="提示"
               :visible.sync="visible"
               width="30%">
      <xj-form :model="model">
        <xj-form-item label="用户名">
          <xj-input placeholder="请输入用户名"
                    v-model="model.username"
                    clearable></xj-input>
        </xj-form-item>
        <xj-form-item label="密码">
          <xj-input placeholder="请输入密码"
                    type="password"
                    v-model="model.userpwd"
                    show-password></xj-input>
        </xj-form-item>
        <xj-form-item label="立即配送">
          <xj-switch v-model="model.soon"></xj-switch>
        </xj-form-item>
        <xj-form-item label="性别">
          <xj-radio-group v-model="model.gender">
            <xj-radio label="1">男</xj-radio>
            <xj-radio label="0">女</xj-radio>
          </xj-radio-group>
        </xj-form-item>
        <xj-form-item label="爱好">
          <xj-checkbox-group v-model="model.hobby">
            <xj-checkbox label="篮球">篮球</xj-checkbox>
            <xj-checkbox label="足球">足球</xj-checkbox>
            <xj-checkbox label="乒乓球">乒乓球</xj-checkbox>
          </xj-checkbox-group>
        </xj-form-item>
      </xj-form>
      <template v-slot:footer>
        <xj-button>取消</xj-button>
        <xj-button @click="btn"
                   type="primary">确定</xj-button>
      </template>
    </xj-dialog>
  </div>
</template>

<script>

export default {
  name: 'App',
  data () {
    return {
      model: {
        username: 'admin',
        userpwd: '123456',
        soon: true,
        gender: '1',
        hobby: ['篮球']
      },
      visible: false
    }
  }
}
</script>

效果

lxj-ui

1.1.0

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.2

3 years ago

1.0.3

3 years ago

0.0.1

3 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago