This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0
wcui/js/lib/sliders/Readme.md

46 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 幻灯片组件文档
## 配置说明
```json
{
sliderList: [{src: '', link: '', title: '', titleStyle: ''}], //src: 图片地址; link: 点击链接; title: 幻灯片标题(可以是文本或html); titleStyle: 标题样式
autoSlide: boolean, //true: 自动轮播; false: 停止轮播
time: int, //轮播间隔时间
preview: boolean //是否有预览图
}
```
## 用法
```html
<div class="slider" :controller="test">
<template name="sliders" config="sliderOpts"></template>
</div>
<!--
其中config属性是指定分页组件的配置会自动从上一层controller里找;
其他的属性(除$id, config, id, class, tabindex, style, ms-*属性,data-*属性外,也可以用以配置组件,且优先级最高);
name属性可以设定组件的$id值方便各模块之间进行通讯
-->
<!-- 引入幻灯片组件 -->
<script src="//dist.doui.cc/js/yua.js"></script>
<script>
require(['//dist.doui.cc/js/lib/sliders/main.js'],function(){
var vm = yua({
$id: "test",
sliderOpts: {
sliderList: [{src: '', link: '', title: '', titleStyle: ''}],
autoSlide: false,
time: 0,
preview: true
}
})
yua.scan()
})
</script>
```
wcui是一套基于`Web Components`的UI组件库, 宗旨是追求简单、实用、不花哨。
JavaScript 95.2%
CSS 4.8%