Sass

一. Vue核心小知识点

半世苍凉 提交于 2020-04-21 22:57:49
1、vue中 key 值的作用 key 的特殊属性主要用在 Vue的虚拟DOM算法,在新旧nodes对比时辨识VNodes。如果不使用key,Vue会使用一种最大限度减少动态元素并且尽可能的尝试修复/再利用相同类型元素的算法。使用key,它会基于key的变化重新排列元素顺序,并且会移除key不存在的元素。 有相同父元素的子元素必须有 独特的key 。重复的key会造成渲染错误。 最常见的用例是结合 v-for: 1 2 3 < ul > < li v-for="item in items" :key="item.id">...</ li > </ ul > 它也可以用于强制替换元素/组件而不是重复使用它。当你遇到如下场景时它可能会很有用: 完整地触发组件的生命周期钩子 触发过渡 1 2 3 < transition > < span :key="text">{{ text }}</ span > </ transition > 当 text 发生改变时,<span> 会随时被更新,因此会触发过渡。 2、vue中子组件调用父组件的方法 子组件调用父组件的方法可以使用this.$emit() 3、vue等单页面应用及其优缺点 优点: 1、具有桌面应用的即时性、网站的可移植性和可访问性。 2、用户体验好、快,内容的改变不需要重新加载整个页面。 3、基于上面一点,SPA相对对服务器压力小。

Sentry实时应用错误跟踪系统在Kubernetes中私有化部署

心已入冬 提交于 2020-04-20 09:52:43
应用错误跟踪系统:对软件系统运行过程中产生的错误日志进行收集从而实现监控告警。 虽然软件错误❌是不可避免的,但是可以降低错误数。 提高对错误的治理能力能让错误带来的损失降到最低 ​👍🏻 。 错误日志监控在最顶层的业务层监控,有他将会帮助你打造更好的软件! 我们需要业务场景下自己发现Bug的速度快于用户报告Bug的速度,毕竟让用户报告已经晚了。 典型的这套系统的架构:错误日志(前端、后端) => 传输(HTTP)=>错误跟踪平台(收集、展示、分析、告警)。 本文不讨论哪款软件来解决这个问题,只讲Sentry这个轮子,SASS版本和私有部署版体验几乎一致 本文主要讲了 应用错误需要监控的场景案例 Sentry有哪些功能 Sentry如何在k8s中私有化部署 本文由 www.iamle.com 流水理鱼 原创,wx公众号搜索 流水理鱼 或 liushuiliyu SEO 关键字 Sentry私有化部署 Sentry helm部署 Sentry kubernets部署 k8s部署 1. 需要应用错误监控的场景案例 多年的老web项目需要https适配,因为老项目大量写死了http://所以文件修改数巨大,即便测试很仔细也不能保证完全没问题 运营发现落地页转化异常了,有访问没表单提交,找到技术,技术发现是某个JS报错,导致表单无法提交,造成推广费用的损失 上线了一个功能,由于环境差异

在Sass中,我们可以使用“@for”来实现循环操作

不打扰是莪最后的温柔 提交于 2020-04-20 08:21:29
CSS、Sass、Scss,以及sass和scss的区别 CSS 指层叠样式表 (Cascading Style Sheets) Sass (Syntactically Awesome StyleSheets),是由buby语言编写的一款css预处理语言,和html一样有严格的缩进风格,和css编写规范有着很大的出入,是不使用花括号和分号的,所以不被广为接受。 Sass 是一款强化 CSS 的辅助工具,是对 CSS 的扩展,它在 CSS 语法的基础上增加了变量 (variables)、嵌套 (nested rules)、混合 (mixins)、继承(extend)、导入 (inline imports) 等高级功能,这些拓展令 CSS 更加强大与优雅。使用 Sass 以及 Sass 的样式库(如 Compass)有助于更好地组织管理样式文件,以及更高效地开发项目, 其后缀是.sass。 SCSS (Sassy CSS),一款css预处理语言,SCSS 是 Sass 3 引入新的语法,其语法完全兼容 CSS3,并且继承了 Sass 的强大功能。也就是说,任何标准的 CSS3 样式表都是具有相同语义的有效的 SCSS 文件。SCSS 需要使用分号和花括号而不是换行和缩进。SCSS 对空白符号不敏感,其实就和css3语法一样,其后缀名是分别为 .scss。 sass和scss的关系

mpvue中的坑

