会议OA项目-其它页面->自定义组件应用,其它界面的布局

简介: 会议OA项目-其它页面->自定义组件应用,其它界面的布局

1.自定义组件应用

文档参考:https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/

//oamin\project.config.json
{
  "description": "项目配置文件",
  "packOptions": {
    "ignore": [],
    "include": []
  },
  "setting": {
    "bundle": false,
    "userConfirmedBundleSwitch": false,
    "ignoreDevUnusedFiles": false,
    "ignoreUploadUnusedFiles": false,
    "urlCheck": true,
    "scopeDataCheck": false,
    "coverView": true,
    "es6": true,
    "postcss": true,
    "compileHotReLoad": false,
    "lazyloadPlaceholderEnable": false,
    "preloadBackgroundData": false,
    "minified": true,
    "autoAudits": false,
    "newFeature": false,
    "uglifyFileName": false,
    "uploadWithSourceMap": true,
    "useIsolateContext": true,
    "nodeModules": false,
    "enhance": true,
    "useMultiFrameRuntime": true,
    "useApiHook": true,
    "useApiHostProcess": true,
    "showShadowRootInWxmlPanel": true,
    "packNpmManually": false,
    "enableEngineNative": false,
    "packNpmRelationList": [],
    "minifyWXSS": true,
    "showES6CompileOption": false,
    "minifyWXML": true,
    "babelSetting": {
      "ignore": [],
      "disablePlugins": [],
      "outputPath": ""
    }
  },
  "compileType": "miniprogram",
  "libVersion": "2.19.4",
  "appid": "wx02e1b4896f9ba974",
  "projectname": "miniprogram-92",
  "condition": {},
  "editorSetting": {
    "tabIndent": "insertSpaces",
    "tabSize": 2
  }
}
<!--components/tabs/tabs.wxml-->
<!-- <text>components/tabs/tabs.wxml</text> -->
<view class="tabs">
    <view class="tabs_title">
        <view wx:for="{{tabList}}" wx:key="id" class="title_item  {{index==tabIndex?'item_active':''}}" bindtap="handleItemTap" data-index="{{index}}">
            <view style="margin-bottom:5rpx">{{item}}</view>
            <view style="width:30px" class="{{index==tabIndex?'item_active1':''}}"></view>
        </view>
    </view>
    <view class="tabs_content">
        <slot></slot>
    </view>
</view>
/* components/tabs/tabs.wxss */
.tabs {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #fff;
  z-index: 99;
  border-bottom: 1px solid #efefef;
  padding-bottom: 20rpx;
}
.tabs_title {
  /* width: 400rpx; */
  width: 90%;
  display: flex;
  font-size: 9pt;
  padding: 0 20rpx;
}
.title_item {
  color: #999;
  padding: 15rpx 0;
  display: flex;
  flex: 1;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
}
.item_active {
  /* color:#ED8137; */
  color: #000000;
  font-size: 11pt;
  font-weight: 800;
}
.item_active1 {
  /* color:#ED8137; */
  color: #000000;
  font-size: 11pt;
  font-weight: 800;
  border-bottom: 6rpx solid #333;
  border-radius: 2px;
}
/* components/tabs/tabs.wxss */
.tabs {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #fff;
  z-index: 99;
  border-bottom: 1px solid #efefef;
  padding-bottom: 20rpx;
}
.tabs_title {
  /* width: 400rpx; */
  width: 90%;
  display: flex;
  font-size: 9pt;
  padding: 0 20rpx;
}
.title_item {
  color: #999;
  padding: 15rpx 0;
  display: flex;
  flex: 1;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
}
.item_active {
  /* color:#ED8137; */
  color: #000000;
  font-size: 11pt;
  font-weight: 800;
}
.item_active1 {
  /* color:#ED8137; */
  color: #000000;
  font-size: 11pt;
  font-weight: 800;
  border-bottom: 6rpx solid #333;
  border-radius: 2px;
}
//oamin\pages\meeting\list\list.json
{
  "usingComponents": {
    "tabs": "/components/tabs/tabs"
  }
}
// components/tabs/tabs.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
   tabList:Object
  },
  /**
   * 组件的初始数据
   */
  data: {
  },
  /**
   * 组件的方法列表
   */
  methods: {
    handleItemTap(e){
      // 获取索引
      const {index} = e.currentTarget.dataset;
      // 触发 父组件的事件
      this.triggerEvent("tabsItemChange",{index})
      this.setData({
          tabIndex:index
      })
    }
  }
})

2.其它界面的布局

<!--pages/ucenter/index/index.wxml-->
<!-- <text>pages/ucenter/index/index.wxml</text> -->
<view class="user">
  <image class="user-img" src="/static/persons/1.jpg"></image>
  <text class="user-name">牛逼</text>
  <text class="user-oper">修改</text>
