Quellcode durchsuchen

Merge branch 'master' of ssh://10.10.100.21/source/uas-office-integration into dev

samhoo vor 5 Jahren
Ursprung
Commit
e585143e1f

+ 1 - 0
uas-office-web/uas-mobile/package.json

@@ -14,6 +14,7 @@
     "connect-history-api-fallback": "^1.6.0",
     "cra-template": "1.0.3",
     "customize-cra": "^1.0.0",
+    "intro.js": "^3.2.1",
     "js-cookie": "^2.2.1",
     "less": "^3.12.2",
     "less-loader": "^7.0.2",

+ 36 - 0
uas-office-web/uas-mobile/src/configs/theme.config.less

@@ -26,6 +26,42 @@
 @com-tabbar-fontsize: 12px; //导航栏文本大小
 @com-form-fontsize-normal: 14px; //表单默认字体大小
 
+/***********************************************【引导布局样式】************************************************/
+.introjs-tooltip {
+  min-width: 200px;
+}
+
+.customTooltip {
+  .introjs-tooltip-header {
+    padding: 10px 16px 0;
+    display: flex;
+    align-items: center;
+
+    .introjs-tooltip-title {
+      flex: 1;
+    }
+
+    .introjs-skipbutton {
+      font-size: 18px;
+      color: dodgerblue;
+      color: dodgerblue;
+      padding: 0;
+    }
+  }
+
+  .introjs-tooltiptext {
+    padding: 16px;
+  }
+
+  .introjs-bullets {
+    padding: 0 0 8px;
+  }
+
+  .introjs-button {
+    padding: 0.3em 0.6em;
+  }
+}
+
 
 /***********************************************【全局通用布局】************************************************/
 .com-column-flex {

+ 1 - 0
uas-office-web/uas-mobile/src/index.js

@@ -11,6 +11,7 @@ import './configs/antd.config.less'
 import { ConfigProvider } from 'antd'
 import moment from 'moment'
 import 'moment/locale/zh-cn'
+import 'intro.js/introjs.css';
 
 moment.locale('zh-cn')
 

+ 41 - 0
uas-office-web/uas-mobile/src/pages/private/homePage/HomePage.jsx

@@ -16,6 +16,7 @@ import { clearFormState } from '../../../redux/actions/formState'
 import { clearScheduleState } from '../../../redux/actions/scheduleState'
 import { forceVisible } from 'react-lazyload'
 import { clearApprovalHomeState } from '../../../redux/actions/approvalState'
+import introJs from 'intro.js'
 
 /**
  * Created by RaoMeng on 2020/11/9
@@ -40,6 +41,46 @@ class HomePage extends Component {
     clearApprovalHomeState()
 
     requestUserInfo()
+
+    // introJs('.home-root')
+    //   .setOptions({
+    //     prevLabel: '上一步',
+    //     nextLabel: '下一步',
+    //     skipLabel: '跳过',
+    //     doneLabel: '结束',
+    //     tooltipClass: 'customTooltip',
+    //     // showStepNumbers: true,
+    //     exitOnOverlayClick: false,
+    //     exitOnEsc: false,
+    //     // showProgress: true,
+    //     scrollToElement: true,
+    //     steps: [
+    //       {
+    //         element: document.querySelectorAll('.am-tab-bar-tab')[0],
+    //         title: '首页',
+    //         intro: '首页首页首页首页首页首页首页首页首页首页首页首页首页首页首页首页',
+    //         position: 'auto',
+    //       },
+    //       {
+    //         element: document.querySelectorAll('.am-tab-bar-tab')[1],
+    //         title: '报表',
+    //         intro: '报表报表报表报表报表报表报表报表报表报表报表报表报表报表报表',
+    //         position: 'auto',
+    //       },
+    //       {
+    //         element: document.querySelectorAll('.am-tab-bar-tab')[2],
+    //         title: '应用',
+    //         intro: '应用应用应用应用应用应用应用应用应用应用应用应用应用应用应用应用应用应用应用应用应用',
+    //         position: 'auto',
+    //       },
+    //       {
+    //         element: document.querySelectorAll('.am-tab-bar-tab')[3],
+    //         title: '我的',
+    //         intro: '我的我的我的我的我的我的我的我的我的我的我的',
+    //         position: 'auto',
+    //       },
+    //     ],
+    //   }).start()
   }
 
   componentWillUnmount () {

+ 5 - 0
uas-office-web/uas-mobile/yarn.lock

@@ -6726,6 +6726,11 @@ internal-slot@^1.0.2:
     has "^1.0.3"
     side-channel "^1.0.2"
 
+intro.js@^3.2.1:
+  version "3.2.1"
+  resolved "https://registry.npm.taobao.org/intro.js/download/intro.js-3.2.1.tgz#fb13f03c13d54aab8485d538a719fe4af0b7bf36"
+  integrity sha1-+xPwPBPVSquEhdU4pxn+SvC3vzY=
+
 invariant@^2.2.2, invariant@^2.2.4:
   version "2.2.4"
   resolved "https://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"