Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/avatar/avatar.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<template
wx:elif="{{iconName || _.isNoEmptyObj(iconData)}}"
is="icon"
data="{{class: classPrefix + '__icon', tClass: prefix + '-class-icon', name: iconName, ...iconData}}"
data="{{cls: classPrefix + '__icon', tClass: prefix + '-class-icon', name: iconName, ...iconData}}"
/>
<view wx:else class="{{classPrefix}}__text {{prefix}}-class-content">
<slot />
Expand Down
2 changes: 1 addition & 1 deletion src/button/button.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<template
wx:if="{{iconName || _.isNoEmptyObj(iconData)}}"
is="icon"
data="{{class: classPrefix + '__icon', tClass: prefix + '-class-icon', ariaHidden: true, name: iconName, ...iconData}}"
data="{{cls: classPrefix + '__icon', tClass: prefix + '-class-icon', ariaHidden: true, name: iconName, ...iconData}}"
/>
<t-loading
wx:if="{{loading}}"
Expand Down
4 changes: 4 additions & 0 deletions src/calendar/calendar.less
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@
}
}

&__confirm-btn {
font-size: 40px;
}

&__footer {
padding: 32rpx;
}
Expand Down
2 changes: 1 addition & 1 deletion src/calendar/template.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<!-- <t-button block theme="primary" v-bind="confirmBtn" bind:tap="handleConfirm" /> -->
<template
is="button"
data="{{ block: true, theme: 'primary', class: 't-calendar__confirm-btn', ...innerConfirmBtn }}"
data="{{ block: true, theme: 'primary', cls: 't-calendar__confirm-btn', ...innerConfirmBtn }}"
/>
</block>
</view>
Expand Down
2 changes: 1 addition & 1 deletion src/common/template/badge.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
shape="{{shape || 'circle'}}"
show-zero="{{showZero || false}}"
size="{{size || 'medium'}}"
t-class="{{class}} {{tClass}}"
t-class="{{cls}} {{tClass}}"
t-class-content="{{tClassContent}}"
t-class-count="{{tClassCount}}"
/>
Expand Down
4 changes: 2 additions & 2 deletions src/common/template/button.wxml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template name="button">
<t-button
block="{{block || false}}"
class="{{class || ''}}"
t-class="{{externalClass}}"
class="{{cls || ''}}"
t-class="{{tClass}}"
disabled="{{disabled || false}}"
data-type="{{type}}"
data-extra="{{extra}}"
Expand Down
2 changes: 1 addition & 1 deletion src/common/template/icon.wxml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template name="icon">
<t-icon
style="{{style || ''}}"
class="{{class}}"
class="{{cls}}"
t-class="{{tClass}}"
prefix="{{prefix || ''}}"
name="{{name || ''}}"
Expand Down
2 changes: 1 addition & 1 deletion src/common/template/image.wxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template name="image">
<t-image
class="{{class}}"
class="{{cls}}"
t-class="{{tClass}}"
t-class-load="{{tClassLoad}}"
style="{{style || ''}}"
Expand Down
4 changes: 2 additions & 2 deletions src/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export default class Dialog extends SuperComponent {
const btn = buttonMap[key];
const base: Record<string, any> = {
block: true,
class: [...cls, `${classPrefix}__button--${key}`],
externalClass: [...externalCls, `${prefix}-class-${key}`],
cls: [...cls, `${classPrefix}__button--${key}`],
tClass: [...externalCls, `${prefix}-class-${key}`],
variant: rect.buttonVariant,
};

Expand Down
2 changes: 1 addition & 1 deletion src/dialog/dialog.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<block wx:for="{{actions}}" wx:key="index">
<template
is="button"
data="{{block: true, type: 'action', extra: index, externalClass: prefix + '-class-action', class: this.getActionClass(classPrefix, buttonLayout), ...item }}"
data="{{block: true, type: 'action', extra: index, tClass: prefix + '-class-action', cls: this.getActionClass(classPrefix, buttonLayout), ...item }}"
/>
</block>
</block>
Expand Down
2 changes: 1 addition & 1 deletion src/empty/empty.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<template
wx:elif="{{iconName || _.isNoEmptyObj(iconData)}}"
is="icon"
data="{{class: classPrefix + '__icon', name: iconName, ...iconData}}"
data="{{cls: classPrefix + '__icon', name: iconName, ...iconData}}"
/>
<slot wx:else name="image" />
</view>
Expand Down
2 changes: 1 addition & 1 deletion src/fab/fab.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
>
<template
is="button"
data="{{ ...baseButtonProps, icon, ...buttonProps, externalClass: prefix + '-fab__button', content: text, ariaLabel}}"
data="{{ ...baseButtonProps, icon, ...buttonProps, tClass: classPrefix + '__button', content: text, ariaLabel}}"
/>
</view>
2 changes: 1 addition & 1 deletion src/grid-item/grid-item.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<template
wx:if="{{iconName || _.isNoEmptyObj(iconData)}}"
is="icon"
data="{{class: classPrefix + '__icon', name: iconName, ...iconData}}"
data="{{cls: classPrefix + '__icon', name: iconName, ...iconData}}"
/>
</view>
</t-badge>
Expand Down
4 changes: 2 additions & 2 deletions src/progress/progress.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<template
wx:if="{{_.includes(this.STATUS, status)}}"
is="icon"
data="{{class: classPrefix + '__icon', size:'44rpx', name: this.LINE_STATUS_ICON[status]}}"
data="{{cls: classPrefix + '__icon', size:'44rpx', name: this.LINE_STATUS_ICON[status]}}"
></template>
<text wx:else>{{ _.isString(label)? label: computedProgress + '%' }}</text>
</view>
Expand Down Expand Up @@ -86,7 +86,7 @@
<template
wx:if="{{_.includes(this.STATUS, status)}}"
is="icon"
data="{{class: classPrefix + '__icon', size:'96rpx', name: this.CIRCLE_STATUS_ICON[status]}}"
data="{{cls: classPrefix + '__icon', size:'96rpx', name: this.CIRCLE_STATUS_ICON[status]}}"
></template>
<text wx:else>{{ _.isString(label)? label: computedProgress + '%' }}</text>
</view>
Expand Down
2 changes: 1 addition & 1 deletion src/result/result.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
>
<view aria-hidden="true" class="{{classPrefix}}__thumb">
<t-image wx:if="{{image}}" t-class="{{prefix}}-class-image" src="{{image}}" mode="aspectFit" />
<template wx:elif="{{_icon}}" is="icon" data="{{class: classPrefix + '__icon', ..._icon }}" />
<template wx:elif="{{_icon}}" is="icon" data="{{cls: classPrefix + '__icon', ..._icon }}" />
<slot name="image" />
</view>

Expand Down
2 changes: 1 addition & 1 deletion src/side-bar-item/side-bar-item.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<view class="{{classPrefix}}__prefix"></view>
<view class="{{classPrefix}}__suffix"></view>
</block>
<template wx:if="{{_icon}}" is="icon" data="{{ class: classPrefix + '__icon', ..._icon }}" />
<template wx:if="{{_icon}}" is="icon" data="{{ cls: classPrefix + '__icon', ..._icon }}" />
<block wx:if="{{badgeProps}}">
<template is="badge" data="{{ ...badgeProps, content: label }}" />
</block>
Expand Down
4 changes: 2 additions & 2 deletions src/swipe-cell/swipe-cell.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<template
wx:if="{{item.icon}}"
is="icon"
data="{{class: classPrefix + '__icon', name: item.icon, ...item.icon}}"
data="{{cls: classPrefix + '__icon', name: item.icon, ...item.icon}}"
></template>
<text wx:if="{{item.text}}" class="{{classPrefix}}__text">{{item.text}}</text>
</view>
Expand All @@ -51,7 +51,7 @@
<template
wx:if="{{item.icon}}"
is="icon"
data="{{class: classPrefix + '__icon', name: item.icon, ...item.icon}}"
data="{{cls: classPrefix + '__icon', name: item.icon, ...item.icon}}"
></template>
<text wx:if="{{item.text}}" class="{{classPrefix}}__text">{{item.text}}</text>
</view>
Expand Down
2 changes: 1 addition & 1 deletion src/swiper/swiper.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
>
<template
is="image"
data="{{ class: classPrefix + '__image-host', tClass: this.getImageClass(prefix, current, index, list), style: 'height: ' + _.addUnit(height), src: _.isObject(item) ? item.value : item, mode: 'aspectFill', dataset: index, ...imageProps, bindload: 'onImageLoad' }}"
data="{{ cls: classPrefix + '__image-host', tClass: this.getImageClass(prefix, current, index, list), style: 'height: ' + _.addUnit(height), src: _.isObject(item) ? item.value : item, mode: 'aspectFill', dataset: index, ...imageProps, bindload: 'onImageLoad' }}"
/>
</swiper-item>
</swiper>
Expand Down
2 changes: 1 addition & 1 deletion src/tabs/tabs.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
class="{{_.cls(classPrefix + '__item-inner', [theme, ['active', currentIndex === index]])}}"
aria-hidden="{{ item.badgeProps.dot || item.badgeProps.count }}"
>
<template wx:if="{{item.icon}}" is="icon" data="{{ class: classPrefix + '__icon', ...item.icon }}" />
<template wx:if="{{item.icon}}" is="icon" data="{{ cls: classPrefix + '__icon', ...item.icon }}" />
<block wx:if="{{item.badgeProps}}">
<template is="badge" data="{{ ...item.badgeProps, content: item.label }}" />
</block>
Expand Down