</view>
<view class="info">
  <view class="item1">
    <image class="item-icon" src="/static/tabBar/sdk.png"></image>
    <view class="item-title">我主持的会议</view>
    <view class="item-num">1</view>
    <view class="item-open">></view>
  </view>
  <view class="item2">
    <image class="item-icon" src="/static/tabBar/sdk.png"></image>
    <view class="item-title">我参与的会议</view>
    <view class="item-num">10</view>
    <view class="item-open">></view>
  </view>
</view>
<view class="info">
  <view class="item1">
    <image class="item-icon" src="/static/tabBar/sdk.png"></image>
    <view class="item-title">我发布的会议</view>
    <view class="item-num">1</view>
    <view class="item-open">></view>
  </view>
  <view class="item2">
    <image class="item-icon" src="/static/tabBar/sdk.png"></image>
    <view class="item-title">我参与的投票</view>
    <view class="item-num">10</view>
    <view class="item-open">></view>
  </view>
</view>
<view class="info">
  <view class="item1">
    <image class="item-icon" src="/static/tabBar/sdk.png"></image>
    <view class="item-title">消息</view>
    <view class="item-num"></view>
    <view class="item-open">></view>
  </view>
  <view class="item2">
    <image class="item-icon" src="/static/tabBar/sdk.png"></image>
    <view class="item-title">设置</view>
    <view class="item-num"></view>
    <view class="item-open">></view>
  </view>
</view>
/* pages/ucenter/index/index.wxss */
.user {
  display: flex;
  align-items: center;
  border-bottom: 6px solid lightgray;
}
.user-img {
  width: 80px;
  height: 80px;
  margin: 10px;
}
.user-name {
  font-weight: 700;
  margin: 0 250rpx 0 50rpx;
}
.user-open {
  color: lightgray;
}
/* .info {} */
.item1,.item2 {
  padding: 5px;
  display: flex;
  align-items: center;
}
.item1{
  border-bottom: 1px solid lightgray;
}
.item2 {
  border-bottom: 10px solid lightgray;
}
.item-icon {
  width: 40px;
  height: 40px;
}
.item-title {
  width: 500rpx;
}
.item-num {
  width: 60rpx;
}
/* .item-open {} */

目录
相关文章
|
2月前
|
SQL 存储 JavaScript
Layui之OA会议增删改查
Layui之OA会议增删改查
45 0
|
7月前
|
开发框架 JavaScript 前端开发
J2EE项目部署与发布(Windows版本)->会议OA单体项目Windows部署,spa前后端分离项目Windows部署
J2EE项目部署与发布(Windows版本)->会议OA单体项目Windows部署,spa前后端分离项目Windows部署
39 0
|
2月前
|
安全 网络安全 数据安全/隐私保护
OA办公系统选购注意的事项
随着数字化时代的到来,越来越多的企业开始选择使用OA办公系统来提高工作效率和管理效果。然而,在选购OA办公系统时,需要注意以下几点的事项,希望能对企业选购OA办公系统有所帮助。
62 4
|
2月前
|
数据安全/隐私保护
免费OA办公系统,提升工作效率与协作的智能选择
在当今快节奏的时代中,企业需要一种高效、智能的办公系统来提升工作效率,促进团队协作,并实现更好的信息管理。点晴OA办公系统是真正免费使用的,成为现在企业管理的重要工具之一。
47 2
|
2月前
|
UED
点晴OA办公系统如何实现业务表单的自定义设计
在点晴OA办公系统中,业务表单的自定义设计是一项重要的功能,它能够满足企业不同的业务需求,提高工作效率和协作能力。 随着企业的发展,不同的业务部门需要处理各种类型的表单,如人事表单、财务表单、项目表单等。如果这些表单无法根据实际需求进行自定义设计,就会导致工作效率低下、信息不准确、协作困难等问题。因此,实现业务表单的自定义设计是提高企业办公效率和协作能力的重要手段。
41 0
|
2月前
|
BI
四款OA办公系统快速提高企业效率
拥有合适企业的OA系统不仅可以实现办公自动化而且还能提高企业效率,今天盘点以下几家的OA办公系统。
46 0
|
2月前
企业都是用谁家的OA办公系统?
好的免费OA办公系统都有哪几家,下面让我们来一起看看吧!
39 1
|
18天前
|
SQL JavaScript 测试技术
办公OA系统|基于SpringBoot+Vue实现银行OA系统的设计与实现
办公OA系统|基于SpringBoot+Vue实现银行OA系统的设计与实现
|
19天前
|
存储 监控 数据挖掘
免费OA办公系统选择的参考指南
随着信息技术的迅猛发展,免费OA办公系统已经成为现代企业不可或缺的管理工具。该免费OA系统通过整合企业内部资源,实现了信息的高效传递、共享和协同办公,极大地提高了工作效率和管理水平。本文以点晴免费OA系统为例子对核心功能进行深度解析。
22 1
|
6天前
|
监控 安全 项目管理
企业应该如何选择OA办公系统
现在越来越多的企业日常办公都离不开OA办公系统,以下是几款比较受企业青睐的OA办公系统的功能介绍,优势和价格。
8 0