上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 86 下一页
摘要: 一、条件渲染 1. v-if 通过表达式的真假来控制此标签是否显示 <div id="vm"> <!--awesome为真时显示此句--> <h1 v-if="awesome">Vue is awesome!</h1> <!--awesome为假时显示此句--> <h1 v-else>Oh no � 阅读全文
posted @ 2021-06-16 10:57 富坚老贼 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 由于Class和Style绑定使用频繁,字符串拼接麻烦且易错。因此,Vue.js 做了专门的增强。表达式结果的类型除了字符串之外,还可以是对象或数组 一、Class isActive,isLine是bool值,用来控制该类是否有此名称 运行 (2)绑定类和非绑定类可以同时使用 (3)也可以把所有属性 阅读全文
posted @ 2021-06-16 09:32 富坚老贼 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 一、计算属性 1.计算属性 计算方式不能复用,且不好维护 <div id="example"> {{ message.split('').reverse().join('') }} </div> 计算方式比较复杂或者重复使用时可以用计算属性 <div id="vm"> <div id="exampl 阅读全文
posted @ 2021-06-15 15:46 富坚老贼 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 一、插值 1.Mustache 语法 html <span>Message: {{ msg }}</span> js <div id="vm">{{ msg }}</div> <script> Vue.createApp({ data(){ return { msg:'hello' } } }).m 阅读全文
posted @ 2021-06-15 13:54 富坚老贼 阅读(341) 评论(0) 推荐(0) 编辑
摘要: <script src="../node_modules/axios/dist/axios.js"></script> <script> //配置 const instance = axios.create({ //设置根路径 baseURL: 'http://localhost:5000/Test 阅读全文
posted @ 2021-06-14 15:54 富坚老贼 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 引入 <script src="https://unpkg.com/axios/dist/axios.min.js"></script> get请求 //默认请求为get axios('http://localhost:5000/Test/g1') .then(function (response) 阅读全文
posted @ 2021-06-14 15:46 富坚老贼 阅读(829) 评论(0) 推荐(0) 编辑
摘要: 配置 <script src="../node_modules/axios/dist/axios.js"></script> <script> //配置 const instance = axios.create({ //设置根路径 baseURL: 'http://localhost:5000/T 阅读全文
posted @ 2021-06-14 15:45 富坚老贼 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-06-14 15:44 富坚老贼 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 导入 下载或引入 jquery https://code.jquery.com/ <script src="https://code.jquery.com/jquery-3.6.0.min.js"</script> 使用 jquery ajax ajax是异步js和xml的意思 Get请求 语法 / 阅读全文
posted @ 2021-06-14 15:37 富坚老贼 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 声明式渲染 类似C#里的 $'' 字符串插值 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name 阅读全文
posted @ 2021-06-13 09:12 富坚老贼 阅读(31) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 86 下一页