摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content 阅读全文
posted @ 2022-04-28 16:09 wjxuriel 阅读(30) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content 阅读全文
posted @ 2022-04-28 16:00 wjxuriel 阅读(192) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content 阅读全文
posted @ 2022-04-28 15:56 wjxuriel 阅读(419) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content 阅读全文
posted @ 2022-04-28 15:47 wjxuriel 阅读(161) 评论(0) 推荐(0)
摘要: computed 属性默认只有 getter ,不过在需要时你也可以提供一个 setter : <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Vue 测试实例</title> <script src="https://un 阅读全文
posted @ 2022-04-28 15:32 wjxuriel 阅读(36) 评论(0) 推荐(0)
摘要: 计算属性关键词: computed。 计算属性在处理一些复杂逻辑时是很有用的 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE 阅读全文
posted @ 2022-04-28 15:21 wjxuriel 阅读(269) 评论(0) 推荐(0)
摘要: 类似于用 v-bind 绑定 HTML 特性到一个表达式,也可以用 v-bind 动态绑定 props 的值到父组件的数据中。每当父组件的数据变化时,该变化也会传导给子组件: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title> 阅读全文
posted @ 2022-04-28 15:05 wjxuriel 阅读(51) 评论(0) 推荐(0)
摘要: prop 是子组件用来接受父组件传递过来的数据的一个自定义属性。 父组件的数据需要通过 props 把数据传给子组件,子组件需要显式地用 props 选项声明 "prop": <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title> 阅读全文
posted @ 2022-04-28 09:38 wjxuriel 阅读(390) 评论(0) 推荐(0)
摘要: <!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 09:34 wjxuriel 阅读(14) 评论(0) 推荐(0)
摘要: <!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 09:08 wjxuriel 阅读(95) 评论(0) 推荐(0)
摘要: <!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 阅读(41) 评论(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 阅读(183) 评论(0) 推荐(0)