2016-09-09 14:29:19 +08:00
|
|
|
<template>
|
|
|
|
<div>
|
2016-11-02 10:21:52 +08:00
|
|
|
<Radio-group :model.sync="phone">
|
|
|
|
<Radio value="apple">
|
|
|
|
<Icon type="social-apple"></Icon>
|
|
|
|
<span>Apple</span>
|
|
|
|
</Radio>
|
|
|
|
<Radio value="android" disabled>
|
|
|
|
<Icon type="social-android"></Icon>
|
|
|
|
<span>Android</span>
|
|
|
|
</Radio>
|
|
|
|
<Radio value="windows">
|
|
|
|
<Icon type="social-windows"></Icon>
|
|
|
|
<span>Windows</span>
|
|
|
|
</Radio>
|
|
|
|
</Radio-group>
|
|
|
|
<Radio-group :model.sync="animal">
|
|
|
|
<Radio value="金斑蝶"></Radio>
|
|
|
|
<Radio value="爪哇犀牛"></Radio>
|
|
|
|
<Radio value="印度黑羚"></Radio>
|
|
|
|
</Radio-group>
|
|
|
|
<br><br>
|
2016-09-13 07:56:38 +08:00
|
|
|
<Button @click="activeKey = '2'">换</Button>
|
2016-09-09 14:29:19 +08:00
|
|
|
</div>
|
2016-09-20 20:46:27 +08:00
|
|
|
<Radio :checked.sync="radio">Radio</Radio>
|
|
|
|
<Button @click="radio = !radio">change radio</Button>
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<Radio-group :model.sync="phone" type="button">
|
|
|
|
<Radio value="apple">
|
|
|
|
<Icon type="social-apple"></Icon>
|
|
|
|
<span>Apple</span>
|
|
|
|
</Radio>
|
|
|
|
<Radio value="android">
|
|
|
|
<Icon type="social-android"></Icon>
|
|
|
|
<span>Android</span>
|
|
|
|
</Radio>
|
|
|
|
<Radio value="windows">
|
|
|
|
<Icon type="social-windows"></Icon>
|
|
|
|
<span>Windows</span>
|
|
|
|
</Radio>
|
|
|
|
</Radio-group>
|
|
|
|
<Radio-group :model.sync="animal" type="button">
|
|
|
|
<Radio value="金斑蝶"></Radio>
|
|
|
|
<Radio value="爪哇犀牛"></Radio>
|
|
|
|
<Radio value="印度黑羚"></Radio>
|
|
|
|
</Radio-group>
|
|
|
|
|
|
|
|
<Radio-group :model.sync="animal" type="button">
|
|
|
|
<Radio value="金斑蝶" disabled></Radio>
|
|
|
|
<Radio value="爪哇犀牛" disabled></Radio>
|
|
|
|
<Radio value="印度黑羚"></Radio>
|
|
|
|
</Radio-group>
|
|
|
|
<br><br>
|
|
|
|
<Radio-group :model.sync="animal" type="button" size="large">
|
|
|
|
<Radio value="金斑蝶"></Radio>
|
|
|
|
<Radio value="爪哇犀牛"></Radio>
|
|
|
|
<Radio value="印度黑羚"></Radio>
|
|
|
|
</Radio-group>
|
|
|
|
<Radio-group :model.sync="animal" type="button">
|
|
|
|
<Radio value="金斑蝶"></Radio>
|
|
|
|
<Radio value="爪哇犀牛"></Radio>
|
|
|
|
<Radio value="印度黑羚"></Radio>
|
|
|
|
</Radio-group>
|
|
|
|
<Radio-group :model.sync="animal" type="button" size="small">
|
|
|
|
<Radio value="金斑蝶"></Radio>
|
|
|
|
<Radio value="爪哇犀牛"></Radio>
|
|
|
|
<Radio value="印度黑羚"></Radio>
|
|
|
|
</Radio-group>
|
2016-09-20 22:00:16 +08:00
|
|
|
<br><br><br><br>
|
|
|
|
<Checkbox :checked.sync="radio">Checkbox</Checkbox>
|
|
|
|
<br><br>
|
|
|
|
<Checkbox-group :model="social">
|
|
|
|
<Checkbox value="twitter">
|
|
|
|
<Icon type="social-twitter"></Icon>
|
|
|
|
<span>Twitter</span>
|
|
|
|
</Checkbox>
|
|
|
|
<Checkbox value="facebook">
|
|
|
|
<Icon type="social-facebook"></Icon>
|
|
|
|
<span>Facebook</span>
|
|
|
|
</Checkbox>
|
|
|
|
<Checkbox value="github">
|
|
|
|
<Icon type="social-github"></Icon>
|
|
|
|
<span>Github</span>
|
|
|
|
</Checkbox>
|
|
|
|
<Checkbox value="snapchat">
|
|
|
|
<Icon type="social-snapchat"></Icon>
|
|
|
|
<span>Snapchat</span>
|
|
|
|
</Checkbox>
|
|
|
|
</Checkbox-group>
|
|
|
|
<br><br>
|
|
|
|
<Checkbox :checked.sync="disabledSingle" disabled>Checkbox</Checkbox>
|
|
|
|
<Checkbox-group :model="disabledGroup">
|
|
|
|
<Checkbox value="香蕉" disabled></Checkbox>
|
|
|
|
<Checkbox value="苹果" disabled></Checkbox>
|
|
|
|
<Checkbox value="西瓜"></Checkbox>
|
|
|
|
</Checkbox-group>
|
2016-09-21 14:59:57 +08:00
|
|
|
<br><br>
|
|
|
|
<Switch @on-change="change"></Switch>
|
|
|
|
<br><br>
|
|
|
|
<Switch>
|
|
|
|
<span slot="open">开</span>
|
|
|
|
<span slot="close">关</span>
|
|
|
|
</Switch>
|
|
|
|
<br><br>
|
|
|
|
<Switch>
|
|
|
|
<Icon type="android-done" slot="open"></Icon>
|
|
|
|
<Icon type="android-close" slot="close"></Icon>
|
|
|
|
</Switch>
|
|
|
|
<Switch disabled></Switch>
|
|
|
|
<Switch size="small"></Switch>
|
2016-09-21 16:59:19 +08:00
|
|
|
<br><br>
|
|
|
|
<Input-number :max="10" :min="1" :step="1.2" :value="1"></Input-number>
|
|
|
|
<Input-number :value="2" size="small"></Input-number>
|
|
|
|
<Input-number :value="2"></Input-number>
|
|
|
|
<Input-number :value="2" size="large"></Input-number>
|
2016-09-21 18:16:37 +08:00
|
|
|
<br><br>
|
|
|
|
<Breadcrumb>
|
|
|
|
<Breadcrumb-item href="/">Home</Breadcrumb-item>
|
|
|
|
<Breadcrumb-item href="/components/breadcrumb">Components</Breadcrumb-item>
|
|
|
|
<Breadcrumb-item>Breadcrumb</Breadcrumb-item>
|
|
|
|
</Breadcrumb>
|
|
|
|
<Breadcrumb>
|
|
|
|
<Breadcrumb-item href="/">
|
|
|
|
<Icon type="ios-home-outline"></Icon> Home
|
|
|
|
</Breadcrumb-item>
|
|
|
|
<Breadcrumb-item href="/components/breadcrumb">
|
|
|
|
<Icon type="social-buffer-outline"></Icon> Components
|
|
|
|
</Breadcrumb-item>
|
|
|
|
<Breadcrumb-item>
|
|
|
|
<Icon type="pound"></Icon> Breadcrumb
|
|
|
|
</Breadcrumb-item>
|
|
|
|
</Breadcrumb>
|
|
|
|
<Breadcrumb separator=">">
|
|
|
|
<Breadcrumb-item href="/">Home</Breadcrumb-item>
|
|
|
|
<Breadcrumb-item href="/components/breadcrumb">Components</Breadcrumb-item>
|
|
|
|
<Breadcrumb-item>Breadcrumb</Breadcrumb-item>
|
|
|
|
</Breadcrumb>
|
|
|
|
<Breadcrumb separator="<b class='demo-breadcrumb-separator'>=></b>">
|
|
|
|
<Breadcrumb-item href="/">Home</Breadcrumb-item>
|
|
|
|
<Breadcrumb-item href="/components/breadcrumb">Components</Breadcrumb-item>
|
|
|
|
<Breadcrumb-item>Breadcrumb</Breadcrumb-item>
|
|
|
|
</Breadcrumb>
|
2016-09-09 14:29:19 +08:00
|
|
|
</template>
|
|
|
|
<script>
|
2016-09-22 13:42:59 +08:00
|
|
|
import { Radio, Alert, Icon, Collapse, Button, Checkbox, Switch, InputNumber, Breadcrumb, LoadingBar } from 'iview';
|
2016-09-09 14:29:19 +08:00
|
|
|
|
|
|
|
const RadioGroup = Radio.Group;
|
2016-09-13 07:56:38 +08:00
|
|
|
const Panel = Collapse.Panel;
|
2016-09-20 22:00:16 +08:00
|
|
|
const CheckboxGroup = Checkbox.Group;
|
2016-09-21 18:16:37 +08:00
|
|
|
const BreadcrumbItem = Breadcrumb.Item;
|
2016-09-09 14:29:19 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Radio,
|
2016-09-12 11:59:15 +08:00
|
|
|
RadioGroup,
|
|
|
|
Alert,
|
2016-09-13 07:56:38 +08:00
|
|
|
Icon,
|
|
|
|
Collapse,
|
|
|
|
Panel,
|
2016-09-20 22:00:16 +08:00
|
|
|
Button,
|
|
|
|
Checkbox,
|
2016-09-21 14:59:57 +08:00
|
|
|
CheckboxGroup,
|
2016-09-21 16:59:19 +08:00
|
|
|
Switch,
|
2016-09-21 18:16:37 +08:00
|
|
|
InputNumber,
|
|
|
|
Breadcrumb,
|
2016-09-22 13:42:59 +08:00
|
|
|
BreadcrumbItem,
|
|
|
|
LoadingBar
|
2016-09-09 14:29:19 +08:00
|
|
|
},
|
|
|
|
props: {
|
2016-11-02 10:21:52 +08:00
|
|
|
|
2016-09-09 14:29:19 +08:00
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
2016-09-20 20:46:27 +08:00
|
|
|
radio: false,
|
2016-09-13 07:56:38 +08:00
|
|
|
radioGroup: '段模',
|
2016-09-20 20:46:27 +08:00
|
|
|
activeKey: [1,2],
|
|
|
|
phone: 'apple',
|
2016-09-20 22:00:16 +08:00
|
|
|
animal: '爪哇犀牛',
|
|
|
|
social: ['facebook', 'github'],
|
|
|
|
disabledSingle: true,
|
|
|
|
disabledGroup: ['苹果']
|
2016-09-09 14:29:19 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
2016-11-02 10:21:52 +08:00
|
|
|
|
2016-09-09 14:29:19 +08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
changeGroup (data) {
|
|
|
|
console.log(data);
|
2016-09-12 11:59:15 +08:00
|
|
|
},
|
|
|
|
closed (data) {
|
|
|
|
console.log(data)
|
2016-09-21 14:59:57 +08:00
|
|
|
},
|
|
|
|
change (status) {
|
|
|
|
console.log(status);
|
2016-09-09 14:29:19 +08:00
|
|
|
}
|
2016-09-22 13:42:59 +08:00
|
|
|
},
|
|
|
|
ready () {
|
|
|
|
LoadingBar.start();
|
2016-09-09 14:29:19 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|