廉价感情. 提交于 2020-04-18 19:55:37
1、关于ui框架weapp的引入 a、下载vant静态文件,再从app.json配置。 b、 npm 下载 vant 模块,再从app.json配置。 2、app.json 这相当于微信的配置文件,里面可设置增加页面,插件(例如weapp组件的引入),增加了页面后,每次都要npm run dev,不然不生效。 3、mpvue,没有路由这个概念。 若要使用,请装mpvue-router-patch,这个插件。 router.push({ path: '/pages/news/list', reLaunch: true }),只能跳转7次(或者5次,具体忘了),可改用$router.replace(但此项不支持微信原生的tab的跳转。) 4、v-html 无效 html内想解析'<p>213</p>'字符串标签,用v-html,无效。 解决方法:利用mpvue-wxparse这个插件。 5、dom问题 小程序内没有dom的概念,所有使用到dom的插件都报错。querySelector,$refs这些都不可以。。 6、父子组件传值问题 父->子,props传值,子组件的html内渲染时能拿到这个值。 在onShow(),mounted()方法内是拿不到的,在methods的方法内可以拿到。(生命周期问题) 解决方法:vuex,watch这个参数。 7、textarea问题

ionic 4 change ion label color when focused within ion item

夙愿已清 提交于 2020-04-18 12:35:55
问题 I want to change ion-label color inside an ion-item with ion-input when focused. I am able to change the highlight color of ion-item using --highlight-color-focused: yellow; but unable to change the label color. It is showing default color of label as primary but I want to change it as 'warning' or if required any custom color. I've tried the following solution which is mentioned in Ionic github repository for same problem but didn't get my problem solved. https://github.com/ionic-team/ionic

ionic 4 change ion label color when focused within ion item

故事扮演 提交于 2020-04-18 12:35:20
问题 I want to change ion-label color inside an ion-item with ion-input when focused. I am able to change the highlight color of ion-item using --highlight-color-focused: yellow; but unable to change the label color. It is showing default color of label as primary but I want to change it as 'warning' or if required any custom color. I've tried the following solution which is mentioned in Ionic github repository for same problem but didn't get my problem solved. https://github.com/ionic-team/ionic

Bootstrap 4 drop-down menu in table

孤街醉人 提交于 2020-04-16 05:32:31
问题 I have some trouble with a drop-down menu (Bootstrap 4). So I have a table: When I'm clicking on settings in first row I have a drop-down: But when I'm clicking on settings in second row, I have a drop-down in same place as the first. How I can solve it? Here is a codepen same troubles there: CodePen HTML: <div class="table-responsive"> <table class="table table-hover table-sm"> <thead> <tr> <th>Фио сотрудника</th> <th>Должность</th> <th>Телефон</th> <th>Ломбард</th> <th>Профиль доступа</th>

How to set different width for different form in mat-horizontal-stepper

本秂侑毒 提交于 2020-04-16 03:09:06
问题 I want to set different width for different form in mat-step.The content in first form to be as width of 400px and the second form content to be as width of 700px. <mat-horizontal-stepper labelPosition="bottom" #stepper> <mat-step [stepControl]="firstFormGroup"> <form [formGroup]="firstFormGroup"> <ng-template matStepLabel>Fill out your name</ng-template> <div style="width:400px"> <mat-form-field> <input matInput placeholder="Last name, First name" formControlName="firstCtrl" required> </mat

How to set different width for different form in mat-horizontal-stepper

房东的猫 提交于 2020-04-16 03:08:53
问题 I want to set different width for different form in mat-step.The content in first form to be as width of 400px and the second form content to be as width of 700px. <mat-horizontal-stepper labelPosition="bottom" #stepper> <mat-step [stepControl]="firstFormGroup"> <form [formGroup]="firstFormGroup"> <ng-template matStepLabel>Fill out your name</ng-template> <div style="width:400px"> <mat-form-field> <input matInput placeholder="Last name, First name" formControlName="firstCtrl" required> </mat

Is there a commonly supported way to make a skewed “frosted glass” effect in CSS/SVG?

三世轮回 提交于 2020-04-12 20:19:13
问题 I'm looking to make a website splash page. The page will have one background that will be cut off on the left side with a slanted div, say at a constant 110 degrees from the horizontal (or equivalent, keep reading). This div will blur the background behind it and will allow for content to be put on it, like text. See the YouTube Brand Resources page: instead of having a plain white background on the left, I would like that to blur the background picture that sits underneath it. I've not yet