文件操作 - index.tsx
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/give/src/Views/Components/ListTable/ListTableHeaders/index.tsx
编辑文件内容
import React from 'react'; import styles from './ListTableHeaders.module.scss'; //@since 2.24.0 used to handle sort direction and column id. const ListTableHeaders = ({column, sortField, setSortDirectionForColumn}) => { const handleItemSort = (event, column) => { event.preventDefault(); const direction = sortField.sortDirection === 'desc' ? 'asc' : 'desc'; setSortDirectionForColumn(column, direction); }; return ( <> {column.sortable ? ( <button type="button" aria-label="sort" className={styles.sortButton} onClick={(event) => column.sortable && handleItemSort(event, column.id)} > <div className={styles.text}>{column.label}</div> <div key={column.id} id={column.id}> <svg width="16" height="7" viewBox="0 0 16 7" fill="none" xmlns="http://www.w3.org/2000/svg" data-sorting={sortField.sortColumn === column.id && sortField.sortDirection === 'asc'}> <path d="M11.1699 6.5L5.66986 0.5L0.169861 6.5L11.1699 6.5Z" fill={ sortField.sortColumn === column.id && sortField.sortDirection === 'asc' ? '#0878b0' : '#dddddd' } /> </svg> <svg width="16" height="7" viewBox="0 0 16 7" fill="none" xmlns="http://www.w3.org/2000/svg" data-sorting={sortField.sortColumn === column.id && sortField.sortDirection === 'desc'}> <path d="M0.169861 0.5L5.66986 6.5L11.1699 0.5H0.169861Z" fill={ sortField.sortColumn === column.id && sortField.sortDirection === 'desc' ? '#0878b0' : '#dddddd' } /> </svg> </div> </button> ) : ( <div className={styles.text} id={column.id}> {column.label} </div> )} </> ); }; export default ListTableHeaders;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件