meta

Vue keep-alive和activated的用法

十年热恋 提交于 2019-12-25 13:25:50
<keep-alive> 是 Vue 的内置组件,能在组件切换过程中将状态保留在内存中,防止重复渲染DOM。 1. 使用 router.meta 属性,预先定义需要缓存的组件 <keep-alive> <router-view v-if="$route.meta.keepAlive"></router-view>> </keep-alive> <router-view v-if="!$route.meta.keepAlive"></router-view> 路由部分: routes: [ { path: '/test1', component: test1, meta: { keepAlive: true } // 需要缓存 }, { path: '/test2', component: test2, meta: { keepAlive: false} // 不需要缓存 }, test1 组件会被缓存,而 test2 组件不会被缓存。 2. 动态缓存 router-view 里面的部分组件页面 如果只想 router-view 里面某个、或某些页面组件被缓存,通常有如下两种办法: 使用 include/exclude 来实现 配合 router.meta 属性来实现 1). 使用 include/exclude 来实现,每个组件中需要加 name 来匹配 include

“兼容模式”错杂谈

孤者浪人 提交于 2019-12-25 12:30:33
今天在网页兼容上费工夫了,IE8下是好的,但是IE8的兼容模式就不行了。花了近两个小时时间还是有问题。 我们合同签订的是兼容IE8以上就可以了,那么IE8的兼容模式实际上是为兼容IE7而创建的,我们这么难为自己不是很自残? 搜索一下如何可以让IE8的兼容模式显示IE8而不是IE7,结果不虚此行啊~ “ 如何禁止使用IE8兼容模式解析网页呢?在IE8以上版本的浏览器增加了一个X-UA-Compatible 头标记,用于为IE8指定不同的页面渲染模式。 <meta http-equiv="X-UA-Compatible" content="IE=8" /> 这段代码表示开启IE8的标准渲染模式。所以我们如果在网页中加上了代码 <meta http-equiv="X-UA-Compatible" content="IE=8" /> 或者 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />,那么就设定要用IE8标准模式渲染网页,而不会使用兼容的模式。 如果我的页面只是在IE7或者IE8的兼容模式才浏览正常怎么办呢?我如何设置必须在IE8的兼容模式渲染网页呢? 那么就加上下面这段代码好喽~~~ <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> “

Front End Upload Images Wordpress

戏子无情 提交于 2019-12-25 10:46:23
问题 The below code is successfully creating a custom post and adding meta details to it. The code is also dumping uploading images into an uploads folder in the site root. I'm stuck on creating a foreach argument to post the image file paths into the following custom fields as text strings: image_1, image_2, image_3 and image_4. <?php if(isset($_POST['url']) && $_POST['url'] == ''){ require('../wp-load.php'); $a = $_POST['a']; $b = $_POST['b']; $c = $_POST['c']; $d = $_POST['d']; $e = $_POST['e']

How to get content of the meta tag of a webpage

江枫思渺然 提交于 2019-12-25 01:00:43
问题 I am trying to read the content of a meta tag of a secure web page. But finding it difficult as the properties are not the general one like name, author etc. If their is any way possible please tell. Thanks in advance. 回答1: did you gone through these post in php.net ? <meta name="author" content="name"> <meta name="keywords" content="php documentation"> <meta name="DESCRIPTION" content="a php manual"> <meta name="geo.position" content="49.33;-86.59"> </head> <!-- parsing stops here --> read

day15 Jquery

一个人想着一个人 提交于 2019-12-24 20:56:03
一 jQuery是什么? [1] jQuery由美国人John Resig创建,至今已吸引了来自世界各地的众多 javascript高手加入其team。 [2] jQuery是继prototype之后又一个优秀的Javascript框架。其宗旨是——WRITE LESS,DO MORE! [3] 它是轻量级的js库(压缩后只有21k) ,这是其它的js库所不及的,它兼容CSS3,还兼容各种浏览器 [4] jQuery是一个快速的,简洁的javaScript库,使用户能更方便地处理HTMLdocuments、events、实现动画效果,并且方便地为网站提供AJAX交互。 [5] jQuery还有一个比较大的优势是,它的文档说明很全,而且各种应用也说得很详细,同时还有许多成熟的插件可供选择。. 二 什么是 jQuery 对象? jQuery 对象就是通过 jQuery 包装 DOM 对象后产生的对象。 jQuery 对象是 jQuery 独有的 . 如果一个对象是 jQuery 对象 , 那么它就可以使用 jQuery 里的方法 : $(“#test”).html(); $("#test").html() 意思是指:获取ID为test的元素内的html代码。其中html()是jQuery里的方法 这段代码等同于用DOM实现代码: document.getElementById("

HTML学习笔记1

雨燕双飞 提交于 2019-12-24 18:41:52
一个HTML文档的组成 文档申明: <!DOCTYPE HTML> 申明表示这是一个HTML文档 html标签: <html></html> 这是设计者在告诉浏览器,整个网页是从 <html> 这里开始的,然后到 </html> 结束 head标签: <head></head> head标签是页面的“头部”,只能定义一些特殊的内容 body标签: <body></body> body标签是页面的“身体”,一般网页绝大多数的标签代码都是在这里编写 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> </body> </html> 一、head标签 一般来讲 <head> 标签中只有 <title><meta><link><style><script><base> 这6个标签可以放在标签内 <title> 网页标题 <meta> “元信息标签”,有两个比较重要的属性name和http

盒模型-

百般思念 提交于 2019-12-24 16:46:39
1 <html lang="en"> 2 <head> 3 <meta charset="UTF-8"> 4 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 5 <meta http-equiv="X-UA-Compatible" content="ie=edge"> 6 <title>box-盒模型</title> 7 <style> 8 div{ 9 width: 200px; 10 height: 200px; 11 margin: 10px; 12 padding: 5px; 13 background-color: aliceblue; 14 border: 1px solid black; 15 } 16 div:first-child{ 17 box-sizing: content-box; 18 } 19 div:last-child{ 20 box-sizing:border-box; 21 } 22 </style> 23 </head> 24 <body> 25 <div> content-box</div> 26 <div>border-box</div> 27 </body> 28 </html> 来源: https://www.cnblogs.com

Difference meta and PHP header

一个人想着一个人 提交于 2019-12-24 15:27:45
问题 What is the difference between these two and should I use both ? I want my website to be fully UTF-8. In PHP: <?php header("Content-Type: text/html; charset=utf-8"); ?> And the meta tag in HTML: <meta charset="utf-8"> 回答1: The HTTP Content-Type header should always be set, it's the primary source for the browser to figure out what kind of document it's dealing with. Only if this header is missing will the browser try to find an HTML meta tag which gives it the same information as a fallback .

open graph meta tags not working in facebook

独自空忆成欢 提交于 2019-12-24 14:52:52
问题 Okay, I can not figure this out for the life of me. I created a new site, and wanted to add the open graph meta tags like on my old site (which is working fine). When I added these to my new site and tested them in facebook debugger, it says that they are not present. I get this back when I test it: Inferred Property The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags. Inferred Property The 'og:title' property should be explicitly provided,

前端学习(199):animation动画

血红的双手。 提交于 2019-12-24 11:52:46
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>animation</title> <style> .box1{width: 300px;height: 300px;border:1px solid black;margin:30px auto;} .box2{width: 100px;height: 100px;background: red; animation-name: mybox; animation-duration: 4s; animation-delay: 1s; } @keyframes mybox{ from{transform: translate(0,0);} to{transform: translate(200px,0);} } </style> </head> <body> <div class="box1"> <div class="box2"></div> </div> </body> </html> 运行结果