affix
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -54,7 +52,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.noteHeaderShade {
|
.noteHeaderShade {
|
||||||
background: linear-gradient(to top,rgba(255,255,255,0.7),rgba(255,255,255,1));
|
background-color: white;
|
||||||
width:100%;
|
width:100%;
|
||||||
height:40px;
|
height:40px;
|
||||||
border-bottom: dashed #ed4014 1px;
|
border-bottom: dashed #ed4014 1px;
|
||||||
|
|||||||
@@ -75,12 +75,11 @@
|
|||||||
|
|
||||||
<Layout>
|
<Layout>
|
||||||
|
|
||||||
|
<div style="position:fixed;z-index:10;width:100%">
|
||||||
<Header class="header">
|
<Header class="header">
|
||||||
<Row>
|
<Row>
|
||||||
<Col :xs="{ span: 24, offset: 0 }" :sm="{ span: 22, offset: 1 }" :md="{ span: 20, offset: 2 }"
|
<Col :xs="{ span: 24, offset: 0 }" :sm="{ span: 22, offset: 1 }" :md="{ span: 20, offset: 2 }"
|
||||||
:lg="{ span: 18, offset: 3 }" :xl="{ span: 16, offset: 4 }" :xxl="{ span: 16, offset: 4 }">
|
:lg="{ span: 18, offset: 3 }" :xl="{ span: 16, offset: 4 }" :xxl="{ span: 16, offset: 4 }">
|
||||||
|
|
||||||
<Affix :offset-top="0">
|
|
||||||
<div :class="[showHeaderShade ? 'noteHeaderShade' : 'noteHeader']">
|
<div :class="[showHeaderShade ? 'noteHeaderShade' : 'noteHeader']">
|
||||||
|
|
||||||
<img style="height:40px;float:left;cursor: pointer;" alt="refresh flagnote" src="/static/logo.png"
|
<img style="height:40px;float:left;cursor: pointer;" alt="refresh flagnote" src="/static/logo.png"
|
||||||
@@ -124,13 +123,22 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</Affix>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Header>
|
</Header>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Content class="content">
|
||||||
|
<div>
|
||||||
|
<Row>
|
||||||
|
<Col :xs="{ span: 24, offset: 0 }" :sm="{ span: 22, offset: 1 }" :md="{ span: 20, offset: 2 }"
|
||||||
|
:lg="{ span: 18, offset: 3 }" :xl="{ span: 16, offset: 4 }" :xxl="{ span: 16, offset: 4 }">
|
||||||
|
<div class="noteHeader" style="height:40px;"></div>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
</Content>
|
||||||
|
|
||||||
<Content class="content">
|
<Content class="content">
|
||||||
<div style="min-height: 650px;">
|
<div style="min-height: 650px;">
|
||||||
@@ -195,6 +203,7 @@ import { isWeixin } from "@/libs/utils";
|
|||||||
import NoteConstant from "@/libs/constants";
|
import NoteConstant from "@/libs/constants";
|
||||||
import html2canvas from "html2canvas";
|
import html2canvas from "html2canvas";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EditNote',
|
name: 'EditNote',
|
||||||
props: {},
|
props: {},
|
||||||
@@ -301,21 +310,6 @@ export default {
|
|||||||
window.wasm_bindgen(window.wasm_flate_bg_path);
|
window.wasm_bindgen(window.wasm_flate_bg_path);
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const myObserver = new ResizeObserver(entries => {
|
|
||||||
// iterate over the entries, do something.
|
|
||||||
entries.forEach(entry => {
|
|
||||||
let affix = document.querySelector('.ivu-affix');
|
|
||||||
if (affix) {
|
|
||||||
affix.setAttribute("style", "top: 0px; width: " + (entry.contentRect.width + 2) + "px;");
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const someOtherEl = document.querySelector('#wrapper');
|
|
||||||
|
|
||||||
myObserver.observe(someOtherEl);
|
|
||||||
|
|
||||||
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
|
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {
|
||||||
|
|||||||
@@ -162,12 +162,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<Layout>
|
<Layout>
|
||||||
|
<div style="position:fixed;z-index:10;width:100%">
|
||||||
<Header class="header">
|
<Header class="header">
|
||||||
<Row>
|
<Row>
|
||||||
<Col :xs="{ span: 24, offset: 0 }" :sm="{ span: 22, offset: 1 }" :md="{ span: 20, offset: 2 }"
|
<Col :xs="{ span: 24, offset: 0 }" :sm="{ span: 22, offset: 1 }" :md="{ span: 20, offset: 2 }"
|
||||||
:lg="{ span: 18, offset: 3 }" :xl="{ span: 16, offset: 4 }" :xxl="{ span: 16, offset: 4 }">
|
:lg="{ span: 18, offset: 3 }" :xl="{ span: 16, offset: 4 }" :xxl="{ span: 16, offset: 4 }">
|
||||||
<Affix :offset-top="0">
|
|
||||||
<div :class="[showHeaderShade ? 'noteHeaderShade' : 'noteHeader']">
|
<div :class="[showHeaderShade ? 'noteHeaderShade' : 'noteHeader']">
|
||||||
<img style="height:40px;float:left;cursor: pointer;" alt="refresh flagnote" src="/static/logo.png"
|
<img style="height:40px;float:left;cursor: pointer;" alt="refresh flagnote" src="/static/logo.png"
|
||||||
v-on:click="refreshPage()">
|
v-on:click="refreshPage()">
|
||||||
@@ -235,13 +235,25 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</Affix>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Header>
|
</Header>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Content class="content">
|
||||||
|
<div>
|
||||||
|
<Row>
|
||||||
|
<Col :xs="{ span: 24, offset: 0 }" :sm="{ span: 22, offset: 1 }" :md="{ span: 20, offset: 2 }"
|
||||||
|
:lg="{ span: 18, offset: 3 }" :xl="{ span: 16, offset: 4 }" :xxl="{ span: 16, offset: 4 }">
|
||||||
|
<div class="noteHeader" style="height:40px;"></div>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
</Content>
|
||||||
|
|
||||||
<Content class="content">
|
<Content class="content">
|
||||||
<div style="min-height: 650px;">
|
<div style="min-height: 650px;">
|
||||||
@@ -452,21 +464,6 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
const myObserver = new ResizeObserver(entries => {
|
|
||||||
// iterate over the entries, do something.
|
|
||||||
entries.forEach(entry => {
|
|
||||||
let affix = document.querySelector('.ivu-affix');
|
|
||||||
if (affix) {
|
|
||||||
affix.setAttribute("style", "top: 0px; width: " + (entry.contentRect.width + 2) + "px;");
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const someOtherEl = document.querySelector('#wrapper');
|
|
||||||
myObserver.observe(someOtherEl);
|
|
||||||
|
|
||||||
let qrimg = document.getElementById("qrImg");
|
let qrimg = document.getElementById("qrImg");
|
||||||
let qrurl = "https://flagnote.com/" + this.noteForm.key;
|
let qrurl = "https://flagnote.com/" + this.noteForm.key;
|
||||||
var opts = {
|
var opts = {
|
||||||
|
|||||||
Reference in New Issue
Block a user