1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
| <!-- 状态启用切换 -->
| <template>
| <!-- TODO: v-model 双向绑定 -->
| <el-switch
| v-model="row.UseStatus"
| :active-value="UseStatusEnum.Enable"
| :inactive-value="UseStatusEnum.Disable"
| size="small"
| @change="changeStatus(row, useStatusApi, req, label)"
| />
| </template>
|
| <script setup lang="ts">
| import { UseStatusEnum } from '/@/views/types';
| import { changeStatus } from './useStatus';
| import { type PropType } from 'vue';
| import { requestProps } from '/@/projectCom/common';
| defineProps({
| row: {
| type: Object as PropType<{
| UseStatus: boolean;
| [key: string]: any;
| }>,
| required: true,
| },
| useStatusApi: {
| required: true,
| },
| ...requestProps,
|
| label: {
| type: String,
| },
| });
| </script>
| <style scoped lang="scss"></style>
|
|