@sigmaott/base-library-next 2.2.6 → 2.2.7

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.
Files changed (63) hide show
  1. package/.npmrc +3 -0
  2. package/locales/en.yaml +289 -289
  3. package/locales/vi.yaml +294 -294
  4. package/nuxt.config.ts +18 -18
  5. package/package.json +32 -33
  6. package/public/routes.json +33 -33
  7. package/src/api/axios.ts +3 -3
  8. package/src/api/index.ts +86 -86
  9. package/src/api-client-library/.openapi-generator/FILES +20 -20
  10. package/src/api-client-library/.openapi-generator-ignore +23 -23
  11. package/src/api-client-library/api/health-api.ts +119 -119
  12. package/src/api-client-library/api/presets-api.ts +599 -599
  13. package/src/api-client-library/api/profiles-api.ts +676 -676
  14. package/src/api-client-library/api.ts +20 -20
  15. package/src/api-client-library/base.ts +72 -72
  16. package/src/api-client-library/common.ts +150 -150
  17. package/src/api-client-library/configuration.ts +101 -101
  18. package/src/api-client-library/git_push.sh +57 -57
  19. package/src/api-client-library/index.ts +18 -18
  20. package/src/api-client-library/models/create-preset-dto.ts +223 -223
  21. package/src/api-client-library/models/create-profile-dto.ts +45 -45
  22. package/src/api-client-library/models/health-controller-get-health200-response-info-value.ts +32 -32
  23. package/src/api-client-library/models/health-controller-get-health200-response.ts +51 -51
  24. package/src/api-client-library/models/health-controller-get-health503-response.ts +51 -51
  25. package/src/api-client-library/models/index.ts +7 -7
  26. package/src/api-client-library/models/update-preset-dto.ts +223 -223
  27. package/src/api-client-library/models/update-profile-dto.ts +45 -45
  28. package/src/components/MediaSelection.vue +40 -40
  29. package/src/components/PresetModify.vue +154 -154
  30. package/src/components/PresetTable.vue +114 -114
  31. package/src/components/ProfileAllList.vue +137 -137
  32. package/src/components/ProfileFormModal.vue +79 -79
  33. package/src/components/ProfileModify.vue +152 -152
  34. package/src/components/ProfileTable.vue +68 -68
  35. package/src/components/WatermarkDraggableItem.vue +88 -88
  36. package/src/components/channel/ConfigWatermarkItem.vue +239 -239
  37. package/src/components/channel/WatermarkPreview.vue +19 -19
  38. package/src/components/common/Vue3DraggableResizable/Container.vue +71 -71
  39. package/src/components/common/Vue3DraggableResizable/index.vue +1327 -1327
  40. package/src/components/common/Vue3DraggableResizable/utils/dom.js +63 -63
  41. package/src/components/common/Vue3DraggableResizable/utils/fns.js +37 -37
  42. package/src/components/common/VueDraggableResizable/dom.js +63 -63
  43. package/src/components/common/VueDraggableResizable/fns.js +37 -37
  44. package/src/components/common/VueDraggableResizable/index.vue +958 -958
  45. package/src/components/preset/ConfigItem.vue +956 -956
  46. package/src/components/profile/ConfigItem.vue +765 -765
  47. package/src/components/profile/TableColumns.vue +137 -137
  48. package/src/components/shared/AudioInfoViewer.vue +101 -101
  49. package/src/components/shared/MediaInfoViewer.vue +249 -249
  50. package/src/components/shared/MediaInfoViewerSmall.vue +111 -105
  51. package/src/components/shared/PopoverProfile.vue +17 -17
  52. package/src/components/shared/VideoInfoViewer.vue +136 -136
  53. package/src/components/shared/fileSizeFilter.ts +26 -26
  54. package/src/composables/preset.ts +141 -141
  55. package/src/public/build-time.json +1 -1
  56. package/src/public/favicon.svg +15 -15
  57. package/src/public/logo.svg +9 -9
  58. package/src/public/routes.json +86 -86
  59. package/src/utils/common.ts +175 -175
  60. package/src/utils/config.ts +19 -19
  61. package/src/utils/preset.ts +353 -353
  62. package/src/utils/profile.ts +30 -30
  63. package/tsconfig.json +3 -3
