ywana-core8 0.1.53 → 0.1.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +49 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +49 -12
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +49 -12
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +22 -0
- package/src/site/site.js +3 -0
package/package.json
CHANGED
package/src/domain/TablePage.js
CHANGED
@@ -600,6 +600,28 @@ const TableContext = (url, field, host, urlQuery, params) => {
|
|
600
600
|
return
|
601
601
|
},
|
602
602
|
|
603
|
+
async removeChecked() {
|
604
|
+
try {
|
605
|
+
const promises = this.checked.map(id => API.remove(id))
|
606
|
+
await Promise.all(promises)
|
607
|
+
await this.load()
|
608
|
+
} catch (error) {
|
609
|
+
console.log(error)
|
610
|
+
}
|
611
|
+
return
|
612
|
+
},
|
613
|
+
|
614
|
+
async removeAll() {
|
615
|
+
try {
|
616
|
+
const promises = this.all.map(item => API.remove(item.id))
|
617
|
+
await Promise.all(promises)
|
618
|
+
await this.load()
|
619
|
+
} catch (error) {
|
620
|
+
console.log(error)
|
621
|
+
}
|
622
|
+
return
|
623
|
+
},
|
624
|
+
|
603
625
|
changeFilters(filters) {
|
604
626
|
this.filters = filters
|
605
627
|
},
|
package/src/site/site.js
CHANGED
@@ -241,6 +241,9 @@ const SiteMenu = ({ iconSrc, title, children, min }) => {
|
|
241
241
|
|
242
242
|
const sections = useMemo(() => {
|
243
243
|
return children.reduce((acc, child) => {
|
244
|
+
|
245
|
+
if (!child || !child.props) return acc
|
246
|
+
|
244
247
|
const section = child.props.section || "";
|
245
248
|
if (!acc[section]) acc[section] = [];
|
246
249
|
const { title } = child.props;
|