| | |
| | | <template v-else>高级表格</template> |
| | | </div> |
| | | <div class="search"> |
| | | <search-area @change="onSearchChange" :columns="columns" > |
| | | <search-area :format-conditions="formatConditions" @change="onSearchChange" :columns="columns" > |
| | | <template :slot="slot" v-for="slot in slots"> |
| | | <slot :name="slot"></slot> |
| | | </template> |
| | |
| | | <a-icon @click="refresh" class="action" :type="loading ? 'loading' : 'reload'" /> |
| | | </a-tooltip> |
| | | <action-size v-model="sSize" class="action" /> |
| | | <action-columns :columns="columns" @reset="onColumnsReset" class="action"> |
| | | <template :slot="slot" v-for="slot in slots"> |
| | | <slot :name="slot"></slot> |
| | | </template> |
| | | </action-columns> |
| | | <a-tooltip title="列配置"> |
| | | <action-columns :columns="columns" @reset="onColumnsReset" class="action"> |
| | | <template :slot="slot" v-for="slot in slots"> |
| | | <slot :name="slot"></slot> |
| | | </template> |
| | | </action-columns> |
| | | </a-tooltip> |
| | | <a-tooltip title="全屏"> |
| | | <a-icon @click="toggleScreen" class="action" :type="fullScreen ? 'fullscreen-exit' : 'fullscreen'" /> |
| | | </a-tooltip> |
| | |
| | | customHeaderRow: Function, |
| | | customRow: Function, |
| | | getPopupContainer: Function, |
| | | transformCellText: Function |
| | | transformCellText: Function, |
| | | formatConditions: Boolean |
| | | }, |
| | | provide() { |
| | | return { |
| | |
| | | id: `${new Date().getTime()}-${Math.floor(Math.random() * 10)}`, |
| | | sSize: this.size || 'default', |
| | | fullScreen: false, |
| | | conditions: [] |
| | | conditions: {} |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | refresh() { |
| | | this.$emit('refresh', this.conditions) |
| | | }, |
| | | onSearchChange(conditions) { |
| | | onSearchChange(conditions, searchOptions) { |
| | | this.conditions = conditions |
| | | this.$emit('search', conditions) |
| | | this.$emit('search', conditions, searchOptions) |
| | | }, |
| | | toggleScreen() { |
| | | if (this.fullScreen) { |