md-iview 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. package/README.md +2 -0
  2. package/package.json +116 -0
  3. package/src/components/libs/util.js +117 -0
  4. package/src/components/md-error-page/403.less +92 -0
  5. package/src/components/md-error-page/403.vue +34 -0
  6. package/src/components/md-error-page/404.less +60 -0
  7. package/src/components/md-error-page/404.vue +34 -0
  8. package/src/components/md-error-page/500.less +73 -0
  9. package/src/components/md-error-page/500.vue +36 -0
  10. package/src/components/md-error-page/demo/index.less +22 -0
  11. package/src/components/md-error-page/demo/index.vue +97 -0
  12. package/src/components/md-form-item/index.js +3 -0
  13. package/src/components/md-icon/icon.vue +77 -0
  14. package/src/components/md-icon/icons.js +5 -0
  15. package/src/components/md-icon/index.js +11 -0
  16. package/src/components/md-icon/style/index.less +1 -0
  17. package/src/components/md-loading/index.js +55 -0
  18. package/src/components/md-loading/index.vue +53 -0
  19. package/src/components/md-loading/md-loading.js +38 -0
  20. package/src/components/md-print/demo/index.vue +260 -0
  21. package/src/components/md-print/index.js +123 -0
  22. package/src/components/md-rich-editor/index.vue +69 -0
  23. package/src/components/md-rich-editor/module/image-extend/index.js +216 -0
  24. package/src/components/md-scroll-bar/demo/index.vue +102 -0
  25. package/src/components/md-scroll-bar/index.js +3 -0
  26. package/src/components/md-scroll-bar/index.less +90 -0
  27. package/src/components/md-scroll-bar/index.vue +250 -0
  28. package/src/components/md-select/index.js +7 -0
  29. package/src/components/md-select/select.vue +841 -0
  30. package/src/components/md-shrinkable-menu/components/sidebarMenu.vue +167 -0
  31. package/src/components/md-shrinkable-menu/components/sidebarMenuShrink.vue +119 -0
  32. package/src/components/md-shrinkable-menu/demo/data/cachePage.js +1 -0
  33. package/src/components/md-shrinkable-menu/demo/data/currentPath.js +9 -0
  34. package/src/components/md-shrinkable-menu/demo/data/menu.js +575 -0
  35. package/src/components/md-shrinkable-menu/demo/data/menu2.js +1017 -0
  36. package/src/components/md-shrinkable-menu/demo/data/pageTagsList.js +153 -0
  37. package/src/components/md-shrinkable-menu/demo/index.less +297 -0
  38. package/src/components/md-shrinkable-menu/demo/index.vue +285 -0
  39. package/src/components/md-shrinkable-menu/index.vue +112 -0
  40. package/src/components/md-shrinkable-menu/sidebar.vue +195 -0
  41. package/src/components/md-shrinkable-menu/styles/menu.less +5 -0
  42. package/src/components/md-shrinkable-menu/styles/sidebar.less +363 -0
  43. package/src/components/md-split-pane/demo/index.vue +101 -0
  44. package/src/components/md-split-pane/index.js +3 -0
  45. package/src/components/md-split-pane/index.less +93 -0
  46. package/src/components/md-split-pane/index.vue +230 -0
  47. package/src/components/md-table/action-tooltip.vue +45 -0
  48. package/src/components/md-table/can-edit-v2.vue +823 -0
  49. package/src/components/md-table/can-edit.vue +723 -0
  50. package/src/components/md-table/custom-cell.vue +71 -0
  51. package/src/components/md-table/date-picker-cell-v2.vue +48 -0
  52. package/src/components/md-table/date-picker-cell.vue +39 -0
  53. package/src/components/md-table/demo/data/search.js +67 -0
  54. package/src/components/md-table/demo/data/table2csv.js +200 -0
  55. package/src/components/md-table/demo/data/table2excel.js +239 -0
  56. package/src/components/md-table/demo/data/table_data.js +251 -0
  57. package/src/components/md-table/demo/editable-table.vue +144 -0
  58. package/src/components/md-table/demo/exportable-table.vue +124 -0
  59. package/src/components/md-table/demo/widgets/header-search.vue +88 -0
  60. package/src/components/md-table/drop-down-cell-v2.vue +87 -0
  61. package/src/components/md-table/drop-down-cell.vue +81 -0
  62. package/src/components/md-table/editable-expand.vue +143 -0
  63. package/src/components/md-table/expand.vue +97 -0
  64. package/src/components/md-table/index.vue +53 -0
  65. package/src/components/md-table/iview-table/cell.vue +99 -0
  66. package/src/components/md-table/iview-table/expand.js +21 -0
  67. package/src/components/md-table/iview-table/export-csv.js +76 -0
  68. package/src/components/md-table/iview-table/header.js +16 -0
  69. package/src/components/md-table/iview-table/index.js +2 -0
  70. package/src/components/md-table/iview-table/mixin.js +31 -0
  71. package/src/components/md-table/iview-table/table-body.vue +101 -0
  72. package/src/components/md-table/iview-table/table-head.vue +311 -0
  73. package/src/components/md-table/iview-table/table-tr.vue +31 -0
  74. package/src/components/md-table/iview-table/table.vue +1026 -0
  75. package/src/components/md-table/iview-table/util.js +93 -0
  76. package/src/components/md-table/libs/table2excel.js +100 -0
  77. package/src/components/md-table/select-cell-v2.vue +64 -0
  78. package/src/components/md-table/select-cell.vue +46 -0
  79. package/src/components/md-table/table.less +76 -0
  80. package/src/components/md-toolbar/index.vue +171 -0
  81. package/src/components/md-tree/index.js +2 -0
  82. package/src/components/md-tree/node.vue +238 -0
  83. package/src/components/md-tree/render.js +17 -0
  84. package/src/components/md-tree/tree.vue +241 -0
  85. package/src/components/utilities/can.js +35 -0
  86. package/src/directives/index.js +34 -0
  87. package/src/directives/resize.js +27 -0
  88. package/src/directives/scroll.js +27 -0
  89. package/src/directives/style/bg-color.js +23 -0
  90. package/src/directives/style/color.js +23 -0
  91. package/src/directives/style/font-size.js +23 -0
  92. package/src/directives/style/height.js +23 -0
  93. package/src/directives/style/lineHeight.js +23 -0
  94. package/src/directives/style/margin.js +48 -0
  95. package/src/directives/style/opacity.js +23 -0
  96. package/src/directives/style/padding.js +48 -0
  97. package/src/directives/style/width.js +24 -0
  98. package/src/index.js +442 -0
  99. package/src/locale/lang.js +5 -0
  100. package/src/mixins/colorable.js +51 -0
  101. package/src/style/color/bezierEasing.less +110 -0
  102. package/src/style/color/colorPalette.less +75 -0
  103. package/src/style/color/colors.less +146 -0
  104. package/src/style/color/tinyColor.less +1184 -0
  105. package/src/style/common.less +72 -0
  106. package/src/style/components/_ripple.less +60 -0
  107. package/src/style/components/_shrinkable-menu.less +46 -0
  108. package/src/style/components/_toolbar.less +96 -0
  109. package/src/style/components/index.less +3 -0
  110. package/src/style/components/rich-editor.less +6 -0
  111. package/src/style/index.less +10 -0
  112. package/src/style/theme.less +155 -0
  113. package/src/utils/color.js +46 -0
  114. package/src/utils/console.js +105 -0
  115. package/src/utils/load.js +79 -0
  116. package/src/utils/mask.js +139 -0
  117. package/src/utils/mixins.js +5 -0
  118. package/src/utils/validate.js +271 -0
