Commit 9b55148becbc2adca95e3a7ebe55dd383cc0d263

Authored by Jian Xu
Committed by 小小鲁班
1 parent 349d12ef

enable windows scroll render as mac scroll bar (+1 squashed commits)

Squashed commits:

[2167dc3] change back format (+5 squashed commit)

Squashed commit:

[12ebc3c] change code format

[3485421] add comment

[7ec632a] change back for code format

[5787f2f] rename to scrollbar.scss

[9c6d843] fix windows scroll bar
front-end/h5/.prettierrc.json 0 → 100644
  1 +{
  2 + "singleQuote":true,
  3 + "semi":false
  4 +}
0 \ No newline at end of file 5 \ No newline at end of file
front-end/h5/public/index.html
@@ -25,6 +25,12 @@ @@ -25,6 +25,12 @@
25 </style> 25 </style>
26 <!-- <script src="https://code.createjs.com/1.0.0/createjs.min.js"></script> --> 26 <!-- <script src="https://code.createjs.com/1.0.0/createjs.min.js"></script> -->
27 <script src="https://cdn.jsdelivr.net/npm/createjs@1.0.1/builds/1.0.0/createjs.min.js"></script> 27 <script src="https://cdn.jsdelivr.net/npm/createjs@1.0.1/builds/1.0.0/createjs.min.js"></script>
  28 + <script>
  29 + // Note: 增加html userAgent标记,
  30 + // windows启用下仿mac的滚动条样式。
  31 + var doc = document.documentElement;
  32 + doc.setAttribute('data-useragent', navigator.userAgent);
  33 + </script>
28 </head> 34 </head>
29 <body> 35 <body>
30 <noscript> 36 <noscript>
front-end/h5/src/components/core/editor/left-panel/shortcuts-panel/index.js
@@ -111,7 +111,7 @@ export default { @@ -111,7 +111,7 @@ export default {
111 render (h) { 111 render (h) {
112 // return this.renderShortCutsPanel(this.groups) 112 // return this.renderShortCutsPanel(this.groups)
113 return ( 113 return (
114 - <a-row gutter={20} style="max-height: calc(100vh - 140px);overflow: scroll;"> 114 + <a-row gutter={20} style="max-height: calc(100vh - 150px);overflow: auto;margin:0;">
115 <UsageTip /> 115 <UsageTip />
116 { 116 {
117 [].concat(this.pluginsList, this.npmPackages) 117 [].concat(this.pluginsList, this.npmPackages)
front-end/h5/src/components/core/index.js
@@ -3,6 +3,7 @@ import Vue from &#39;vue&#39; @@ -3,6 +3,7 @@ import Vue from &#39;vue&#39;
3 3
4 import 'core/support/index.js' 4 import 'core/support/index.js'
5 import 'core/styles/index.scss' 5 import 'core/styles/index.scss'
  6 +import 'core/styles/scrollbar.scss'
6 import 'animate.css' 7 import 'animate.css'
7 8
8 import FixedTools from 'core/editor/fixed-tools/index' 9 import FixedTools from 'core/editor/fixed-tools/index'
front-end/h5/src/components/core/styles/index.scss
1 -@import url("./helpers.scss");  
2 -@import url("./spacing-helpers.scss");  
3 -@import url("./shape.scss");  
4 -@import url("./align-guides.scss");  
5 -@import url("./shortcut-btn.scss");  
6 -@import url("./page-manager.scss");  
7 -@import url("./canvas-wrapper.scss"); 1 +@import url('./helpers.scss');
  2 +@import url('./spacing-helpers.scss');
  3 +@import url('./shape.scss');
  4 +@import url('./align-guides.scss');
  5 +@import url('./shortcut-btn.scss');
  6 +@import url('./page-manager.scss');
  7 +@import url('./canvas-wrapper.scss');
8 8
9 .hidden { 9 .hidden {
10 display: none !important; 10 display: none !important;
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 height: 30px; 21 height: 30px;
22 width: 130px; 22 width: 130px;
23 border-radius: 4px; 23 border-radius: 4px;
24 - border: 1px solid #CCC; 24 + border: 1px solid #ccc;
25 25
26 cursor: grabbing; 26 cursor: grabbing;
27 user-select: none; 27 user-select: none;
@@ -32,7 +32,6 @@ @@ -32,7 +32,6 @@
32 padding: 12px 0 !important; 32 padding: 12px 0 !important;
33 } 33 }
34 34
35 -  
36 .avaiable-animations-tabs .ant-tabs-nav .ant-tabs-tab { 35 .avaiable-animations-tabs .ant-tabs-nav .ant-tabs-tab {
37 padding: 12px 16px !important; 36 padding: 12px 16px !important;
38 } 37 }
@@ -64,9 +63,9 @@ @@ -64,9 +63,9 @@
64 .plugin-usage-tip { 63 .plugin-usage-tip {
65 font-size: 12px; 64 font-size: 12px;
66 color: #999; 65 color: #999;
67 - border-left: .2rem solid #dfe2e5; 66 + border-left: 0.2rem solid #dfe2e5;
68 // margin: 1rem 0; 67 // margin: 1rem 0;
69 - padding: .25rem 0 .25rem 0.5rem; 68 + padding: 0.25rem 0 0.25rem 0.5rem;
70 } 69 }
71 70
72 .ant-layout-sider { 71 .ant-layout-sider {
@@ -134,7 +133,6 @@ $activeHoverColor: #1593ff; @@ -134,7 +133,6 @@ $activeHoverColor: #1593ff;
134 133
135 .adjust-line-wrapper-v { 134 .adjust-line-wrapper-v {
136 position: relative; 135 position: relative;
137 - height: 100vh;  
138 cursor: ew-resize; 136 cursor: ew-resize;
139 137
140 .adjust-button { 138 .adjust-button {
@@ -143,4 +141,4 @@ $activeHoverColor: #1593ff; @@ -143,4 +141,4 @@ $activeHoverColor: #1593ff;
143 top: 50%; 141 top: 50%;
144 transform: rotate(90deg); 142 transform: rotate(90deg);
145 } 143 }
146 -}  
147 \ No newline at end of file 144 \ No newline at end of file
  145 +}
front-end/h5/src/components/core/styles/scrollbar.scss 0 → 100644
  1 +// 重置windows 滚动条样式
  2 +// 仅windows 生效,mac排除当前逻辑。
  3 +html:not([data-useragent*='Mac OS X']) {
  4 + ::-webkit-scrollbar {
  5 + width: 6px;
  6 + height: 6px;
  7 + }
  8 + ::-webkit-scrollbar-corner {
  9 + background-color: transparent;
  10 + }
  11 + ::-webkit-scrollbar-thumb {
  12 + background-color: rgb(188, 188, 188);
  13 + border-radius: 4px;
  14 + }
  15 + ::-webkit-scrollbar-track {
  16 + background-color: transparent;
  17 + }
  18 +}