import html from "html"; import { ref } from "vue"; import request from "../../request/index.js"; import AppList from "../../components/list/index.js"; import useConfig from "../../models/centralized-control.js"; export default { components: { AppList }, template: html``, setup(props, context) { const listRef = ref(null); const config = useConfig(); const onCommand = async (item, rows, load) => { if (item.path === "open-version" || item.path === "closed-version") { const url = `${config.baseUrl}/${item.path}`; await request( url, rows.map((o) => o.id), { method: "POST" } ); console.log(context); await load(); } }; return { config, onCommand }; }, };