27 lines
436 B
Markdown
27 lines
436 B
Markdown
|
## 基础使用
|
||
|
|
||
|
:::tip
|
||
|
只需引入`xm-select.js`, 剩下的就只有渲染了
|
||
|
:::
|
||
|
|
||
|
|
||
|
### 一个小栗子
|
||
|
|
||
|
:::demo `el`绑定的不一定是id, 也可以是其他css选择器
|
||
|
```html
|
||
|
<div id="demo1" class="xm-select-demo"></div>
|
||
|
|
||
|
<script>
|
||
|
var demo1 = xmSelect.render({
|
||
|
el: '#demo1',
|
||
|
data: [
|
||
|
{name: '张三', value: 1},
|
||
|
{name: '李四', value: 2},
|
||
|
{name: '王五', value: 3},
|
||
|
]
|
||
|
})
|
||
|
</script>
|
||
|
```
|
||
|
:::
|
||
|
|