diff --git a/README.md b/README.md
index aa749d1..741d474 100644
--- a/README.md
+++ b/README.md
@@ -21,12 +21,15 @@ const slots = {
default: () =>
main
}
-
+
//template
-
+
header
main
diff --git a/examples/App.jsx b/examples/App.jsx
index 3ad7a81..853fb6c 100644
--- a/examples/App.jsx
+++ b/examples/App.jsx
@@ -1,9 +1,7 @@
import { defineComponent } from 'vue'
export default defineComponent({
- setup() {
-
- return () =>
- }
-
-})
\ No newline at end of file
+ setup() {
+ return () =>
+ }
+})
diff --git a/examples/App.vue b/examples/App.vue
index c1011dd..792a35f 100644
--- a/examples/App.vue
+++ b/examples/App.vue
@@ -1,15 +1,21 @@
-
- 123
+
+ 123
\ No newline at end of file
diff --git a/packages/Layout/Layout.jsx b/packages/Layout/Layout.jsx
index 99493ee..3160347 100644
--- a/packages/Layout/Layout.jsx
+++ b/packages/Layout/Layout.jsx
@@ -2,38 +2,42 @@ import { defineComponent } from 'vue'
import './Layout.scss'
export default defineComponent({
- name: 'Layout',
- props: {
- title: {
- type: String,
- default: () => {
- return 'Zoo-Layout'
- }
- }
- },
-
- setup(props, { slots }) {
- const renderHeader = () => {
- return
+ name: 'Layout',
+ props: {
+ title: {
+ type: Object,
+ default: () => {
+ return {
+ name: 'Zoo Layout',
+ url: 'https://github.com/zoo-js/zoo-layout',
}
+ }
+ }
+ },
- return () => (
-
- { renderHeader()}
-
- {slots.default?.()}
-
-
- )
+ setup(props, { slots }) {
+ console.log(props.title)
+ const renderHeader = () => {
+ return
}
-})
\ No newline at end of file
+
+ return () => (
+
+ { renderHeader()}
+
+ {slots.default?.()}
+
+
+ )
+ }
+})
diff --git a/packages/Layout/Layout.scss b/packages/Layout/Layout.scss
index 4d63430..4724c95 100644
--- a/packages/Layout/Layout.scss
+++ b/packages/Layout/Layout.scss
@@ -2,131 +2,68 @@
@import '~@zoo-js/colors/color.scss';
* {
- margin: 0;
- padding: 0;
+ margin: 0;
+ padding: 0;
}
body {
- height: 100vh;
- font-size: 62.5%;
- background-image: linear-gradient(180deg, #eaf1e7 30%, #d9dfe4 45%, #e6dcc8 71%, #eaf1e7 91%);
- user-select: none;
- -moz-user-select: -moz-none;
- -khtml-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
-
- .zoo-layout {
- .zoo-layout-header {
- background-color: #fff;
- box-shadow: 4px 4px 12px #d7dbe0;
- position: fixed;
- top: 0;
- height: 76px;
- width: 100vw;
- z-index: 99;
-
- &-content {
- width: 1024px;
- margin: 0 auto;
- display: flex;
- height: 76px;
- line-height: 76px;
-
- a+a {
- margin-left: 10px;
- text-decoration: none;
- }
-
- h1 {
- font-family: "Montserrat";
- margin: 0 20px;
- font-size: 24px;
- line-height: 76px;
- font-weight: normal;
- color: rgba(0, 0, 0, .85);
- text-shadow: #494a45 1px 2px 4px;
- }
-
- img {
- margin-top: 8px;
- }
- }
-
- &-form {
- position: absolute;
- display: flex;
- margin-left: 600px;
- align-items: center;
- }
-
- &-item {
- font-family: "Montserrat";
-
- input {
- font-family: "Montserrat";
- border: none;
- border-bottom: 2px solid $theme-color;
- width: 200px;
- outline: none;
- padding: 6px;
- font-size: 16px;
- }
-
- label {
- height: 0;
- position: absolute;
- transition: all .5s;
- font-size: 16px;
- color: #666;
- cursor: text;
- }
-
- .label-title {
- transform: translateX(-20px) translateY(-10px) scale(0.7);
- color: $theme-color;
- cursor: default;
- }
-
- }
-
- &-submit {
- font-family: "Montserrat";
- outline: none;
- filter: chroma(color=#000000);
- font-size: 16px;
- color: $theme-text-color;
- padding: 8px 20px;
- border: none;
- border-radius: 4px;
- margin-left: 20px;
- background-color: $theme-color;
- box-shadow: 0 0 2px $theme-shadow-color;
- transition: all .3s;
- cursor: pointer;
-
- &:hover {
- background-color: $theme-hover-color;
- box-shadow: 0 0 10px $theme-shadow-color;
- }
+ height: 100vh;
+ font-size: 62.5%;
+ background-image: linear-gradient(180deg, #eaf1e7 30%, #d9dfe4 45%, #e6dcc8 71%, #eaf1e7 91%);
+ user-select: none;
+ -moz-user-select: -moz-none;
+ -khtml-user-select: none;
+ -webkit-user-select: none;
+ -ms-user-select: none;
+
+ .zoo-layout {
+ &-header {
+ background-color: #fff;
+ box-shadow: 4px 4px 12px #d7dbe0;
+ position: fixed;
+ top: 0;
+ height: 76px;
+ width: 100vw;
+ z-index: 99;
+
+ &-content {
+ width: 1024px;
+ margin: 0 auto;
+ display: flex;
+ height: 76px;
+ line-height: 76px;
+
+ a+a {
+ margin-left: 10px;
+ text-decoration: none;
+ }
- &:active {
- transform: translateY(4px);
- }
- }
+ h1 {
+ font-family: "Montserrat";
+ margin: 0 20px;
+ font-size: 24px;
+ line-height: 76px;
+ font-weight: normal;
+ color: rgba(0, 0, 0, .85);
+ text-shadow: #494a45 1px 2px 4px;
+ }
+ img {
+ margin-top: 8px;
}
+ }
}
- .zoo-layout-body {
- padding-top: 84px
+ &-body {
+ padding-top: 84px;
}
+ }
- @media screen and (max-width: 480px) {
- .zoo-header-content {
- h1 {
- display: none;
- }
- }
+ @media screen and (max-width: 480px) {
+ .zoo-header-content {
+ h1 {
+ display: none;
+ }
}
-}
\ No newline at end of file
+ }
+}
diff --git a/packages/index.js b/packages/index.js
index 5f7478e..3456a3b 100644
--- a/packages/index.js
+++ b/packages/index.js
@@ -1,17 +1,16 @@
import Layout from './Layout/Layout'
const components = [
- Layout
+ Layout
]
-const install = function(app) {
- components.forEach(com => {
- app.component(com.name, com)
- })
-
+const install = function (app) {
+ components.forEach(com => {
+ app.component(com.name, com)
+ })
}
export default {
- Layout,
- install
+ Layout,
+ install
}