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

修改样式由:attr指令改为:css

old
lcoln 2017-09-26 00:24:31 +08:00
parent a597117368
commit e055c2f089
2 changed files with 5 additions and 6 deletions

View File

@ -4,14 +4,13 @@
<div class="container">
<div class="box"
:attr="{style: 'width:' + sliderList.length * 100 + '%;' + transform}">
:css="{width: sliderList.length * 100 + '%', transform: transform}">
<a target="_blank"
:repeat="sliderList"
:css="{width: currWidth}"
:attr="{href: el.link || 'javascript:;'}">
<img :attr-src="el.src">
<p :if="el.title"
:attr="{style: el.titlaStyle ? el.titleStyle + ';' : ''}"
:html="el.title"
class="default-class"></p>
</a>

View File

@ -95,7 +95,7 @@ define(["yua", "text!./main.htm", "css!./main"], function(yua, tpl){
if(vm.currWidth.indexOf('px') > -1)
width = vm.currWidth.slice(0, vm.currWidth.indexOf('px'))
vm.transform = 'transform: translate(' + (-width * val) + 'px, 0);'
vm.transform = 'translate(' + (-width * val) + 'px, 0)'
if(vm.preview)
vm.sliderBtnList = getBtnList(vm)
})
@ -106,7 +106,7 @@ define(["yua", "text!./main.htm", "css!./main"], function(yua, tpl){
if(vm.currWidth.indexOf('px') > -1)
width = vm.currWidth.slice(0, vm.currWidth.indexOf('px'))
vm.transform = 'transform: translate(' + (-width * vm.curr) + 'px, 0);'
vm.transform = 'translate(' + (-width * vm.curr) + 'px, 0)'
if(vm.preview)
vm.sliderBtnList = getBtnList(vm)
}, false)
@ -125,8 +125,8 @@ define(["yua", "text!./main.htm", "css!./main"], function(yua, tpl){
transform: '',
curr: 0,
sliderBtnList: [],
maxNum: '',
auto: '',
maxNum: 0,
auto: yua.noop,
sliderList: [],
autoSlide: '',