Vue todos示例 在class中的应用表达式

  作者: thtomatic  分类: Vue   评论: [ 0 ] 条  浏览: [ 596 ] 次

本篇博客用到了v-if,v-on,v-for三个没有写到的知识点,以后会详细写三篇博客,详细写这三个方法的用处

直接上代码:

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue.js 使用数组和对...

阅读全文>>


Vue 使用数组和对象控制Class

  作者: thtomatic  分类: Vue   评论: [ 0 ] 条  浏览: [ 974 ] 次

直接上代码:

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue.js 使用数组和对象控制Class </title>
    <script src="vue.js">&l...

阅读全文>>


Vue 使用lodash库减少watch对后台请求压力

  作者: thtomatic  分类: Vue   评论: [ 0 ] 条  浏览: [ 820 ] 次

watch的使用方法可以看我上一篇的博客<<vue 使用watch监听实现类似百度搜索功能>>

lodash需要新引入

我使用的是npm方式

使用lodash的_.debounce方法

阅读全文>>


vue 使用watch监听实现类似百度搜索功能

  作者: thtomatic  分类: Vue   评论: [ 0 ] 条  浏览: [ 765 ] 次

watch监听方法,watch可以监听多个变量,具体使用方法看代码:

HTML:


<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue.js 使用watch监听实现类似百度搜索功能  </ti...

阅读全文>>


Vue 使用comouted计算属性

  作者: thtomatic  分类: Vue   评论: [ 0 ] 条  浏览: [ 1198 ] 次

computed计算属性

使用方法见代码:

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue.js 使用comouted计算属性 </title>
    <script s...

阅读全文>>


vue 使用JavaScript表达式

  作者: thtomatic  分类: Vue   评论: [ 0 ] 条  浏览: [ 601 ] 次

vue使用JavaScript的运算方式

代码如下:

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue.js 使用 v-text 和 v-html </title>
    <...

阅读全文>>


vue.js 使用 v-text 和 v-html

  作者: thtomatic  分类: Vue   评论: [ 0 ] 条  浏览: [ 651 ] 次

v-text:转义输出

v-html:不转义输出


值得一说的是 如果直接使用{{html}}的话会直接转义


看代码:


<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue.js 使用...


阅读全文>>


vue.js 使用v-model v-once

  作者: thtomatic  分类: Vue   评论: [ 0 ] 条  浏览: [ 733 ] 次

v-model 双向绑定

v-once 单项绑定

代码:


<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue.js 使用v-model v-once</title>
    <script ...


阅读全文>>


vue.js操作元素属性

  作者: thtomatic  分类: Vue   评论: [ 0 ] 条  浏览: [ 625 ] 次

vue动态操作div的class

看代码:

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue.js操作元素属性</title>
    <script src="vue.j...

阅读全文>>


Vue.js 创建第一个应用

  作者: thtomatic  分类: Vue   评论: [ 0 ] 条  浏览: [ 649 ] 次

VUE官网下载Vue.js文件或者用Vue的CDN地址

在项目中引入Vue.js文件


阅读全文>>


    21.37ms