Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
1722d7d30d
73 changed files with 2234 additions and 843 deletions
38
test/app.vue
38
test/app.vue
|
@ -2,8 +2,46 @@
|
|||
@import "../src/styles/index.less";
|
||||
@import "../src/styles/package.less";
|
||||
</style>
|
||||
<style scoped>
|
||||
nav {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
li + li {
|
||||
border-left: solid 1px #bbb;
|
||||
padding-left: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.v-link-active {
|
||||
color: #bbb;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a v-link="'/button'">Button</a></li>
|
||||
<li><a v-link="'/card'">Card</a></li>
|
||||
<li><a v-link="'/message'">Message</a></li>
|
||||
<li><a v-link="'/more'">More</a></li>
|
||||
<li><a v-link="'/page'">Page</a></li>
|
||||
<li><a v-link="'/poptip'">Poptip</a></li>
|
||||
<li><a v-link="'/tooltip'">Tooltip</a></li>
|
||||
<li><a v-link="'/radio'">Radio</a></li>
|
||||
<li><a v-link="'/select'">Select</a></li>
|
||||
<li><a v-link="'/slider'">Slider</a></li>
|
||||
<li><a v-link="'/step'">Step</a></li>
|
||||
<li><a v-link="'/switch'">Switch</a></li>
|
||||
<li><a v-link="'/alert'">Alert</a></li>
|
||||
<li><a v-link="'/tag'">Tag</a></li>
|
||||
<li><a v-link="'/input'">Input</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
|
57
test/main.js
57
test/main.js
|
@ -16,19 +16,19 @@ var router = new VueRouter({
|
|||
});
|
||||
|
||||
router.map({
|
||||
'/index': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/index.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/button': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/button.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/page': {
|
||||
'/card': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/page.vue'], resolve);
|
||||
require(['./routers/card.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/message': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/message.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/more': {
|
||||
|
@ -36,9 +36,14 @@ router.map({
|
|||
require(['./routers/more.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/layout': {
|
||||
'/page': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/layout.vue'], resolve);
|
||||
require(['./routers/page.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/poptip': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/poptip.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/radio': {
|
||||
|
@ -46,14 +51,29 @@ router.map({
|
|||
require(['./routers/radio.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/msg': {
|
||||
'/select': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/msg.vue'], resolve);
|
||||
require(['./routers/select.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/notice': {
|
||||
'/slider': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/notice.vue'], resolve);
|
||||
require(['./routers/slider.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/step': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/step.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/switch': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/switch.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/alert': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/alert.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/tag': {
|
||||
|
@ -61,9 +81,14 @@ router.map({
|
|||
require(['./routers/tag.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/select': {
|
||||
'/input': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/select.vue'], resolve);
|
||||
require(['./routers/input.vue'], resolve);
|
||||
}
|
||||
},
|
||||
'/tooltip': {
|
||||
component: function (resolve) {
|
||||
require(['./routers/tooltip.vue'], resolve);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -77,6 +102,6 @@ router.afterEach(function (transition) {
|
|||
});
|
||||
|
||||
router.redirect({
|
||||
'*': "/index"
|
||||
'*': "/button"
|
||||
});
|
||||
router.start(App, '#app');
|
||||
|
|
37
test/routers/alert.vue
Normal file
37
test/routers/alert.vue
Normal file
|
@ -0,0 +1,37 @@
|
|||
<template>
|
||||
<Alert show-icon>消息提示文案</Alert>
|
||||
<Alert type="success" show-icon>成功提示文案</Alert>
|
||||
<Alert type="warning" show-icon>警告提示文案</Alert>
|
||||
<Alert type="error" show-icon>错误提示文案</Alert>
|
||||
<Alert show-icon>
|
||||
消息提示文案
|
||||
<template slot="desc">消息提示的描述文案消息提示的描述文案消息提示的描述文案消息提示的描述文案消息提示的描述文案</template>
|
||||
</Alert>
|
||||
<Alert type="success" show-icon>
|
||||
成功提示文案
|
||||
<span slot="desc">成功的提示描述文案成功的提示描述文案成功的提示描述文案成功的提示描述文案成功的提示描述文案</span>
|
||||
</Alert>
|
||||
<Alert type="warning" show-icon>
|
||||
警告提示文案
|
||||
<template slot="desc">
|
||||
警告的提示描述文案警告的提示描述文案警告的提示描述文案
|
||||
</template>
|
||||
</Alert>
|
||||
<Alert type="error" show-icon>
|
||||
错误提示文案
|
||||
<span slot="desc">
|
||||
自定义错误描述文案。
|
||||
</span>
|
||||
</Alert>
|
||||
<Alert show-icon>
|
||||
自定义图标
|
||||
<Icon type="ios-lightbulb-outline" slot="icon"></Icon>
|
||||
<template slot="desc">自定义图标文案自定义图标文案自定义图标文案自定义图标文案自定义图标文案</template>
|
||||
</Alert>
|
||||
</template>
|
||||
<script>
|
||||
import { Alert, Icon } from 'iview';
|
||||
export default {
|
||||
components: { Alert, Icon }
|
||||
}
|
||||
</script>
|
|
@ -1,7 +1,101 @@
|
|||
<template>
|
||||
<h4>基本</h4>
|
||||
<br><br>
|
||||
<Button-group>
|
||||
<i-button>取消</i-button>
|
||||
<i-button type="primary">确定</i-button>
|
||||
</Button-group>
|
||||
<Button-group>
|
||||
<i-button disabled>昨日</i-button>
|
||||
<i-button disabled>今日</i-button>
|
||||
<i-button disabled>明日</i-button>
|
||||
</Button-group>
|
||||
<Button-group>
|
||||
<i-button type="primary">L</i-button>
|
||||
<i-button>M</i-button>
|
||||
<i-button type="ghost">M</i-button>
|
||||
<i-button type="dashed">R</i-button>
|
||||
</Button-group>
|
||||
<br><br>
|
||||
<h4>配合图标</h4>
|
||||
<br><br>
|
||||
<Button-group>
|
||||
<i-button type="primary">
|
||||
<Icon type="chevron-left"></Icon>
|
||||
前进
|
||||
</i-button>
|
||||
<i-button type="primary">
|
||||
后退
|
||||
<Icon type="chevron-right"></Icon>
|
||||
</i-button>
|
||||
</Button-group>
|
||||
<Button-group>
|
||||
<i-button type="primary" icon="ios-skipbackward"></i-button>
|
||||
<i-button type="primary" icon="ios-skipforward"></i-button>
|
||||
</Button-group>
|
||||
<Button-group>
|
||||
<i-button type="ghost" icon="ios-color-wand-outline"></i-button>
|
||||
<i-button type="ghost" icon="ios-sunny-outline"></i-button>
|
||||
<i-button type="ghost" icon="ios-crop"></i-button>
|
||||
<i-button type="ghost" icon="ios-color-filter-outline"></i-button>
|
||||
</Button-group>
|
||||
<br><br>
|
||||
<h4>圆角</h4>
|
||||
<br><br>
|
||||
<Button-group shape="circle">
|
||||
<i-button type="primary">
|
||||
<Icon type="chevron-left"></Icon>
|
||||
前进
|
||||
</i-button>
|
||||
<i-button type="primary">
|
||||
后退
|
||||
<Icon type="chevron-right"></Icon>
|
||||
</i-button>
|
||||
</Button-group>
|
||||
<Button-group shape="circle">
|
||||
<i-button type="primary" icon="ios-skipbackward"></i-button>
|
||||
<i-button type="primary" icon="ios-skipforward"></i-button>
|
||||
</Button-group>
|
||||
<Button-group shape="circle">
|
||||
<i-button type="ghost" icon="ios-color-wand-outline"></i-button>
|
||||
<i-button type="ghost" icon="ios-sunny-outline"></i-button>
|
||||
<i-button type="ghost" icon="ios-crop"></i-button>
|
||||
<i-button type="ghost" icon="ios-color-filter-outline"></i-button>
|
||||
</Button-group>
|
||||
<Button-group shape="circle" size="large">
|
||||
<i-button type="primary" icon="ios-skipbackward"></i-button>
|
||||
<i-button type="primary" icon="ios-skipforward"></i-button>
|
||||
</Button-group>
|
||||
<Button-group shape="circle" size="large">
|
||||
<i-button type="ghost" icon="ios-color-wand-outline"></i-button>
|
||||
<i-button type="ghost" icon="ios-sunny-outline"></i-button>
|
||||
<i-button type="ghost" icon="ios-crop"></i-button>
|
||||
<i-button type="ghost" icon="ios-color-filter-outline"></i-button>
|
||||
</Button-group>
|
||||
<Button-group shape="circle" size="small">
|
||||
<i-button type="primary" icon="ios-skipbackward"></i-button>
|
||||
<i-button type="primary" icon="ios-skipforward"></i-button>
|
||||
</Button-group>
|
||||
<Button-group shape="circle" size="small">
|
||||
<i-button type="ghost" icon="ios-color-wand-outline"></i-button>
|
||||
<i-button type="ghost" icon="ios-sunny-outline"></i-button>
|
||||
<i-button type="ghost" icon="ios-crop"></i-button>
|
||||
<i-button type="ghost" icon="ios-color-filter-outline"></i-button>
|
||||
</Button-group>
|
||||
<br><br>
|
||||
<i-button type="primary" icon="ios-search" shape="circle" size="small"></i-button>
|
||||
<i-button type="primary" icon="ios-search" shape="circle"></i-button>
|
||||
<i-button type="primary" icon="ios-search" shape="circle" size="large"></i-button>
|
||||
<i-button type="primary" icon="ios-search" shape="circle" size="small">搜索</i-button>
|
||||
<i-button type="primary" icon="ios-search" shape="circle">搜索</i-button>
|
||||
<i-button type="primary" icon="ios-search" shape="circle" size="large">搜索</i-button>
|
||||
<br><br>
|
||||
<i-button>Default</i-button>
|
||||
<i-button type="primary">Primary</i-button>
|
||||
<i-button type="ghost">Ghost</i-button>
|
||||
<i-button type="dashed">Dashed</i-button>
|
||||
<i-button type="text">文字按钮</i-button>
|
||||
<i-button type="text" disabled>文字按钮</i-button>
|
||||
<br><br>
|
||||
<i-button type="primary" size="large">Large</i-button>
|
||||
<i-button type="primary">Default</i-button>
|
||||
|
@ -16,6 +110,9 @@
|
|||
<i-button type="ghost">Ghost</i-button>
|
||||
<i-button type="ghost" disabled>Ghost(Disabled)</i-button>
|
||||
<br><br>
|
||||
<i-button type="dashed">dashed</i-button>
|
||||
<i-button type="dashed" disabled>dashed(Disabled)</i-button>
|
||||
<br><br>
|
||||
<i-button type="primary" shape="circle" icon="ios-search"></i-button>
|
||||
<i-button type="primary" icon="ios-search">搜索</i-button>
|
||||
<br><br>
|
||||
|
@ -53,6 +150,7 @@
|
|||
<i-button type="primary">L</i-button>
|
||||
<i-button>M</i-button>
|
||||
<i-button type="ghost">R</i-button>
|
||||
<i-button type="dashed">R</i-button>
|
||||
</Button-group>
|
||||
<h4>配合图标</h4>
|
||||
<Button-group>
|
||||
|
@ -98,7 +196,8 @@
|
|||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
loading2: false
|
||||
loading2: false,
|
||||
model6: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
<style>
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<Page :total="40" size="small"></Page>
|
||||
<Page :total="40" size="small" show-elevator show-sizer></Page>
|
||||
<Page :total="40" size="small" show-total></Page>
|
||||
</template>
|
||||
<script>
|
||||
import { Modal, Button, Message, Page } from 'iview';
|
||||
|
||||
export default {
|
||||
components: { Modal, Button, Page },
|
||||
props: {
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
info () {
|
||||
Modal.info({
|
||||
title: '这是对话框标题',
|
||||
content: `<p>这是对话框内容</p><p>这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容这是对话框内容</p>`
|
||||
});
|
||||
},
|
||||
success () {
|
||||
Modal.success();
|
||||
},
|
||||
warning () {
|
||||
Modal.warning();
|
||||
},
|
||||
error () {
|
||||
Modal.error();
|
||||
},
|
||||
confirm () {
|
||||
Modal.confirm({
|
||||
// okText: 'OK',
|
||||
// cancelText: 'Cancel',
|
||||
title: '删除提示',
|
||||
content: '删除后将不可找回,您确定要删除吗?',
|
||||
onCancel () {
|
||||
Message.info('cancel it');
|
||||
},
|
||||
onOk () {
|
||||
setTimeout(() => {
|
||||
Modal.remove();
|
||||
Message.success('OK!');
|
||||
}, 2000);
|
||||
},
|
||||
loading: true
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
121
test/routers/input.vue
Normal file
121
test/routers/input.vue
Normal file
|
@ -0,0 +1,121 @@
|
|||
<template>
|
||||
<i-input icon="ios-clock-outline" style="width:200px;" :value.sync="v" @on-enter="enter" @on-click="iconclick" size="large" placeholder="请输入"></i-input>
|
||||
<i-input icon="ios-clock-outline" style="width:200px;" :value.sync="v" @on-enter="enter" placeholder="请输入"></i-input>
|
||||
<i-input icon="ios-clock-outline" style="width:200px;" :value.sync="v" @on-enter="enter" size="small" placeholder="请输入"></i-input>
|
||||
<br>
|
||||
<br>
|
||||
<i-input style="width:200px;" :value.sync="v" @on-enter="enter" size="large" placeholder="请输入"></i-input>
|
||||
<i-input style="width:200px;" :value.sync="v" @on-enter="enter" placeholder="请输入"></i-input>
|
||||
<i-input style="width:200px;" :value.sync="v" @on-enter="enter" @on-change="change" size="small" placeholder="请输入"></i-input>
|
||||
{{ v }}
|
||||
<br>
|
||||
<br>
|
||||
<i-input placeholder="this is something" style="width:200px;" :value.sync="t" type="textarea" :autosize="autosize"></i-input>
|
||||
{{ t }}
|
||||
<br>
|
||||
<br>
|
||||
<div style="width: 400px">
|
||||
<i-input :value.sync="v">
|
||||
<span slot="prepend">http://</span>
|
||||
<span slot="append">
|
||||
<i-button icon="ios-search"></i-button>
|
||||
</span>
|
||||
</i-input>
|
||||
<br>
|
||||
<i-input :value.sync="v">
|
||||
<span slot="prepend">http://</span>
|
||||
<span slot="append"><Icon type="ios-search"></Icon></span>
|
||||
</i-input>
|
||||
<br>
|
||||
<i-input :value.sync="v" size="small">
|
||||
<span slot="prepend">http://</span>
|
||||
<span slot="append"><Icon type="ios-search"></Icon></span>
|
||||
</i-input>
|
||||
|
||||
<br>
|
||||
<i-input :value.sync="v" size="large">
|
||||
<i-select :model.sync="select1" slot="prepend" style="width: 80px">
|
||||
<i-option value="http">http://</i-option>
|
||||
<i-option value="https">https://</i-option>
|
||||
</i-select>
|
||||
<i-select :model.sync="select2" slot="append" style="width: 70px">
|
||||
<i-option value="com">.com</i-option>
|
||||
<i-option value="cn">.cn</i-option>
|
||||
<i-option value="net">.net</i-option>
|
||||
<i-option value="io">.io</i-option>
|
||||
</i-select>
|
||||
</i-input>
|
||||
<br>
|
||||
<i-input :value.sync="v">
|
||||
<i-select :model.sync="select1" slot="prepend" style="width: 80px">
|
||||
<i-option value="http">http://</i-option>
|
||||
<i-option value="https">https://</i-option>
|
||||
</i-select>
|
||||
<i-select :model.sync="select2" slot="append" style="width: 70px">
|
||||
<i-option value="com">.com</i-option>
|
||||
<i-option value="cn">.cn</i-option>
|
||||
<i-option value="net">.net</i-option>
|
||||
<i-option value="io">.io</i-option>
|
||||
</i-select>
|
||||
</i-input>
|
||||
<br>
|
||||
<i-input :value.sync="v" size="small">
|
||||
<i-select :model.sync="select1" slot="prepend" style="width: 80px">
|
||||
<i-option value="http">http://</i-option>
|
||||
<i-option value="https">https://</i-option>
|
||||
</i-select>
|
||||
<i-select :model.sync="select2" slot="append" style="width: 70px">
|
||||
<i-option value="com">.com</i-option>
|
||||
<i-option value="cn">.cn</i-option>
|
||||
<i-option value="net">.net</i-option>
|
||||
<i-option value="io">.io</i-option>
|
||||
</i-select>
|
||||
</i-input>
|
||||
<Input-number :value="2" size="small"></Input-number>
|
||||
<Input-number :value="2"></Input-number>
|
||||
<Input-number :value="2" size="large"></Input-number>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { iInput, Icon, iButton, iSelect, iOption, InputNumber } from 'iview';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
iInput,
|
||||
Icon,
|
||||
iButton,
|
||||
iSelect,
|
||||
iOption,
|
||||
InputNumber
|
||||
},
|
||||
props: {
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
v: 'hello',
|
||||
t: '',
|
||||
autosize: {
|
||||
minRows: 2,
|
||||
maxRows: 5
|
||||
},
|
||||
select1: 'http',
|
||||
select2: 'com'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
enter () {
|
||||
console.log(123)
|
||||
},
|
||||
iconclick () {
|
||||
console.log('iconclicked')
|
||||
},
|
||||
change (val) {
|
||||
console.log(val)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
124
test/routers/message.vue
Normal file
124
test/routers/message.vue
Normal file
|
@ -0,0 +1,124 @@
|
|||
<template>
|
||||
<i-button @click="mInfo">m信息</i-button>
|
||||
<i-button @click="open">打开</i-button>
|
||||
<i-button @click="info2">消息2</i-button>
|
||||
<i-button @click="info">消息</i-button>
|
||||
<i-button @click="success">成功</i-button>
|
||||
<i-button @click="warning">警告</i-button>
|
||||
<i-button @click="error">错误</i-button>
|
||||
<i-button @click="modal1 = true"></i-button>
|
||||
<Modal
|
||||
:visible.sync="modal1"
|
||||
title="普通的Modal对话框标题">
|
||||
<p>对话框内容</p>
|
||||
<p>对话框内容</p>
|
||||
<p>对话框内容</p>
|
||||
</Modal>
|
||||
</template>
|
||||
<script>
|
||||
import { Message, Button, Alert, Card, Notice, iButton, Modal } from 'iview';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Message,
|
||||
Button,
|
||||
Alert,
|
||||
Card,
|
||||
Notice,
|
||||
iButton,
|
||||
Modal
|
||||
},
|
||||
props: {
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
modal1: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
Notice.open({
|
||||
duration: 1000,
|
||||
title: '这是通知标题',
|
||||
desc: '这里是通知描述这里,是通知描述这里是通知描述这里,是通知描述这里,是通知描述这里是通知描述这里是通知描述'
|
||||
})
|
||||
},
|
||||
info () {
|
||||
Notice.info({
|
||||
duration: 1000,
|
||||
title: '这是通知标题',
|
||||
// desc: '这里是通知描述这里,是通知描述这里是通知描述这里,是通知描述这里,是通知描述这里是通知描述这里是通知描述'
|
||||
});
|
||||
},
|
||||
info2 () {
|
||||
Notice.open({
|
||||
duration: 1000,
|
||||
title: '这是通知标题这是通知标题这是通知标题这是通知标题这是通知标题这是通知标题'
|
||||
});
|
||||
Notice.info({
|
||||
duration: 1000,
|
||||
title: '这是通知标题这是通知标题这是通知标题这是通知标题这是通知标题这是通知标题'
|
||||
});
|
||||
Notice.open({
|
||||
duration: 1000,
|
||||
title: '这是通知标题这是通知标题这是通知标题这是通知标题这是通知标题这是通知标题',
|
||||
desc: '这里是通知描述这里,是通知描述这里是通知描述这里,是通知描述这里,是通知描述这里是通知描'
|
||||
});
|
||||
Notice.info({
|
||||
duration: 1000,
|
||||
title: '这是通知标题这是通知标题这是通知标题这是通知标题这是通知标题这是通知标题',
|
||||
desc: '这里是通知描述这里,是通知描述这里是通知描述这里,是通知描述这里,是通知描述这里是通知描'
|
||||
});
|
||||
Notice.success({
|
||||
duration: 1000,
|
||||
title: '这是通知标题',
|
||||
desc: '这里是通知描述这里,是通知描述这里是通知描述这里,是通知描述这里,是通知描述这里是通知描'
|
||||
});
|
||||
Notice.warning({
|
||||
duration: 1000,
|
||||
title: '这是通知标题',
|
||||
desc: '这里是通知描述这里,是通知描述这里是通知描述这里,是通知描述这里,是通知描述这里是通知描'
|
||||
});
|
||||
Notice.error({
|
||||
duration: 1000,
|
||||
title: '这是通知标题',
|
||||
desc: '这里是通知描述这里,是通知描述这里是通知描述这里,是通知描述这里,是通知描述这里是通知描'
|
||||
});
|
||||
},
|
||||
success () {
|
||||
Notice.success({
|
||||
duration: 1000,
|
||||
title: '这是通知标题',
|
||||
desc: '这里是通知描述这里,是通知描述这里是通知描述这里,是通知描述这里,是通知描述这里是通知描'
|
||||
});
|
||||
},
|
||||
warning () {
|
||||
Notice.warning({
|
||||
duration: 1000,
|
||||
title: '这是通知标题',
|
||||
desc: '这里是通知描述这里,是通知描述这里是通知描述这里,是通知描述这里,是通知描述这里是通知描'
|
||||
});
|
||||
},
|
||||
error () {
|
||||
Notice.error({
|
||||
duration: 1000,
|
||||
title: '这是通知标题',
|
||||
desc: '这里是通知描述这里,是通知描述这里是通知描述这里,是通知描述这里,是通知描述这里是通知描'
|
||||
});
|
||||
},
|
||||
mInfo () {
|
||||
Message.info('飞机飞士大夫', 1000);
|
||||
}
|
||||
},
|
||||
ready () {
|
||||
// Message.config({
|
||||
// top: 50,
|
||||
// duration: 8
|
||||
// });
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -29,7 +29,7 @@
|
|||
<Timeline pending>
|
||||
<Timeline-item color="red">发布3.0版本</Timeline-item>
|
||||
<Timeline-item color="green">
|
||||
<Icon type="time" slot="dot"></Icon>
|
||||
<Icon type="cloak" slot="dot"></Icon>
|
||||
发布2.0版本
|
||||
</Timeline-item>
|
||||
<Timeline-item color="#ff6600">发布1.0版本</Timeline-item>
|
||||
|
|
|
@ -1,72 +0,0 @@
|
|||
<template>
|
||||
<Button @click="info">info</Button>
|
||||
<Button @click="success">success</Button>
|
||||
<Button @click="error">error</Button>
|
||||
<Button @click="warning">warning</Button>
|
||||
<Button @click="loading">手动消失</Button>
|
||||
<Button @click="destroy">destroy</Button>
|
||||
<Alert closable>消息提示文案</Alert>
|
||||
<Alert type="success" show-icon closable>
|
||||
成功提示文案
|
||||
<span slot="desc">成功的提示描述文案成功的提示描述文案成功的提示描述文案成功的提示描述文案成功的提示描述文案</span>
|
||||
</Alert>
|
||||
<Card :bordered="false">
|
||||
<p slot="title">无边框标题</p>
|
||||
<p>无边框内容填充无边框内容填充无边框内容填充无边框内容填充无边框内容填充无边框内容填充无边框内容填充无边框内容填充无边框内容填充无边框内容填充无边框内容填充。</p>
|
||||
</Card>
|
||||
</template>
|
||||
<script>
|
||||
import { Message, Button, Alert, Card } from 'iview';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Message,
|
||||
Button,
|
||||
Alert,
|
||||
Card
|
||||
},
|
||||
props: {
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
info () {
|
||||
Message.info('欢迎来到iView', 3, () => {
|
||||
console.log('close info');
|
||||
});
|
||||
},
|
||||
success () {
|
||||
Message.success('成功啦', 5, () => {
|
||||
console.log('close successs');
|
||||
});
|
||||
},
|
||||
error () {
|
||||
Message.error('错误啦');
|
||||
},
|
||||
warning () {
|
||||
Message.warning('来个警告');
|
||||
},
|
||||
loading () {
|
||||
const hide = Message.loading('我是loading', 0);
|
||||
|
||||
setTimeout(hide, 5000);
|
||||
},
|
||||
destroy () {
|
||||
Message.destroy();
|
||||
}
|
||||
},
|
||||
ready () {
|
||||
// Message.config({
|
||||
// top: 50,
|
||||
// duration: 8
|
||||
// });
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,132 +0,0 @@
|
|||
<style>
|
||||
.tooltip_out{
|
||||
padding: 150px;
|
||||
}
|
||||
body{
|
||||
height: 1000px;
|
||||
padding: 10px;
|
||||
}
|
||||
.api table{
|
||||
font-family: Consolas,Menlo,Courier,monospace;
|
||||
font-size: 13px;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
empty-cells: show;
|
||||
border: 1px solid #e9e9e9;
|
||||
width: 100%;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.api table th{
|
||||
background: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
color: #5c6b77;
|
||||
font-weight: 600;
|
||||
}
|
||||
.api table td, .api table th{
|
||||
border: 1px solid #e9e9e9;
|
||||
padding: 8px 16px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="tooltip_out">
|
||||
<Poptip>
|
||||
<a>click 激活</a>
|
||||
<div slot="title"><i>自定义标题</i></div>
|
||||
<div slot="content">
|
||||
<a>关闭提示框</a>
|
||||
</div>
|
||||
</Poptip>
|
||||
<Poptip placement="right" width="300">
|
||||
<i-button type="ghost">click 激活</i-button>
|
||||
<div class="api" slot="content">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>属性</th>
|
||||
<th>说明</th>
|
||||
<th>类型</th>
|
||||
<th>默认值</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>content</td>
|
||||
<td>显示的内容</td>
|
||||
<td>String | Number</td>
|
||||
<td>空</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>placement</td>
|
||||
<td>提示框出现的位置,可选值为<code>top</code><code>top-start</code><code>top-end</code><code>bottom</code><code>bottom-start</code><code>bottom-end</code><code>left</code><code>left-start</code><code>left-end</code><code>right</code><code>right-start</code><code>right-end</code></td>
|
||||
<td>String</td>
|
||||
<td>bottom</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>disabled</td>
|
||||
<td>是否禁用提示框</td>
|
||||
<td>Boolean</td>
|
||||
<td>false</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>delay</td>
|
||||
<td>延迟显示,单位毫秒</td>
|
||||
<td>Number</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</Poptip>
|
||||
<!--<Poptip title="标题" content="内容">-->
|
||||
<!--<Button>click 触发</Button>-->
|
||||
<!--</Poptip>-->
|
||||
<!--<Poptip title="标题" content="内容" trigger="hover">-->
|
||||
<!--<Button>hover 触发</Button>-->
|
||||
<!--</Poptip>-->
|
||||
<Poptip title="确定删除这条信息吗?" confirm content="内容" trigger="focus" @on-ok="ok" @on-cancel="cancel">
|
||||
<a><strong>Delete</strong></a>
|
||||
</Poptip>
|
||||
<!--<Poptip title="标题" content="内容" trigger="focus">-->
|
||||
<!--<input type="text">-->
|
||||
<!--</Poptip>-->
|
||||
<!--<Poptip title="标题" content="内容" trigger="focus">-->
|
||||
<!--<Button>focus 触发</Button>-->
|
||||
<!--</Poptip>-->
|
||||
<!--<Tooltip content="这里是提示文字">-->
|
||||
<!--当鼠标经过这段文字时,会显示一个气泡框-->
|
||||
<!--</Tooltip>-->
|
||||
<Poptip>
|
||||
<a>click 激活</a>
|
||||
<div slot="content">
|
||||
<a>关闭提示框</a>
|
||||
</div>
|
||||
</Poptip>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Tooltip, Button, Row, iCol, Poptip, iSelect, iOption, Message } from 'iview';
|
||||
|
||||
export default {
|
||||
components: { Tooltip, iButton: Button, Row, iCol, Poptip, iSelect, iOption, Message },
|
||||
props: {
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
ok () {
|
||||
Message.info('ok');
|
||||
},
|
||||
cancel () {
|
||||
Message.info('cancel');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,97 +1,13 @@
|
|||
<style>
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<Steps :current="1" size="small">
|
||||
<Step title="已完成" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
|
||||
<Step title="进行中" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息"></Step>
|
||||
</Steps>
|
||||
<br>
|
||||
<Steps :current="2">
|
||||
<Step title="已完成"></Step>
|
||||
<Step title="进行中"></Step>
|
||||
<Step title="待进行"></Step>
|
||||
<Step title="待进行"></Step>
|
||||
</Steps>
|
||||
<br>
|
||||
<Steps :current="1" size="small">
|
||||
<Step title="已完成"></Step>
|
||||
<Step title="进行中"></Step>
|
||||
<Step title="待进行"></Step>
|
||||
<Step title="待进行"></Step>
|
||||
</Steps>
|
||||
<br>
|
||||
<Steps :current="1" direction="vertical" size="small">
|
||||
<Step title="注册" icon="person-add"></Step>
|
||||
<Step title="上传头像" icon="camera" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
|
||||
<Step title="验证邮箱" icon="email"></Step>
|
||||
</Steps>
|
||||
<Steps :current="1" direction="vertical">
|
||||
<Step title="注册" icon="person-add"></Step>
|
||||
<Step title="上传头像" icon="camera" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
|
||||
<Step title="验证邮箱" icon="email"></Step>
|
||||
</Steps>
|
||||
<br>
|
||||
<p>当前正在进行第 {{ current + 1 }} 步</p>
|
||||
<Steps :current="current">
|
||||
<Step title="步骤1"></Step>
|
||||
<Step title="步骤2"></Step>
|
||||
<Step title="步骤3"></Step>
|
||||
<Step title="步骤4"></Step>
|
||||
</Steps>
|
||||
<i-button type="primary" @click="next">下一步</i-button>
|
||||
<Page :total="1000" show-sizer show-elevator show-total></Page>
|
||||
<br><br>
|
||||
<Steps :current="1" direction="vertical" size="small">
|
||||
<Step title="已完成" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
|
||||
<Step title="进行中" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息"></Step>
|
||||
</Steps>
|
||||
<Page :total="1000" show-sizer show-elevator show-total size="small"></Page>
|
||||
<br><br>
|
||||
<Steps :current="1" status="error">
|
||||
<Step title="已完成" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="进行中" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息"></Step>
|
||||
</Steps>
|
||||
<Page :current="2" :total="50" simple></Page>
|
||||
</template>
|
||||
<script>
|
||||
import { Page, Steps, Button } from 'iview';
|
||||
|
||||
const Step = Steps.Step;
|
||||
|
||||
import { Page } from 'iview';
|
||||
export default {
|
||||
components: {
|
||||
Page,
|
||||
Steps,
|
||||
Step,
|
||||
iButton: Button
|
||||
},
|
||||
props: {
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
total: 512,
|
||||
current: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
setPage (page) {
|
||||
console.log(page)
|
||||
},
|
||||
next () {
|
||||
if (this.current == 3) {
|
||||
this.current = 0;
|
||||
} else {
|
||||
this.current += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
components: { Page }
|
||||
}
|
||||
</script>
|
||||
|
|
180
test/routers/poptip.vue
Normal file
180
test/routers/poptip.vue
Normal file
|
@ -0,0 +1,180 @@
|
|||
<style>
|
||||
.tooltip_out{
|
||||
padding: 150px;
|
||||
}
|
||||
body{
|
||||
height: 1000px;
|
||||
padding: 10px;
|
||||
}
|
||||
.api table{
|
||||
font-family: Consolas,Menlo,Courier,monospace;
|
||||
font-size: 13px;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
empty-cells: show;
|
||||
border: 1px solid #e9e9e9;
|
||||
width: 100%;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.api table th{
|
||||
background: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
color: #5c6b77;
|
||||
font-weight: 600;
|
||||
}
|
||||
.api table td, .api table th{
|
||||
border: 1px solid #e9e9e9;
|
||||
padding: 8px 16px;
|
||||
text-align: left;
|
||||
}
|
||||
.tip{
|
||||
width: 24px;
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
.tip-inner{
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
line-height: 22px;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
border: 1px solid #3399ff;
|
||||
color: #3399ff;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tip-content{
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
white-space: normal;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<Tooltip content="这里是提示文字">
|
||||
当鼠标经过这段文字时,会显示一个气泡框
|
||||
</Tooltip>
|
||||
<div class="tooltip_out">
|
||||
<!--<Tooltip placement="top" content="Tooltip 文字提示">-->
|
||||
<!--<strong>-->
|
||||
<!--<a>Link</a>-->
|
||||
<!--</strong>-->
|
||||
<!--</Tooltip>-->
|
||||
<!--<Poptip trigger="hover" title="提示标题" content="提示内容">-->
|
||||
<!--<i-button>hover 激活</i-button>-->
|
||||
<!--</Poptip>-->
|
||||
<!--<Poptip content="提示内容" title="tip">-->
|
||||
<!--<i-button>click 激活</i-button>-->
|
||||
<!--</Poptip>-->
|
||||
<!--<Poptip content="提示内容">-->
|
||||
<!--<div slot="title"><i>自定义标题</i></div>-->
|
||||
<!--<i-button>click 激活</i-button>-->
|
||||
<!--</Poptip>-->
|
||||
<!--<Tooltip class="tip" placement="left-start" trigger="hover">-->
|
||||
<!--<div class="tip-inner">-->
|
||||
<!--<Icon type="information"></Icon>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="tip-content" slot="content">-->
|
||||
<!--<p>iView 最新版本为 0.9.7,该版本对很多组件 UI 进行了调整</p>-->
|
||||
<!--</div>-->
|
||||
<!--</Tooltip>-->
|
||||
<!--<Poptip>-->
|
||||
<!--<a>click 激活</a>-->
|
||||
<!--<div slot="title"><i>自定义标题</i></div>-->
|
||||
<!--<div slot="content">-->
|
||||
<!--<a>关闭提示框</a>-->
|
||||
<!--</div>-->
|
||||
<!--</Poptip>-->
|
||||
<!--<Poptip placement="right" width="300">-->
|
||||
<!--<i-button type="ghost">click 激活</i-button>-->
|
||||
<!--<div class="api" slot="content">-->
|
||||
<!--<table>-->
|
||||
<!--<thead>-->
|
||||
<!--<tr>-->
|
||||
<!--<th>属性</th>-->
|
||||
<!--<th>说明</th>-->
|
||||
<!--<th>类型</th>-->
|
||||
<!--<th>默认值</th>-->
|
||||
<!--</tr>-->
|
||||
<!--</thead>-->
|
||||
<!--<tbody>-->
|
||||
<!--<tr>-->
|
||||
<!--<td>content</td>-->
|
||||
<!--<td>显示的内容</td>-->
|
||||
<!--<td>String | Number</td>-->
|
||||
<!--<td>空</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td>placement</td>-->
|
||||
<!--<td>提示框出现的位置,可选值为<code>top</code><code>top-start</code><code>top-end</code><code>bottom</code><code>bottom-start</code><code>bottom-end</code><code>left</code><code>left-start</code><code>left-end</code><code>right</code><code>right-start</code><code>right-end</code></td>-->
|
||||
<!--<td>String</td>-->
|
||||
<!--<td>bottom</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td>disabled</td>-->
|
||||
<!--<td>是否禁用提示框</td>-->
|
||||
<!--<td>Boolean</td>-->
|
||||
<!--<td>false</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td>delay</td>-->
|
||||
<!--<td>延迟显示,单位毫秒</td>-->
|
||||
<!--<td>Number</td>-->
|
||||
<!--<td>0</td>-->
|
||||
<!--</tr>-->
|
||||
<!--</tbody>-->
|
||||
<!--</table>-->
|
||||
<!--</div>-->
|
||||
<!--</Poptip>-->
|
||||
<!--<Poptip title="标题" content="内容">-->
|
||||
<!--<Button>click 触发</Button>-->
|
||||
<!--</Poptip>-->
|
||||
<!--<Poptip title="标题" content="内容" trigger="hover">-->
|
||||
<!--<Button>hover 触发</Button>-->
|
||||
<!--</Poptip>-->
|
||||
<Poptip title="确定删除这条信息吗?" confirm content="内容" trigger="focus" @on-ok="ok" @on-cancel="cancel">
|
||||
<a><strong>Delete</strong></a>
|
||||
</Poptip>
|
||||
<!--<Poptip title="标题" content="内容" trigger="focus">-->
|
||||
<!--<input type="text">-->
|
||||
<!--</Poptip>-->
|
||||
<!--<Poptip title="标题" content="内容" trigger="focus">-->
|
||||
<!--<Button>focus 触发</Button>-->
|
||||
<!--</Poptip>-->
|
||||
<!--<Tooltip content="这里是提示文字">-->
|
||||
<!--当鼠标经过这段文字时,会显示一个气泡框-->
|
||||
<!--</Tooltip>-->
|
||||
<!--<Poptip>-->
|
||||
<!--<a>click 激活</a>-->
|
||||
<!--<div slot="content">-->
|
||||
<!--<a>关闭提示框</a>-->
|
||||
<!--</div>-->
|
||||
<!--</Poptip>-->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Tooltip, Button, Row, iCol, Poptip, iSelect, iOption, Message, Icon } from 'iview';
|
||||
|
||||
export default {
|
||||
components: { Tooltip, iButton: Button, Row, iCol, Poptip, iSelect, iOption, Message, Icon },
|
||||
props: {
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
ok () {
|
||||
Message.info('ok');
|
||||
},
|
||||
cancel () {
|
||||
Message.info('cancel');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,32 +1,25 @@
|
|||
<template>
|
||||
<div>
|
||||
<Collapse active-key="2">
|
||||
<Panel key="1">
|
||||
Header1
|
||||
<Collapse active-key="2" slot="content">
|
||||
<Panel key="1">
|
||||
inHeader1
|
||||
<p slot="content">inContent1</p>
|
||||
</Panel>
|
||||
<Panel key="2">
|
||||
inHeader2
|
||||
<p slot="content">inContent2</p>
|
||||
</Panel>
|
||||
<Panel key="3">
|
||||
inHeader3
|
||||
<p slot="content">inContent3</p>
|
||||
</Panel>
|
||||
</Collapse>
|
||||
</Panel>
|
||||
<Panel key="2">
|
||||
Header2
|
||||
<p slot="content">A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
|
||||
</Panel>
|
||||
<Panel key="3">
|
||||
Header3
|
||||
<p slot="content">A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
|
||||
</Panel>
|
||||
</Collapse>
|
||||
<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>
|
||||
<Button @click="activeKey = '2'">换</Button>
|
||||
</div>
|
||||
<Radio :checked.sync="radio">Radio</Radio>
|
||||
|
@ -148,6 +141,8 @@
|
|||
<Breadcrumb-item href="/components/breadcrumb">Components</Breadcrumb-item>
|
||||
<Breadcrumb-item>Breadcrumb</Breadcrumb-item>
|
||||
</Breadcrumb>
|
||||
<br><br>
|
||||
<Checkbox :checked.sync="single"></Checkbox>
|
||||
</template>
|
||||
<script>
|
||||
import { Radio, Alert, Icon, Collapse, Button, Checkbox, Switch, InputNumber, Breadcrumb, LoadingBar } from 'iview';
|
||||
|
@ -175,10 +170,11 @@
|
|||
LoadingBar
|
||||
},
|
||||
props: {
|
||||
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
single: false,
|
||||
radio: false,
|
||||
radioGroup: '段模',
|
||||
activeKey: [1,2],
|
||||
|
@ -190,7 +186,7 @@
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
changeGroup (data) {
|
||||
|
|
|
@ -1,98 +1,89 @@
|
|||
<template>
|
||||
<div>
|
||||
<br><br><br><br><br><br><br><br><br><br><br>
|
||||
{{ city | json }}<br>
|
||||
<Button @click="city = 'hangzhou'">切换城市</Button>
|
||||
<br>
|
||||
<i-select v-if="true" :model.sync="city" style="width:200px" filterable @on-change="change">
|
||||
<i-option-group label="热门城市">
|
||||
<i-option value="beijing">北京市</i-option>
|
||||
<i-option value="shanghai" disabled label="上海市">上海市2</i-option>
|
||||
<i-option value="shenzhen">深圳市</i-option>
|
||||
</i-option-group>
|
||||
<i-option-group label="二线城市">
|
||||
<i-option value="nanjing">南京市</i-option>
|
||||
<i-option value="hangzhou">杭州市</i-option>
|
||||
<i-option value="heilongjiang" disabled>黑龙江市</i-option>
|
||||
</i-option-group>
|
||||
<i-option-group label="其它城市">
|
||||
<i-option value="jyg">嘉峪关市</i-option>
|
||||
<i-option value="lanzhou">兰州市</i-option>
|
||||
<i-option value="beijingxi">北京西</i-option>
|
||||
</i-option-group>
|
||||
</i-select>
|
||||
|
||||
<i-select v-show="true" :model.sync="focus" style="width:200px" @on-change="change" clearable filterable label-in-value>
|
||||
<i-option value="beijing">北京</i-option>
|
||||
<i-option value="shanghai" label="上海市">上海市</i-option>
|
||||
<i-option value="shenzhen" disabled>深圳市</i-option>
|
||||
<i-option value="guangzhou" label="广州市">广州市2</i-option>
|
||||
<i-option value="shijiazhuang" disabled>石家庄市</i-option>
|
||||
<!--<i-option value="shijiazhuang2">石家庄市2</i-option>-->
|
||||
<i-option value="a">a市</i-option>
|
||||
<i-option value="b">b市</i-option>
|
||||
<i-option value="c">c市</i-option>
|
||||
<i-option value="d">d市</i-option>
|
||||
<i-option value="e">e市</i-option>
|
||||
</i-select>
|
||||
|
||||
<i-select v-if="true" :model.sync="focus2" style="width:300px" @on-change="change" clearable filterable multiple>
|
||||
<i-option value="beijing" label="北京市">北京2</i-option>
|
||||
<i-option value="shanghai">上海市</i-option>
|
||||
<i-option value="shenzhen" disabled>深圳市</i-option>
|
||||
<i-option value="guangzhou">广州市</i-option>
|
||||
<i-option value="shijiazhuang">石家庄市</i-option>
|
||||
<i-option value="a">a1市</i-option>
|
||||
<i-option value="b">b2市</i-option>
|
||||
<i-option value="c">c1市</i-option>
|
||||
<i-option value="d">d2市</i-option>
|
||||
<i-option value="e">e1市</i-option>
|
||||
</i-select>
|
||||
|
||||
<i-select v-if="true" :model.sync="focus2" style="width:300px" @on-change="change" clearable multiple>
|
||||
<i-option value="beijing" label="北京市">北京2</i-option>
|
||||
<i-option value="shanghai">上海市</i-option>
|
||||
<i-option value="shenzhen" disabled>深圳市</i-option>
|
||||
<i-option value="guangzhou">广州市</i-option>
|
||||
<i-option value="shijiazhuang">石家庄市</i-option>
|
||||
<i-option value="a">a市</i-option>
|
||||
<i-option value="b">b市</i-option>
|
||||
<i-option value="c">c市</i-option>
|
||||
<i-option value="d">d市</i-option>
|
||||
<i-option value="e">e市</i-option>
|
||||
</i-select>
|
||||
|
||||
<br><br><br><br><br><br><br><br><br><br><br><br>
|
||||
</div>
|
||||
<i-select :model.sync="model1" style="width:200px" clearable>
|
||||
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||
</i-select>
|
||||
{{ model1 | json }}
|
||||
<i-button @click="change">修改数据</i-button>
|
||||
<i-select :model.sync="model10" multiple style="width:240px" @on-change="datachange">
|
||||
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||
</i-select>
|
||||
{{ model10 | json }}
|
||||
<i-select :model.sync="model11" filterable style="width:200px" @on-change="datachange">
|
||||
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||
</i-select>
|
||||
{{ model11 | json }}
|
||||
<i-select :model.sync="model12" filterable multiple style="width:240px" @on-change="datachange">
|
||||
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||
</i-select>
|
||||
{{ model12 | json }}
|
||||
<br><br>
|
||||
<i-select :model.sync="model2" size="small" style="width:100px">
|
||||
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||
</i-select>
|
||||
<i-select :model.sync="model3" style="width:100px">
|
||||
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||
</i-select>
|
||||
<i-select :model.sync="model4" size="large" style="width:100px">
|
||||
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||
</i-select>
|
||||
<i-select :model.sync="model7" style="width:200px">
|
||||
<i-option-group label="热门城市">
|
||||
<i-option v-for="item in cityList | limitBy 3" :value="item.value">{{ item.label }}</i-option>
|
||||
</i-option-group>
|
||||
<i-option-group label="其它城市">
|
||||
<i-option v-for="item in cityList | limitBy 3 3" :value="item.value">{{ item.label }}</i-option>
|
||||
</i-option-group>
|
||||
</i-select>
|
||||
</template>
|
||||
<script>
|
||||
import { iSelect, iOption, iOptionGroup, Button } from 'iview';
|
||||
|
||||
import { iSelect, iOption, iButton, iOptionGroup } from 'iview';
|
||||
export default {
|
||||
components: {
|
||||
iSelect,
|
||||
iOption,
|
||||
iOptionGroup,
|
||||
Button
|
||||
},
|
||||
props: {
|
||||
|
||||
},
|
||||
components: { iSelect, iOption, iButton, iOptionGroup },
|
||||
data () {
|
||||
return {
|
||||
city: '',
|
||||
focus: '',
|
||||
focus2: ['beijing']
|
||||
// focus2: []
|
||||
cityList: [
|
||||
{
|
||||
value: 'beijing',
|
||||
label: '北京市'
|
||||
},
|
||||
{
|
||||
value: 'shanghai',
|
||||
label: '上海市'
|
||||
},
|
||||
{
|
||||
value: 'shenzhen',
|
||||
label: '深圳市'
|
||||
},
|
||||
// {
|
||||
// value: 'hangzhou',
|
||||
// label: '杭州市'
|
||||
// },
|
||||
// {
|
||||
// value: 'nanjing',
|
||||
// label: '南京市'
|
||||
// },
|
||||
// {
|
||||
// value: 'chongqing',
|
||||
// label: '重庆市'
|
||||
// }
|
||||
],
|
||||
model1: '',
|
||||
model10: [],
|
||||
model11: '',
|
||||
model12: [],
|
||||
model2: '',
|
||||
model3: '',
|
||||
model4: '',
|
||||
model7: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
change (data) {
|
||||
console.log(data)
|
||||
change () {
|
||||
this.cityList.splice(2, 1);
|
||||
},
|
||||
datachange (data) {
|
||||
console.log(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
21
test/routers/slider.vue
Normal file
21
test/routers/slider.vue
Normal file
|
@ -0,0 +1,21 @@
|
|||
<template>
|
||||
<Slider :value="10" :tip-format="format">
|
||||
|
||||
</Slider>
|
||||
</template>
|
||||
<script>
|
||||
import { Slider } from 'iview';
|
||||
export default {
|
||||
components: { Slider },
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
format (val) {
|
||||
return `进度:${val}%`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
97
test/routers/step.vue
Normal file
97
test/routers/step.vue
Normal file
|
@ -0,0 +1,97 @@
|
|||
<style>
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<Steps :current="1" size="small">
|
||||
<Step title="已完成" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
|
||||
<Step title="进行中" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息"></Step>
|
||||
</Steps>
|
||||
<br>
|
||||
<Steps :current="2">
|
||||
<Step title="已完成"></Step>
|
||||
<Step title="进行中"></Step>
|
||||
<Step title="待进行"></Step>
|
||||
<Step title="待进行"></Step>
|
||||
</Steps>
|
||||
<br>
|
||||
<Steps :current="1" size="small">
|
||||
<Step title="已完成"></Step>
|
||||
<Step title="进行中"></Step>
|
||||
<Step title="待进行"></Step>
|
||||
<Step title="待进行"></Step>
|
||||
</Steps>
|
||||
<br>
|
||||
<Steps :current="1" direction="vertical" size="small">
|
||||
<Step title="注册" icon="person-add"></Step>
|
||||
<Step title="上传头像" icon="camera" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
|
||||
<Step title="验证邮箱" icon="email"></Step>
|
||||
</Steps>
|
||||
<Steps :current="1" direction="vertical">
|
||||
<Step title="注册" icon="person-add"></Step>
|
||||
<Step title="上传头像" icon="camera" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
|
||||
<Step title="验证邮箱" icon="email"></Step>
|
||||
</Steps>
|
||||
<br>
|
||||
<p>当前正在进行第 {{ current + 1 }} 步</p>
|
||||
<Steps :current="current">
|
||||
<Step title="步骤1"></Step>
|
||||
<Step title="步骤2"></Step>
|
||||
<Step title="步骤3"></Step>
|
||||
<Step title="步骤4"></Step>
|
||||
</Steps>
|
||||
<i-button type="primary" @click="next">下一步</i-button>
|
||||
<br><br>
|
||||
<Steps :current="1" direction="vertical" size="small">
|
||||
<Step title="已完成" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
|
||||
<Step title="进行中" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息这里是该步骤的描述信息这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息"></Step>
|
||||
</Steps>
|
||||
<br><br>
|
||||
<Steps :current="1" status="error">
|
||||
<Step title="已完成" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="进行中" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息"></Step>
|
||||
</Steps>
|
||||
</template>
|
||||
<script>
|
||||
import { Page, Steps, Button } from 'iview';
|
||||
|
||||
const Step = Steps.Step;
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Page,
|
||||
Steps,
|
||||
Step,
|
||||
iButton: Button
|
||||
},
|
||||
props: {
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
total: 512,
|
||||
current: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
setPage (page) {
|
||||
console.log(page)
|
||||
},
|
||||
next () {
|
||||
if (this.current == 3) {
|
||||
this.current = 0;
|
||||
} else {
|
||||
this.current += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
34
test/routers/switch.vue
Normal file
34
test/routers/switch.vue
Normal file
|
@ -0,0 +1,34 @@
|
|||
<template>
|
||||
<Switch @on-change="change"></Switch>
|
||||
<Switch>
|
||||
<span slot="open">开</span>
|
||||
<span slot="close">关</span>
|
||||
</Switch>
|
||||
<Switch size="large">
|
||||
<span slot="open">ON</span>
|
||||
<span slot="close">OFF</span>
|
||||
</Switch>
|
||||
<Switch>
|
||||
<Icon type="android-done" slot="open"></Icon>
|
||||
<Icon type="android-close" slot="close"></Icon>
|
||||
</Switch>
|
||||
<Switch :disabled="disabled"></Switch>
|
||||
<i-button type="primary" @click="disabled = !disabled">Toggle Disabled</i-button>
|
||||
<Switch size="small"></Switch>
|
||||
</template>
|
||||
<script>
|
||||
import { Switch, Message, iButton, Icon } from 'iview';
|
||||
export default {
|
||||
components: { Switch, Message, iButton, Icon },
|
||||
data () {
|
||||
return {
|
||||
disabled: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change (status) {
|
||||
Message.info('开关状态:' + status);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,25 +1,59 @@
|
|||
<style>
|
||||
body{
|
||||
padding: 50px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<Slider :value="10" :tip-format="format">
|
||||
|
||||
</Slider>
|
||||
<Tag>标签一</Tag>
|
||||
<Tag>标签二</Tag>
|
||||
<Tag closable>标签三</Tag>
|
||||
<Tag closable color="blue">标签一</Tag>
|
||||
<Tag closable color="green">标签二</Tag>
|
||||
<Tag closable color="red">标签三</Tag>
|
||||
<Tag closable color="yellow">标签四</Tag>
|
||||
<br><br>
|
||||
<Tag type="dot">标签一</Tag>
|
||||
<Tag type="dot" closable>标签一</Tag>
|
||||
<Tag type="dot" color="blue">标签一</Tag>
|
||||
<Tag type="dot" color="blue" closable>标签一</Tag>
|
||||
<Tag type="dot" color="green">标签一</Tag>
|
||||
<Tag type="dot" color="green" closable>标签一</Tag>
|
||||
<Tag type="dot" color="red">标签一</Tag>
|
||||
<Tag type="dot" color="red" closable>标签一</Tag>
|
||||
<Tag type="dot" color="yellow">标签一</Tag>
|
||||
<Tag type="dot" color="yellow" closable>标签一</Tag>
|
||||
<br><br>
|
||||
<Tag type="border">标签一</Tag>
|
||||
<Tag type="border" closable>标签一</Tag>
|
||||
<Tag type="border" color="blue">标签一</Tag>
|
||||
<Tag type="border" color="blue" closable>标签一</Tag>
|
||||
<Tag type="border" color="green">标签一</Tag>
|
||||
<Tag type="border" color="green" closable>标签一</Tag>
|
||||
<Tag type="border" color="red">标签一</Tag>
|
||||
<Tag type="border" color="red" closable>标签一</Tag>
|
||||
<Tag type="border" color="yellow">标签一</Tag>
|
||||
<Tag type="border" color="yellow" closable>标签一</Tag>
|
||||
<i-button type="primary" @click="modal1 = true">显示对话框</i-button>
|
||||
<Modal
|
||||
:visible.sync="modal1"
|
||||
title="普通的Modal对话框标题"
|
||||
:loading="loading" @on-ok="ok">
|
||||
<p>对话框内容</p>
|
||||
<p>对话框内容</p>
|
||||
<p>对话框内容</p>
|
||||
{{ loading }}
|
||||
<i-button @click="loading = true">true</i-button>
|
||||
<i-button @click="loading = false">false</i-button>
|
||||
</Modal>
|
||||
</template>
|
||||
<script>
|
||||
import { Slider } from 'iview';
|
||||
import { Tag, Modal, iButton } from 'iview';
|
||||
export default {
|
||||
components: { Slider },
|
||||
components: { Tag, Modal, iButton },
|
||||
data () {
|
||||
return {
|
||||
|
||||
modal1: false,
|
||||
loading: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
format (val) {
|
||||
return `进度:${val}%`
|
||||
ok () {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
70
test/routers/tooltip.vue
Normal file
70
test/routers/tooltip.vue
Normal file
|
@ -0,0 +1,70 @@
|
|||
<style scoped>
|
||||
.top,.bottom{
|
||||
text-align: center;
|
||||
}
|
||||
.center{
|
||||
width: 300px;
|
||||
margin: 10px auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
.center-left{
|
||||
float: left;
|
||||
}
|
||||
.center-right{
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="top">
|
||||
<Tooltip content="Top Left 文字提示" placement="top-start">
|
||||
<i-button>上左</i-button>
|
||||
</Tooltip>
|
||||
<Tooltip content="Top Center 文字提示" placement="top">
|
||||
<i-button>上边</i-button>
|
||||
</Tooltip>
|
||||
<Tooltip content="Top Right 文字提示" placement="top-end">
|
||||
<i-button>上右</i-button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<div class="center">
|
||||
<div class="center-left">
|
||||
<Tooltip content="Left Top 文字提示" placement="left-start">
|
||||
<i-button>左上</i-button>
|
||||
</Tooltip><br><br>
|
||||
<Tooltip content="Left Center 文字提示" placement="left">
|
||||
<i-button>左边</i-button>
|
||||
</Tooltip><br><br>
|
||||
<Tooltip content="Left Bottom 文字提示" placement="left-end">
|
||||
<i-button>左下</i-button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<div class="center-right">
|
||||
<Tooltip content="Right Top 文字提示" placement="right-start">
|
||||
<i-button>右上</i-button>
|
||||
</Tooltip><br><br>
|
||||
<Tooltip content="Right Center 文字提示" placement="right">
|
||||
<i-button>右边</i-button>
|
||||
</Tooltip><br><br>
|
||||
<Tooltip content="Right Bottom 文字提示" placement="right-end">
|
||||
<i-button>右下</i-button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<Tooltip content="Bottom Left 文字提示" placement="bottom-start">
|
||||
<i-button>下左</i-button>
|
||||
</Tooltip>
|
||||
<Tooltip content="Bottom Center 文字提示" placement="bottom">
|
||||
<i-button>下边</i-button>
|
||||
</Tooltip>
|
||||
<Tooltip content="Bottom Right 文字提示" placement="bottom-end">
|
||||
<i-button>下右</i-button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Tooltip, iButton } from 'iview';
|
||||
export default {
|
||||
components: { Tooltip, iButton }
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue