### key值
### commit()方法没有返回值
### let obj1={...obj}
### splice()的用途
### vue中常用的ui框架
### mint-ui的使用
import Vue from 'vue'; import Mint from 'mint-ui'; import "mint-ui/lib/style.min.css"; Vue.use(Mint);
<h1>css组件</h1> <h3>样式</h3> <mt-button type="default">default</mt-button> <mt-button type="primary">primary</mt-button> <mt-button type="danger">danger</mt-button> <h3>尺寸</h3> <mt-button size="small">small</mt-button> <mt-button size="large">large</mt-button> <mt-button size="normal">normal</mt-button> <mt-button disabled>disabled</mt-button> <mt-button plain>plain</mt-button> <h3>icon</h3> <mt-button icon="back">back</mt-button> <mt-button icon="more">more</mt-button> <h3>自定义icon</h3> <mt-button> <img src="../public/img/01.jpg" height="20" width="20" slot="icon"> icon </mt-button> <h1>js组件</h1> <button @click="toast">toast</button>
import {Toast} from 'mint-ui'; Toast({ message:"点击我了,操作成功", // 信息 position:"center", // 位置 duration:3000 // 持续时间 });
### mint-ui按需加载-借助babel-plugin-component插件
{ "plugins": [ [ "component", { "libraryName": "mint-ui", "style": true } ] ] }
import "mint-ui/lib/style.min.css"; import {Button,Header} from 'mint-ui'; Vue.component('my-btn', Button); Vue.component(Header.name,Header);
<mt-header title="fixed top"></mt-header> <my-btn type="default">default</my-btn> <my-btn type="primary">primary</my-btn> <my-btn type="danger">danger</my-btn>
### vant的使用-有赞
plugins: [ ['import', { libraryName: 'vant', libraryDirectory: 'es', style: true }, 'vant'] ]
import Vue from "vue"; import { Button } from 'vant'; Vue.use(Button);// 自动按需引入插件已经帮我们注册好了
<van-button type="default">默认按钮</van-button> <van-button type="primary">主要按钮</van-button> <van-button type="info">信息按钮</van-button> <van-button type="warning">警告按钮</van-button> <van-button type="danger">危险按钮</van-button>
import Vue from "vue"; import { Button,Icon } from 'vant'; Vue.use(Button); Vue.use(Icon);
<van-icon name="success" dot /> <van-icon name="eye-o" info="9" /> <van-icon name="chat-o" info="99+" />
### cube的使用-滴滴
<cube-button>Button</cube-button> <cube-button type="submit">Submit Button</cube-button>
### element-ui的使用
[ "component", { "libraryName": "element-ui", "styleLibraryName": "theme-chalk" } ]