@@ -1,114 +1,114 @@
1
- <script lang="ts" setup>
2
- import { normalizePreset } from '../utils/preset'
3
- import { getPresets } from '../api'
4
-
5
- const props = defineProps<{
6
- params: any
7
- height?: string
8
- }>()
9
-
10
- const emit = defineEmits<{
11
- (e: 'update:params', params: any): void
12
- (e: 'select', preset: any): void
13
- }>()
14
-
15
- const params = useVModel(props, 'params', emit)
16
-
17
- const _q = computed({
18
- get: () => params.value.q,
19
- set: (val) => {
20
- params.value.q = val
21
- },
22
- })
23
-
24
- const q = useQueryParams(_q, {})
25
-
26
- const { data, isLoading, refetch } = useQuery(
27
- [QueryKeys.LibraryPreset, params],
28
- async () => {
29
- // return (await getProfiles(params, { params: { q: toReactive(q) } })).data
30
- return (await getPresets(params.value)).data
31
- },
32
- )
33
- const refreshForm = reactive({
34
- enabled: true,
35
- duration: 20,
36
- })
37
-
38
- const tableData = computed(() => {
39
- return data.value?.data.map(normalizePreset)
40
- })
41
- const tableRef = ref(null)
42
- const paginationRef = ref(null)
43
-
44
- function handleSizeChange(value: number) {
45
- params.value.perPage = value
46
- params.value.page = 1
47
- }
48
- </script>
49
-
50
- <template>
51
- <el-table
52
- v-bind="$attrs"
53
- ref="tableRef"
54
- v-loading="isLoading"
55
- :data="tableData"
56
- stripe border
57
- class="w-ful my-16px flex-1"
58
- :height="height"
59
- @row-click="$emit('select', $event)"
60
- >
61
- <el-table-column prop="id" label="ID" width="60" fixed>
62
- <template #default="{ row }">
63
- <SSCopyButton :value="row.id" />
64
- </template>
65
- </el-table-column>
66
-
67
- <el-table-column label="Name" prop="name" min-width="130">
68
- <template #default="scope">
69
- {{ scope.row.name }}
70
- </template>
71
- </el-table-column>
72
- <el-table-column align="center" label="Type" prop="type" min-width="100">
73
- <template #default="scope">
74
- {{ scope.row.type }}
75
- </template>
76
- </el-table-column>
77
- <el-table-column label="Information" prop="information" width="500">
78
- <template #default="scope">
79
- <SharedVideoInfoViewer v-if="scope.row.type === 'video'" :video="scope.row" />
80
-
81
- <SharedAudioInfoViewer v-if="scope.row.type === 'audio'" :audio="scope.row" />
82
- </template>
83
- </el-table-column>
84
- <el-table-column label="Option" prop="option" min-width="130">
85
- <template #default="scope">
86
- <div>{{ scope.row.option || '' }}</div>
87
- </template>
88
- </el-table-column>
89
- <el-table-column label="Description" prop="description" min-width="130">
90
- <template #default="scope">
91
- <div>{{ scope.row.description }}</div>
92
- </template>
93
- </el-table-column>
94
- <slot />
95
- </el-table>
96
- <div class="flex items-center justify-between">
97
- <el-pagination
98
- v-if="tableData"
99
- ref="paginationRef"
100
- v-model:current-page="params.page"
101
- background
102
- :page-sizes="[10, 15, 20, 50, 100]"
103
- :page-size="params.perPage"
104
- layout="total, sizes, prev, pager, next, jumper"
105
- :total="data?.total || 0"
106
- @size-change="handleSizeChange"
107
- />
108
- <SSAutoRefresh
109
- :duration="refreshForm.duration"
110
- :enabled="refreshForm.enabled"
111
- @on-refresh="refetch"
112
- />
113
- </div>
114
- </template>
1
+ <script lang="ts" setup>
2
+ import { normalizePreset } from '../utils/preset'
3
+ import { getPresets } from '../api'
4
+
5
+ const props = defineProps<{
6
+ params: any
7
+ height?: string
8
+ }>()
9
+
10
+ const emit = defineEmits<{
11
+ (e: 'update:params', params: any): void
12
+ (e: 'select', preset: any): void
13
+ }>()
14
+
15
+ const params = useVModel(props, 'params', emit)
16
+
17
+ const _q = computed({
18
+ get: () => params.value.q,
19
+ set: (val) => {
20
+ params.value.q = val
21
+ },
22
+ })
23
+
24
+ const q = useQueryParams(_q, {})
25
+
26
+ const { data, isLoading, refetch } = useQuery(
27
+ [QueryKeys.LibraryPreset, params],
28
+ async () => {
29
+ // return (await getProfiles(params, { params: { q: toReactive(q) } })).data
30
+ return (await getPresets(params.value)).data
31
+ },
32
+ )
33
+ const refreshForm = reactive({
34
+ enabled: true,
35
+ duration: 20,
36
+ })
37
+
38
+ const tableData = computed(() => {
39
+ return data.value?.data.map(normalizePreset)
40
+ })
41
+ const tableRef = ref(null)
42
+ const paginationRef = ref(null)
43
+
44
+ function handleSizeChange(value: number) {
45
+ params.value.perPage = value
46
+ params.value.page = 1
47
+ }
48
+ </script>
49
+
50
+ <template>
51
+ <el-table
52
+ v-bind="$attrs"
53
+ ref="tableRef"
54
+ v-loading="isLoading"
55
+ :data="tableData"
56
+ stripe border
57
+ class="w-ful my-16px flex-1"
58
+ :height="height"
59
+ @row-click="$emit('select', $event)"
60
+ >
61
+ <el-table-column prop="id" label="ID" width="60" fixed>
62
+ <template #default="{ row }">
63
+ <SSCopyButton :value="row.id" />
64
+ </template>
65
+ </el-table-column>
66
+
67
+ <el-table-column label="Name" prop="name" min-width="130">
68
+ <template #default="scope">
69
+ {{ scope.row.name }}
70
+ </template>
71
+ </el-table-column>
72
+ <el-table-column align="center" label="Type" prop="type" min-width="100">
73
+ <template #default="scope">
74
+ {{ scope.row.type }}
75
+ </template>
76
+ </el-table-column>
77
+ <el-table-column label="Information" prop="information" width="500">
78
+ <template #default="scope">
79
+ <SharedVideoInfoViewer v-if="scope.row.type === 'video'" :video="scope.row" />
80
+
81
+ <SharedAudioInfoViewer v-if="scope.row.type === 'audio'" :audio="scope.row" />
82
+ </template>
83
+ </el-table-column>
84
+ <el-table-column label="Option" prop="option" min-width="130">
85
+ <template #default="scope">
86
+ <div>{{ scope.row.option || '' }}</div>
87
+ </template>
88
+ </el-table-column>
89
+ <el-table-column label="Description" prop="description" min-width="130">
90
+ <template #default="scope">
91
+ <div>{{ scope.row.description }}</div>
92
+ </template>
93
+ </el-table-column>
94
+ <slot />
95
+ </el-table>
96
+ <div class="flex items-center justify-between">
97
+ <el-pagination
98
+ v-if="tableData"
99
+ ref="paginationRef"
100
+ v-model:current-page="params.page"
101
+ background
102
+ :page-sizes="[10, 15, 20, 50, 100]"
103
+ :page-size="params.perPage"
104
+ layout="total, sizes, prev, pager, next, jumper"
105
+ :total="data?.total || 0"
106
+ @size-change="handleSizeChange"
107
+ />
108
+ <SSAutoRefresh
109
+ :duration="refreshForm.duration"
110
+ :enabled="refreshForm.enabled"
111
+ @on-refresh="refetch"
112
+ />
113
+ </div>
114
+ </template>
@@ -1,137 +1,137 @@
1
- <script lang="ts" setup>
2
- import { normalizeProfile } from '../utils/profile'
3
- import { deleteProfile, getProfiles } from '../api'
4
- import ProfileFormModal from './ProfileFormModal.vue'
5
-
6
- const emit = defineEmits(['selectItem'])
7
- const { t } = useI18n()
8
- const route = useRoute()
9
- const params = reactive({
10
- ...useRouteQueries({
11
- page: 1,
12
- perPage: 15,
13
- q: '{}',
14
- }),
15
- populates: 'sigmaChannels',
16
- sort: '',
17
- })
18
- const q = useQueryParams(toRef(params, 'q'), {})
19
-
20
- const { data, isLoading, refetch } = useQuery(
21
- [QueryKeys.LibraryProfile, params],
22
- async () => {
23
- return (await getProfiles(params)).data
24
- },
25
- )
26
- const refreshForm = reactive({
27
- enabled: true,
28
- duration: 20,
29
- })
30
-
31
- const tableData = computed(() => {
32
- return data.value?.data.map(normalizeProfile)
33
- })
34
-
35
- function handleSizeChange(value: number) {
36
- params.perPage = value
37
- params.page = 1
38
- }
39
-
40
- let modifierFormMode = $ref<'create' | 'edit' | 'clone'>('create')
41
- let isShowModifierForm = $ref(route.query.mode === 'create')
42
- let edittingProfileId = $ref<string>()
43
-
44
- function handleEdit(id: string) {
45
- modifierFormMode = 'edit'
46
- isShowModifierForm = true
47
- edittingProfileId = id
48
- }
49
-
50
- function handleClone(id: string) {
51
- modifierFormMode = 'clone'
52
- isShowModifierForm = true
53
- edittingProfileId = id
54
- }
55
-
56
- function handleDestroy(id: string) {
57
- ElMessageBox.confirm('This will permanently delete the profile. Continue?', 'Warning', {
58
- confirmButtonText: 'OK',
59
- cancelButtonText: 'Cancel',
60
- type: 'warning',
61
- })
62
- .then(async () => {
63
- const res = await deleteProfile(id)
64
- if (res) {
65
- ElMessage({
66
- message: 'Delete successful',
67
- type: 'success',
68
- })
69
- refetch()
70
- }
71
- })
72
- .catch(() => { })
73
- }
74
-
75
- function handleAdd() {
76
- modifierFormMode = 'create'
77
- isShowModifierForm = true
78
- }
79
-
80
- function selecteRow(row: any) {
81
- emit('selectItem', row)
82
- }
83
- </script>
84
-
85
- <template>
86
- <div class="flex items-center justify-between">
87
- <div class="font-bold uppercase">
88
- {{ t('Profile.list') }}
89
- </div>
90
- <el-button type="primary" @click="handleAdd">
91
- <template #icon>
92
- <div class="i-ep:plus" />
93
- </template>
94
- Add
95
- </el-button>
96
- </div>
97
- <ProfileTable :is-loading="isLoading" :selecte-row="selecteRow" :table-data="tableData">
98
- <el-table-column fixed="right" label="Action" align="center" width="200">
99
- <template #default="scope">
100
- <el-button-group>
101
- <el-tooltip content="Edit">
102
- <el-button type="primary" @click="handleEdit(scope.row.id)">
103
- <template #icon>
104
- <div class="i-ep:edit" />
105
- </template>
106
- </el-button>
107
- </el-tooltip>
108
- <el-tooltip content="Clone" placement="top-start">
109
- <el-button type="warning" @click="handleClone(scope.row.id)">
110
- <template #icon>
111
- <div class="i-ep:document-copy" />
112
- </template>
113
- </el-button>
114
- </el-tooltip>
115
- <el-tooltip content="Delete">
116
- <el-button type="danger" @click="handleDestroy(scope.row.id)">
117
- <template #icon>
118
- <div class="i-ep:delete" />
119
- </template>
120
- </el-button>
121
- </el-tooltip>
122
- </el-button-group>
123
- </template>
124
- </el-table-column>
125
- </ProfileTable>
126
- <div class="flex items-center justify-between">
127
- <el-pagination
128
- v-if="tableData" v-model:current-page="params.page" background
129
- :page-sizes="[10, 20, 50, 100]" :page-size="params.perPage" layout="total, sizes, prev, pager, next, jumper"
130
- :total="data?.total || 0" @size-change="handleSizeChange"
131
- />
132
-
133
- <SSAutoRefresh :duration="10" enabled @on-refresh="refetch" />
134
- </div>
135
-
136
- <ProfileFormModal :id="edittingProfileId" v-model="isShowModifierForm" :mode="modifierFormMode" @on-refresh="refetch" />
137
- </template>
1
+ <script lang="ts" setup>
2
+ import { normalizeProfile } from '../utils/profile'
3
+ import { deleteProfile, getProfiles } from '../api'
4
+ import ProfileFormModal from './ProfileFormModal.vue'
5
+
6
+ const emit = defineEmits(['selectItem'])
7
+ const { t } = useI18n()
8
+ const route = useRoute()
9
+ const params = reactive({
10
+ ...useRouteQueries({
11
+ page: 1,
12
+ perPage: 15,
13
+ q: '{}',
14
+ }),
15
+ populates: 'sigmaChannels',
16
+ sort: '',
17
+ })
18
+ const q = useQueryParams(toRef(params, 'q'), {})
19
+
20
+ const { data, isLoading, refetch } = useQuery(
21
+ [QueryKeys.LibraryProfile, params],
22
+ async () => {
23
+ return (await getProfiles(params)).data
24
+ },
25
+ )
26
+ const refreshForm = reactive({
27
+ enabled: true,
28
+ duration: 20,
29
+ })
30
+
31
+ const tableData = computed(() => {
32
+ return data.value?.data.map(normalizeProfile)
33
+ })
34
+
35
+ function handleSizeChange(value: number) {
36
+ params.perPage = value
37
+ params.page = 1
38
+ }
39
+
40
+ let modifierFormMode = $ref<'create' | 'edit' | 'clone'>('create')
41
+ let isShowModifierForm = $ref(route.query.mode === 'create')
42
+ let edittingProfileId = $ref<string>()
43
+
44
+ function handleEdit(id: string) {
45
+ modifierFormMode = 'edit'
46
+ isShowModifierForm = true
47
+ edittingProfileId = id
48
+ }
49
+
50
+ function handleClone(id: string) {
51
+ modifierFormMode = 'clone'
52
+ isShowModifierForm = true
53
+ edittingProfileId = id
54
+ }
55
+
56
+ function handleDestroy(id: string) {
57
+ ElMessageBox.confirm('This will permanently delete the profile. Continue?', 'Warning', {
58
+ confirmButtonText: 'OK',
59
+ cancelButtonText: 'Cancel',
60
+ type: 'warning',
61
+ })
62
+ .then(async () => {
63
+ const res = await deleteProfile(id)
64
+ if (res) {
65
+ ElMessage({
66
+ message: 'Delete successful',
67
+ type: 'success',
68
+ })
69
+ refetch()
70
+ }
71
+ })
72
+ .catch(() => { })
73
+ }
74
+
75
+ function handleAdd() {
76
+ modifierFormMode = 'create'
77
+ isShowModifierForm = true
78
+ }
79
+
80
+ function selecteRow(row: any) {
81
+ emit('selectItem', row)
82
+ }
83
+ </script>
84
+
85
+ <template>
86
+ <div class="flex items-center justify-between">
87
+ <div class="font-bold uppercase">
88
+ {{ t('Profile.list') }}
89
+ </div>
90
+ <el-button type="primary" @click="handleAdd">
91
+ <template #icon>
92
+ <div class="i-ep:plus" />
93
+ </template>
94
+ Add
95
+ </el-button>
96
+ </div>
97
+ <ProfileTable :is-loading="isLoading" :selecte-row="selecteRow" :table-data="tableData">
98
+ <el-table-column fixed="right" label="Action" align="center" width="200">
99
+ <template #default="scope">
100
+ <el-button-group>
101
+ <el-tooltip content="Edit">
102
+ <el-button type="primary" @click="handleEdit(scope.row.id)">
103
+ <template #icon>
104
+ <div class="i-ep:edit" />
105
+ </template>
106
+ </el-button>
107
+ </el-tooltip>
108
+ <el-tooltip content="Clone" placement="top-start">
109
+ <el-button type="warning" @click="handleClone(scope.row.id)">
110
+ <template #icon>
111
+ <div class="i-ep:document-copy" />
112
+ </template>
113
+ </el-button>
114
+ </el-tooltip>
115
+ <el-tooltip content="Delete">
116
+ <el-button type="danger" @click="handleDestroy(scope.row.id)">
117
+ <template #icon>
118
+ <div class="i-ep:delete" />
119
+ </template>
120
+ </el-button>
121
+ </el-tooltip>
122
+ </el-button-group>
123
+ </template>
124
+ </el-table-column>
125
+ </ProfileTable>
126
+ <div class="flex items-center justify-between">
127
+ <el-pagination
128
+ v-if="tableData" v-model:current-page="params.page" background
129
+ :page-sizes="[10, 20, 50, 100]" :page-size="params.perPage" layout="total, sizes, prev, pager, next, jumper"
130
+ :total="data?.total || 0" @size-change="handleSizeChange"
131
+ />
132
+
133
+ <SSAutoRefresh :duration="10" enabled @on-refresh="refetch" />
134
+ </div>
135
+
136
+ <ProfileFormModal :id="edittingProfileId" v-model="isShowModifierForm" :mode="modifierFormMode" @on-refresh="refetch" />
137
+ </template>
@@ -1,79 +1,79 @@
1
- <script lang="ts" setup>
2
- import { getProfile } from '../api'
3
- import ProfileModify from './ProfileModify.vue'
4
-
5
- const props = defineProps<{
6
- modelValue: boolean
7
- mode: 'create' | 'edit' | 'clone'
8
- id: string
9
- }>()
10
-
11
- const emit = defineEmits<{
12
- (e: 'onRefresh'): void
13
- }>()
14
-
15
- const id = toRef(props, 'id')
16
- const mode = toRef(props, 'mode')
17
-
18
- const { data: profileDetail, isLoading } = useQuery(
19
- [QueryKeys.LibraryProfile, id, mode],
20
- async () => {
21
- return (await getProfile(id.value!)).data
22
- },
23
- {
24
- enabled: computed(() => !!id.value),
25
- },
26
- )
27
-
28
- const { modelValue: visible } = defineModels<{
29
- modelValue: boolean
30
- }>()
31
-
32
- const modifyTitle = computed(() => {
33
- if (props.mode === 'create')
34
- return 'Create'
35
- if (props.mode === 'edit')
36
- return 'Edit'
37
- if (props.mode === 'clone')
38
- return 'Clone'
39
- return '-'
40
- })
41
-
42
- function handleCloseModifierForm() {
43
- visible.value = false
44
- }
45
-
46
- function handleDoneAddProfile() {
47
- handleCloseModifierForm()
48
- emit('onRefresh')
49
- }
50
-
51
- function handleDoneCloneProfile() {
52
- handleCloseModifierForm()
53
- emit('onRefresh')
54
- }
55
-
56
- function handleDoneUpdateProfile() {
57
- handleCloseModifierForm()
58
- emit('onRefresh')
59
- }
60
- </script>
61
-
62
- <template>
63
- <el-dialog
64
- v-model="visible"
65
- append-to-body
66
- width="75%"
67
- :title="modifyTitle"
68
- :before-close="handleCloseModifierForm"
69
- >
70
- <ProfileModify
71
- :mode="mode"
72
- :item="props.mode !== 'create' ? profileDetail : null"
73
- @added="handleDoneAddProfile"
74
- @cloned="handleDoneCloneProfile"
75
- @updated="handleDoneUpdateProfile"
76
- @close="visible = false"
77
- />
78
- </el-dialog>
79
- </template>
1
+ <script lang="ts" setup>
2
+ import { getProfile } from '../api'
3
+ import ProfileModify from './ProfileModify.vue'
4
+
5
+ const props = defineProps<{
6
+ modelValue: boolean
7
+ mode: 'create' | 'edit' | 'clone'
8
+ id: string
9
+ }>()
10
+
11
+ const emit = defineEmits<{
12
+ (e: 'onRefresh'): void
13
+ }>()
14
+
15
+ const id = toRef(props, 'id')
16
+ const mode = toRef(props, 'mode')
17
+
18
+ const { data: profileDetail, isLoading } = useQuery(
19
+ [QueryKeys.LibraryProfile, id, mode],
20
+ async () => {
21
+ return (await getProfile(id.value!)).data
22
+ },
23
+ {
24
+ enabled: computed(() => !!id.value),
25
+ },
26
+ )
27
+
28
+ const { modelValue: visible } = defineModels<{
29
+ modelValue: boolean
30
+ }>()
31
+
32
+ const modifyTitle = computed(() => {
33
+ if (props.mode === 'create')
34
+ return 'Create'
35
+ if (props.mode === 'edit')
36
+ return 'Edit'
37
+ if (props.mode === 'clone')
38
+ return 'Clone'
39
+ return '-'
40
+ })
41
+
42
+ function handleCloseModifierForm() {
43
+ visible.value = false
44
+ }
45
+
46
+ function handleDoneAddProfile() {
47
+ handleCloseModifierForm()
48
+ emit('onRefresh')
49
+ }
50
+
51
+ function handleDoneCloneProfile() {
52
+ handleCloseModifierForm()
53
+ emit('onRefresh')
54
+ }
55
+
56
+ function handleDoneUpdateProfile() {
57
+ handleCloseModifierForm()
58
+ emit('onRefresh')
59
+ }
60
+ </script>
61
+
62
+ <template>
63
+ <el-dialog
64
+ v-model="visible"
65
+ append-to-body
66
+ width="75%"
67
+ :title="modifyTitle"
68
+ :before-close="handleCloseModifierForm"
69
+ >
70
+ <ProfileModify
71
+ :mode="mode"
72
+ :item="props.mode !== 'create' ? profileDetail : null"
73
+ @added="handleDoneAddProfile"
74
+ @cloned="handleDoneCloneProfile"
75
+ @updated="handleDoneUpdateProfile"
76
+ @close="visible = false"
77
+ />
78
+ </el-dialog>
79
+ </template>