zoukankan      html  css  js  c++  java
  • element ui Angular学习笔记(一)

    1.element ui安装

    npm i --save element-angular

    2.Angular-cli引入

    引入后需要开启ElModule.forRoot(),也可以单独引入某个组件入ElChildModules.ElButton

    3.指令

    [el-class]

    如:<el-alert [el-class]="'myClass'">text</el-alert>

    .myClass { >div { color: #ccc; } }

    在自己的@comopnent内使用encapsulation: ViewEncapsulation.None来覆盖样式,使element Angular可以影响组件样式

    4.布局

    layout布局

    基础采用24分栏布局。

    el-row,el-col,span,gutter(间隔),type="flex"(对齐,justify:start, center, end, space-between, space-around)

    row属性:gutter,type,justify,align

    col属性:span,offset,push,pull,xs,sm,md,lg,xl

    container布局

    el-container(direction:horizontal / vertical),el-header(height),el-aside(width),el-main,el-footer(height)

    5.icon图标

    5.1使用class=“el-icon+-iconName”

    5.2使用el-icon,name=

    <span class="icons"> <i class="el-icon-edit"></i> <el-icon name="share"></el-icon> <el-icon name="delete"></el-icon> </span> <el-button type="primary" icon="search">搜索</el-button>

    6.按钮button

    size 尺寸 string arge,small,mini -
    type 类型 string primary,success,warning,danger,info,text -
    plain 是否朴素按钮 boolean false
    round 是否圆形按钮 boolean false
    loading 是否加载中状态 boolean false
    elDisabled 是否禁用状态 boolean false
    icon 图标,已有的图标库中的图标名 string -
    native-type 原生 type 属性 string button,submit,reset button
    FIGHTING
  • 相关阅读:
    11个Javascript树形菜单
    7款Flash和Javascript网页视频播放器
    10款Flash和Javascript网页音乐播放器
    第六章 jQuery操作表单
    第五章 jQuery中的动画
    第四章 jQuery中的事件
    第三章 jQuery中的DOM操作
    第二章 jQuery选择器
    第一章 认识jQuery
    DataGridView窗体之间的传递
  • 原文地址:https://www.cnblogs.com/ljwsyt/p/9007407.html
Copyright © 2011-2022 走看看