摘要:
<style> [v-cloak]{ display: none; } </style> <body> <div id="app"> <h1 v-cloak>{{ msg }}</h1> </div> 过程: 1 通过 CSS样式将 带有 v-cloak 属性的元素隐藏 2 这样,我们就无法看到 { 阅读全文
摘要:
swiper在vue里的用法 首先通过npm i vue-awesome-swiper --save 来在vue中下载插件 然后再main.js中引入 require('swiper/dist/css/swiper.css')import VueAwesomeSwiper from 'vue-awe 阅读全文
摘要:
// 添加 .self 修饰符后,只有点击绑定事件元素本身才会触发这个事件,点击子元素是不回触发这个事件的 <div class="dv" @click.self="handleClick"> <button>按钮</button> </div> // 添加 .self 修饰符后,只有点击绑定事件元 阅读全文
摘要:
1: <style> .green{background-color:black} .size{fount-size:18px} </style> 2: <body> <div id="app"> <div :class="cls">天上的星</div> <div :class="{ green: 阅读全文
摘要:
// 数组 var trees = new Array("redwood", "bay", "cedar", "oak", "maple"); 0 in trees // 返回true 3 in trees // 返回true 6 in trees // 返回false "bay" in trees 阅读全文