页面折叠布局:(折叠按钮、transition动画、git项目池模块分支)

布局组件(template):
<el-container>
<el-aside>
<!-- some custom component -->
</el-aside>
<el-main>
<!-- 折叠按钮放在这里 -->
<!-- some custom component -->
</el-main>
</el-container>

template内折叠按钮:

<span class="theme-icon jr-mix-fold-button" @click="changeFold">
<i class="icon-fold-btn-bg-1"></i>
<i class="icon-add23" :class="{'icon-add24': fold}"></i>
</span>

template所有内容:

<el-container>
<el-aside class="jr-layout transition" :width="asideWidth">
<!-- some custom component -->
</el-aside>
<el-main class="jr-layout" style="padding: 40px">
<span class="theme-icon jr-mix-fold-button" @click="changeFold">
<i class="icon-fold-btn-bg-1"></i>
<i class="icon-add23" :class="{'icon-add24': fold}"></i>
</span>
<!-- some custom component -->
</el-main>
</el-container>
折叠按钮:
<span class="theme-icon jr-mix-fold-button" @click="changeFold">
<i class="icon-fold-btn-bg-1"></i>
<i class="icon-add23" :class="{'icon-add24': fold}"></i>
</span>
组件行为(script):
data() {
return {
fold: false, // 折叠按钮,默认false,表展开
}
},
computed: {
asideWidth() { // 折叠后el-aside组件宽度,默认展开,页面宽度占比25%
return this.fold ? '0' : '25%'
}
},
methods: {
changeFold() {
this.fold = !this.fold;
}
},

配图:

// ----- end  -

// ----- 20190326 @ziChin update -

表单筛选样式(table页面上方的筛选组合)

标签嵌套:
el-row.jr-form-filter
> el-form[label-width="100px" size="small" label-position="right"]
> el-col[:xs="12" :sm="8" :md="6"]
> el-form-item[:label="$t('filter.industry') + ':'"]
> el-input || el-select
jr-vue.css样式:
 // 表单筛选样式:table页面上方的筛选组合
.jr-form-filter { // 表单筛选样式
white-space: nowrap;
@border-color: #C0C5C8;
@border-inner-color: #E5E7E8;
.el-form-item {
border: 1px solid @border-color;
margin-left: -1px;
border-left-color: @border-inner-color;
input {
background-color: transparent;
&,
&:hover,
&:focus {
border-color: transparent;
}
}
.el-input.is-focus input {
border-color: transparent;
}
}
.el-col:first-child {
.el-form-item {
border-left-color: @border-color;
}
}
}

vue文件写法:

<el-row class="jr-form-filter">
<el-form status-icon ref="editForm" label-width="100px" size="small" label-position="right">
<el-col :xs="12" :sm="8" :md="6">
<el-form-item :label="$t('filter.industry') + ':'">
<el-input
type="text"
:value="currentIndustry.industryCnname"
placeholder="请选择行业"
:readonly="false"
clearable
@focus="handleOpenSelectInudstry"
@clear="clearSelectIndustry"
></el-input>
</el-form-item>
</el-col> <el-col :xs="12" :sm="8" :md="6">
<el-form-item :label="$t('filter.rounds') + ':'">
<el-select
v-model="currentRounds"
@change="search(0)"
placeholder="请选择"
>
<el-option v-for="item in rounds" :key="item" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
</el-col> <el-col :xs="12" :sm="8" :md="6">
<el-form-item :label="$t('filter.location') + ':'">
<el-input
type="text"
:value="currentLocation.name"
placeholder="请选择地区"
:readonly="false"
@focus="handleOpenSelectArea"
clearable
@clear="clearArea"
></el-input>
</el-form-item>
</el-col> <el-col :xs="12" :sm="8" :md="6">
<el-form-item :label="$t('filter.status') + ':'">
<el-select
v-model="currentPoolStatus"
@change="search(0)"
placeholder="请选择">
<el-option
v-for="item in poolStatus"
:key="item.itemCode"
:label="systemLang == 'cn'? item.itemNameCn : item.itemNameEn"
:value="item.itemCode"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-form>
</el-row>
栗子图片:

// ----- end  -

// ----- 20190318 @ziChin update -

header标签内搜索搜索框样式

vue文件写法:
<el-row :gutter="10" style="margin-bottom: 20px">
<el-col :span="12">
<el-input
:placeholder="this.$t('pleaseInput')"
@keyup.native.enter="search"
@blur.native="search"
v-model="keyword"
size="small"
prefix-icon="el-icon-search"
></el-input>
</el-col>
<el-col :span="6">
<el-button @click="search" size="small" type="primary">{{$t("search")}}</el-button>
</el-col>
<el-col :span="6">
<span class="el-icon-group">
<el-tooltip class="item" effect="dark" :content="$t('add')" placement="bottom">
<i class="jr-icon-plus" @click="startAdd"></i>
</el-tooltip>
<span></span>
<el-tooltip class="item" effect="dark" content="$t('del')" placement="bottom">
<i class="jr-icon-delete" @click="deleteAll"></i>
</el-tooltip>
</span>
</el-col>
</el-row>
栗子配图:

// ----- end  -

// ----- 20190318 @ziChin update -

最新文章

  1. spring整合quartz并持久化
  2. js中常用数组方法concat join push pop slice splice shift
  3. Chapter 6 Windows下编译pycaffe
  4. HDU2897邂逅明下(博弈)
  5. sed和awk最佳入门教程
  6. 读书时间《JavaScript高级程序设计》六:事件
  7. S3C2440看门狗解析
  8. css文字溢出隐藏,及强制断句
  9. 浅谈SQL优化入门:3、利用索引
  10. 从零安装Scrapy心得 | Install Python Scrapy from scratch
  11. 用mongo和redis查询排行榜、统计活跃用户
  12. ECMA Script 6_必须要知道的基础
  13. 完美解决safari、微信浏览器下拉回弹效果
  14. CentOS6—HAProxy安装与配置
  15. linux查看文件的后几行
  16. 解决System.Data.SqlClient.SqlException (0x80131904): Timeout 时间已到的问题
  17. 洛谷 P2057 [SHOI2007]善意的投票 解题报告
  18. h5之js生成二维码
  19. MT【193】三面角的正余弦定理
  20. 网狐荣耀平台找不到存储过程 &#39;GSP_GS_LoadGameMatchItem&#39;错误解决

热门文章

  1. BNUOJ 26223 CosmoCraft
  2. [luoguP2957] [USACO09OCT]谷仓里的回声Barn Echoes(Hash)
  3. [K/3Cloud] 理解BOS关于Enabled属性的表决器原理
  4. spring-session(一)揭秘
  5. 学习swift从青铜到王者之swift基础部分01
  6. Centos7下安装.bin格式
  7. Linux系统调用过程分析
  8. Redis学习笔记3-Redis5个可运行程序命令的使用
  9. Django打造大型企业官网(六)
  10. 中国第二代身份证验证js代码