@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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
field: {
|
|
5
|
+
type: ObjectConstructor;
|
|
6
|
+
default: null;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
hide: (...args: any[]) => void;
|
|
10
|
+
ok: (...args: any[]) => void;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
field: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
default: null;
|
|
15
|
+
};
|
|
16
|
+
}>> & Readonly<{
|
|
17
|
+
onHide?: ((...args: any[]) => any) | undefined;
|
|
18
|
+
onOk?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
field: Record<string, any>;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/dist/runtime/components/{l-dialog-database-field-add.vue → L/DialogDatabaseFieldAdd.vue}
RENAMED
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useDialogPluginComponent } from "quasar";
|
|
3
3
|
const props = defineProps({
|
|
4
|
-
|
|
4
|
+
field: {
|
|
5
|
+
type: Object,
|
|
6
|
+
default: null
|
|
7
|
+
}
|
|
5
8
|
});
|
|
6
|
-
defineEmits([
|
|
7
|
-
// REQUIRED; need to specify some events that your
|
|
8
|
-
// component will emit through useDialogPluginComponent()
|
|
9
|
-
...useDialogPluginComponent.emits
|
|
10
|
-
]);
|
|
9
|
+
defineEmits([...useDialogPluginComponent.emits]);
|
|
11
10
|
const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } = useDialogPluginComponent();
|
|
12
11
|
function onOKClick(value) {
|
|
13
12
|
onDialogOK(value);
|
|
14
13
|
}
|
|
15
14
|
const types = ["varchar", "int", "date", "time", "datetime", "timestamp", "text", "blob", "json", "jsonb", "uuid", "boolean", "decimal", "float", "double", "real", "numeric", "smallint", "bigint", "tinyint", "mediumint", "char", "binary", "varbinary", "enum"];
|
|
15
|
+
const isEdit = !!props.field;
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<template>
|
|
19
19
|
<q-dialog ref="dialogRef">
|
|
20
20
|
<q-card class="q-dialog-plugin">
|
|
21
21
|
<q-toolbar>
|
|
22
|
-
<q-toolbar-title>Add Field</q-toolbar-title>
|
|
22
|
+
<q-toolbar-title>{{ isEdit ? 'Edit Field' : 'Add Field' }}</q-toolbar-title>
|
|
23
23
|
<q-space />
|
|
24
24
|
<q-btn dense flat icon="sym_o_close" v-close-popup />
|
|
25
25
|
</q-toolbar>
|
|
26
26
|
<form-kit type="l-form" :bordered="false" @submit="onOKClick" :value="{
|
|
27
|
-
name: '',
|
|
28
|
-
type: '',
|
|
29
|
-
length: '',
|
|
30
|
-
default: '',
|
|
31
|
-
nullable: false,
|
|
32
|
-
autoincrement: false
|
|
27
|
+
name: field?.name ?? '',
|
|
28
|
+
type: field?.type ?? '',
|
|
29
|
+
length: field?.length ?? '',
|
|
30
|
+
default: field?.default ?? '',
|
|
31
|
+
nullable: field?.nullable ?? false,
|
|
32
|
+
autoincrement: field?.autoincrement ?? false
|
|
33
33
|
}">
|
|
34
|
-
<form-kit type="l-input" name="name" label="Name" validation="required" />
|
|
34
|
+
<form-kit type="l-input" name="name" label="Name" validation="required" :disabled="isEdit" />
|
|
35
35
|
<form-kit type="l-select" name="type" label="Type" :options="types" validation="required" />
|
|
36
36
|
<form-kit type="l-input" name="length" label="Length" />
|
|
37
37
|
<form-kit type="l-input" name="default" label="Default" />
|
|
38
38
|
<form-kit type="l-checkbox" name="nullable" label="Nullable" />
|
|
39
39
|
<form-kit type="l-checkbox" name="autoincrement" label="Auto increment" />
|
|
40
40
|
</form-kit>
|
|
41
|
-
|
|
42
41
|
</q-card>
|
|
43
42
|
</q-dialog>
|
|
44
43
|
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
field: {
|
|
5
|
+
type: ObjectConstructor;
|
|
6
|
+
default: null;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
hide: (...args: any[]) => void;
|
|
10
|
+
ok: (...args: any[]) => void;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
field: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
default: null;
|
|
15
|
+
};
|
|
16
|
+
}>> & Readonly<{
|
|
17
|
+
onHide?: ((...args: any[]) => any) | undefined;
|
|
18
|
+
onOk?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
field: Record<string, any>;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
url: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
mimeType: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
width: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
height: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
fit: {
|
|
19
|
+
type: () => "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
url: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
mimeType: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
width: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
height: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
fit: {
|
|
40
|
+
type: () => "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
}>> & Readonly<{}>, {
|
|
44
|
+
width: string;
|
|
45
|
+
height: string;
|
|
46
|
+
fit: "fill" | "none" | "contain" | "cover" | "scale-down";
|
|
47
|
+
mimeType: string;
|
|
48
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
49
|
+
declare const _default: typeof __VLS_export;
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed, watch } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
url: {
|
|
5
|
+
type: String,
|
|
6
|
+
required: true
|
|
7
|
+
},
|
|
8
|
+
mimeType: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: ""
|
|
11
|
+
},
|
|
12
|
+
// 圖片/視頻的寬高
|
|
13
|
+
width: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "100%"
|
|
16
|
+
},
|
|
17
|
+
height: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "500px"
|
|
20
|
+
},
|
|
21
|
+
// 圖片的 fit 模式
|
|
22
|
+
fit: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "contain"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const textContent = ref("");
|
|
28
|
+
const isLoading = ref(false);
|
|
29
|
+
const error = ref(null);
|
|
30
|
+
const fileType = computed(() => {
|
|
31
|
+
const mime = props.mimeType.toLowerCase();
|
|
32
|
+
if (mime.startsWith("image/")) return "image";
|
|
33
|
+
if (mime.startsWith("video/")) return "video";
|
|
34
|
+
if (mime.startsWith("audio/")) return "audio";
|
|
35
|
+
if (mime === "application/pdf") return "pdf";
|
|
36
|
+
if (mime.startsWith("text/") || mime === "application/json") return "text";
|
|
37
|
+
if (mime.includes("word") || mime.includes("spreadsheet") || mime.includes("presentation") || mime.includes("excel") || mime.includes("powerpoint") || mime.includes("msword") || mime.includes("officedocument")) {
|
|
38
|
+
return "office";
|
|
39
|
+
}
|
|
40
|
+
return "unknown";
|
|
41
|
+
});
|
|
42
|
+
const officeViewerUrl = computed(() => {
|
|
43
|
+
if (fileType.value === "office") {
|
|
44
|
+
return `https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(props.url)}`;
|
|
45
|
+
}
|
|
46
|
+
return "";
|
|
47
|
+
});
|
|
48
|
+
const loadTextContent = async () => {
|
|
49
|
+
if (fileType.value !== "text") return;
|
|
50
|
+
isLoading.value = true;
|
|
51
|
+
error.value = null;
|
|
52
|
+
try {
|
|
53
|
+
const response = await fetch(props.url);
|
|
54
|
+
if (!response.ok) throw new Error("\u7121\u6CD5\u8F09\u5165\u6587\u4EF6");
|
|
55
|
+
textContent.value = await response.text();
|
|
56
|
+
} catch (e) {
|
|
57
|
+
error.value = e instanceof Error ? e.message : "\u8F09\u5165\u5931\u6557";
|
|
58
|
+
} finally {
|
|
59
|
+
isLoading.value = false;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
watch(() => [props.url, fileType.value], () => {
|
|
63
|
+
if (fileType.value === "text") {
|
|
64
|
+
loadTextContent();
|
|
65
|
+
}
|
|
66
|
+
}, { immediate: true });
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<template>
|
|
70
|
+
<div class="l-document-viewer">
|
|
71
|
+
<!-- 圖片預覽 -->
|
|
72
|
+
<q-img
|
|
73
|
+
v-if="fileType === 'image'"
|
|
74
|
+
:src="url"
|
|
75
|
+
:fit="fit"
|
|
76
|
+
:style="{ width, height }"
|
|
77
|
+
spinner-color="primary"
|
|
78
|
+
>
|
|
79
|
+
<template #error>
|
|
80
|
+
<div class="absolute-full flex flex-center bg-negative text-white">
|
|
81
|
+
無法載入圖片
|
|
82
|
+
</div>
|
|
83
|
+
</template>
|
|
84
|
+
</q-img>
|
|
85
|
+
|
|
86
|
+
<!-- 視頻預覽 -->
|
|
87
|
+
<q-video
|
|
88
|
+
v-else-if="fileType === 'video'"
|
|
89
|
+
:src="url"
|
|
90
|
+
:style="{ width, height }"
|
|
91
|
+
/>
|
|
92
|
+
|
|
93
|
+
<!-- 音頻預覽 -->
|
|
94
|
+
<audio
|
|
95
|
+
v-else-if="fileType === 'audio'"
|
|
96
|
+
:src="url"
|
|
97
|
+
controls
|
|
98
|
+
style="width: 100%"
|
|
99
|
+
>
|
|
100
|
+
您的瀏覽器不支援音頻播放
|
|
101
|
+
</audio>
|
|
102
|
+
|
|
103
|
+
<!-- PDF 預覽 -->
|
|
104
|
+
<iframe
|
|
105
|
+
v-else-if="fileType === 'pdf'"
|
|
106
|
+
:src="url"
|
|
107
|
+
:style="{ width, height, border: 'none' }"
|
|
108
|
+
title="PDF Viewer"
|
|
109
|
+
/>
|
|
110
|
+
|
|
111
|
+
<!-- 文字預覽 (txt, json 等) -->
|
|
112
|
+
<div v-else-if="fileType === 'text'" class="text-viewer" :style="{ height }">
|
|
113
|
+
<q-spinner v-if="isLoading" color="primary" size="3em" />
|
|
114
|
+
<q-banner v-else-if="error" class="bg-negative text-white">
|
|
115
|
+
{{ error }}
|
|
116
|
+
</q-banner>
|
|
117
|
+
<pre v-else class="text-content">{{ textContent }}</pre>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<!-- Office 文件預覽 -->
|
|
121
|
+
<iframe
|
|
122
|
+
v-else-if="fileType === 'office'"
|
|
123
|
+
:src="officeViewerUrl"
|
|
124
|
+
:style="{ width, height, border: 'none' }"
|
|
125
|
+
title="Office Viewer"
|
|
126
|
+
/>
|
|
127
|
+
|
|
128
|
+
<!-- 不支援的類型 -->
|
|
129
|
+
<div v-else class="unsupported flex flex-center" :style="{ height }">
|
|
130
|
+
<div class="text-center">
|
|
131
|
+
<q-icon name="sym_r_description" size="64px" color="grey-5" />
|
|
132
|
+
<div class="text-grey-7 q-mt-md">
|
|
133
|
+
不支援預覽此文件類型
|
|
134
|
+
</div>
|
|
135
|
+
<div class="text-caption text-grey-5">
|
|
136
|
+
{{ mimeType || "\u672A\u77E5\u985E\u578B" }}
|
|
137
|
+
</div>
|
|
138
|
+
<q-btn
|
|
139
|
+
class="q-mt-md"
|
|
140
|
+
color="primary"
|
|
141
|
+
icon="sym_r_download"
|
|
142
|
+
label="下載文件"
|
|
143
|
+
:href="url"
|
|
144
|
+
target="_blank"
|
|
145
|
+
outline
|
|
146
|
+
/>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</template>
|
|
151
|
+
|
|
152
|
+
<style scoped>
|
|
153
|
+
.l-document-viewer{width:100%}.text-viewer{background:#f5f5f5;border-radius:4px;overflow:auto;padding:16px}.text-content{margin:0;white-space:pre-wrap;word-wrap:break-word;font-family:Consolas,Monaco,monospace;font-size:14px;line-height:1.5}.unsupported{background:#fafafa;border:1px dashed #e0e0e0;border-radius:8px}
|
|
154
|
+
</style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
url: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
mimeType: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
width: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
height: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
fit: {
|
|
19
|
+
type: () => "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
url: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
mimeType: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
width: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
height: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
fit: {
|
|
40
|
+
type: () => "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
}>> & Readonly<{}>, {
|
|
44
|
+
width: string;
|
|
45
|
+
height: string;
|
|
46
|
+
fit: "fill" | "none" | "contain" | "cover" | "scale-down";
|
|
47
|
+
mimeType: string;
|
|
48
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
49
|
+
declare const _default: typeof __VLS_export;
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
url: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
mimeType: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
title: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
width: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
height: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
fit: {
|
|
23
|
+
type: () => "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
hide: (...args: any[]) => void;
|
|
28
|
+
ok: (...args: any[]) => void;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
url: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
mimeType: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
title: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
width: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
height: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
fit: {
|
|
51
|
+
type: () => "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
}>> & Readonly<{
|
|
55
|
+
onHide?: ((...args: any[]) => any) | undefined;
|
|
56
|
+
onOk?: ((...args: any[]) => any) | undefined;
|
|
57
|
+
}>, {
|
|
58
|
+
width: string;
|
|
59
|
+
height: string;
|
|
60
|
+
title: string;
|
|
61
|
+
fit: "fill" | "none" | "contain" | "cover" | "scale-down";
|
|
62
|
+
mimeType: string;
|
|
63
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
64
|
+
declare const _default: typeof __VLS_export;
|
|
65
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useDialogPluginComponent } from "quasar";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
url: {
|
|
5
|
+
type: String,
|
|
6
|
+
required: true
|
|
7
|
+
},
|
|
8
|
+
mimeType: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: ""
|
|
11
|
+
},
|
|
12
|
+
title: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
15
|
+
},
|
|
16
|
+
// 圖片/視頻的寬高
|
|
17
|
+
width: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "100%"
|
|
20
|
+
},
|
|
21
|
+
height: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "70vh"
|
|
24
|
+
},
|
|
25
|
+
// 圖片的 fit 模式
|
|
26
|
+
fit: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "contain"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
defineEmits([
|
|
32
|
+
// REQUIRED; need to specify some events that your
|
|
33
|
+
// component will emit through useDialogPluginComponent()
|
|
34
|
+
...useDialogPluginComponent.emits
|
|
35
|
+
]);
|
|
36
|
+
const { dialogRef, onDialogHide, onDialogCancel } = useDialogPluginComponent();
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<q-dialog ref="dialogRef" @hide="onDialogHide" full-width >
|
|
41
|
+
<q-card class="q-dialog-plugin" :bordered="false" square>
|
|
42
|
+
<q-toolbar class="bg-primary text-white">
|
|
43
|
+
<q-toolbar-title>{{ title || "\u6587\u4EF6\u9810\u89BD" }}</q-toolbar-title>
|
|
44
|
+
<q-space />
|
|
45
|
+
<q-btn
|
|
46
|
+
:href="url"
|
|
47
|
+
target="_blank"
|
|
48
|
+
dense
|
|
49
|
+
flat
|
|
50
|
+
icon="sym_o_download"
|
|
51
|
+
title="下載"
|
|
52
|
+
/>
|
|
53
|
+
<q-btn dense flat icon="sym_o_close" v-close-popup />
|
|
54
|
+
</q-toolbar>
|
|
55
|
+
|
|
56
|
+
<q-card-section class="q-pa-md">
|
|
57
|
+
<LDocumentViewer
|
|
58
|
+
:url="url"
|
|
59
|
+
:mime-type="mimeType"
|
|
60
|
+
:width="width"
|
|
61
|
+
:height="height"
|
|
62
|
+
:fit="fit"
|
|
63
|
+
/>
|
|
64
|
+
</q-card-section>
|
|
65
|
+
</q-card>
|
|
66
|
+
</q-dialog>
|
|
67
|
+
</template>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
url: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
mimeType: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
title: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
width: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
height: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
fit: {
|
|
23
|
+
type: () => "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
hide: (...args: any[]) => void;
|
|
28
|
+
ok: (...args: any[]) => void;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
url: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
mimeType: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
title: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
width: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
height: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
fit: {
|
|
51
|
+
type: () => "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
}>> & Readonly<{
|
|
55
|
+
onHide?: ((...args: any[]) => any) | undefined;
|
|
56
|
+
onOk?: ((...args: any[]) => any) | undefined;
|
|
57
|
+
}>, {
|
|
58
|
+
width: string;
|
|
59
|
+
height: string;
|
|
60
|
+
title: string;
|
|
61
|
+
fit: "fill" | "none" | "contain" | "cover" | "scale-down";
|
|
62
|
+
mimeType: string;
|
|
63
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
64
|
+
declare const _default: typeof __VLS_export;
|
|
65
|
+
export default _default;
|
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, ref, useAttrs } from "vue";
|
|
3
3
|
import { useQuasar } from "quasar";
|
|
4
|
-
import { sanitizeHtml } from "
|
|
4
|
+
import { sanitizeHtml } from "../../composables/sanitizeHtml";
|
|
5
5
|
const $q = useQuasar();
|
|
6
6
|
const editorRef = ref(null);
|
|
7
7
|
const textColorRef = ref(null);
|
|
8
8
|
const textHightlightRef = ref(null);
|
|
9
9
|
const insertTableRef = ref(null);
|
|
10
|
+
const fontSizeRef = ref(null);
|
|
11
|
+
const fontSizes = ["8px", "10px", "12px", "14px", "16px", "18px", "20px", "24px", "28px", "32px", "36px", "48px", "72px"];
|
|
12
|
+
const setFontSizeCMD = (size) => {
|
|
13
|
+
const edit = editorRef.value;
|
|
14
|
+
fontSizeRef.value.hide();
|
|
15
|
+
edit.caret.restore();
|
|
16
|
+
document.execCommand("fontSize", false, "7");
|
|
17
|
+
const contentEl = edit.$el.querySelector(".q-editor__content");
|
|
18
|
+
contentEl.querySelectorAll('font[size="7"]').forEach((el) => {
|
|
19
|
+
const span = document.createElement("span");
|
|
20
|
+
span.style.fontSize = size;
|
|
21
|
+
span.innerHTML = el.innerHTML;
|
|
22
|
+
el.parentNode.replaceChild(span, el);
|
|
23
|
+
});
|
|
24
|
+
emit("update:modelValue", contentEl.innerHTML);
|
|
25
|
+
edit.focus();
|
|
26
|
+
};
|
|
10
27
|
const highlight = ref("#ffff00aa");
|
|
11
28
|
const foreColor = ref("#000000");
|
|
12
29
|
const tableRows = ref(3);
|
|
@@ -130,22 +147,7 @@ const newToolBar = [
|
|
|
130
147
|
"code"
|
|
131
148
|
]
|
|
132
149
|
},
|
|
133
|
-
|
|
134
|
-
label: $q.lang.editor.fontSize,
|
|
135
|
-
icon: $q.iconSet.editor.fontSize,
|
|
136
|
-
fixedLabel: true,
|
|
137
|
-
fixedIcon: true,
|
|
138
|
-
list: "no-icons",
|
|
139
|
-
options: [
|
|
140
|
-
"size-1",
|
|
141
|
-
"size-2",
|
|
142
|
-
"size-3",
|
|
143
|
-
"size-4",
|
|
144
|
-
"size-5",
|
|
145
|
-
"size-6",
|
|
146
|
-
"size-7"
|
|
147
|
-
]
|
|
148
|
-
},
|
|
150
|
+
"fontSize",
|
|
149
151
|
{
|
|
150
152
|
label: $q.lang.editor.defaultFont,
|
|
151
153
|
icon: $q.iconSet.editor.font,
|
|
@@ -187,6 +189,18 @@ const newFonts = {
|
|
|
187
189
|
|
|
188
190
|
<template>
|
|
189
191
|
<q-editor v-model="localValue" ref="editorRef" v-bind="attrs" @blur="onEditorBlur">
|
|
192
|
+
<template v-slot:fontSize>
|
|
193
|
+
<q-btn-dropdown dense no-caps ref="fontSizeRef" no-wrap unelevated color="white" text-color="default"
|
|
194
|
+
label="Font Size" icon="sym_o_format_size" size="sm">
|
|
195
|
+
<q-list dense>
|
|
196
|
+
<q-item v-for="size in fontSizes" :key="size" clickable v-close-popup @click="setFontSizeCMD(size)">
|
|
197
|
+
<q-item-section>
|
|
198
|
+
<span :style="{ fontSize: size }">{{ size }}</span>
|
|
199
|
+
</q-item-section>
|
|
200
|
+
</q-item>
|
|
201
|
+
</q-list>
|
|
202
|
+
</q-btn-dropdown>
|
|
203
|
+
</template>
|
|
190
204
|
<template v-slot:textColor>
|
|
191
205
|
<q-btn-dropdown dense no-caps ref="textColorRef" no-wrap unelevated color="white" text-color="default"
|
|
192
206
|
label="Text Color" icon="sym_o_format_color_text" size="sm">
|
|
@@ -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
|
};
|