Skip to content

Commit

Permalink
feat: 更新 axnnm
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondYuan committed Jan 19, 2024
1 parent 5e13ad7 commit 1e92550
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 37 deletions.
6 changes: 2 additions & 4 deletions compiled/alipay/src/Grid/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
<block
a:for="{{ items }}"
a:for-index="index"
a:for-item="item"
a:key="{{ item.title }}">
a:for-item="item">
<view
data-item="{{ item }}"
class="ant-grid-item ant-grid-item-{{ gridItemLayout }} {{ sjs.checkNeedVerticalSpace(items.length, index, columns) ? 'ant-grid-item-vertical-space' : '' }} ant-grid-item-columns-{{ columns }} {{ sjs.checkShowSplitLine(index, items.length, columns, mode, showDivider) ? 'ant-grid-item-line' : '' }}"
Expand Down Expand Up @@ -59,8 +58,7 @@
<block
a:for="{{ items }}"
a:for-index="index"
a:for-item="item"
a:key="{{ item.title }}">
a:for-item="item">
<view
data-item="{{ item }}"
class="ant-grid-item ant-grid-item-{{ gridItemLayout }} ant-grid-item-columns-scroll {{ sjs.checkShowSplitLine(index, items.length, columns, mode, showDivider) ? 'ant-grid-item-line' : '' }}"
Expand Down
12 changes: 8 additions & 4 deletions compiled/alipay/src/Pagination/index.axml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
<import-sjs
from="./index.sjs"
name="sjs" />

<view
class="ant-page-infinite {{ className || '' }}"
style="{{ style || '' }}">
<scroll-view
scrollX="{{ true }}"
scroll-x="{{ true }}"
class="ant-page-infinite-content"
id="ant-pageInfinite-{{ $id }}"
onScroll="{{ sjs.supportSjs ? sjs.changeScollDistance : 'onScroll' }}">
onScroll="{{ supportSjs ? sjs.changeScollDistance : 'onScroll' }}">
<slot />
</scroll-view>
<view class="ant-page-infinite-wrap">
<view
class="ant-page-infinite-area"
style="{{ fillColor ? `background-color:${fillColor}` : '' }}">
style="{{ fillColor ? 'background-color:' + fillColor : '' }}">
<view
class="ant-page-infinite-move"
style="{{ frontColor ? `background-color:${frontColor}` : '' }}; transform: translateX({{ pageDeg }}%);" />
style="{{ frontColor ? 'background-color:' + frontColor : '' }}; transform: translateX({{ pageDeg }}%);" />
</view>
</view>
</view>
10 changes: 5 additions & 5 deletions compiled/alipay/src/Toast/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
a:if="{{ type === 'loading' }}"
type="mini" />
<am-icon
a:if="{{ type === 'warning' }}"
a:elif="{{ type === 'warning' }}"
type="ExclamationOutline"
className="ant-toast-icon" />
<am-icon
a:if="{{ type === 'error' }}"
a:elif="{{ type === 'error' }}"
type="CloseOutline"
className="ant-toast-icon" />
<am-icon
a:if="{{ type === 'success' }}"
a:elif="{{ type === 'success' }}"
type="CheckOutline"
className="ant-toast-icon" />
</view>
<am-icon
a:if="{{ icon }}"
a:elif="{{ icon }}"
type="{{ icon }}"
className="ant-toast-icon" />
<view
a:if="{{ image }}"
a:elif="{{ image }}"
style="background-image: url({{ image }})"
class="ant-toast-image" />
<view class="ant-toast-text-body">
Expand Down
1 change: 0 additions & 1 deletion compiled/alipay/src/tsxml/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export interface Props {
style?: string;
ref?: string;
name?: string;
scrollX?: any;
current?: any;
'a:key'?: string;
scrollLeft?: any;
Expand Down
2 changes: 0 additions & 2 deletions src/Grid/index.axml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export default ({
>
{items.map((item, index) => (
<View
key={item.title}
data-item={item}
class={`ant-grid-item ant-grid-item-${gridItemLayout} ${
sjs.checkNeedVerticalSpace(items.length, index, columns)
Expand Down Expand Up @@ -100,7 +99,6 @@ export default ({
<View class={`ant-grid ant-grid-${mode}`}>
{items.map((item, index) => (
<View
key={item.title}
data-item={item}
class={`ant-grid-item ant-grid-item-${gridItemLayout} ant-grid-item-columns-scroll ${
sjs.checkShowSplitLine(
Expand Down
11 changes: 6 additions & 5 deletions src/Pagination/index.axml.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
import { ScrollView, View, Slot, InternalData, Component } from 'tsxml';
import { TSXMLProps } from 'tsxml';
import { IPaginationProps } from './props';
import sjs from './index.sjs';

export default (
{ className, style, fillColor, frontColor }: TSXMLProps<IPaginationProps>,
{ sjs, pageDeg, $id }: InternalData
{ pageDeg, $id, supportSjs }: InternalData
) => (
<Component>
<View class={`ant-page-infinite ${className || ''}`} style={style || ''}>
<ScrollView
scrollX={true}
scroll-x={true}
class="ant-page-infinite-content"
id={`ant-pageInfinite-${$id}`}
onScroll={sjs.supportSjs ? sjs.changeScollDistance : 'onScroll'}
onScroll={supportSjs ? sjs.changeScollDistance : 'onScroll'}
>
<Slot></Slot>
</ScrollView>
<View class="ant-page-infinite-wrap">
<View
class="ant-page-infinite-area"
style={fillColor ? `background-color:${fillColor}` : ''}
style={fillColor ? 'background-color:' + fillColor : ''}
>
<View
class="ant-page-infinite-move"
style={`${
frontColor ? `background-color:${frontColor}` : ''
frontColor ? 'background-color:' + frontColor : ''
}; transform: translateX(${pageDeg}%);`}
></View>
</View>
Expand Down
33 changes: 18 additions & 15 deletions src/Toast/index.axml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,29 @@ export default (
}`}
style={style || ''}
>
{type && (
{type ? (
<View class="ant-toast-normal">
{type === 'loading' && <Loading type="mini" />}
{type === 'warning' && (
{type === 'loading' ? (
<Loading type="mini" />
) : type === 'warning' ? (
<AmIcon type="ExclamationOutline" className="ant-toast-icon" />
)}
{type === 'error' && (
) : type === 'error' ? (
<AmIcon type="CloseOutline" className="ant-toast-icon" />
)}
{type === 'success' && (
<AmIcon type="CheckOutline" className="ant-toast-icon" />
) : (
type === 'success' && (
<AmIcon type="CheckOutline" className="ant-toast-icon" />
)
)}
</View>
)}
{icon && <AmIcon type={icon} className="ant-toast-icon" />}
{image && (
<View
style={`background-image: url(${image})`}
class="ant-toast-image"
/>
) : icon ? (
<AmIcon type={icon} className="ant-toast-icon" />
) : (
image && (
<View
style={`background-image: url(${image})`}
class="ant-toast-image"
/>
)
)}
<View class="ant-toast-text-body">
<View class="ant-toast-text-box">
Expand Down
1 change: 0 additions & 1 deletion src/tsxml/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export interface Props {
style?: string;
ref?: string;
name?: string;
scrollX?: any;
current?: any;
'a:key'?: string;
scrollLeft?: any;
Expand Down

0 comments on commit 1e92550

Please sign in to comment.