@@ -0,0 +1,363 @@
1
+ .lock-screen-back {
2
+ border-radius: 50%;
3
+ z-index: -1;
4
+ box-shadow: 0 0 0 0 #667aa6 inset;
5
+ position: fixed;
6
+ left: 50%;
7
+ top: 50%;
8
+ transform: translate(-50%, -50%);
9
+ transition: all 3s;
10
+ }
11
+
12
+ .main {
13
+ //position: absolute;
14
+ width: 100%;
15
+ height: 100%;
16
+
17
+ .unlock-con {
18
+ width: 0px;
19
+ height: 0px;
20
+ position: absolute;
21
+ left: 50%;
22
+ top: 50%;
23
+ z-index: 11000;
24
+ }
25
+
26
+ .sidebar-menu-con {
27
+ //height: 100%;
28
+ //height: calc(~"100% - 47px");;
29
+ //position: absolute;
30
+ //top: 0;
31
+ //left: 0;
32
+ z-index: 21;
33
+ margin-top: 1px;
34
+ transition: width .3s;
35
+ //border-right: 1px solid #d3d3d3;
36
+ //background-color: #fafafa;
37
+ .sidebar-menu-shrink {
38
+ .shrink-btn-item:hover {
39
+ color: #595959 !important;
40
+ background-color: #f0f0f0 !important;
41
+ border-color: transparent !important;
42
+ }
43
+ }
44
+
45
+ .menus {
46
+ padding-bottom: 120px;
47
+ height: inherit;
48
+
49
+ &:after {
50
+ content: none;
51
+ }
52
+
53
+ height: inherit;
54
+ //background-color: #fafafa;
55
+ .menus-item {
56
+ width: 100%;
57
+ margin: 0 !important;
58
+ &__submenus {
59
+ //&>div {
60
+ // width: inherit;
61
+ // height: inherit;
62
+ //}
63
+ &:first-child {
64
+ //margin-top: 8px;
65
+ //border-top: 1px solid #e8e8e8;
66
+ }
67
+
68
+ &:last-child {
69
+ border-bottom: none !important;
70
+ }
71
+
72
+ &:hover {
73
+ background: #f0f0f0;
74
+ }
75
+
76
+ margin: 0 !important;
77
+ padding: 0 16px !important;
78
+ height: 40px;
79
+ line-height: 40px;
80
+ display: flex;
81
+ align-items: center;
82
+ text-decoration: none;
83
+ //border-bottom: 1px solid #e8e8e8;
84
+ }
85
+
86
+ &__icon {
87
+ margin-right: 10px;
88
+ //color: rgb(89, 89, 89); //!important;
89
+ }
90
+
91
+ &__title {
92
+ font-size: 14px;
93
+ //color: #17233D;
94
+ }
95
+
96
+ text-align: left;
97
+ //align-items: center;
98
+ /* height: auto;
99
+ line-height: 28px;*/
100
+
101
+ .ivu-menu-submenu-title {
102
+ line-height: 57px;
103
+ padding: 0 16px !important;
104
+ display: flex;
105
+ align-items: center;
106
+ justify-content: space-between;
107
+ }
108
+
109
+ //.ivu-menu-submenu-title-icon {
110
+ // line-height: 57px;
111
+ // top: 0 !important;
112
+ //}
113
+ }
114
+
115
+ background: none;
116
+ }
117
+
118
+ //background: rgb(73, 80, 96);
119
+ .vue-scroller-bars-content {
120
+ height: 100% !important;
121
+ overflow-y: auto;
122
+
123
+ }
124
+ }
125
+
126
+ .menu-right-footer {
127
+ border-top: 1px solid #d3d3d3;
128
+ height: 50px;
129
+ line-height: 49px;
130
+ cursor: pointer;
131
+ background-color: #fafafa;
132
+ text-align: left;
133
+ position: fixed;
134
+ bottom: 0;
135
+ display: flex;
136
+ align-items: center;
137
+ border-right: 1px solid #d3d3d3;
138
+ }
139
+
140
+ .layout-text {
141
+ display: inline-block;
142
+ white-space: nowrap;
143
+ position: absolute;
144
+ }
145
+
146
+ .main-hide-text .layout-text {
147
+ display: none;
148
+ }
149
+
150
+ &-content-container {
151
+ position: relative;
152
+ }
153
+
154
+ &-header-con {
155
+ box-sizing: border-box;
156
+ position: fixed;
157
+ display: block;
158
+ padding-left: 200px;
159
+ width: 100%;
160
+ height: 100px;
161
+ z-index: 20;
162
+ box-shadow: 0 2px 1px 1px rgba(100, 100, 100, .1);
163
+ transition: padding .3s;
164
+ }
165
+
166
+ &-breadcrumb {
167
+ padding: 8px 15px 0;
168
+ }
169
+
170
+ &-menu-left {
171
+ background: #464c5b;
172
+ height: 100%;
173
+ }
174
+
175
+ .tags-con {
176
+ height: 40px;
177
+ z-index: -1;
178
+ overflow: hidden;
179
+ background: #f0f0f0;
180
+
181
+ .tags-outer-scroll-con {
182
+ position: relative;
183
+ box-sizing: border-box;
184
+ padding-right: 120px;
185
+ width: 100%;
186
+ height: 100%;
187
+
188
+ .tags-inner-scroll-body {
189
+ position: absolute;
190
+ padding: 2px 10px;
191
+ overflow: visible;
192
+ white-space: nowrap;
193
+ transition: left .3s ease;
194
+ }
195
+
196
+ .close-all-tag-con {
197
+ position: absolute;
198
+ right: 0;
199
+ top: 0;
200
+ box-sizing: border-box;
201
+ padding-top: 8px;
202
+ text-align: center;
203
+ width: 110px;
204
+ height: 100%;
205
+ background: white;
206
+ box-shadow: -3px 0 15px 3px rgba(0, 0, 0, .1);
207
+ z-index: 10;
208
+ }
209
+ }
210
+ }
211
+
212
+ &-header {
213
+ height: 60px;
214
+ background: #fff;
215
+ box-shadow: 0 2px 1px 1px rgba(100, 100, 100, .1);
216
+ position: relative;
217
+ z-index: 11;
218
+
219
+ .navicon-con {
220
+ margin: 6px;
221
+ display: inline-block;
222
+ }
223
+
224
+ .header-middle-con {
225
+ position: absolute;
226
+ left: 60px;
227
+ top: 0;
228
+ right: 340px;
229
+ bottom: 0;
230
+ padding: 10px;
231
+ overflow: hidden;
232
+ }
233
+
234
+ .header-avator-con {
235
+ position: absolute;
236
+ right: 0;
237
+ top: 0;
238
+ height: 100%;
239
+ width: 300px;
240
+
241
+ .switch-theme-con {
242
+ display: inline-block;
243
+ width: 40px;
244
+ height: 100%;
245
+ }
246
+
247
+ .message-con {
248
+ display: inline-block;
249
+ width: 30px;
250
+ padding: 18px 0;
251
+ text-align: center;
252
+ cursor: pointer;
253
+
254
+ i {
255
+ vertical-align: middle;
256
+ }
257
+ }
258
+
259
+ .change-skin {
260
+ font-size: 14px;
261
+ font-weight: 500;
262
+ padding-right: 5px;
263
+ }
264
+
265
+ .switch-theme {
266
+ height: 100%;
267
+ }
268
+
269
+ .user-dropdown {
270
+ &-menu-con {
271
+ position: absolute;
272
+ right: 0;
273
+ top: 0;
274
+ width: 150px;
275
+ height: 100%;
276
+
277
+ .main-user-name {
278
+ display: inline-block;
279
+ width: 80px;
280
+ word-break: keep-all;
281
+ white-space: nowrap;
282
+ vertical-align: middle;
283
+ overflow: hidden;
284
+ text-overflow: ellipsis;
285
+ text-align: right;
286
+ }
287
+ }
288
+
289
+ &-innercon {
290
+ height: 100%;
291
+ padding-right: 14px;
292
+ }
293
+ }
294
+
295
+ .full-screen-btn-con {
296
+ display: inline-block;
297
+ width: 30px;
298
+ padding: 18px 0;
299
+ text-align: center;
300
+ cursor: pointer;
301
+
302
+ i {
303
+ vertical-align: middle;
304
+ }
305
+ }
306
+
307
+ .lock-screen-btn-con {
308
+ display: inline-block;
309
+ width: 30px;
310
+ padding: 18px 0;
311
+ text-align: center;
312
+ cursor: pointer;
313
+
314
+ i {
315
+ vertical-align: middle;
316
+ }
317
+ }
318
+ }
319
+ }
320
+
321
+ .single-page-con {
322
+ position: absolute;
323
+ top: 100px;
324
+ right: 0;
325
+ bottom: 0;
326
+ overflow: auto;
327
+ background-color: #F0F0F0;
328
+ z-index: 1;
329
+ transition: left .3s;
330
+
331
+ .single-page {
332
+ margin: 10px;
333
+ }
334
+ }
335
+
336
+ &-copy {
337
+ text-align: center;
338
+ padding: 10px 0 20px;
339
+ color: #9ea7b4;
340
+ }
341
+ }
342
+
343
+ .taglist-moving-animation-move {
344
+ transition: transform .3s;
345
+ }
346
+
347
+ .logo-con {
348
+ padding: 8px;
349
+ text-align: center;
350
+ background-color: #fafafa;
351
+
352
+ img {
353
+ height: 44px;
354
+ width: auto;
355
+ }
356
+ }
357
+
358
+ .sidebar-menu-con-footer__has {
359
+ height: calc(~"100% - 47px");;
360
+ }
361
+ .sidebar-menu-con-footer__none {
362
+ height: calc(~"100%");;
363
+ }
@@ -0,0 +1,101 @@
1
+ <template>
2
+ <div>
3
+ <Card :padding="0">
4
+ <div class="split-pane-con">
5
+ <split-pane :style="{height: '100%'}" right :min="20" max="100px" @on-trigger-moving="handleMoving" direction="horizontal" v-model="triggerOffset">
6
+ <div slot="left" style="height: 100%;">
7
+ <split-pane :style="{height: '100%'}" direction="vertical" v-model="triggerOffsetV">
8
+ <div class="introduce-left-con" slot="top" style="background: #EDE3A0;height: 100%;padding: 30px;">
9
+ <h4>- 该组件可以拖动修改左右尺寸,还可以绑定v-model来设置,如设置v-model="40"即左侧40%,右侧60%,也可设置'200px'像素值</h4>
10
+ <h4>- 设置right属性则v-model设置的值为右侧(下册)的宽度(高度)</h4>
11
+ <h4>- 可设置最小和最大距离,如:min="80"即向右拖动到80%处就不能再拖动</h4>
12
+ <h4>- 可绑定事件@on-trigger-moving,回调函数的返回值是鼠标事件对象,同时该对象还包括两个我们自定义的变量,即atMax和atMin,即此时是否是在最大或最小距离处,类型是Boolean。来拖动右边的trigger看看吧。</h4>
13
+ <h4 style="margin-bottom: 10px;">- 可使用slot="trigger"自定义拖动触发器,但有三个注意点:</h4>
14
+ <h5>-- 样式需要设置position: absolute;</h5>
15
+ <h5>-- 需要给trigger绑定mousedown事件,绑定的方法调用this.$refs.pane.handleMousedow(e),e为mousedown事件的事件对象</h5>
16
+ <h5>-- 给trigger添加:style="{width: offset + '%'}",这里的offset是通过v-model给split-pane组件绑定的值</h5>
17
+ <h4>- 其他api请看源码</h4>
18
+ </div>
19
+ <div slot="bottom" style="background: #A2EDB6;height: 100%;">
20
+ <split-pane ref="pane" :style="{height: '100%'}" direction="horizontal" v-model="triggerOffsetMin">
21
+ <div slot="left" style="background: #EDACE2;height: 100%;"></div>
22
+ <div slot="trigger"
23
+ :style="{left: triggerOffsetMin + '%'}"
24
+ @mousedown="handleMousedown"
25
+ class="custom-trigger"></div>
26
+ <div slot="right" style="background: #A2EDB6;height: 100%;"></div>
27
+ </split-pane>
28
+ </div>
29
+ </split-pane>
30
+ </div>
31
+ <div class="split-pane-right-con" slot="right" style="background: #8FB5ED;height: 100%;">
32
+ <p>是否是在最小距离处: {{ atMin }}</p>
33
+ <p>是否是在最大距离处: {{ atMax }}</p>
34
+ </div>
35
+ </split-pane>
36
+ </div>
37
+ </Card>
38
+ </div>
39
+ </template>
40
+ <script>
41
+ import splitPane from '../index';
42
+ export default {
43
+ name: 'split-pane-page',
44
+ components: {
45
+ splitPane
46
+ },
47
+ data () {
48
+ return {
49
+ triggerOffset: 20,
50
+ triggerOffsetV: 70,
51
+ triggerOffsetMin: 40,
52
+ atMax: false,
53
+ atMin: false
54
+ };
55
+ },
56
+ methods: {
57
+ handleMousedown (e) {
58
+ this.$refs.pane.handleMousedown(e);
59
+ },
60
+ handleMoving (e) {
61
+ this.atMax = e.atMax;
62
+ this.atMin = e.atMin;
63
+ }
64
+ }
65
+ };
66
+ </script>
67
+ <style lang="less" scoped>
68
+ .split-pane-con{
69
+ width: 100%;
70
+ height: 89vh;
71
+ }
72
+ .custom-trigger{
73
+ position: absolute;
74
+ width: 40px;
75
+ height: 40px;
76
+ box-sizing: border-box;
77
+ top: 50%;
78
+ transform: translate(-50%, -50%);
79
+ background: white;
80
+ border-radius: 50%;
81
+ box-shadow: 2px 2px 5px 2px rgba(0, 0, 0, .1) , 2px 2px 10px 2px rgba(0, 0, 0, .2) inset;
82
+ border: 1px solid #c3c3c3;
83
+ cursor: pointer;
84
+ }
85
+ .introduce-left-con h4{
86
+ margin-bottom: 20px;
87
+ }
88
+ .introduce-left-con h5{
89
+ margin-bottom: 10px;
90
+ margin-left: 20px;
91
+ }
92
+ .split-pane-right-con{
93
+ padding: 30px;
94
+ }
95
+ .split-pane-right-con p{
96
+ font-size: 26px;
97
+ font-weight: 700;
98
+ color: white;
99
+ }
100
+ </style>
101
+
@@ -0,0 +1,3 @@
1
+ import splitPane from './index.vue';
2
+
3
+ export default splitPane;
@@ -0,0 +1,93 @@
1
+ @prefix: ~"split-pane";
2
+ @container: ~"@{prefix}-container";
3
+ @trigger: ~"@{prefix}-trigger";
4
+
5
+ .@{prefix}{
6
+ position: relative;
7
+ &-container{
8
+ height: 100%;
9
+ width: 100%;
10
+ }
11
+
12
+ &-horizontal{
13
+ & > div > .@{trigger}{
14
+ transform: translateX(-50%);
15
+ cursor: col-resize;
16
+ width: 8px;
17
+ height: 100%;
18
+ margin: 0 1px;
19
+ .trigger-middle-point{
20
+ width: 3px;
21
+ height: 20px;
22
+ p{
23
+ width: 100%;
24
+ height: 1px;
25
+ margin-top: 2px;
26
+ }
27
+ }
28
+ }
29
+ }
30
+
31
+ &-vertical{
32
+ & > div > .@{trigger}{
33
+ transform: translateY(-50%);
34
+ cursor: row-resize;
35
+ height: 8px;
36
+ width: 100%;
37
+ margin: 1px 0;
38
+ .trigger-middle-point{
39
+ width: 20px;
40
+ height: 3px;
41
+ p{
42
+ height: 100%;
43
+ width: 1px;
44
+ display: inline-block;
45
+ margin-left: 2px;
46
+ }
47
+ }
48
+ }
49
+ }
50
+
51
+ &-trigger{
52
+ position: absolute;
53
+ z-index: 3;
54
+ background: #F8F8F9;
55
+ box-shadow: 0 0 4px 0 rgba(28,36,56,0.32);
56
+ .trigger-middle-point{
57
+ position: absolute;
58
+ top: 50%;
59
+ left: 50%;
60
+ transform: translate(-50%,-87%);
61
+ line-height: 0px;
62
+ p{
63
+ background: rgba(23,35,61,0.25);
64
+ }
65
+ }
66
+ }
67
+
68
+ &-left-area{
69
+ height: 100%;
70
+ float: left;
71
+ z-index: 2;
72
+ // overflow: auto;
73
+ }
74
+
75
+ &-right-area{
76
+ height: 100%;
77
+ float: left;
78
+ z-index: 2;
79
+ // overflow: auto;
80
+ }
81
+
82
+ &-top-area{
83
+ width: 100%;
84
+ z-index: 2;
85
+ // overflow: auto;
86
+ }
87
+
88
+ &-bottom-area{
89
+ width: 100%;
90
+ z-index: 2;
91
+ // overflow: auto;
92
+ }
93
+ }