@hostlink/nuxt-light 1.65.0 → 1.66.2
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.
- package/README.md +1 -0
- package/dist/module.d.mts +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +29 -0
- package/dist/runtime/components/{l-audit-card.d.vue.ts → L/AuditCard.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-audit-card.vue → L/AuditCard.vue} +1 -1
- package/dist/runtime/components/{l-audit-card.vue.d.ts → L/AuditCard.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-bar.vue → L/Bar.vue} +1 -2
- package/dist/runtime/components/{l-btn.d.vue.ts → L/Btn.d.vue.ts} +0 -1
- package/dist/runtime/components/{l-btn.vue → L/Btn.vue} +17 -14
- package/dist/runtime/components/{l-btn.vue.d.ts → L/Btn.vue.d.ts} +0 -1
- package/dist/runtime/components/{l-card.vue → L/Card.vue} +8 -6
- package/dist/runtime/components/{l-checkbox.vue → L/Checkbox.vue} +4 -2
- package/dist/runtime/components/L/CustomField/Add.vue +6 -1
- package/dist/runtime/components/{l-customizer.vue.d.ts → L/Customizer.d.vue.ts} +19 -3
- package/dist/runtime/components/{l-customizer.d.vue.ts → L/Customizer.vue.d.ts} +19 -3
- package/dist/runtime/components/L/Database/create-table-dialog.vue +34 -26
- package/dist/runtime/components/{l-date-picker.vue → L/DatePicker.vue} +85 -103
- package/dist/runtime/components/L/DialogDatabaseFieldAdd.d.vue.ts +21 -0
- package/dist/runtime/components/{l-dialog-database-field-add.vue → L/DialogDatabaseFieldAdd.vue} +14 -15
- package/dist/runtime/components/L/DialogDatabaseFieldAdd.vue.d.ts +21 -0
- package/dist/runtime/components/L/DocumentViewer.d.vue.ts +50 -0
- package/dist/runtime/components/L/DocumentViewer.vue +154 -0
- package/dist/runtime/components/L/DocumentViewer.vue.d.ts +50 -0
- package/dist/runtime/components/L/DocumentViewerDialog.d.vue.ts +65 -0
- package/dist/runtime/components/L/DocumentViewerDialog.vue +67 -0
- package/dist/runtime/components/L/DocumentViewerDialog.vue.d.ts +65 -0
- package/dist/runtime/components/{l-editor.vue → L/Editor.vue} +31 -17
- package/dist/runtime/components/L/Fieldset.d.vue.ts +15 -27
- package/dist/runtime/components/L/Fieldset.vue +4 -10
- package/dist/runtime/components/L/Fieldset.vue.d.ts +15 -27
- package/dist/runtime/components/{l-file-manager.vue → L/FileManager.vue} +15 -30
- package/dist/runtime/components/{l-input-xlsx.d.vue.ts → L/FileManagerLabels.d.vue.ts} +7 -8
- package/dist/runtime/components/{l-input-xlsx.vue.d.ts → L/FileManagerLabels.vue.d.ts} +7 -8
- package/dist/runtime/components/{l-file-manager-preview.vue → L/FileManagerPreview.vue} +23 -22
- package/dist/runtime/components/{l-icon-picker.vue → L/IconPicker.vue} +13 -13
- package/dist/runtime/components/{l-input.d.vue.ts → L/Input.d.vue.ts} +7 -3
- package/dist/runtime/components/{l-input.vue → L/Input.vue} +59 -80
- package/dist/runtime/components/{l-input.vue.d.ts → L/Input.vue.d.ts} +7 -3
- package/dist/runtime/components/{l-input-select.d.vue.ts → L/InputSelect.d.vue.ts} +3 -2
- package/dist/runtime/components/{l-input-select.vue → L/InputSelect.vue} +27 -9
- package/dist/runtime/components/{l-input-select.vue.d.ts → L/InputSelect.vue.d.ts} +3 -2
- package/dist/runtime/components/L/InputXlsx.d.vue.ts +17 -0
- package/dist/runtime/components/L/InputXlsx.vue +81 -0
- package/dist/runtime/components/L/InputXlsx.vue.d.ts +17 -0
- package/dist/runtime/components/{l-item.vue → L/Item.vue} +14 -5
- package/dist/runtime/components/{l-list.vue → L/List.vue} +18 -21
- package/dist/runtime/components/{l-page.vue → L/Page.vue} +6 -8
- package/dist/runtime/components/L/Select.d.vue.ts +46 -0
- package/dist/runtime/components/{l-select.vue → L/Select.vue} +37 -18
- package/dist/runtime/components/L/Select.vue.d.ts +46 -0
- package/dist/runtime/components/L/System/Setting/logs.vue +75 -0
- package/dist/runtime/components/{l-tab.d.vue.ts → L/Tab.d.vue.ts} +2 -2
- package/dist/runtime/components/L/Tab.vue +38 -0
- package/dist/runtime/components/{l-tab.vue.d.ts → L/Tab.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-table.vue → L/Table.vue} +71 -78
- package/dist/runtime/components/{l-tabs.vue → L/Tabs.vue} +15 -8
- package/dist/runtime/components/{l-time-picker.d.vue.ts → L/TimePicker.d.vue.ts} +3 -2
- package/dist/runtime/components/L/TimePicker.vue +73 -0
- package/dist/runtime/components/{l-time-picker.vue.d.ts → L/TimePicker.vue.d.ts} +3 -2
- package/dist/runtime/components/{MyTest.d.vue.ts → L/User/apikey.d.vue.ts} +4 -4
- package/dist/runtime/components/L/User/apikey.vue +18 -0
- package/dist/runtime/components/{MyTest.vue.d.ts → L/User/apikey.vue.d.ts} +4 -4
- package/dist/runtime/components/L/ViewBtn.d.vue.ts +3 -0
- package/dist/runtime/components/L/ViewBtn.vue.d.ts +3 -0
- package/dist/runtime/composables/defineLightModel.d.ts +1 -1
- package/dist/runtime/composables/model.d.ts +1 -1
- package/dist/runtime/composables/showDocumentDialog.d.ts +9 -0
- package/dist/runtime/composables/showDocumentDialog.js +15 -0
- package/dist/runtime/composables/showUploadFilesDialog.js +1 -1
- package/dist/runtime/composables/useLight.d.ts +22 -22
- package/dist/runtime/composables/useLightProps.d.ts +26 -0
- package/dist/runtime/composables/useLightProps.js +73 -0
- package/dist/runtime/models/APIKey.d.ts +2 -0
- package/dist/runtime/models/APIKey.js +20 -0
- package/dist/runtime/models/SystemValue.d.ts +2 -0
- package/dist/runtime/models/SystemValue.js +15 -0
- package/dist/runtime/pages/CustomField/index.vue +5 -5
- package/dist/runtime/pages/System/database/table.vue +77 -63
- package/dist/runtime/pages/System/index.vue +1 -1
- package/dist/runtime/pages/System/menu/index.vue +5 -1
- package/dist/runtime/pages/System/setting.vue +4 -2
- package/dist/runtime/pages/System/view_as.vue +4 -1
- package/dist/runtime/pages/SystemValue/index.vue +4 -1
- package/dist/runtime/pages/User/createAccessToken.d.vue.ts +3 -0
- package/dist/runtime/pages/User/createAccessToken.vue +64 -0
- package/dist/runtime/pages/User/createAccessToken.vue.d.ts +3 -0
- package/dist/runtime/pages/User/index.vue +2 -2
- package/dist/runtime/pages/User/profile.d.vue.ts +1 -1
- package/dist/runtime/pages/User/profile.vue +49 -5
- package/dist/runtime/pages/User/profile.vue.d.ts +1 -1
- package/dist/runtime/plugin.js +1 -22
- package/package.json +5 -4
- package/dist/runtime/components/MyTest.vue +0 -11
- package/dist/runtime/components/l-dialog-database-field-add.d.vue.ts +0 -9
- package/dist/runtime/components/l-dialog-database-field-add.vue.d.ts +0 -9
- package/dist/runtime/components/l-file-manager-labels.d.vue.ts +0 -6
- package/dist/runtime/components/l-file-manager-labels.vue.d.ts +0 -6
- package/dist/runtime/components/l-input-xlsx.vue +0 -60
- package/dist/runtime/components/l-select.d.vue.ts +0 -20
- package/dist/runtime/components/l-select.vue.d.ts +0 -20
- package/dist/runtime/components/l-tab.vue +0 -30
- package/dist/runtime/components/l-time-picker.vue +0 -71
- package/dist/runtime/components/{l-action-btn.d.vue.ts → L/ActionBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-action-btn.vue → L/ActionBtn.vue} +0 -0
- package/dist/runtime/components/{l-action-btn.vue.d.ts → L/ActionBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-add-btn.d.vue.ts → L/AddBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-add-btn.vue → L/AddBtn.vue} +0 -0
- package/dist/runtime/components/{l-add-btn.vue.d.ts → L/AddBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-alert.d.vue.ts → L/Alert.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-alert.vue → L/Alert.vue} +0 -0
- package/dist/runtime/components/{l-alert.vue.d.ts → L/Alert.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-app.d.vue.ts → L/App.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-app.vue → L/App.vue} +0 -0
- package/dist/runtime/components/{l-app.vue.d.ts → L/App.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-app-main.d.vue.ts → L/AppMain.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-app-main.vue → L/AppMain.vue} +0 -0
- package/dist/runtime/components/{l-app-main.vue.d.ts → L/AppMain.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-back-btn.d.vue.ts → L/BackBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-back-btn.vue → L/BackBtn.vue} +0 -0
- package/dist/runtime/components/{l-back-btn.vue.d.ts → L/BackBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-banner.d.vue.ts → L/Banner.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-banner.vue → L/Banner.vue} +0 -0
- package/dist/runtime/components/{l-banner.vue.d.ts → L/Banner.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-bar.d.vue.ts → L/Bar.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-bar.vue.d.ts → L/Bar.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-card.d.vue.ts → L/Card.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-card.vue.d.ts → L/Card.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-checkbox.d.vue.ts → L/Checkbox.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-checkbox.vue.d.ts → L/Checkbox.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-col.d.vue.ts → L/Col.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-col.vue → L/Col.vue} +0 -0
- package/dist/runtime/components/{l-col.vue.d.ts → L/Col.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-customizer.vue → L/Customizer.vue} +0 -0
- package/dist/runtime/components/{l-date-picker.d.vue.ts → L/DatePicker.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-date-picker.vue.d.ts → L/DatePicker.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-delete-btn.d.vue.ts → L/DeleteBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-delete-btn.vue → L/DeleteBtn.vue} +0 -0
- package/dist/runtime/components/{l-delete-btn.vue.d.ts → L/DeleteBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-dialog-upload-files.d.vue.ts → L/DialogUploadFiles.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-dialog-upload-files.vue → L/DialogUploadFiles.vue} +0 -0
- package/dist/runtime/components/{l-dialog-upload-files.vue.d.ts → L/DialogUploadFiles.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop.d.vue.ts → L/DragDrop.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop.vue → L/DragDrop.vue} +0 -0
- package/dist/runtime/components/{l-drag-drop.vue.d.ts → L/DragDrop.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop-container.d.vue.ts → L/DragDropContainer.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop-container.vue → L/DragDropContainer.vue} +0 -0
- package/dist/runtime/components/{l-drag-drop-container.vue.d.ts → L/DragDropContainer.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop-group.d.vue.ts → L/DragDropGroup.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop-group.vue → L/DragDropGroup.vue} +0 -0
- package/dist/runtime/components/{l-drag-drop-group.vue.d.ts → L/DragDropGroup.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-edit-btn.d.vue.ts → L/EditBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-edit-btn.vue → L/EditBtn.vue} +0 -0
- package/dist/runtime/components/{l-edit-btn.vue.d.ts → L/EditBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-editor.d.vue.ts → L/Editor.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-editor.vue.d.ts → L/Editor.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-facebook-button.d.vue.ts → L/FacebookButton.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-facebook-button.vue → L/FacebookButton.vue} +0 -0
- package/dist/runtime/components/{l-facebook-button.vue.d.ts → L/FacebookButton.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-fav-menu.d.vue.ts → L/FavMenu.d.vue.ts} +2 -2
- package/dist/runtime/components/{l-fav-menu.vue → L/FavMenu.vue} +0 -0
- package/dist/runtime/components/{l-menu.d.vue.ts → L/FavMenu.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-field.d.vue.ts → L/Field.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-field.vue → L/Field.vue} +0 -0
- package/dist/runtime/components/{l-field.vue.d.ts → L/Field.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file.d.vue.ts → L/File.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file.vue → L/File.vue} +0 -0
- package/dist/runtime/components/{l-file.vue.d.ts → L/File.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-manager.d.vue.ts → L/FileManager.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-file-manager.vue.d.ts → L/FileManager.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-file-manager-breadcrumbs.d.vue.ts → L/FileManagerBreadcrumbs.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-breadcrumbs.vue → L/FileManagerBreadcrumbs.vue} +0 -0
- package/dist/runtime/components/{l-file-manager-breadcrumbs.vue.d.ts → L/FileManagerBreadcrumbs.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-labels.vue → L/FileManagerLabels.vue} +0 -0
- package/dist/runtime/components/{l-file-manager-move.d.vue.ts → L/FileManagerMove.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-move.vue → L/FileManagerMove.vue} +0 -0
- package/dist/runtime/components/{l-file-manager-move.vue.d.ts → L/FileManagerMove.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-preview.d.vue.ts → L/FileManagerPreview.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-preview.vue.d.ts → L/FileManagerPreview.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-upload.d.vue.ts → L/FileUpload.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-file-upload.vue → L/FileUpload.vue} +0 -0
- package/dist/runtime/components/{l-file-upload.vue.d.ts → L/FileUpload.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-form.d.vue.ts → L/Form.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-form.vue → L/Form.vue} +0 -0
- package/dist/runtime/components/{l-form.vue.d.ts → L/Form.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-form-dialog.d.vue.ts → L/FormDialog.d.vue.ts} +2 -2
- package/dist/runtime/components/{l-form-dialog.vue → L/FormDialog.vue} +0 -0
- package/dist/runtime/components/{l-form-dialog.vue.d.ts → L/FormDialog.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-group-select.d.vue.ts → L/GroupSelect.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-group-select.vue → L/GroupSelect.vue} +0 -0
- package/dist/runtime/components/{l-group-select.vue.d.ts → L/GroupSelect.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-icon-picker.d.vue.ts → L/IconPicker.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-icon-picker.vue.d.ts → L/IconPicker.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-item.d.vue.ts → L/Item.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-item.vue.d.ts → L/Item.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-link.d.vue.ts → L/Link.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-link.vue → L/Link.vue} +0 -0
- package/dist/runtime/components/{l-link.vue.d.ts → L/Link.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-list.d.vue.ts → L/List.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-list.vue.d.ts → L/List.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-login.d.vue.ts → L/Login.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-login.vue → L/Login.vue} +0 -0
- package/dist/runtime/components/{l-login.vue.d.ts → L/Login.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-fav-menu.vue.d.ts → L/Menu.d.vue.ts} +2 -2
- package/dist/runtime/components/{l-menu.vue → L/Menu.vue} +0 -0
- package/dist/runtime/components/{l-menu.vue.d.ts → L/Menu.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-microsoft-button.d.vue.ts → L/MicrosoftButton.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-microsoft-button.vue → L/MicrosoftButton.vue} +0 -0
- package/dist/runtime/components/{l-microsoft-button.vue.d.ts → L/MicrosoftButton.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-page.d.vue.ts → L/Page.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-page.vue.d.ts → L/Page.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-repeater.d.vue.ts → L/Repeater.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-repeater.vue → L/Repeater.vue} +0 -0
- package/dist/runtime/components/{l-repeater.vue.d.ts → L/Repeater.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-row.d.vue.ts → L/Row.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-row.vue → L/Row.vue} +0 -0
- package/dist/runtime/components/{l-row.vue.d.ts → L/Row.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-save-btn.d.vue.ts → L/SaveBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-save-btn.vue → L/SaveBtn.vue} +0 -0
- package/dist/runtime/components/{l-save-btn.vue.d.ts → L/SaveBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-setup-2fa-dialog.d.vue.ts → L/Setup2faDialog.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-setup-2fa-dialog.vue → L/Setup2faDialog.vue} +0 -0
- package/dist/runtime/components/{l-setup-2fa-dialog.vue.d.ts → L/Setup2faDialog.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-small-box.d.vue.ts → L/SmallBox.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-small-box.vue → L/SmallBox.vue} +0 -0
- package/dist/runtime/components/{l-small-box.vue.d.ts → L/SmallBox.vue.d.ts} +1 -1
- /package/dist/runtime/components/{l-statistic.d.vue.ts → L/Statistic.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-statistic.vue → L/Statistic.vue} +0 -0
- /package/dist/runtime/components/{l-statistic.vue.d.ts → L/Statistic.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-view-btn.d.vue.ts → L/System/Setting/logs.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-view-btn.vue.d.ts → L/System/Setting/logs.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-table.d.vue.ts → L/Table.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-table.vue.d.ts → L/Table.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-tabs.d.vue.ts → L/Tabs.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-tabs.vue.d.ts → L/Tabs.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-test2.d.vue.ts → L/Test2.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-test2.vue → L/Test2.vue} +0 -0
- /package/dist/runtime/components/{l-test2.vue.d.ts → L/Test2.vue.d.ts} +0 -0
- /package/dist/runtime/components/{user-list.d.vue.ts → L/UserList.d.vue.ts} +0 -0
- /package/dist/runtime/components/{user-list.vue → L/UserList.vue} +0 -0
- /package/dist/runtime/components/{user-list.vue.d.ts → L/UserList.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-view-btn.vue → L/ViewBtn.vue} +0 -0
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useI18n } from "vue-i18n";
|
|
3
|
-
const
|
|
3
|
+
const { t } = useI18n();
|
|
4
4
|
const props = defineProps({
|
|
5
|
-
gutter: {
|
|
6
|
-
|
|
7
|
-
default: "none"
|
|
8
|
-
},
|
|
9
|
-
label: {
|
|
10
|
-
type: String,
|
|
11
|
-
default: null
|
|
12
|
-
}
|
|
5
|
+
gutter: { type: String, required: false, default: "none" },
|
|
6
|
+
label: { type: String, required: false }
|
|
13
7
|
});
|
|
14
8
|
</script>
|
|
15
9
|
|
|
@@ -19,7 +13,7 @@ body.body--dark fieldset{border-color:hsla(0,0%,100%,.6)}fieldset{border:1px sol
|
|
|
19
13
|
|
|
20
14
|
<template>
|
|
21
15
|
<fieldset>
|
|
22
|
-
<legend v-if="props.label">{{
|
|
16
|
+
<legend v-if="props.label">{{ t(props.label) }}</legend>
|
|
23
17
|
|
|
24
18
|
<div :class="`q-gutter-${props.gutter}`">
|
|
25
19
|
<slot></slot>
|
|
@@ -1,31 +1,19 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
gutter?: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
gutter: string;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
1
13
|
declare const _default: typeof __VLS_export;
|
|
2
14
|
export default _default;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
7
|
-
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
-
gutter: {
|
|
9
|
-
type: StringConstructor;
|
|
10
|
-
default: string;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
11
18
|
};
|
|
12
|
-
label: {
|
|
13
|
-
type: StringConstructor;
|
|
14
|
-
default: null;
|
|
15
|
-
};
|
|
16
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
-
gutter: {
|
|
18
|
-
type: StringConstructor;
|
|
19
|
-
default: string;
|
|
20
|
-
};
|
|
21
|
-
label: {
|
|
22
|
-
type: StringConstructor;
|
|
23
|
-
default: null;
|
|
24
|
-
};
|
|
25
|
-
}>> & Readonly<{}>, {
|
|
26
|
-
label: string;
|
|
27
|
-
gutter: string;
|
|
28
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
29
|
-
type __VLS_Slots = {
|
|
30
|
-
default?: ((props: {}) => any) | undefined;
|
|
31
19
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useI18n } from "vue-i18n";
|
|
3
3
|
import { ref, watch, computed } from "vue";
|
|
4
4
|
import { useQuasar, format, date } from "quasar";
|
|
5
|
-
import { q,
|
|
5
|
+
import { q, useLight, showUploadFilesDialog, showDocumentDialog } from "#imports";
|
|
6
6
|
import { getGrantedRights } from "@hostlink/light";
|
|
7
7
|
import { fs } from "@hostlink/light";
|
|
8
8
|
const { humanStorageSize } = format;
|
|
@@ -347,18 +347,10 @@ const getFilePublicUrl = async (location) => {
|
|
|
347
347
|
return file.publicUrl;
|
|
348
348
|
};
|
|
349
349
|
const onPreview = async (node) => {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
const height = window.innerHeight - 200;
|
|
355
|
-
$q.dialog({
|
|
356
|
-
autoClose: true,
|
|
357
|
-
fullWidth: true,
|
|
358
|
-
fullHeight: true,
|
|
359
|
-
title: "Preview PDF",
|
|
360
|
-
message: "<iframe src='" + await getFilePublicUrl(node.location) + "' width='100%' height='" + height + "px'></iframe>",
|
|
361
|
-
html: true
|
|
350
|
+
showDocumentDialog({
|
|
351
|
+
url: await getFilePublicUrl(node.location),
|
|
352
|
+
mimeType: node.mimeType,
|
|
353
|
+
title: node.name
|
|
362
354
|
});
|
|
363
355
|
};
|
|
364
356
|
const onClickInfo = async (row) => {
|
|
@@ -376,7 +368,7 @@ const canPreview = (file) => {
|
|
|
376
368
|
if (!file.mimeType) {
|
|
377
369
|
return false;
|
|
378
370
|
}
|
|
379
|
-
return file.mimeType.startsWith("image/");
|
|
371
|
+
return file.mimeType.startsWith("image/") || file.mimeType === "text/plain" || file.mimeType === "application/pdf" || file.mimeType.startsWith("video/") || file.mimeType.startsWith("audio/");
|
|
380
372
|
};
|
|
381
373
|
const onCheckTotalSize = async (folder) => {
|
|
382
374
|
const d = $q.dialog({
|
|
@@ -407,10 +399,7 @@ const onCheckTotalSize = async (folder) => {
|
|
|
407
399
|
};
|
|
408
400
|
const onDuplicateFile = async (file) => {
|
|
409
401
|
try {
|
|
410
|
-
const newPath = await
|
|
411
|
-
index: file.driveIndex,
|
|
412
|
-
path: file.path
|
|
413
|
-
});
|
|
402
|
+
const newPath = await fs.duplicateFile(file.location);
|
|
414
403
|
$q.notify({
|
|
415
404
|
type: "positive",
|
|
416
405
|
message: "File duplicated to " + newPath
|
|
@@ -562,8 +551,9 @@ const getFileIcon = (file) => {
|
|
|
562
551
|
<q-toolbar>
|
|
563
552
|
<l-file-manager-breadcrumbs v-model="selectedLocation" />
|
|
564
553
|
<q-space></q-space>
|
|
565
|
-
<q-btn flat round icon="sym_o_drive_file_move" v-if="selected.length > 0">
|
|
566
|
-
<l-file-manager-move @selected="moveToFolder($event)"
|
|
554
|
+
<q-btn flat round icon="sym_o_drive_file_move" v-if="selected.length > 0 && selectedLocation">
|
|
555
|
+
<l-file-manager-move @selected="moveToFolder($event)"
|
|
556
|
+
:current_location="selectedLocation"
|
|
567
557
|
:allow_cross_fs="selected.every(item => item.__typename == 'File')" />
|
|
568
558
|
<q-tooltip>
|
|
569
559
|
{{ $t('Move to') }}
|
|
@@ -624,7 +614,10 @@ const getFileIcon = (file) => {
|
|
|
624
614
|
</q-item-section>
|
|
625
615
|
</q-item>
|
|
626
616
|
|
|
627
|
-
<
|
|
617
|
+
<l-document-viewer :url="props.row.publicUrl"
|
|
618
|
+
height="100px"
|
|
619
|
+
|
|
620
|
+
:mime-type="props.row.mimeType" :title="props.row.name" v-if="props.row.mimeType.startsWith('image/')" />
|
|
628
621
|
|
|
629
622
|
</q-card>
|
|
630
623
|
</div>
|
|
@@ -636,7 +629,7 @@ const getFileIcon = (file) => {
|
|
|
636
629
|
<q-table flat :columns="columns" :rows="items" @row-dblclick="onDblclickRow" @row-click="onClickRow"
|
|
637
630
|
:pagination="pagination" row-key="location" selection="multiple" v-model:selected="selected" dense
|
|
638
631
|
:loading="loading" :loading-label="$t('Loading...')" :no-data-label="$t('No data available')"
|
|
639
|
-
separator="horizontal" :rows-per-page-options="[0]" color="primary">
|
|
632
|
+
separator="horizontal" :rows-per-page-options="[0]" color="primary" square>
|
|
640
633
|
<template #body-cell-icon="props">
|
|
641
634
|
<q-td auto-width>
|
|
642
635
|
<q-icon name="sym_o_folder" v-if="props.row.__typename == 'Folder'" size="sm" />
|
|
@@ -695,14 +688,6 @@ const getFileIcon = (file) => {
|
|
|
695
688
|
<q-item-section>{{ $t('Preview') }}</q-item-section>
|
|
696
689
|
</q-item>
|
|
697
690
|
|
|
698
|
-
<q-item clickable v-close-popup v-if="props.row.mimeType == 'application/pdf'"
|
|
699
|
-
@click="onPreviewPDF(props.row)">
|
|
700
|
-
<q-item-section avatar>
|
|
701
|
-
<q-icon name="sym_o_preview"></q-icon>
|
|
702
|
-
</q-item-section>
|
|
703
|
-
<q-item-section>{{ $t('Preview') }}</q-item-section>
|
|
704
|
-
</q-item>
|
|
705
|
-
|
|
706
691
|
<q-item clickable v-close-popup @click="onClickInfo(props.row)" class="lt-lg">
|
|
707
692
|
<q-item-section avatar>
|
|
708
693
|
<q-icon name="sym_o_info"></q-icon>
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
|
|
3
|
-
modelValue?: typeof modelValue['value'];
|
|
4
|
-
};
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
5
3
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
-
"update:modelValue": (
|
|
4
|
+
"update:modelValue": (...args: any[]) => void;
|
|
7
5
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
8
|
-
"onUpdate:modelValue"?: ((
|
|
6
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
9
7
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
type __VLS_ModelProps = {
|
|
9
|
+
modelValue?: string | undefined;
|
|
10
|
+
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
|
|
3
|
-
modelValue?: typeof modelValue['value'];
|
|
4
|
-
};
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
5
3
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
-
"update:modelValue": (
|
|
4
|
+
"update:modelValue": (...args: any[]) => void;
|
|
7
5
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
8
|
-
"onUpdate:modelValue"?: ((
|
|
6
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
9
7
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
type __VLS_ModelProps = {
|
|
9
|
+
modelValue?: string | undefined;
|
|
10
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { format, useQuasar, date } from "quasar";
|
|
3
3
|
import { computed } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
const api = getApiClient();
|
|
4
|
+
import { query } from "@hostlink/light";
|
|
6
5
|
const { humanStorageSize } = format;
|
|
7
6
|
const quasar = useQuasar();
|
|
8
7
|
const props = defineProps({
|
|
@@ -60,27 +59,29 @@ const isVideo = computed(() => {
|
|
|
60
59
|
</script>
|
|
61
60
|
|
|
62
61
|
<template>
|
|
63
|
-
<
|
|
64
|
-
|
|
62
|
+
<div>
|
|
63
|
+
<q-img :src="file.publicUrl" v-if="isImage"></q-img>
|
|
64
|
+
<q-video :src="file.publicUrl" v-else-if="isVideo"></q-video>
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
<q-list dense>
|
|
67
|
+
<l-item label="Name">{{ file.name }}</l-item>
|
|
68
|
+
<l-item label="Size">{{ size }} ({{ file.size }})</l-item>
|
|
69
|
+
<l-item label="Location">{{ file.path }}</l-item>
|
|
70
|
+
<l-item label="Last modified">{{ lastModifiedHuman }}</l-item>
|
|
71
|
+
<l-item label="MIME type">{{ file.mimeType }}</l-item>
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
<q-item>
|
|
74
|
+
<q-item-section side>
|
|
75
|
+
<q-item-label>URL</q-item-label>
|
|
76
|
+
</q-item-section>
|
|
77
|
+
<q-item-section style="align-items: flex-end;">
|
|
78
|
+
<q-item-label lines="1">{{ file.publicUrl }}</q-item-label>
|
|
79
|
+
</q-item-section>
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
<q-item-section side>
|
|
82
|
+
<q-btn size="md" flat dense round icon="sym_o_content_copy" @click="copyToClipboard(file.publicUrl)"></q-btn>
|
|
83
|
+
</q-item-section>
|
|
84
|
+
</q-item>
|
|
85
|
+
</q-list>
|
|
86
|
+
</div>
|
|
86
87
|
</template>
|
|
@@ -3237,33 +3237,34 @@ const icons = [
|
|
|
3237
3237
|
"sym_o_nest_gale_wifi"
|
|
3238
3238
|
];
|
|
3239
3239
|
const scroll = ref(null);
|
|
3240
|
+
const search = ref("");
|
|
3241
|
+
const scroll_index = ref(0);
|
|
3240
3242
|
const filteredIcons = computed(() => {
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
return icons.filter((icon) => {
|
|
3245
|
-
return icon.includes(search.value);
|
|
3246
|
-
});
|
|
3243
|
+
const q = search.value.trim();
|
|
3244
|
+
if (!q) return icons;
|
|
3245
|
+
return icons.filter((icon) => icon.includes(q));
|
|
3247
3246
|
});
|
|
3248
|
-
const scroll_index = ref(0);
|
|
3249
3247
|
const onLoad = (index, done) => {
|
|
3250
3248
|
scroll_index.value = index;
|
|
3251
3249
|
done();
|
|
3252
3250
|
};
|
|
3253
|
-
|
|
3254
|
-
watch(search, (val) => {
|
|
3255
|
-
scroll.value.reset();
|
|
3256
|
-
scroll.value.poll();
|
|
3251
|
+
watch(search, () => {
|
|
3257
3252
|
scroll_index.value = 0;
|
|
3253
|
+
scroll.value?.reset();
|
|
3254
|
+
scroll.value?.poll();
|
|
3258
3255
|
});
|
|
3259
3256
|
const displayIcons = computed(() => {
|
|
3260
3257
|
return filteredIcons.value.slice(0, 100 * scroll_index.value + 100);
|
|
3261
3258
|
});
|
|
3259
|
+
const onMenuHide = () => {
|
|
3260
|
+
search.value = "";
|
|
3261
|
+
scroll_index.value = 0;
|
|
3262
|
+
};
|
|
3262
3263
|
</script>
|
|
3263
3264
|
|
|
3264
3265
|
<template>
|
|
3265
3266
|
<q-btn v-bind="$props" :icon="modelValue ?? 'sym_o_link'">
|
|
3266
|
-
<q-menu :offset="[0, 8]">
|
|
3267
|
+
<q-menu :offset="[0, 8]" @hide="onMenuHide">
|
|
3267
3268
|
|
|
3268
3269
|
<q-item-label header>
|
|
3269
3270
|
<q-input v-model="search" label="Search" outlined dense>
|
|
@@ -3288,7 +3289,6 @@ const displayIcons = computed(() => {
|
|
|
3288
3289
|
|
|
3289
3290
|
<template v-slot:loading>
|
|
3290
3291
|
<div class="text-center q-my-md">
|
|
3291
|
-
|
|
3292
3292
|
<q-spinner-dots size="40px" />
|
|
3293
3293
|
</div>
|
|
3294
3294
|
</template>
|
|
@@ -9,11 +9,15 @@ type __VLS_ModelProps = {
|
|
|
9
9
|
modelValue?: any;
|
|
10
10
|
};
|
|
11
11
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare var
|
|
12
|
+
declare var __VLS_44: string, __VLS_45: any;
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
|
-
[K in NonNullable<typeof
|
|
14
|
+
[K in NonNullable<typeof __VLS_44>]?: (props: typeof __VLS_45) => any;
|
|
15
15
|
};
|
|
16
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
17
|
+
validate: () => any;
|
|
18
|
+
focus: () => any;
|
|
19
|
+
reset: () => any;
|
|
20
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
21
|
"update:modelValue": (value: any) => any;
|
|
18
22
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
23
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, ref, useAttrs } from "vue";
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
|
4
|
-
import tc2sc from "
|
|
4
|
+
import tc2sc from "../../composables/tc2sc";
|
|
5
|
+
import useLight from "../../composables/useLight";
|
|
6
|
+
import { useLightInputDefaults } from "../../composables/useLightProps";
|
|
7
|
+
defineOptions({ inheritAttrs: false });
|
|
5
8
|
const { t } = useI18n();
|
|
6
9
|
const props = defineProps({
|
|
7
10
|
showPassword: { type: Boolean, required: false },
|
|
@@ -62,91 +65,68 @@ const props = defineProps({
|
|
|
62
65
|
onClear: { type: Function, required: false }
|
|
63
66
|
});
|
|
64
67
|
const modelValue = defineModel({ type: null });
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
if (props.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (val && !val.match(/[0-9]/)) {
|
|
94
|
-
return t("Must contain at least one number");
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
if (stringRules.includes("containSpecial")) {
|
|
99
|
-
new_rules.push((val) => {
|
|
100
|
-
if (val && !val.match(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/)) {
|
|
101
|
-
return t("Must contain at least one symbol");
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
const minLength = new_rules.find((rule) => {
|
|
106
|
-
if (typeof rule != "string") return false;
|
|
107
|
-
return rule.startsWith("minLength:");
|
|
68
|
+
const attrs = useAttrs();
|
|
69
|
+
const L_KEYS = ["showPassword", "translate", "required"];
|
|
70
|
+
const computedRules = computed(() => {
|
|
71
|
+
const rules = Array.isArray(props.rules) ? [...props.rules] : [];
|
|
72
|
+
if (props.required) {
|
|
73
|
+
rules.push((val) => !!val || t("input_required", [t(props.label ?? "")]));
|
|
74
|
+
}
|
|
75
|
+
if (props.type === "email") {
|
|
76
|
+
rules.push((val) => {
|
|
77
|
+
if (val && !val.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/))
|
|
78
|
+
return t("Invalid email format");
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
const stringRules = rules.filter((r) => typeof r === "string");
|
|
82
|
+
if (stringRules.includes("containUpper"))
|
|
83
|
+
rules.push((val) => val && !val.match(/[A-Z]/) ? t("Must contain at least one uppercase letter") : void 0);
|
|
84
|
+
if (stringRules.includes("containLower"))
|
|
85
|
+
rules.push((val) => val && !val.match(/[a-z]/) ? t("Must contain at least one lowercase letter") : void 0);
|
|
86
|
+
if (stringRules.includes("containNumber"))
|
|
87
|
+
rules.push((val) => val && !val.match(/[0-9]/) ? t("Must contain at least one number") : void 0);
|
|
88
|
+
if (stringRules.includes("containSpecial"))
|
|
89
|
+
rules.push((val) => val && !val.match(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/) ? t("Must contain at least one symbol") : void 0);
|
|
90
|
+
const minLengthRule = rules.find((r) => typeof r === "string" && r.startsWith("minLength:"));
|
|
91
|
+
if (minLengthRule) {
|
|
92
|
+
const min = parseInt(minLengthRule.replace("minLength:", ""));
|
|
93
|
+
rules.push((val) => val && val.length < min ? t("input_min", [min]) : void 0);
|
|
94
|
+
}
|
|
95
|
+
return rules.filter((r) => typeof r !== "string");
|
|
108
96
|
});
|
|
109
|
-
if (minLength) {
|
|
110
|
-
const min = parseInt(minLength.replace("minLength:", ""));
|
|
111
|
-
new_rules.push((val) => {
|
|
112
|
-
if (val && val.length < min) {
|
|
113
|
-
return t("input_min", [min]);
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
97
|
const isShowPassword = ref(false);
|
|
118
98
|
const localType = computed(() => {
|
|
119
|
-
if (props.type
|
|
120
|
-
return "text";
|
|
121
|
-
}
|
|
99
|
+
if (props.type === "password" && isShowPassword.value) return "text";
|
|
122
100
|
return props.type;
|
|
123
101
|
});
|
|
124
|
-
const localShowPassword = computed(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
if (!props.showPassword) {
|
|
129
|
-
return false;
|
|
130
|
-
}
|
|
131
|
-
if (!modelValue.value) {
|
|
132
|
-
return false;
|
|
133
|
-
}
|
|
134
|
-
return true;
|
|
135
|
-
});
|
|
102
|
+
const localShowPassword = computed(
|
|
103
|
+
() => props.type === "password" && !!props.showPassword && !!modelValue.value
|
|
104
|
+
);
|
|
136
105
|
const onClickTc2Sc = () => {
|
|
137
106
|
modelValue.value = tc2sc(modelValue.value ?? "");
|
|
138
107
|
};
|
|
139
|
-
const
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
108
|
+
const base = useLightInputDefaults(props, attrs, L_KEYS);
|
|
109
|
+
const inputProps = computed(() => {
|
|
110
|
+
const result = {
|
|
111
|
+
...base.value,
|
|
112
|
+
// label/hint already translated by composable
|
|
113
|
+
rules: computedRules.value,
|
|
114
|
+
type: localType.value
|
|
115
|
+
};
|
|
116
|
+
if (props.required && result.label)
|
|
117
|
+
result.label = "* " + result.label;
|
|
118
|
+
return result;
|
|
119
|
+
});
|
|
120
|
+
const inputRef = ref();
|
|
121
|
+
defineExpose({
|
|
122
|
+
validate: () => inputRef.value?.validate(),
|
|
123
|
+
focus: () => inputRef.value?.focus(),
|
|
124
|
+
reset: () => inputRef.value?.reset()
|
|
145
125
|
});
|
|
146
126
|
</script>
|
|
147
127
|
|
|
148
128
|
<template>
|
|
149
|
-
<q-input
|
|
129
|
+
<q-input ref="inputRef" v-model="modelValue" v-bind="inputProps">
|
|
150
130
|
<template v-if="translate" #prepend>
|
|
151
131
|
<q-btn icon="sym_o_translate" flat dense rounded>
|
|
152
132
|
<q-menu dense>
|
|
@@ -158,15 +138,14 @@ const localClass = computed(() => {
|
|
|
158
138
|
</q-menu>
|
|
159
139
|
</q-btn>
|
|
160
140
|
</template>
|
|
161
|
-
|
|
162
|
-
|
|
141
|
+
|
|
142
|
+
<template v-for="(_, name) in $slots" #[name]="slotProps" :key="name">
|
|
143
|
+
<slot :name="name" v-bind="slotProps ?? {}" />
|
|
163
144
|
</template>
|
|
164
145
|
|
|
165
|
-
<template v-if="localShowPassword"
|
|
166
|
-
<q-icon name="sym_o_visibility" class="cursor-pointer" @click="isShowPassword = false"
|
|
167
|
-
v-if="isShowPassword" />
|
|
146
|
+
<template v-if="localShowPassword" #append>
|
|
147
|
+
<q-icon name="sym_o_visibility" class="cursor-pointer" @click="isShowPassword = false" v-if="isShowPassword" />
|
|
168
148
|
<q-icon name="sym_o_visibility_off" class="cursor-pointer" @click="isShowPassword = true" v-else />
|
|
169
149
|
</template>
|
|
170
|
-
|
|
171
150
|
</q-input>
|
|
172
151
|
</template>
|
|
@@ -9,11 +9,15 @@ type __VLS_ModelProps = {
|
|
|
9
9
|
modelValue?: any;
|
|
10
10
|
};
|
|
11
11
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare var
|
|
12
|
+
declare var __VLS_44: string, __VLS_45: any;
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
|
-
[K in NonNullable<typeof
|
|
14
|
+
[K in NonNullable<typeof __VLS_44>]?: (props: typeof __VLS_45) => any;
|
|
15
15
|
};
|
|
16
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
17
|
+
validate: () => any;
|
|
18
|
+
focus: () => any;
|
|
19
|
+
reset: () => any;
|
|
20
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
21
|
"update:modelValue": (value: any) => any;
|
|
18
22
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
23
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { QSelectProps } from 'quasar';
|
|
2
2
|
export interface LInputSelectProps extends QSelectProps {
|
|
3
|
+
required?: boolean;
|
|
3
4
|
}
|
|
4
5
|
type __VLS_Props = LInputSelectProps;
|
|
5
6
|
type __VLS_ModelProps = {
|
|
6
7
|
modelValue?: string | null;
|
|
7
8
|
};
|
|
8
9
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
-
declare var
|
|
10
|
+
declare var __VLS_13: string, __VLS_14: any;
|
|
10
11
|
type __VLS_Slots = {} & {
|
|
11
|
-
|
|
12
|
+
[K in NonNullable<typeof __VLS_13>]?: (props: typeof __VLS_14) => any;
|
|
12
13
|
};
|
|
13
14
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
15
|
"update:modelValue": (value: string | null | undefined) => any;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref } from "vue";
|
|
2
|
+
import { ref, useAttrs, computed, watch } from "vue";
|
|
3
|
+
import { useLightInputDefaults } from "../../composables/useLightProps";
|
|
4
|
+
defineOptions({ inheritAttrs: false });
|
|
3
5
|
const props = defineProps({
|
|
6
|
+
required: { type: Boolean, required: false },
|
|
4
7
|
name: { type: null, required: false },
|
|
5
8
|
virtualScrollHorizontal: { type: Boolean, required: false, skipCheck: true },
|
|
6
9
|
virtualScrollSliceSize: { type: null, required: false },
|
|
@@ -101,21 +104,36 @@ const props = defineProps({
|
|
|
101
104
|
onPopupHide: { type: Function, required: false }
|
|
102
105
|
});
|
|
103
106
|
const model = defineModel({ type: [String, null] });
|
|
104
|
-
const
|
|
105
|
-
|
|
107
|
+
const attrs = useAttrs();
|
|
108
|
+
const L_KEYS = ["required"];
|
|
109
|
+
const toStringOptions = (opts) => {
|
|
110
|
+
if (!opts || !Array.isArray(opts)) return [];
|
|
111
|
+
return opts.map((v) => typeof v === "string" ? v : String(v));
|
|
106
112
|
};
|
|
107
|
-
const localOptions = ref(props.options
|
|
108
|
-
|
|
113
|
+
const localOptions = ref(toStringOptions(props.options));
|
|
114
|
+
watch(() => props.options, (opts) => {
|
|
115
|
+
localOptions.value = toStringOptions(opts);
|
|
116
|
+
});
|
|
117
|
+
const filterFn = (val, update) => {
|
|
109
118
|
update(() => {
|
|
110
119
|
const needle = val.toLocaleLowerCase();
|
|
111
|
-
localOptions.value = props.options
|
|
120
|
+
localOptions.value = toStringOptions(props.options).filter((v) => v.toLocaleLowerCase().includes(needle));
|
|
112
121
|
});
|
|
113
122
|
};
|
|
123
|
+
const base = useLightInputDefaults(props, attrs, L_KEYS);
|
|
124
|
+
const selectProps = computed(() => ({
|
|
125
|
+
...base.value,
|
|
126
|
+
options: localOptions.value
|
|
127
|
+
}));
|
|
114
128
|
</script>
|
|
115
129
|
|
|
116
130
|
<template>
|
|
117
|
-
<q-select v-model="model" v-bind="
|
|
118
|
-
|
|
119
|
-
|
|
131
|
+
<q-select v-model="model" v-bind="selectProps"
|
|
132
|
+
use-input fill-input hide-selected
|
|
133
|
+
@filter="filterFn"
|
|
134
|
+
@input-value="(val) => model = val">
|
|
135
|
+
<template v-for="(_, name) in $slots" #[name]="slotProps" :key="name">
|
|
136
|
+
<slot :name="name" v-bind="slotProps ?? {}" />
|
|
137
|
+
</template>
|
|
120
138
|
</q-select>
|
|
121
139
|
</template>
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { QSelectProps } from 'quasar';
|
|
2
2
|
export interface LInputSelectProps extends QSelectProps {
|
|
3
|
+
required?: boolean;
|
|
3
4
|
}
|
|
4
5
|
type __VLS_Props = LInputSelectProps;
|
|
5
6
|
type __VLS_ModelProps = {
|
|
6
7
|
modelValue?: string | null;
|
|
7
8
|
};
|
|
8
9
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
-
declare var
|
|
10
|
+
declare var __VLS_13: string, __VLS_14: any;
|
|
10
11
|
type __VLS_Slots = {} & {
|
|
11
|
-
|
|
12
|
+
[K in NonNullable<typeof __VLS_13>]?: (props: typeof __VLS_14) => any;
|
|
12
13
|
};
|
|
13
14
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
15
|
"update:modelValue": (value: string | null | undefined) => any;
|