|
@@ -23,7 +23,7 @@
|
|
|
<Popup @register="addRegister" :popupData="popupData" @saveData="saveData" />
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
- import { defineComponent, reactive, ref, toRefs, unref } from 'vue';
|
|
|
+ import { defineComponent, reactive, onUpdated, ref, toRefs, unref } from 'vue';
|
|
|
import Popup from './popup.vue';
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
@@ -39,12 +39,16 @@
|
|
|
interface Btn {
|
|
|
disable_btn: boolean;
|
|
|
}
|
|
|
+ const props = {
|
|
|
+ ids: { type: Array, default: [] },
|
|
|
+ };
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'User',
|
|
|
components: { BasicTable, Popup },
|
|
|
+ props,
|
|
|
emits: ['select'],
|
|
|
- setup(_, { emit }) {
|
|
|
+ setup(props, { emit }) {
|
|
|
const { createMessage } = useMessage();
|
|
|
const { success /*, error*/ } = createMessage;
|
|
|
const tableRef = ref<Nullable<TableActionType>>(null);
|
|
@@ -132,6 +136,9 @@
|
|
|
success('创建成功!');
|
|
|
});
|
|
|
}
|
|
|
+ onUpdated(() => {
|
|
|
+ getTableAction().setSelectedRowKeys(props.ids);
|
|
|
+ });
|
|
|
return {
|
|
|
popupData,
|
|
|
tableRef,
|