2020-08-27 17:18:57 +08:00

163 lines
5.6 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="checkbox-page article">
<h1>Split 面板分割</h1>
<h2>概述</h2>
<p>基本组件-多选框基本组件-多选框主要用于一组可选项多项选择或者单独用于标记切换某种状态</p>
<h2>代码示例</h2>
<Row class="panel">
<Cell class="son-panel" span="12">
<div class="panel-case" style="height: 600px">
<split diretion="vertical" @on-move-start="movestart" @on-moving="moving" @on-move-end="moveend">
<splitItem>
1
</splitItem>
<splitItem>
2
</splitItem>
<splitItem>
3
</splitItem>
</split>
</div>
<div class="panel-header">
<span>单独使用</span>
</div>
<div class="panel-desc">
<p>通过设置checked来标记是否选择因为组件内部是使用v-model来绑定所以需要将checked设置.sync实现数据的双向绑定否则在改变状态时使用者的数据并没有变化</p>
</div>
</Cell>
<div class="panel-split">
</div>
<Cell class="son-panel" span="12">
<div class="code">
<markdown1></markdown1>
</div>
</Cell>
</Row>
<h2>API</h2>
<h3>CheckboxGroup props</h3>
<section>
<table>
<thead>
<tr>
<th style="text-align:left">属性</th>
<th style="text-align:left">说明</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">默认值</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">value</td>
<td style="text-align:left">选择的值必须设置为.sync</td>
<td style="text-align:left">Array</td>
<td style="text-align:left">[]</td>
</tr>
<tr>
<td style="text-align:left">vertical</td>
<td style="text-align:left">选项排列方向</td>
<td style="text-align:left">Boolean</td>
<td style="text-align:left">false</td>
</tr>
</tbody>
</table>
</section>
<h3>CheckboxGroup events</h3>
<section>
<table>
<thead>
<tr>
<th style="text-align:left">事件名</th>
<th style="text-align:left">说明</th>
<th style="text-align:left">返回值</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">on-change</td>
<td style="text-align:left">值改变时触发</td>
<td style="text-align:left">event</td>
</tr>
</tbody>
</table>
</section>
<h3>Checkbox props</h3>
<section>
<table>
<thead>
<tr>
<th style="text-align:left">属性</th>
<th style="text-align:left">说明</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">默认值</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">value</td>
<td style="text-align:left">选项的值必输</td>
<td style="text-align:left">Number, String</td>
<td style="text-align:left">""</td>
</tr>
<tr>
<td style="text-align:left">checked</td>
<td style="text-align:left">是否被选中</td>
<td style="text-align:left">Boolean</td>
<td style="text-align:left">false</td>
</tr>
<tr>
<td style="text-align:left">disabled</td>
<td style="text-align:left">是否禁用</td>
<td style="text-align:left">Boolean</td>
<td style="text-align:left">false</td>
</tr>
</tbody>
</table>
</section>
</div>
</template>
<script type="text/ecmascript-6">
import markdown1 from './md/checkbox1.md'
import markdown2 from './md/checkbox2.md'
import markdown3 from './md/checkbox3.md'
export default {
components: {
markdown1, markdown2, markdown3
},
data: function () {
return {
show: false
}
},
ready: function () {
},
methods: {
movestart(val) {
},
moving(val) {
},
moveend(val) {
},
}
}
</script>
<style>
.ui-split {
height: 300px;
border: 1px solid #d7d7d7;
margin: 20px 0;
}
.ui-split-vertical .ui-split-item:not(:first-child){
border-top: 1px solid #d7d7d7;
}
.ui-split-horizontal .ui-split-item:not(:first-child){
border-left: 1px solid #d7d7d7;
}
</style>