上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页
摘要: 最近做了一个项目用到了数组的计算属性,这里记录一下 1、将数组中的string,转换为float类型 data = ['1.0', '2.1', '3.9'] map(float, data) 返回值: Python 2.x 返回列表。 Python 3.x 返回迭代器。 所以在python 3.x 阅读全文
posted @ 2020-09-22 14:15 yingzi__block 阅读(5043) 评论(0) 推荐(0) 编辑
摘要: 场景 使用了第三方的组件UI,在调用事件时想要获取事件的默认值及默认值之外的其他参数值,如:index 代码如下: <div style="display: flex; padding-top: 20px;" v-for="(date, index) in dynamicFormData.dates 阅读全文
posted @ 2020-08-07 11:08 yingzi__block 阅读(847) 评论(0) 推荐(0) 编辑
摘要: 问题:前端打包之后,文本多行显示省略号的关键css语句 -webkit-box-orient: vertical;属性丢失,导致样式不生效。 ####解决方案: 1、添加注释 在网上找了一种方案,把autoprefixer关掉 .bk-table .cell { /* autoprefixer: o 阅读全文
posted @ 2020-07-01 16:01 yingzi__block 阅读(842) 评论(0) 推荐(0) 编辑
摘要: 一、使用router-link <router-link :to="{path:'/test',query: {userid: id}}">跳转</router-link> 使用query传递参数,路由必须使用path引入; 使用params传递参数,路由必须使用name引入 取值方式:this.$ 阅读全文
posted @ 2020-06-30 17:08 yingzi__block 阅读(1225) 评论(0) 推荐(0) 编辑
摘要: 最近进行前端开发时使用到了filter()、forEach()、map()方法,这里介绍一下它们的大致用法: 1、filter()是通过删选oldArray,来生产newArray的方法 语法: array.filter(function(value, index, arr),thisValue) 阅读全文
posted @ 2020-05-29 17:36 yingzi__block 阅读(921) 评论(0) 推荐(0) 编辑
摘要: 最近在开发中用到了发送邮件的功能,邮件内容要求是html,所以就用到了mako的模版功能。 mako模版可以让我们在后端进行html的数据填充,从而获取html文件 使用方法: 1、pip安装Mako pip install Mako 2、设置发送邮件的模版 <div style="margin:0 阅读全文
posted @ 2020-05-27 15:56 yingzi__block 阅读(1030) 评论(0) 推荐(0) 编辑
摘要: 最近开发python项目时该用python3.6版本,在开发中遇到了一些问题,在这里记录一下。 一、python3虚拟环境的创建 电脑上有python2.7和python3.6两个python环境,默认为python2.7。所以在使用python3.6进行开发时,在创建虚拟环境时就需要指定pytho 阅读全文
posted @ 2020-04-27 10:10 yingzi__block 阅读(2459) 评论(0) 推荐(0) 编辑
摘要: 开发中经常会遇到一些数据在程序的运行时就要在数据库中存在,所以就需要做数据的初始化。这里简单分享两种Django的数据初始化方法。 背景:项目app:role有两个mode: RoleType和UserRole,modol中已经写好了初始化方法: 和`init_builtin_user_roles( 阅读全文
posted @ 2020-04-09 17:49 yingzi__block 阅读(4759) 评论(0) 推荐(1) 编辑
摘要: 背景 Django项目运行celery定时任务celery beat时,报错如下: 排查 经过排查,发现celerybeat运行时,会自动创建一个pidfile文件,默认为celerybeat.pid,存放在项目根目录下: 正常情况下:celerybeat停止运行时,celerybeat.pid文件 阅读全文
posted @ 2020-04-01 09:49 yingzi__block 阅读(403) 评论(1) 推荐(0) 编辑
摘要: 单元测试框架unittest unittest是python自带的一个单元测试框架,无需安装,使用简单方便。 unittest中最核心的部分是:TestFixture、TestCase、TestSuite、TestRunner unittest case的运行流程: 1. 写好一个完整的TestCa 阅读全文
posted @ 2020-03-27 14:43 yingzi__block 阅读(906) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页