@lambo-design/page-layout 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +2 -0
  2. package/package.json +21 -0
  3. package/src/index.vue +109 -0
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import LamboPageLayout from './src/index';
2
+ export default LamboPageLayout;
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@lambo-design/page-layout",
3
+ "version": "1.0.0-beta.3",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "author": "lambo",
7
+ "license": "ISC",
8
+ "publishConfig": {
9
+ "access": "public",
10
+ "registry": "https://registry.npmjs.org/"
11
+ },
12
+ "devDependencies": {},
13
+ "scripts": {
14
+ "release": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
15
+ "release-major": "standard-version --release-as major",
16
+ "release-minor": "standard-version --release-as minor",
17
+ "release-patch": "standard-version --release-as patch",
18
+ "release-beta": "standard-version --prerelease beta",
19
+ "re-publish": "pnpm publish --access public --no-git-checks"
20
+ }
21
+ }
package/src/index.vue ADDED
@@ -0,0 +1,109 @@
1
+ <template>
2
+ <div class="page-layout">
3
+ <div class="page-layout-left">
4
+ <div class="page-layout-left-header" v-if="showLeftHeader">
5
+ <div class="page-layout-header-title">
6
+ <slot name="left-header"></slot>
7
+ </div>
8
+ <div class="page-layout-header-actions">
9
+ <slot name="left-header-actions"></slot>
10
+ </div>
11
+ </div>
12
+ <div class="page-layout-left-content">
13
+ <slot name="left-content"></slot>
14
+ </div>
15
+ </div>
16
+ <div class="page-layout-gap"></div>
17
+ <div class="page-layout-right">
18
+ <div class="page-layout-right-header" v-if="showRightHeader">
19
+ <div class="page-layout-header-title">
20
+ <slot name="right-header"></slot>
21
+ </div>
22
+ <div class="page-layout-header-actions">
23
+ <slot name="right-header-actions"></slot>
24
+ </div>
25
+ </div>
26
+ <div class="page-layout-right-content">
27
+ <slot name="right-content"></slot>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ export default {
35
+ name: "PageLayout",
36
+ props: {
37
+ showLeftHeader: {
38
+ type: Boolean,
39
+ default: true
40
+ },
41
+ showRightHeader: {
42
+ type: Boolean,
43
+ default: true
44
+ }
45
+ }
46
+ }
47
+ </script>
48
+
49
+ <style lang="less" scoped>
50
+ .page-layout {
51
+ display: flex;
52
+ height: 100%;
53
+ width: 100%;
54
+
55
+ &-left{
56
+ flex: 0 0 24%;
57
+ display: flex;
58
+ flex-direction: column;
59
+ margin-right: 1%;
60
+ background: var(--component-background, #fff);
61
+ border-radius: var(--border-radius-base, 6px);
62
+ border: 1px solid var(--border-color-base, #cacacb);
63
+ border-color: var(--border-color-split, #e8eaec);
64
+ }
65
+ &-right {
66
+ flex: 0 0 75%;
67
+ display: flex;
68
+ flex-direction: column;
69
+ background: var(--component-background, #fff);
70
+ border-radius: var(--border-radius-base, 6px);
71
+ border: 1px solid var(--border-color-base, #cacacb);
72
+ border-color: var(--border-color-split, #e8eaec);
73
+ }
74
+
75
+ &-left-header,
76
+ &-right-header {
77
+ margin: 10px 15px 0px 15px;
78
+ height: 50px;
79
+ background: var(--component-background, #fff);
80
+ display: flex;
81
+ align-items: center;
82
+ padding: 0 15px;
83
+ border-bottom: 1px solid #e8e8e8;
84
+ }
85
+
86
+ .page-layout-header-title {
87
+ text-align: left;
88
+ line-height: 20px;
89
+ font-size: var(--font-size-large, 16px);
90
+ color: var(--title-color, #17233d);
91
+ font-weight: var(--content-header-font-weight, 500);
92
+ text-overflow: ellipsis;
93
+ white-space: nowrap;
94
+ }
95
+
96
+ .page-layout-header-actions {
97
+ flex: 1;
98
+ text-align: right;
99
+ }
100
+
101
+ &-left-content,
102
+ &-right-content {
103
+ flex: 1;
104
+ overflow-y: auto;
105
+ overflow-x: hidden;
106
+ padding: 10px 15px;
107
+ }
108
+ }
109
+ </style>