
	<wxs src="./helper.wxs" module="helper"/>
	<view class="mc-table mc-class {{ border ? 'has-border' : ''}} {{ allowScroll && isScrolling ? '' : 'is-scrolling-none' }} {{ !allowScroll || isScrollingEnd ? 'is-scrolling-right-none' : ''}}" id="{{ tableId }}">
		<!-- TODO: sticky需要mc-sticky支持placeholder -->
		<!-- sticky 代理滑动有延迟，且无法弹性，为了更好的效果，普通模式下不走代理滑动 -->
		<!-- 如果在scroll-view将会无效（如不能套在recycle-list里），需要在页面级滚动 -->
		<mc-sticky wx:if="{{ sticky }}" mc-class="mc-table__header" offsetTop="{{ offsetTop }}" placeholder>
			<view wx:if="{{ doLayouted && headerHeightStyle && helper.hasFixed(columns) }}" class="mc-table__fixed">
				<mc-table-header fixed="left" header-class="header-class" border="{{ border }}" columns="{{ columns }}" defaultSort="{{ defaultSort }}" tHeadStyle="{{ tHeadStyle }}" tHeadTrStyle="{{ tHeadTrStyle }};" tHeadThStyle="{{ tHeadThStyle }}; {{ headerHeightStyle }}" bind:header-click="handleHeaderClick"/>
			</view>

			<scroll-view id="{{ tableHeaderId }}" scroll-x="{{ allowScroll }}" scroll-left="{{ scrollHeaderLeft }}" style="{{ mcStyle }}" class="mc-table__scroll-view" data-trigger="{{ tableBodyId }}" data-delegate="scrollHeaderLeft" binddragstart="handleScroll">
				<mc-table-header wx:if="{{ doLayouted }}" header-class="header-class" border="{{ border }}" columns="{{ columns }}" defaultSort="{{ defaultSort }}" containerWidthStyle="{{ containerWidthStyle }}" tHeadStyle="{{ tHeadStyle }}" tHeadTrStyle="{{ tHeadTrStyle }};" tHeadThStyle="{{ tHeadThStyle }}; {{ headerHeightStyle }}" bind:ready="handleHeaderReady" bind:header-click="handleHeaderClick"/>
			</scroll-view>

			<view wx:if="{{ doLayouted && headerHeightStyle && helper.hasRightFixed(columns) }}" class="mc-table__fixed-right">
				<mc-table-header fixed="right" header-class="header-class" border="{{ border }}" columns="{{ columns }}" defaultSort="{{ defaultSort }}" tHeadStyle="{{ tHeadStyle }}" tHeadTrStyle="{{ tHeadTrStyle }}" tHeadThStyle="{{ tHeadThStyle }}; {{ headerHeightStyle }}" bind:header-click="handleHeaderClick"/>
			</view>
		</mc-sticky>
		<view class="mc-table__body">
			<view wx:if="{{ doLayouted && headerHeightStyle && helper.hasFixed(columns) }}" class="mc-table__fixed">
				<mc-table-header wx:if="{{ !sticky }}" fixed="left" header-class="header-class" border="{{ border }}" columns="{{ columns }}" defaultSort="{{ defaultSort }}" tHeadStyle="{{ tHeadStyle }}" tHeadTrStyle="{{ tHeadTrStyle }};" tHeadThStyle="{{ tHeadThStyle }}; {{ headerHeightStyle }}" bind:header-click="handleHeaderClick"/>
				<mc-table-body fixed="left" row-class="row-class" cell-class="cell-class" dataSource="{{ rebuildData }}" border="{{ border }}" stripe="{{ stripe }}" columns="{{ columns }}" tBodyTrStyle="{{ tBodyTrStyle }}" tBodyTdStyle="{{ tBodyTdStyle }}" bind:row-click="handleRowClick"/>
			</view>

			<scroll-view id="{{ tableBodyId }}" scroll-x="{{ allowScroll }}" scroll-left="{{ scrollBodyLeft }}" style="{{ mcStyle }}" class="mc-table__scroll-view" data-trigger="{{ tableHeaderId }}" data-delegate="scrollHeaderLeft" bindscroll="handleScroll">
				<mc-table-header wx:if="{{ !sticky && doLayouted }}" header-class="header-class" border="{{ border }}" columns="{{ columns }}" defaultSort="{{ defaultSort }}" containerWidthStyle="{{ containerWidthStyle }}" tHeadStyle="{{ tHeadStyle }}" tHeadTrStyle="{{ tHeadTrStyle }};" tHeadThStyle="{{ tHeadThStyle }}; {{ headerHeightStyle }}" bind:ready="handleHeaderReady" bind:header-click="handleHeaderClick"/>
				<mc-table-body wx:if="{{ doLayouted }}" row-class="row-class" cell-class="cell-class" dataSource="{{ rebuildData }}" border="{{ border }}" stripe="{{ stripe }}" columns="{{ columns }}" containerWidthStyle="{{ containerWidthStyle }}" tBodyTrStyle="{{ tBodyTrStyle }}" tBodyTdStyle="{{ tBodyTdStyle }}" bind:ready="handleBodyReady" bind:row-click="handleRowClick"/>
			</scroll-view>

			<view wx:if="{{ doLayouted && headerHeightStyle && helper.hasRightFixed(columns) }}" class="mc-table__fixed-right">
				<mc-table-header wx:if="{{ !sticky }}" fixed="right" header-class="header-class" border="{{ border }}" columns="{{ columns }}" defaultSort="{{ defaultSort }}" tHeadStyle="{{ tHeadStyle }}" tHeadTrStyle="{{ tHeadTrStyle }}" tHeadThStyle="{{ tHeadThStyle }}; {{ headerHeightStyle }}" bind:header-click="handleHeaderClick"/>
				<mc-table-body fixed="right" row-class="row-class" cell-class="cell-class" dataSource="{{ rebuildData }}" border="{{ border }}" stripe="{{ stripe }}" columns="{{ columns }}" tBodyTrStyle="{{ tBodyTrStyle }}" tBodyTdStyle="{{ tBodyTdStyle }}" bind:row-click="handleRowClick"/>
			</view>
		</view>
		<!-- 列表无数据处理 -->
		<view class="mc-table__empty" wx:if="{{ dataSource.length === 0 }}">
			<slot wx:if="{{ useEmptySlot }}" name="empty"/>
			<view wx:elif="{{ empty }}">{{ empty }}</view>
		</view>
	</view>
