first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1 @@
a067a8ca-8b23-4fc2-a5f9-33be43358fe4

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
{
"component": true
}

View File

@@ -0,0 +1,35 @@
<view class="wux-class {{ classes.wrap }}" style="{{ extWrapStyle }}">
<view class="{{ classes.min }}" wx:if="{{ common.getValue(showValue, 'min') }}">{{ min }}</view>
<slot name="min" wx:else></slot>
<view class="{{ classes.rail }}" style="{{ extRailStyle }}">
<block wx:for="{{ marks }}" wx:key="index" wx:if="{{ showMark && marks.length > 0 }}">
<view class="{{ classes.mark }}" style="left: {{ item + '%' }}; {{ common.getStyle(extMarkStyle, index) }}" />
</block>
<block wx:for="{{ inputValue }}" wx:key="index">
<view
class="{{ classes.track }}"
style="{{ common.getTrackStyle(offsets, index, inputValue.length > 1) }}; {{ common.getStyle(extTrackStyle, index) }}"
wx:if="{{ inputValue.length === 1 || index !== inputValue.length - 1 }}"
/>
<view
class="{{ classes.handle }} {{ last === index ? prefixCls + '__handle--last' : '' }} {{ last === index && isTouched ? prefixCls + '__handle--is-touched' : '' }}"
data-index="{{ index }}"
data-meta="{{ common.format(tipFormatter, item) }}"
bindtouchstart="onTouchStart"
catchtouchmove="{{ isMoved ? 'noop' : '' }}"
capture-bind:touchmove="onTouchMove"
bindtouchend="onTouchEnd"
style="left: {{ offsets[index] + '%' }}; {{ common.getStyle(extHandleStyle, index) }}"
/>
</block>
</view>
<view class="{{ classes.max }}" wx:if="{{ common.getValue(showValue, 'max') }}">{{ max }}</view>
<slot name="max" wx:else></slot>
</view>
<wxs module="common">
module.exports.format = function(source, value) { return source.replace(getRegExp('\{d\}', 'g'), value) }
module.exports.getTrackStyle = function(offsets, index, multiple) { if (!multiple) { return 'width: ' + offsets[index] + '%' } return 'left: ' + offsets[index] + '%; width: ' + (offsets[index + 1] - offsets[index]) + '%' }
module.exports.getStyle = function(style, index) { if (style.constructor !== 'String') { return style[index] } return style }
module.exports.getValue = function(obj, name) { if (obj.constructor === 'Object') { return obj[name] } return obj }
</wxs>

View File

@@ -0,0 +1 @@
.wux-slider{position:relative;z-index:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.wux-slider__rail{width:100%;height:8rpx;margin:30rpx 0;background-color:#e9e9e9;border-radius:8rpx;vertical-align:middle;position:relative}.wux-slider__track{position:absolute;left:0;height:8rpx;border-radius:8rpx;background-color:#33cd5f}.wux-slider__handle{background-color:#fff;border-radius:50%;height:56rpx;left:0;top:50%;position:absolute;width:56rpx;box-shadow:0 0 8rpx rgba(0,0,0,.2);transform:translate3d(-50%,-50%,0);transition:transform .2s}.wux-slider__handle::after{content:attr(data-meta);color:#fff;position:absolute;pointer-events:none;display:none;opacity:0;visibility:hidden;z-index:15;font-size:28rpx;line-height:1.25;padding:8rpx 16rpx;border-radius:8rpx;background-color:rgba(0,0,0,.7);white-space:nowrap;text-align:center;left:50%;bottom:100%;margin-bottom:20rpx;transform:translateX(-50%)}.wux-slider__handle--last{z-index:2}.wux-slider__handle--is-touched{transform:translate3d(-50%,-50%,0) scale(1.3)}.wux-slider--has-tip .wux-slider__handle--is-touched::after{display:block;opacity:1;visibility:visible}.wux-slider__mark{width:8rpx;height:8rpx;position:absolute;border-radius:50%;background-color:#ccc;transform:translateX(-50%)}.wux-slider__max,.wux-slider__min{font-size:28rpx;color:rgba(0,0,0,.45)}.wux-slider__min{margin-right:24rpx}.wux-slider__max{margin-left:24rpx}.wux-slider--disabled{opacity:.3}