上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Vue 测试实例</title> <script src="https://unpkg.com/vue@next"></script> </head> <body> <div 阅读全文
posted @ 2022-04-28 08:57 wjxuriel 阅读(48) 评论(0) 推荐(0)
摘要: 在自定义组件上,你可以像在任何普通元素上一样使用 v-for: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" 阅读全文
posted @ 2022-04-28 08:46 wjxuriel 阅读(187) 评论(0) 推荐(0)
摘要: cock = 3 hen = 1 chick = 1 / 3 money = 100 for cock in range(101): for hen in range(101): for chick in range(101): if cock + hen + chick*3 == 100 and 阅读全文
posted @ 2022-04-27 17:35 wjxuriel 阅读(376) 评论(0) 推荐(0)
摘要: n = eval(input("enter a num:")) for i in range(1, n+1): for j in range(n-i+1): print(" ", end="") for j2 in range(1, 2*i-1+1): print("*", end="") prin 阅读全文
posted @ 2022-04-27 17:07 wjxuriel 阅读(145) 评论(0) 推荐(0)
摘要: for i in range(1, 10): for j in range(1, i+1): print("{}*{}={}".format(i, j, i*j),end="\t") print() Result: 1*1=1 2*1=2 2*2=4 3*1=3 3*2=6 3*3=9 4*1=4 阅读全文
posted @ 2022-04-27 16:49 wjxuriel 阅读(101) 评论(0) 推荐(0)
摘要: 以上实例联合使用 v-for/v-if 给 select 设置默认值: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=ed 阅读全文
posted @ 2022-04-27 15:26 wjxuriel 阅读(113) 评论(0) 推荐(0)
摘要: 我们可以对数组的元素进行处理后再显示出来,一般可以通过创建一个计算属性,来返回过滤或排序后的数组。 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" 阅读全文
posted @ 2022-04-27 15:10 wjxuriel 阅读(36) 评论(0) 推荐(0)
摘要: v-for 迭代整数 v-for 也可以循环整数 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <met 阅读全文
posted @ 2022-04-27 15:02 wjxuriel 阅读(133) 评论(0) 推荐(0)
摘要: 你也可以提供第二个的参数为键名: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name=" 阅读全文
posted @ 2022-04-27 14:57 wjxuriel 阅读(23) 评论(0) 推荐(0)
摘要: v-for 迭代对象 v-for 可以通过一个对象的属性来迭代数据: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edg 阅读全文
posted @ 2022-04-27 14:55 wjxuriel 阅读(22) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 下一页