@gct-paas/word 0.1.14 → 0.1.16
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 +274 -15
- package/dist/base/avatar/index.d.ts +1 -0
- package/dist/base/avatar/src/Avatar.vue.d.ts +9 -0
- package/dist/base/avatar/src/utils/useFile.d.ts +3 -0
- package/dist/base/breadcrumb/src/breadcrumb-item.vue.d.ts +1 -1
- package/dist/base/color-picker/index.d.ts +1 -0
- package/dist/base/color-picker/src/ColorPicker.vue.d.ts +88 -0
- package/dist/base/color-picker/src/constant/index.d.ts +6 -0
- package/dist/base/divider/index.d.ts +1 -0
- package/dist/base/divider/src/divider.d.ts +7 -0
- package/dist/base/divider/src/divider.vue.d.ts +19 -0
- package/dist/base/dropdown/src/dropdown-basic-select.vue.d.ts +2 -2
- package/dist/base/empty/index.d.ts +1 -0
- package/dist/base/empty/src/empty.d.ts +8 -0
- package/dist/base/empty/src/empty.vue.d.ts +9 -0
- package/dist/base/index.d.ts +5 -0
- package/dist/base/input/index.d.ts +1 -0
- package/dist/base/input/src/input-number.vue.d.ts +24 -2
- package/dist/base/input/src/input.vue.d.ts +7 -7
- package/dist/base/input/src/text-area.vue.d.ts +65 -0
- package/dist/base/modal/src/ModalRoot.vue.d.ts +1 -1
- package/dist/base/select/src/basic-select.vue.d.ts +4 -3
- package/dist/base/slider/index.d.ts +1 -0
- package/dist/base/slider/src/slider.vue.d.ts +22 -0
- package/dist/base/tree-select/src/tree-select.vue.d.ts +2 -2
- package/dist/base/utils/asset-helper-util.d.ts +23 -2
- package/dist/capabilities/panel/config/types.d.ts +2 -1
- package/dist/capabilities/paper-widget-manifest/types.d.ts +13 -2
- package/dist/core/command/base/SetStyleBase.d.ts +4 -0
- package/dist/core/command/commands/Delete2DTable.d.ts +12 -0
- package/dist/core/command/commands/DeleteCheckTable.d.ts +12 -0
- package/dist/core/command/commands/DeleteDataGroup2D.d.ts +12 -0
- package/dist/core/command/commands/DeleteTableHeader.d.ts +12 -0
- package/dist/core/command/commands/InsertFloatingOverlay.d.ts +9 -0
- package/dist/core/command/commands/InsertPaperWidget.d.ts +2 -42
- package/dist/core/command/commands/ResizeOverlayLayout.d.ts +7 -0
- package/dist/core/command/commands/Set2DTable.d.ts +7 -0
- package/dist/core/command/commands/SetCheckTable.d.ts +7 -0
- package/dist/core/command/commands/SetDataGroup2D.d.ts +25 -0
- package/dist/core/command/commands/SetHeaderFooterConfig.d.ts +11 -0
- package/dist/core/command/commands/SetSubTableHeader.d.ts +8 -0
- package/dist/core/command/commands/SetTableHeader.d.ts +7 -0
- package/dist/core/command/types.d.ts +68 -3
- package/dist/core/constants/index.d.ts +7 -0
- package/dist/core/cursor/CursorController.d.ts +15 -0
- package/dist/core/cursor/hit/OverlayLayoutHitHandler.d.ts +9 -0
- package/dist/core/cursor/hit/types.d.ts +17 -0
- package/dist/core/cursor/layout/baseMeta.d.ts +1 -1
- package/dist/core/data/DataManager.d.ts +5 -0
- package/dist/core/event/DocumentEventBridge.d.ts +5 -1
- package/dist/core/event/EventManager.d.ts +1 -1
- package/dist/core/event/handlers/InteractionHandler.d.ts +3 -0
- package/dist/core/event/handlers/KonvaHandler.d.ts +3 -0
- package/dist/core/index.d.ts +8 -4
- package/dist/core/interaction/InteractionController.d.ts +8 -1
- package/dist/core/interaction/InteractionPolicy.d.ts +2 -0
- package/dist/core/interaction/types.d.ts +8 -0
- package/dist/core/interaction/useInteraction.d.ts +7 -3
- package/dist/core/layout/LayoutContext.d.ts +13 -3
- package/dist/core/layout/LayoutManager.d.ts +14 -0
- package/dist/core/layout/LayoutMapper.d.ts +0 -2
- package/dist/core/layout/handlers/PageWidgetHandler.d.ts +5 -0
- package/dist/core/layout/handlers/TextHandler.d.ts +11 -0
- package/dist/core/layout/handlers/base/BaseHandler.d.ts +26 -0
- package/dist/core/layout/handlers/fields/{ImgHandler.d.ts → ImageHandler.d.ts} +1 -1
- package/dist/core/layout/handlers/fields/index.d.ts +1 -1
- package/dist/core/layout/handlers/index.d.ts +1 -0
- package/dist/core/layout/handlers/pageWidgets/BarcodeHandler.d.ts +11 -0
- package/dist/core/layout/handlers/pageWidgets/DefaultHandler.d.ts +4 -0
- package/dist/core/layout/handlers/pageWidgets/DiagonalHandler.d.ts +4 -0
- package/dist/core/layout/handlers/pageWidgets/ImageHandler.d.ts +4 -0
- package/dist/core/layout/handlers/pageWidgets/LineHandler.d.ts +4 -0
- package/dist/core/layout/handlers/pageWidgets/PaginationHandler.d.ts +7 -0
- package/dist/core/layout/handlers/pageWidgets/QrCodeHandler.d.ts +4 -0
- package/dist/core/layout/handlers/pageWidgets/SerialNumberHandler.d.ts +4 -0
- package/dist/core/layout/handlers/pageWidgets/index.d.ts +8 -0
- package/dist/core/layout/logic/LayoutBuilder.d.ts +7 -3
- package/dist/core/layout/logic/ModelBuilder.d.ts +2 -1
- package/dist/core/layout/providers/TableInfoProvider.d.ts +8 -2
- package/dist/core/layout/types/index.d.ts +7 -0
- package/dist/core/model/DocModel.d.ts +20 -0
- package/dist/core/model/base/ModelNode.d.ts +4 -0
- package/dist/core/model/base/RefManager.d.ts +50 -0
- package/dist/core/model/base/index.d.ts +1 -0
- package/dist/core/model/document/Wbackground.d.ts +22 -0
- package/dist/core/model/document/Wdocument.d.ts +7 -1
- package/dist/core/model/document/Wp.d.ts +8 -1
- package/dist/core/model/document/WrImage.d.ts +2 -0
- package/dist/core/model/document/WrPageWidget.d.ts +8 -0
- package/dist/core/model/document/WrText.d.ts +9 -2
- package/dist/core/model/document/WsecPr.d.ts +66 -1
- package/dist/core/model/document/Wtbl/Calculation.d.ts +12 -0
- package/dist/core/model/document/Wtbl/RegionManager.d.ts +13 -1
- package/dist/core/model/document/Wtbl/RowColumnOps.d.ts +6 -0
- package/dist/core/model/document/Wtbl/Serialization.d.ts +12 -0
- package/dist/core/model/document/Wtbl.d.ts +22 -1
- package/dist/core/model/document/Wtc.d.ts +54 -4
- package/dist/core/model/document/WtrPr.d.ts +1 -0
- package/dist/core/model/document/index.d.ts +2 -0
- package/dist/core/model/footers/Wfooter.d.ts +40 -0
- package/dist/core/model/footers/Wfooters.d.ts +42 -0
- package/dist/core/model/headers/Wheader.d.ts +40 -0
- package/dist/core/model/headers/Wheaders.d.ts +45 -0
- package/dist/core/model/logic/CheckTableRegion.d.ts +44 -0
- package/dist/core/model/logic/DataGroup2DRegion.d.ts +12 -0
- package/dist/core/model/logic/SubTableHeaderRegion.d.ts +22 -0
- package/dist/core/model/logic/TableHeaderRegion.d.ts +16 -0
- package/dist/core/model/logic/_2DTableRegion.d.ts +44 -0
- package/dist/core/model/logic/index.d.ts +14 -1
- package/dist/core/model/overlays/Wlayout.d.ts +70 -0
- package/dist/core/model/overlays/Woverlay.d.ts +41 -0
- package/dist/core/model/overlays/Woverlays.d.ts +45 -0
- package/dist/core/model/settings/Wsettings.d.ts +47 -0
- package/dist/core/model/templates/footer.template.d.ts +75 -0
- package/dist/core/model/templates/header.template.d.ts +75 -0
- package/dist/core/model/templates/layout.template.d.ts +66 -0
- package/dist/core/model/templates/overlay.template.d.ts +22 -0
- package/dist/core/model/templates/paragraph.template.d.ts +46 -0
- package/dist/core/model/templates/trPr.template.d.ts +19 -0
- package/dist/core/model/types/model.d.ts +3 -0
- package/dist/core/model/types/region.d.ts +1 -0
- package/dist/core/sdk/DocPubApiContext.d.ts +14 -12
- package/dist/core/sdk/createDoc.d.ts +1 -3
- package/dist/core/sdk/usePagesToPdf.d.ts +13 -4
- package/dist/core/utils/expand.d.ts +29 -4
- package/dist/core/utils/index.d.ts +4 -0
- package/dist/core/utils/unit-converter-util.d.ts +12 -2
- package/dist/core/view/Doc.d.ts +14 -3
- package/dist/core/view/Page.d.ts +50 -1
- package/dist/core/view/Paragraph.d.ts +2 -0
- package/dist/core/view/Section.d.ts +26 -1
- package/dist/core/view/Table.d.ts +12 -0
- package/dist/core/view/TableCell.d.ts +7 -3
- package/dist/core/view/TableRow.d.ts +2 -0
- package/dist/core/view/base/BandContainer.d.ts +49 -0
- package/dist/core/view/base/LayoutGroup.d.ts +11 -0
- package/dist/core/view/base/LayoutNode.d.ts +3 -0
- package/dist/core/view/base/OverlayContainer.d.ts +31 -0
- package/dist/core/view/base/OverlayLayout.d.ts +19 -0
- package/dist/core/view/base/index.d.ts +2 -0
- package/dist/core/view/runs/ImageRun.d.ts +9 -0
- package/dist/core/view/runs/ImageWidget.d.ts +12 -6
- package/dist/core/view/runs/TextRun.d.ts +26 -3
- package/dist/core/view/runs/TextWidget.d.ts +14 -7
- package/dist/core/view/utils/EventUtil.d.ts +22 -0
- package/dist/core/view/utils/TextUtil.d.ts +47 -0
- package/dist/core/widget/widget-meta.d.ts +5 -0
- package/dist/domain/active/active-types.d.ts +12 -6
- package/dist/domain/constants/enum.d.ts +34 -0
- package/dist/domain/constants/options.d.ts +4 -0
- package/dist/domain/field/field-props-schema-type.d.ts +1 -1
- package/dist/domain/paper-widget/paper-widget-props-schema-type.d.ts +2 -0
- package/dist/domain/paper-widget/paper-widget-type.d.ts +10 -141
- package/dist/domain/paper-widget/widget-binding.d.ts +8 -0
- package/dist/domain/widget/component-type.d.ts +6 -2
- package/dist/index.d.ts +5 -10
- package/dist/index.es.js +57077 -46931
- package/dist/runtime/_register_/composables/panel/useActivePanel.d.ts +2 -2
- package/dist/runtime/_register_/context/DesignSuiteContext.d.ts +2 -0
- package/dist/runtime/canvas/__common__/context-menu/index.vue.d.ts +3 -1
- package/dist/runtime/canvas/doc-layout.vue.d.ts +11 -5
- package/dist/runtime/canvas/inline-image/resize-box.vue.d.ts +28 -7
- package/dist/{suites/edhr/panel-schema/paper-widget/widgets/barcode.vue.d.ts → runtime/canvas/node/overlay-layout.vue.d.ts} +2 -3
- package/dist/{suites/edhr/panel-schema/paper-widget/widgets/qrcode.vue.d.ts → runtime/canvas/overlay/page-overlay-group.vue.d.ts} +4 -3
- package/dist/{suites/edhr/panel-schema/paper-widget/widgets/diagonal.vue.d.ts → runtime/canvas/paper/header-footer-guides.vue.d.ts} +2 -3
- package/dist/runtime/canvas/paper/inner-corner-mark.vue.d.ts +2 -5
- package/dist/runtime/canvas/paper/paper-group.vue.d.ts +2 -1
- package/dist/{suites/edhr/panel-schema/paper-widget/widgets/serialnumber.vue.d.ts → runtime/canvas/paper/paper-hit-rect.vue.d.ts} +3 -3
- package/dist/runtime/canvas/table/design/table-structure-overlay/dynamic-label.vue.d.ts +1 -0
- package/dist/runtime/canvas/table/design/table-structure-overlay/placeholder-label.vue.d.ts +1 -0
- package/dist/runtime/canvas/table/utils/index.d.ts +21 -3
- package/dist/runtime/canvas/table/utils/useTableSelection.d.ts +5 -1
- package/dist/runtime/designer/main/editable-canvas.vue.d.ts +6 -3
- package/dist/runtime/designer/ribbon/components/set-table-header-form-modal.vue.d.ts +18 -0
- package/dist/runtime/designer/ribbon/components/sub-table-form-modal.vue.d.ts +4 -1
- package/dist/runtime/factories/usePwRenderData.d.ts +13 -0
- package/dist/runtime/factories/useRenderData.d.ts +1 -1
- package/dist/runtime/interface/change-diff.d.ts +26 -0
- package/dist/runtime/interface/render.d.ts +18 -0
- package/dist/runtime/renderer/annotation/annotation-comment-item.vue.d.ts +13 -0
- package/dist/runtime/renderer/annotation/annotation-comment-layer.vue.d.ts +2 -0
- package/dist/runtime/renderer/dropdowns/components/tables/rdo-table-dropdown.vue.d.ts +16 -16
- package/dist/runtime/renderer/dropdowns/components/tables/table-dropdown.vue.d.ts +16 -16
- package/dist/runtime/renderer/main/preview-canvas.vue.d.ts +8 -4
- package/dist/sdk/doc-runtime/composables/useDocController.d.ts +17 -0
- package/dist/sdk/doc-runtime/composables/useDocOperations.d.ts +41 -0
- package/dist/sdk/doc-runtime/composables/useDocRuntimeProvider.d.ts +19 -0
- package/dist/sdk/doc-runtime/composables/useDocSuite.d.ts +20 -0
- package/dist/sdk/doc-runtime/factories/document-initializer.d.ts +10 -0
- package/dist/sdk/doc-runtime/factories/document-request-strategy.d.ts +3 -0
- package/dist/sdk/doc-runtime/factories/runtime-json-builder.d.ts +17 -0
- package/dist/{runtime → sdk/doc-runtime}/factories/useDocumentFactory.d.ts +33 -6
- package/dist/sdk/doc-runtime/useWord.d.ts +16 -0
- package/dist/sdk/engine/index.d.ts +14 -0
- package/dist/sdk/index.d.ts +14 -0
- package/dist/sdk/plugins/index.d.ts +15 -0
- package/dist/sdk/setup.d.ts +55 -0
- package/dist/sdk/types/index.d.ts +154 -0
- package/dist/sdk/vue/index.d.ts +7 -0
- package/dist/sdk/vue/layouts/doc-design-layout.d.ts +7 -0
- package/dist/sdk/vue/layouts/doc-design-layout.vue.d.ts +10 -0
- package/dist/{runtime/renderer → sdk/vue/layouts}/doc-render-layout.vue.d.ts +17 -11
- package/dist/suites/edhr/field-manifest/_common_/basic.d.ts +6 -0
- package/dist/suites/edhr/index.d.ts +3 -2
- package/dist/suites/edhr/panel-config/index.d.ts +2 -1
- package/dist/suites/edhr/panel-schema/2d-table/2d-table.basic.d.ts +14 -0
- package/dist/suites/edhr/panel-schema/{paper-widget/widgets/editors/diagonal-name-editor.vue.d.ts → 2d-table/_2DTablePanel.vue.d.ts} +4 -5
- package/dist/suites/edhr/panel-schema/{paper-widget/widgets/image.vue.d.ts → check-table/CheckTablePanel.vue.d.ts} +5 -5
- package/dist/suites/edhr/panel-schema/check-table/check-table.basic.d.ts +14 -0
- package/dist/suites/edhr/panel-schema/data-group-2d/DataGroup2DPanel.vue.d.ts +8 -0
- package/dist/suites/edhr/panel-schema/data-group-2d/data-group-2d.basic.d.ts +14 -0
- package/dist/suites/edhr/panel-schema/data-init/utils/index.d.ts +26 -2
- package/dist/suites/edhr/panel-schema/data-init/utils/json-schema.d.ts +18 -0
- package/dist/suites/edhr/panel-schema/data-load/DataLoadPanel.vue.d.ts +2 -0
- package/dist/suites/edhr/panel-schema/data-load/ai-tmpl/ai-tmpl-editor.vue.d.ts +6 -0
- package/dist/suites/edhr/panel-schema/data-load/ai-tmpl/identify-param-card.vue.d.ts +14 -0
- package/dist/suites/edhr/panel-schema/data-load/common/add-tmpl-btn.vue.d.ts +16 -0
- package/dist/suites/edhr/panel-schema/data-load/common/decimal-slider.vue.d.ts +21 -0
- package/dist/suites/edhr/panel-schema/data-load/common/form-field-select.vue.d.ts +19 -0
- package/dist/suites/edhr/panel-schema/data-load/common/icon-tooltip.vue.d.ts +10 -0
- package/dist/suites/edhr/panel-schema/data-load/common/remove-icon.vue.d.ts +7 -0
- package/dist/suites/edhr/panel-schema/data-load/common/tmpl-card.vue.d.ts +25 -0
- package/dist/suites/edhr/panel-schema/data-load/data-load.basic.d.ts +5 -0
- package/dist/suites/edhr/panel-schema/data-load/device-tmpl/device-field-status.vue.d.ts +9 -0
- package/dist/suites/edhr/panel-schema/data-load/device-tmpl/device-tmpl-editor.vue.d.ts +6 -0
- package/dist/suites/edhr/panel-schema/data-load/device-tmpl/params-item-card.vue.d.ts +30 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/device-link/constant.d.ts +44 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/device-link/controller.d.ts +38 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/device-link/index.d.ts +3 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/device-link/types.d.ts +157 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/form-tmpl-config/form-tmpl-config-controller.d.ts +67 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/form-tmpl-config/index.d.ts +2 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/form-tmpl-config/use-form-tmpl-config.d.ts +10 -0
- package/dist/suites/edhr/panel-schema/index.d.ts +70 -1
- package/dist/suites/edhr/panel-schema/paper-header-footer/PaperHeaderFooterPanel.vue.d.ts +2 -0
- package/dist/suites/edhr/panel-schema/paper-header-footer/paper-header-footer.basic.d.ts +5 -0
- package/dist/suites/edhr/panel-schema/paper-widget/PaperWidgetPanel.vue.d.ts +7 -1
- package/dist/suites/edhr/panel-schema/paper-widget/paper-widget.basic.d.ts +7 -1
- package/dist/suites/edhr/panel-schema/table-header/TableHeaderPanel.vue.d.ts +8 -0
- package/dist/suites/edhr/panel-schema/table-header/table-header.basic.d.ts +11 -0
- package/dist/suites/edhr/paper-widget-manifest/basic/line-manifest.d.ts +2 -0
- package/dist/suites/edhr/paper-widget-manifest/basic/pagination-manifest.d.ts +2 -0
- package/dist/suites/{edhr/panel-schema/paper-widget/widgets/editors/align-editor.vue.d.ts → shared/panel/config/editor/FormNumberEditor.vue.d.ts} +6 -8
- package/dist/suites/shared/panel/config/editor/single-field-editor/types.d.ts +9 -0
- package/dist/suites/{edhr/panel-schema/paper-widget/widgets/editors/size-editor.vue.d.ts → shared/panel/modules/field-formula-module/field-formula-module.vue.d.ts} +8 -8
- package/dist/suites/shared/panel/modules/table-setting-module.vue.d.ts +5 -4
- package/dist/utils/TriggerUtil.d.ts +1 -1
- package/dist/utils/func/dragdrop.d.ts +6 -1
- package/dist/utils/func/file.d.ts +1 -1
- package/dist/utils/symbol/contextKey.d.ts +7 -1
- package/dist/word.css +9288 -8120
- package/package.json +4 -1
- package/dist/core/sdk/types/public-types.d.ts +0 -78
- package/dist/runtime/designer/doc-design-layout.vue.d.ts +0 -6
- package/dist/runtime/useDocEngine.d.ts +0 -36
- package/dist/setup.d.ts +0 -46
- package/dist/suites/edhr/panel-schema/paper-widget/widgets/editors/img-parser.d.ts +0 -9
- package/dist/suites/edhr/panel-schema/paper-widget/widgets/editors/value-editor.vue.d.ts +0 -46
- /package/dist/suites/edhr/panel-config/{file → field/file}/upload.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,35 +1,294 @@
|
|
|
1
1
|
# @gct-paas/word
|
|
2
2
|
|
|
3
|
-
GCT 在线 Word
|
|
3
|
+
GCT 在线 Word 文档引擎与 Vue 组件 SDK,用于在业务系统中接入文档设计、渲染与表单填报能力。
|
|
4
|
+
|
|
5
|
+
## 适用场景
|
|
6
|
+
|
|
7
|
+
- 需要在 Vue 3 项目中嵌入在线文档设计器/预览器
|
|
8
|
+
- 需要统一接入文档实例、模板、填报数据能力
|
|
9
|
+
- 需要通过插件机制扩展套件能力(如 `edhr`)
|
|
10
|
+
|
|
11
|
+
## 环境要求
|
|
12
|
+
|
|
13
|
+
- Node.js >= 18
|
|
14
|
+
- Vue 3
|
|
4
15
|
|
|
5
16
|
## 安装
|
|
6
17
|
|
|
7
18
|
```bash
|
|
8
|
-
npm install @gct-paas/word
|
|
9
|
-
# 或
|
|
10
19
|
pnpm add @gct-paas/word
|
|
11
20
|
```
|
|
12
21
|
|
|
13
|
-
|
|
22
|
+
或:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install @gct-paas/word
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
或:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
yarn add @gct-paas/word
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 依赖与样式
|
|
35
|
+
|
|
36
|
+
请在宿主项目中安装/确保以下 peer dependencies 可用(以 `package.json` 为准),包括但不限于:
|
|
37
|
+
|
|
38
|
+
- `vue`
|
|
39
|
+
- `floating-vue`
|
|
40
|
+
- `vue-konva`
|
|
41
|
+
- `konva`
|
|
42
|
+
- `vxe-table`
|
|
43
|
+
- `vuedraggable`
|
|
44
|
+
- `sortablejs`
|
|
45
|
+
- `crypto-js`
|
|
46
|
+
- `jspdf`
|
|
47
|
+
- `qrcode`
|
|
48
|
+
- `jsbarcode`
|
|
49
|
+
- `exifr`
|
|
50
|
+
|
|
51
|
+
同时引入样式文件:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import '@gct-paas/word/style.css';
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 快速开始
|
|
58
|
+
|
|
59
|
+
下面示例展示从初始化宿主适配器,到创建运行时,再到挂载渲染组件的完整流程。
|
|
14
60
|
|
|
15
|
-
```
|
|
16
|
-
import {
|
|
61
|
+
```ts
|
|
62
|
+
import { createApp, defineComponent } from 'vue';
|
|
63
|
+
import {
|
|
64
|
+
setupPlatformAdapters,
|
|
65
|
+
setupVueRuntime,
|
|
66
|
+
useWord,
|
|
67
|
+
DocRenderLayout,
|
|
68
|
+
edhrSuitePlugin,
|
|
69
|
+
} from '@gct-paas/word';
|
|
17
70
|
import '@gct-paas/word/style.css';
|
|
18
71
|
|
|
19
|
-
//
|
|
72
|
+
// 1) 应用全局初始化(整个应用生命周期调用一次)
|
|
73
|
+
setupPlatformAdapters({
|
|
74
|
+
interceptors: {
|
|
75
|
+
requestInterceptors: (config: any) => config,
|
|
76
|
+
requestInterceptorsCatch: (error: any) => Promise.reject(error),
|
|
77
|
+
responseInterceptors: (response: any) => response,
|
|
78
|
+
responseInterceptorsCatch: (error: any) => Promise.reject(error),
|
|
79
|
+
},
|
|
80
|
+
getAppInfo: async () => ({}),
|
|
81
|
+
parseFile: async (file: File) => file,
|
|
82
|
+
uploadFile: async (file: File) => ({ url: '', name: file.name }),
|
|
83
|
+
formulaIdentify: async () => [],
|
|
84
|
+
formulaCalculate: async () => ({}),
|
|
85
|
+
triggerHandler: async () => void 0,
|
|
86
|
+
plugins: [edhrSuitePlugin],
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
const Root = defineComponent({
|
|
90
|
+
name: 'WordDemo',
|
|
91
|
+
components: { DocRenderLayout },
|
|
92
|
+
setup() {
|
|
93
|
+
// 2) 创建文档运行时
|
|
94
|
+
const { controller, docInfo } = useWord(
|
|
95
|
+
{
|
|
96
|
+
requestId: 'your-request-id',
|
|
97
|
+
materialNo: 'optional-material-no',
|
|
98
|
+
requestQuery: {},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
factoryType: 'instance', // 'template' | 'instance'
|
|
102
|
+
modelKey: 'fm_your_model_key',
|
|
103
|
+
suiteKey: 'edhr',
|
|
104
|
+
isPreview: true,
|
|
105
|
+
},
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
return { controller, docInfo };
|
|
109
|
+
},
|
|
110
|
+
template: `
|
|
111
|
+
<div style="height: 100vh;">
|
|
112
|
+
<DocRenderLayout />
|
|
113
|
+
</div>
|
|
114
|
+
`,
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const app = createApp(Root);
|
|
118
|
+
|
|
119
|
+
// 3) Vue 运行时初始化(createApp 后调用)
|
|
120
|
+
setupVueRuntime({ app });
|
|
121
|
+
app.mount('#app');
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## 初始化 API
|
|
125
|
+
|
|
126
|
+
### `setupPlatformAdapters(options)`
|
|
127
|
+
|
|
128
|
+
平台适配器注册函数。用于将宿主系统能力注入 SDK,全局只需调用一次。
|
|
129
|
+
|
|
130
|
+
`options` 关键字段:
|
|
131
|
+
|
|
132
|
+
- `interceptors`:HTTP 请求拦截器配置
|
|
133
|
+
- `getAppInfo`:获取应用信息/默认上下文
|
|
134
|
+
- `parseFile`:文件解析方法
|
|
135
|
+
- `uploadFile`:文件上传方法
|
|
136
|
+
- `formulaIdentify?`:公式变量识别(可选)
|
|
137
|
+
- `formulaCalculate?`:公式计算(可选)
|
|
138
|
+
- `triggerHandler?`:触发主工程交互(可选)
|
|
139
|
+
- `plugins?`:要安装的 suite 插件列表(如 `edhrSuitePlugin`)
|
|
140
|
+
|
|
141
|
+
### `setupVueRuntime({ app })`
|
|
142
|
+
|
|
143
|
+
Vue 运行时注册函数。建议在 `createApp` 后、`mount` 前调用。
|
|
144
|
+
|
|
145
|
+
作用:
|
|
146
|
+
|
|
147
|
+
- 注册 `FloatingVue`
|
|
148
|
+
- 注册 `VueKonva`
|
|
149
|
+
- 注册 SDK 所需全局指令
|
|
150
|
+
|
|
151
|
+
## 核心运行时 API
|
|
152
|
+
|
|
153
|
+
### `useWord(props, options)`
|
|
154
|
+
|
|
155
|
+
文档运行时主入口,返回 `WordRuntime`。
|
|
156
|
+
|
|
157
|
+
- `props.requestId`:文档实例 ID 或模板 ID(支持函数形式)
|
|
158
|
+
- `options.factoryType`:`'template' | 'instance'`
|
|
159
|
+
- `options.modelKey`:主模型 key
|
|
160
|
+
- `options.suiteKey?`:套件 key(默认常用 `edhr`)
|
|
161
|
+
- `options.isPreview?` / `options.isDetailPage?` / `options.renderModeType?`:运行模式控制
|
|
162
|
+
|
|
163
|
+
返回值:
|
|
164
|
+
|
|
165
|
+
- `controller`:`ShallowRef<DocController | null>`
|
|
166
|
+
- `docInfo`:`Ref<DocInfo>`
|
|
167
|
+
|
|
168
|
+
### `DocController`(对外 API 清单)
|
|
169
|
+
|
|
170
|
+
`controller.value` 可用后,主要分为 4 类能力:
|
|
171
|
+
|
|
172
|
+
1) 状态字段(响应式):
|
|
173
|
+
|
|
174
|
+
- `id: string`:当前文档实例 id
|
|
175
|
+
- `mode`:当前渲染模式
|
|
176
|
+
- `modeLabel`:渲染模式文案
|
|
177
|
+
- `updateTick`:布局刷新计数
|
|
178
|
+
- `pages`:当前页面数组
|
|
179
|
+
- `docRuntimeMeta`:运行时元信息(接口返回 + 业务拼接)
|
|
180
|
+
|
|
181
|
+
2) 查询 API(只读):
|
|
182
|
+
|
|
183
|
+
- `query.getWidgetByModelId(modelId)`:按模型字段 id 定位组件节点
|
|
184
|
+
- `query.getPaperBySecRefId(id)`:按分节 refId 定位页面
|
|
185
|
+
|
|
186
|
+
3) 编辑/控制 API:
|
|
187
|
+
|
|
188
|
+
- `execute(command, payload?)`:执行内置命令(高级)
|
|
189
|
+
- `undo()` / `redo()`:撤销与重做
|
|
190
|
+
- `setMode(mode)`:切换渲染模式
|
|
191
|
+
- `setModel(model)`:替换当前文档模型
|
|
192
|
+
- `rawData()`:获取原始填报数据
|
|
193
|
+
- `reload()`:手动触发文档重载
|
|
194
|
+
|
|
195
|
+
4) 数据处理 API:
|
|
196
|
+
|
|
197
|
+
- `validate()`:校验字段,返回错误映射或 `null`
|
|
198
|
+
- `exportModel()`:导出 XmlJson 模型数据
|
|
199
|
+
- `getDocumentAttachmentPaths(types?)`:提取附件路径列表
|
|
200
|
+
- `enterBaseline(uniqueId)`:记录基线并进入填报模式
|
|
201
|
+
- `computeBaselineChanges(ctx)`:计算与基线差异
|
|
202
|
+
- `setAnnotation(ids, list)`:设置批注
|
|
203
|
+
|
|
204
|
+
示例:
|
|
205
|
+
|
|
206
|
+
```ts
|
|
207
|
+
const c = controller.value;
|
|
208
|
+
if (!c) return;
|
|
209
|
+
|
|
210
|
+
const errors = await c.validate();
|
|
211
|
+
if (!errors) {
|
|
212
|
+
const model = c.exportModel();
|
|
213
|
+
const data = c.rawData();
|
|
214
|
+
const files = c.getDocumentAttachmentPaths();
|
|
215
|
+
console.log(model, data, files);
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## 对外导出(主入口)
|
|
220
|
+
|
|
221
|
+
当前包主入口为 `@gct-paas/word`,可直接使用以下能力:
|
|
222
|
+
|
|
223
|
+
- 初始化 API:`setupPlatformAdapters`、`setupVueRuntime`
|
|
224
|
+
- 引擎/类型:`useWord`、`DocModeTypeConst`、`PageSizeEnumConst`、`BuiltinComponentTypeConst`、`WordRuntime`、`DocController` 等
|
|
225
|
+
- Vue 组件:`DocDesignLayout`、`DocRenderLayout`、`GctLayout`
|
|
226
|
+
- 插件能力:`registerSuite`、`WordSuitePlugin`、`edhrSuitePlugin`
|
|
227
|
+
|
|
228
|
+
## 插件扩展
|
|
229
|
+
|
|
230
|
+
### 方式一:在 `setupPlatformAdapters` 里批量注册(推荐)
|
|
231
|
+
|
|
232
|
+
```ts
|
|
233
|
+
import { setupPlatformAdapters, edhrSuitePlugin } from '@gct-paas/word';
|
|
234
|
+
|
|
235
|
+
setupPlatformAdapters({
|
|
236
|
+
interceptors,
|
|
237
|
+
getAppInfo,
|
|
238
|
+
parseFile,
|
|
239
|
+
uploadFile,
|
|
240
|
+
plugins: [edhrSuitePlugin],
|
|
241
|
+
});
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### 方式二:手动调用 `registerSuite`
|
|
245
|
+
|
|
246
|
+
```ts
|
|
247
|
+
import { registerSuite, edhrSuitePlugin } from '@gct-paas/word';
|
|
248
|
+
|
|
249
|
+
registerSuite(edhrSuitePlugin);
|
|
20
250
|
```
|
|
21
251
|
|
|
22
|
-
|
|
252
|
+
### 自定义插件协议
|
|
253
|
+
|
|
254
|
+
```ts
|
|
255
|
+
import type { WordSuitePlugin } from '@gct-paas/word';
|
|
256
|
+
|
|
257
|
+
const customPlugin: WordSuitePlugin = {
|
|
258
|
+
key: 'custom-suite',
|
|
259
|
+
install() {
|
|
260
|
+
// 在这里注册你的 suite 能力
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
## 最佳实践
|
|
266
|
+
|
|
267
|
+
- `setupPlatformAdapters` 只在应用启动时调用一次,避免重复注册全局能力。
|
|
268
|
+
- 在 `createApp` 之后立即执行 `setupVueRuntime`,再调用 `mount`。
|
|
269
|
+
- `uploadFile`、`parseFile`、`getAppInfo` 建议提供稳定兜底实现,避免运行时空函数导致异常。
|
|
270
|
+
- 通过 `controller` 调用业务动作前,先判断 `controller.value` 是否已就绪。
|
|
271
|
+
|
|
272
|
+
## 常见问题
|
|
273
|
+
|
|
274
|
+
### 1) 组件渲染空白
|
|
275
|
+
|
|
276
|
+
- 检查是否已引入 `@gct-paas/word/style.css`
|
|
277
|
+
- 检查是否调用了 `setupVueRuntime({ app })`
|
|
278
|
+
- 检查容器是否有明确高度(例如 `height: 100vh`)
|
|
279
|
+
|
|
280
|
+
### 2) 数据加载失败
|
|
23
281
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
- 可扩展的组件架构
|
|
282
|
+
- 检查 `requestId`、`factoryType`、`modelKey` 是否匹配当前业务接口
|
|
283
|
+
- 检查 `interceptors` 与鉴权逻辑是否正确透传
|
|
284
|
+
- 检查 `getAppInfo`、`requestQuery` 是否包含业务必需上下文
|
|
28
285
|
|
|
29
|
-
|
|
286
|
+
### 3) 插件能力未生效
|
|
30
287
|
|
|
31
|
-
|
|
288
|
+
- 检查插件是否执行了 `install()`
|
|
289
|
+
- 检查是否在 `setupPlatformAdapters` 初始化阶段完成注册
|
|
290
|
+
- 检查 `suiteKey` 与已注册插件 `key` 是否一致
|
|
32
291
|
|
|
33
|
-
##
|
|
292
|
+
## License
|
|
34
293
|
|
|
35
294
|
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GctAvatar } from './src/Avatar.vue';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
avatar?: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
direction?: 'vertical' | 'horizontal';
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
direction: "vertical" | "horizontal";
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
9
|
+
export default _default;
|
|
@@ -13,8 +13,8 @@ declare function __VLS_template(): {
|
|
|
13
13
|
};
|
|
14
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
15
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
16
|
-
disabled: boolean;
|
|
17
16
|
path: string;
|
|
17
|
+
disabled: boolean;
|
|
18
18
|
isLast: boolean;
|
|
19
19
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
|
|
20
20
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GctColorPicker } from './src/ColorPicker.vue';
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
tooltip?: string;
|
|
3
|
+
};
|
|
4
|
+
type __VLS_PublicProps = {
|
|
5
|
+
modelValue?: string;
|
|
6
|
+
} & __VLS_Props;
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (value: string) => any;
|
|
9
|
+
} & {
|
|
10
|
+
change: (val: string) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
+
onChange?: ((val: string) => any) | undefined;
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
tooltip: string;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
17
|
+
insRef: ({
|
|
18
|
+
$: import('vue').ComponentInternalInstance;
|
|
19
|
+
$data: {};
|
|
20
|
+
$props: {
|
|
21
|
+
readonly tooltip: string;
|
|
22
|
+
readonly "onLeft-btn-click"?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
24
|
+
$attrs: {
|
|
25
|
+
[x: string]: unknown;
|
|
26
|
+
};
|
|
27
|
+
$refs: {
|
|
28
|
+
[x: string]: unknown;
|
|
29
|
+
} & {
|
|
30
|
+
dropdownRef: import('vue').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
31
|
+
P: {};
|
|
32
|
+
B: {};
|
|
33
|
+
D: {};
|
|
34
|
+
C: {};
|
|
35
|
+
M: {};
|
|
36
|
+
Defaults: {};
|
|
37
|
+
}, Record<string, any> & {}, {}, {}, {}, {}, {}> | null;
|
|
38
|
+
};
|
|
39
|
+
$slots: Readonly<{
|
|
40
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
43
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
44
|
+
$host: Element | null;
|
|
45
|
+
$emit: (event: "left-btn-click", ...args: any[]) => void;
|
|
46
|
+
$el: HTMLDivElement;
|
|
47
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
48
|
+
tooltip: string;
|
|
49
|
+
}> & Readonly<{
|
|
50
|
+
"onLeft-btn-click"?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
}>, {
|
|
52
|
+
getRef: import('vue').Ref<any, any>;
|
|
53
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
54
|
+
"left-btn-click": (...args: any[]) => void;
|
|
55
|
+
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
56
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
57
|
+
created?: (() => void) | (() => void)[];
|
|
58
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
59
|
+
mounted?: (() => void) | (() => void)[];
|
|
60
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
61
|
+
updated?: (() => void) | (() => void)[];
|
|
62
|
+
activated?: (() => void) | (() => void)[];
|
|
63
|
+
deactivated?: (() => void) | (() => void)[];
|
|
64
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
65
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
66
|
+
destroyed?: (() => void) | (() => void)[];
|
|
67
|
+
unmounted?: (() => void) | (() => void)[];
|
|
68
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
69
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
70
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
71
|
+
};
|
|
72
|
+
$forceUpdate: () => void;
|
|
73
|
+
$nextTick: typeof import('vue').nextTick;
|
|
74
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
75
|
+
} & Readonly<{}> & Omit<Readonly<{
|
|
76
|
+
tooltip: string;
|
|
77
|
+
}> & Readonly<{
|
|
78
|
+
"onLeft-btn-click"?: ((...args: any[]) => any) | undefined;
|
|
79
|
+
}>, "getRef"> & import('vue').ShallowUnwrapRef<{
|
|
80
|
+
getRef: import('vue').Ref<any, any>;
|
|
81
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
82
|
+
$slots: {
|
|
83
|
+
'main-content'?(_: {}): any;
|
|
84
|
+
'left-content'?(_: {}): any;
|
|
85
|
+
};
|
|
86
|
+
}) | null;
|
|
87
|
+
}, HTMLDivElement>;
|
|
88
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GctDivider } from './src/divider.vue';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IDividerProps } from './divider';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
5
|
+
refs: {};
|
|
6
|
+
rootEl: HTMLDivElement;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
+
declare const __VLS_component: import('vue').DefineComponent<IDividerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IDividerProps> & Readonly<{}>, {
|
|
10
|
+
vertical: boolean;
|
|
11
|
+
color: string;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
13
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -60,12 +60,12 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
60
60
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
61
61
|
getRef: import('vue').Ref<any, any>;
|
|
62
62
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
63
|
-
edit: (...args: any[]) => void;
|
|
64
63
|
change: (...args: any[]) => void;
|
|
64
|
+
edit: (...args: any[]) => void;
|
|
65
65
|
"update:modelValue": (...args: any[]) => void;
|
|
66
66
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
67
|
-
onEdit?: ((...args: any[]) => any) | undefined;
|
|
68
67
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
68
|
+
onEdit?: ((...args: any[]) => any) | undefined;
|
|
69
69
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
70
70
|
}>, {
|
|
71
71
|
options: DropdownOption[] | DropdownOptionGroup[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GctEmpty } from './src/empty.vue';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IEmptyProps } from './empty';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<IEmptyProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IEmptyProps> & Readonly<{}>, {
|
|
3
|
+
width: number | string;
|
|
4
|
+
height: number | string;
|
|
5
|
+
tip: string;
|
|
6
|
+
iconSrc: string;
|
|
7
|
+
iconHeight: number | string;
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
9
|
+
export default _default;
|
package/dist/base/index.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ export * from './breadcrumb';
|
|
|
3
3
|
export * from './calendar';
|
|
4
4
|
export * from './checkbox';
|
|
5
5
|
export * from './collapse';
|
|
6
|
+
export * from './divider';
|
|
6
7
|
export * from './dropdown';
|
|
8
|
+
export * from './empty';
|
|
7
9
|
export * from './form-item';
|
|
8
10
|
export * from './icon';
|
|
9
11
|
export * from './image-upload';
|
|
@@ -16,9 +18,12 @@ export * from './radio';
|
|
|
16
18
|
export * from './scrollbar';
|
|
17
19
|
export * from './segment-slider';
|
|
18
20
|
export * from './select';
|
|
21
|
+
export * from './slider';
|
|
19
22
|
export * from './switch';
|
|
20
23
|
export * from './table';
|
|
21
24
|
export * from './tooltip';
|
|
22
25
|
export * from './tree';
|
|
23
26
|
export * from './tree-select';
|
|
24
27
|
export * from './date-time-picker';
|
|
28
|
+
export * from './color-picker';
|
|
29
|
+
export * from './avatar';
|
|
@@ -11,6 +11,8 @@ type __VLS_Props = {
|
|
|
11
11
|
controls?: boolean;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
placeholder?: string;
|
|
14
|
+
suffix?: string;
|
|
15
|
+
allowClear?: boolean;
|
|
14
16
|
/** 控制返回类型 */
|
|
15
17
|
returnString?: boolean;
|
|
16
18
|
/** 控制是否实时 emit */
|
|
@@ -18,7 +20,18 @@ type __VLS_Props = {
|
|
|
18
20
|
/** 小数截取处理规则 */
|
|
19
21
|
roundingMode?: 1 | 4 | 6;
|
|
20
22
|
};
|
|
21
|
-
declare
|
|
23
|
+
declare function __VLS_template(): {
|
|
24
|
+
attrs: Partial<{}>;
|
|
25
|
+
slots: {
|
|
26
|
+
clearIcon?(_: {}): any;
|
|
27
|
+
};
|
|
28
|
+
refs: {
|
|
29
|
+
inputRef: HTMLInputElement;
|
|
30
|
+
};
|
|
31
|
+
rootEl: HTMLDivElement;
|
|
32
|
+
};
|
|
33
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
34
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
22
35
|
blur: () => any;
|
|
23
36
|
change: (val: string | number | null) => any;
|
|
24
37
|
"update:modelValue": (val: string | number | null) => any;
|
|
@@ -30,9 +43,18 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
30
43
|
disabled: boolean;
|
|
31
44
|
modelValue: ValueType;
|
|
32
45
|
step: number;
|
|
46
|
+
allowClear: boolean;
|
|
33
47
|
controls: boolean;
|
|
34
48
|
returnString: boolean;
|
|
35
49
|
emitOnInput: boolean;
|
|
36
50
|
roundingMode: 1 | 4 | 6;
|
|
37
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
51
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
52
|
+
inputRef: HTMLInputElement;
|
|
53
|
+
}, HTMLDivElement>;
|
|
54
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
55
|
export default _default;
|
|
56
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -17,27 +17,27 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
|
|
|
17
17
|
select: () => void;
|
|
18
18
|
inputRef: import('vue').Ref<HTMLTextAreaElement | HTMLInputElement | null, HTMLTextAreaElement | HTMLInputElement | null>;
|
|
19
19
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
20
|
+
input: (value: string | number, event: Event) => any;
|
|
20
21
|
search: (value: string | number) => any;
|
|
21
|
-
focus: (event: FocusEvent) => any;
|
|
22
|
-
clear: () => any;
|
|
23
22
|
blur: (event: FocusEvent) => any;
|
|
24
23
|
change: (value: string | number, event: Event) => any;
|
|
25
|
-
|
|
24
|
+
focus: (event: FocusEvent) => any;
|
|
26
25
|
keydown: (event: KeyboardEvent) => any;
|
|
27
26
|
keypress: (event: KeyboardEvent) => any;
|
|
28
27
|
keyup: (event: KeyboardEvent) => any;
|
|
28
|
+
clear: () => any;
|
|
29
29
|
"update:modelValue": (value: string | number) => any;
|
|
30
30
|
pressEnter: (event: KeyboardEvent) => any;
|
|
31
31
|
}, string, import('vue').PublicProps, Readonly<GctInputProps> & Readonly<{
|
|
32
|
+
onInput?: ((value: string | number, event: Event) => any) | undefined;
|
|
32
33
|
onSearch?: ((value: string | number) => any) | undefined;
|
|
33
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
34
|
-
onClear?: (() => any) | undefined;
|
|
35
34
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
36
35
|
onChange?: ((value: string | number, event: Event) => any) | undefined;
|
|
37
|
-
|
|
36
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
38
37
|
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
39
38
|
onKeypress?: ((event: KeyboardEvent) => any) | undefined;
|
|
40
39
|
onKeyup?: ((event: KeyboardEvent) => any) | undefined;
|
|
40
|
+
onClear?: (() => any) | undefined;
|
|
41
41
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
42
42
|
onPressEnter?: ((event: KeyboardEvent) => any) | undefined;
|
|
43
43
|
}>, {
|
|
@@ -51,8 +51,8 @@ declare const __VLS_component: import('vue').DefineComponent<GctInputProps, {
|
|
|
51
51
|
placeholder: string;
|
|
52
52
|
autocomplete: string;
|
|
53
53
|
spellcheck: boolean;
|
|
54
|
-
modelValue: string | number;
|
|
55
54
|
prefix: string;
|
|
55
|
+
modelValue: string | number;
|
|
56
56
|
suffix: string;
|
|
57
57
|
addonBefore: string;
|
|
58
58
|
addonAfter: string;
|