-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ Support graphic file manager
- Loading branch information
Showing
10 changed files
with
366 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/components/Device/components/ControlBar/FileManage/FileDialog/AddPopover/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<template> | ||
<el-popover | ||
ref="popoverRef" | ||
placement="bottom-start" | ||
:width="300" | ||
trigger="click" | ||
@hide="onHide" | ||
> | ||
<template #reference> | ||
<slot name="reference"></slot> | ||
</template> | ||
<div class="flex items-center space-x-2"> | ||
<el-input | ||
v-model="dirname" | ||
:placeholder="$t('common.input.placeholder')" | ||
clearable | ||
class="flex-1 w-0" | ||
></el-input> | ||
|
||
<el-button type="primary" class="flex-none" @click="handleConfirm"> | ||
{{ $t('common.confirm') }} | ||
</el-button> | ||
</div> | ||
</el-popover> | ||
</template> | ||
|
||
<script setup> | ||
const emit = defineEmits(['success']) | ||
const defaultText = 'NewFolder' | ||
const dirname = ref(defaultText) | ||
const popoverRef = ref() | ||
function onHide() { | ||
dirname.value = defaultText | ||
} | ||
function handleConfirm() { | ||
emit('success', dirname.value) | ||
popoverRef.value.hide() | ||
} | ||
</script> | ||
|
||
<style></style> |
Oops, something went wrong.