-
使用ESlint格式化代码
作者: 陆金龙 发表时间: 2022-01-21 04:14关键词:options.parse is not a function at ESLintPluginESLint简介 ESLint是可组装的JavaScript和JSX检查工具。能保证写出语法正确、风格统一的代码。 ESLint安装 安装 eslint :npm install -D eslint 设置一个配置文件:npx eslint --init 可以选择 Use a popular style guide ,用一个流行的规则 Airbnb ! ESLint配置 1.安装WebStorm 2022.2 之前使用WebStorm2019的版本,eslint版本... -
:nth-child(n) 选择器的坑
作者: 陆金龙 发表时间: 2022-01-21 02:11关键词::nth-child(n)css匹配选择第n个子元素可以使用:nth-child(n) 选择器。 其匹配属于其父元素的第N个子元素,不论元素的类型。 其逻辑是先找到:nth-child(n)前元素的父元素,再找父元素的第n个子元素。 举例: 页面有以下html标签: <div class="parent"> <div class="other">other1</div> <div class="other">other2</div> <div class="one-third">o... -
手机浏览器上ckeditor失效
作者: 陆金龙 发表时间: 2019-07-14 21:36关键词:不支持iframe安卓下不支持iframe,ckeditor是采用iframe方式来加载新内容进行渲染的。 所以在手机上千万别用ckeditor -
手机网页Session失效问题
作者: 陆金龙 发表时间: 2019-07-14 21:34关键词:设置允许cookie因为有不少手机不支持cookie。 而sessionid默认是通过cookie来存储和传递的。 所以会出现收集不支持session的情况。 -
重装angular-cli(ng serve 找不到ng)
作者: 陆金龙 发表时间: 2018-11-07 15:20ng serve 找不到ng ng不是内部支持的程序,先卸载然后按如下方式重装。 彻底卸载: npm uninstall -g angular-cli npm uninstall -g @angular/cli npm cache verify Delete the C:\Users\YOU\AppData\Roaming\npm\node_modules\@angular folder. npm uninstall angular-devkit/build-angular npm uninst... -
Android 引用第三方so文件加载报错
作者: 陆金龙 发表时间: 2018-10-02 11:30问题分析 不同CPU架构的Android手机加载时会在libs下找自己对应的目录,从对应的目录下寻找需要的.so文件;如果没有对应的目录,就会去armeabi下去寻找。 如果已经有对应的目录,但是如果没有找到对应的.so文件,也不会去armeabi下去寻找了。 所以需要注意工程配置哪几个so文件目录,需要加载对应的so文件,不然会报错。 如果配置了 ndk { abiFilters "armeabi", "arme... -
fitsSystemWindows属性解析
作者: 陆金龙 发表时间: 2018-10-02 11:00属性说明 fitsSystemWindows属性可以让view根据系统窗口来调整自己的布局;系统窗口包括系统状态栏、导航栏、输入法等,包括一些手机系统带有的底部虚拟按键。 android:fitsSystemWindows=”true” 会触发View的padding属性来给系统窗口留出空间,设置为false时可能出现Toolbar与状态栏重叠的情况。 这个属性可以给任何view设置,只要设置了这个属性,此view的其他所有padding属性失效。 fitsSystemWindows属性的生效条件是设置了透明状态栏(StatusBar)或... -
防止Adapter线程异常
作者: 陆金龙 发表时间: 2018-10-02 10:50报错信息 the content of the adapter has changed but Listview did not receive a notification. Make sure the content of the adapter is not modified from a background thread,but only from the UI thread. Make sure your adapter calls notifyDatachanged() when its content changes. 解决方法 1.Ada...