meta

Vue常用语法

懵懂的女人 提交于 2019-12-30 10:18:23
一、模板语法 1、双大括号表达式 【语法:】 {{exp}} 用于向页面输入数据,即页面显示数据。 【举例:】 <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <div id="test"> <p>{{message}}</p> <p>{{message.toUpperCase()}}</p> <p v-text="message"></p> <!--<p v-text="message"></p> 等价于 <p>{{message}}</p>--> <p v-html="message"></p> </div> <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>

Ordering enum value in python

房东的猫 提交于 2019-12-30 09:53:15
问题 I would like to be able to arrange the ordering of Enum. Has somebody suggestions how this can be solved? The following Enum meta class is using: class EnumMeta(type): def __new__(typ, name, bases, attrs): cls_attrs = {} cls_choices = [] for attr_name, value in attrs.items(): cls_attrs[attr_name] = attr_name.lower() if not attr_name.startswith("__"): cls_choices.append((attr_name.lower(), value)) def choices(cls): return cls_choices def values(cls, value=None): if value is None: return

Ordering enum value in python

两盒软妹~` 提交于 2019-12-30 09:53:06
问题 I would like to be able to arrange the ordering of Enum. Has somebody suggestions how this can be solved? The following Enum meta class is using: class EnumMeta(type): def __new__(typ, name, bases, attrs): cls_attrs = {} cls_choices = [] for attr_name, value in attrs.items(): cls_attrs[attr_name] = attr_name.lower() if not attr_name.startswith("__"): cls_choices.append((attr_name.lower(), value)) def choices(cls): return cls_choices def values(cls, value=None): if value is None: return

Web APP开发技巧总结(转)

£可爱£侵袭症+ 提交于 2019-12-30 04:12:31
一、META/LINK相关:   1、百度禁止转码   通过百度手机打开网页时,百度可能会对你的网页进行转码,往你页面贴上它的广告,非常之恶心。不过我们可以通过这个meta标签来禁止它:   <meta http-equiv="Cache-Control" content="no-siteapp" />   相关链接: SiteApp 转码声明   2、添加到主屏后的标题(IOS)   <meta name="apple-mobile-web-app-title" content="标题">   3、启用 WebApp 全屏模式(IOS)   当网站添加到主屏幕后再点击进行启动时,可隐藏地址栏(从浏览器跳转或输入链接进入并没有此效果)   <meta name="apple-mobile-web-app-capable" content="yes" />   <meta name="apple-touch-fullscreen" content="yes" />   PS:然而,经本人用5S测试,设置"apple-touch-fullscreen"并没有什么卵用,希望了解者能在底部评论告知   4、设置状态栏的背景颜色(IOS)   设置状态栏的背景颜色,只有在 "apple-mobile-web-app-capable" content="yes" 时生效   <meta

html模板

前提是你 提交于 2019-12-30 00:33:42
http://www.w3chtml.com/html5/<!DOCTYPE html> <head> <!-- <meta http-equiv="Refresh" content=3 /> 刷新 -->   <!-- <meta http-equiv="Refresh" content=3 ;Url=http://www.baidu.com /> 跳转 -->   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- 设置编码 -->   <meta http-equiv="keywords" content="word1,word2" /> <!-- 关键词 -->   <meta http-equiv="description" content="this is word web!!!" /> <!-- 描述 -->   <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9;IE=EmulateIE8" /> <!-- IE8即支持新的标准又支持旧的标准 -->   <meta name="author" content="" /> <!-- 作者 -->   <meta name="viewport" content

视图窗口,移动端特属的标签

大憨熊 提交于 2019-12-29 22:52:50
<!-- 视图窗口,移动端特属的标签。 --> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" /> <!-- 是否启动webapp功能,会删除默认的苹果工具栏和菜单栏。 --> <meta name="apple-mobile-web-app-capable" content="yes" /> <!-- 这个主要是根据实际的页面设计的主体色为搭配来进行设置。 --> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <!-- 忽略页面中的数字识别为电话号码,email识别 --> <meta name="format-detection"content="telephone=no, email=no" /> <!-- 启用360浏览器的极速模式(webkit) --> <meta name="renderer" content="webkit"> <!-- 避免IE使用兼容模式 --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!--

移动端meta

喜欢而已 提交于 2019-12-29 22:52:12
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> <!-- 删除苹果默认的工具栏和菜单栏 --> <meta name="apple-mobile-web-app-capable" content="yes" /> <!-- 设置苹果工具栏颜色 --> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <!-- 忽略页面中的数字识别为电话,忽略email识别 --> <meta name="format-detection" content="telphone=no, email=no" /> <!-- 启用360浏览器的极速模式(webkit) --> <meta name="renderer" content="webkit"> <!-- 避免IE使用兼容模式 --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑莓 --> <meta name="HandheldFriendly" content="true"> <!

Django中model类的Meta选项

梦想与她 提交于 2019-12-29 19:24:52
Django模型类的Meta是一个内部类,它用于定义一些Django模型类的行为特性。而可用的选项大致包含以下几类: class UserInfo(models.Model): username = models.CharField(max_length=32,unique=True) class meta: #相关选项 pass unique_together 多个字段组合必须是唯一的。例如 unique_together = ['driver', 'restaurant'] 表示数据库表中driver字段和restaurant字段值组合不能是重复的。ManyToManyField字段不能包含在unique_together中。 注意:数据库中NULL值不受唯一性约束,NULL != NULL。所以[1,NULL] !=[1,NULL] verbose_name 模型类的易读名 verbose_name_plural 模型的复数形式是什么。若未指定则,Django 会使用 verbose_name + "s". abstract 这个属性是定义当前的模型是不是一个抽象类。所谓抽象类是不会对应数据库表的。一般我们用它来归纳一些公共属性字段,然后继承它的子类可以继承这些字段。 Options.abstract 如果abstract = True 这个model就是一个抽象类 app

keepAlive使用

佐手、 提交于 2019-12-29 14:03:54
用vue做后台管理项目,特别是有列表页、列表数据详情页、列表数据修改页功能的码友们,几乎都被vue前进后退都刷新的逻辑坑过,有时候需要保存组件状态, 要求 : 1.列表页进入详情页返回列表页时列表不能刷新,连页数、筛选条件等都不能变 2.列表页进列表数据编辑页若数据有改动返回列表页列表数据得刷新,但页数、筛选条件等都不能变 3.非详情页、编辑页进入列表页时列表数据得刷新,页数、筛选条件等都全部重置 总结一下就是‘这个列表页我想让它刷新,他就得刷新,不想让他刷,他就无变化 那么是啥呢?对,是keep-alive组件,对,是它。 但单纯的keep-alive是前进后退都不会刷新的,所以需要改造一下,让它乖乖听话。这个过程需要路由路由参数meta配合我们。 1.在路由文件中为目标列表页设置meta参数,里面包含keepAlive和ifDoFresh字段 复制代码 { path:'*', name:'datalists', component: resolve => require(['@/view/datalist'], resolve), meta:{ keepAlive: true, ifDoFresh:false } }, 复制代码 2.在程序主入口main.vue中设置页面根据keepAlive字段判断是否使用keep-alive组件。 复制代码 <div class="main

Changing the content of meta refresh does not change refreshing time

一世执手 提交于 2019-12-29 08:12:13
问题 I have a meta http-equiv="refresh" inside the <head> . <head> <meta name="mymeta" http-equiv="refresh" content="2" id="myMeta"> </head> Using Javascript , I'm trying to change the content attribute of this meta tag. var myMeta = document.getElementById("myMeta"); myMeta.content="10"; When I display the content via document.write(myMeta.content); , I get the changed value which is 10 , however, the meta tag will keep refreshing each 2 seconds. I have tested this both in Firefox and Opera. FULL