foucui 1.0.2 → 2.0.0
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 +8 -8
- package/README.publish.md +19 -0
- package/dist/components/{QiuAnchor → FouAnchor}/context.d.ts +4 -4
- package/dist/components/{QiuBadge → FouBadge}/composables/useTableHostHeight.d.ts +1 -1
- package/dist/components/FouBadge/index.d.ts +18 -0
- package/dist/components/{QiuBadge → FouBadge}/shared/BadgeTemplateRenderer.vue.d.ts +1 -1
- package/dist/components/{QiuBadge → FouBadge}/shared/badgeTemplate.d.ts +1 -1
- package/dist/components/{QiuButton → FouButton}/index.vue.d.ts +4 -4
- package/dist/components/{QiuCanvasKit/QiuCanvasEditor.vue.d.ts → FouCanvasKit/FouCanvasEditor.vue.d.ts} +1 -1
- package/dist/components/{QiuCanvasKit → FouCanvasKit}/index.d.ts +4 -4
- package/dist/components/{QiuCanvasKit → FouCanvasKit}/types.d.ts +1 -1
- package/dist/components/{QiuCarousel → FouCarousel}/context.d.ts +4 -4
- package/dist/components/{QiuCascader → FouCascader}/types.d.ts +7 -7
- package/dist/components/{QiuCheckbox → FouCheckbox}/types.d.ts +1 -1
- package/dist/components/{QiuCollapse → FouCollapse}/context.d.ts +2 -2
- package/dist/components/{QiuDescriptions → FouDescriptions}/context.d.ts +4 -4
- package/dist/components/{QiuDropdown → FouDropdown}/context.d.ts +2 -2
- package/dist/components/{QiuForm → FouForm}/types.d.ts +10 -10
- package/dist/components/FouLoading/index.d.ts +26 -0
- package/dist/components/{QiuLoading → FouLoading}/spinner.vue.d.ts +3 -3
- package/dist/components/{QiuLoading → FouLoading}/types.d.ts +2 -2
- package/dist/components/{QiuMenu → FouMenu}/context.d.ts +2 -2
- package/dist/components/{QiuMenuNav → FouMenuNav}/context.d.ts +2 -2
- package/dist/components/{QiuMsg/QiuMsgItem.vue.d.ts → FouMsg/FouMsgItem.vue.d.ts} +3 -3
- package/dist/components/FouMsg/index.d.ts +30 -0
- package/dist/components/{QiuMsg → FouMsg}/types.d.ts +5 -5
- package/dist/components/{QiuMsgBox → FouMsgBox}/index.d.ts +3 -3
- package/dist/components/{QiuNotification/QiuNotificationItem.vue.d.ts → FouNotification/FouNotificationItem.vue.d.ts} +3 -3
- package/dist/components/FouNotification/index.d.ts +30 -0
- package/dist/components/FouNotification/types.d.ts +12 -0
- package/dist/components/{QiuRadio → FouRadio}/types.d.ts +1 -1
- package/dist/components/FouRow/types.d.ts +4 -0
- package/dist/components/{QiuSelect → FouSelect}/index.vue.d.ts +3 -3
- package/dist/components/{QiuSelect → FouSelect}/types.d.ts +3 -3
- package/dist/components/{QiuStep → FouStep}/index.vue.d.ts +1 -1
- package/dist/components/{QiuSteps → FouSteps}/context.d.ts +5 -5
- package/dist/components/{QiuTabBar → FouTabBar}/index.vue.d.ts +3 -3
- package/dist/components/{QiuTabBar → FouTabBar}/types.d.ts +5 -5
- package/dist/components/{QiuTable → FouTable}/export.d.ts +5 -5
- package/dist/components/FouTable/index.d.ts +3 -0
- package/dist/components/{QiuTable → FouTable}/index.vue.d.ts +49 -49
- package/dist/components/FouTable/registry.d.ts +39 -0
- package/dist/components/{QiuTable → FouTable}/types.d.ts +60 -60
- package/dist/components/{QiuTable → FouTable}/useArea.d.ts +10 -10
- package/dist/components/{QiuTable → FouTable}/useColumns.d.ts +5 -5
- package/dist/components/FouTable/useEdit.d.ts +36 -0
- package/dist/components/{QiuTable → FouTable}/useHistory.d.ts +5 -5
- package/dist/components/{QiuTable → FouTable}/useMerge.d.ts +6 -6
- package/dist/components/{QiuTable → FouTable}/useScrollSync.d.ts +1 -1
- package/dist/components/{QiuTable → FouTable}/utils.d.ts +17 -17
- package/dist/components/FouTree/types.d.ts +13 -0
- package/dist/components/{QiuUpload → FouUpload}/index.vue.d.ts +17 -17
- package/dist/foucui.css +1 -1
- package/dist/foucui.js +7362 -7362
- package/dist/foucui.umd.cjs +37 -37
- package/dist/index.d.ts +43 -43
- package/dist/src/bridge/@/config/index.d.ts +1 -1
- package/dist/src/bridge/@fou/plugins/shortcuts.d.ts +2 -0
- package/package.json +5 -3
- package/dist/components/QiuBadge/index.d.ts +0 -18
- package/dist/components/QiuLoading/index.d.ts +0 -26
- package/dist/components/QiuMsg/index.d.ts +0 -30
- package/dist/components/QiuNotification/index.d.ts +0 -30
- package/dist/components/QiuNotification/types.d.ts +0 -12
- package/dist/components/QiuRow/types.d.ts +0 -4
- package/dist/components/QiuTable/index.d.ts +0 -3
- package/dist/components/QiuTable/registry.d.ts +0 -39
- package/dist/components/QiuTable/useEdit.d.ts +0 -36
- package/dist/components/QiuTree/types.d.ts +0 -13
- package/dist/src/bridge/@qiu/plugins/shortcuts.d.ts +0 -2
- /package/dist/components/{QiuAnchorLink → FouAnchorLink}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/api/index.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/components/BadgeImagePickerDialog.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/components/BadgeLibraryManagerDialog.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/components/BadgeLibraryPanel.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/shared/assetUrl.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/utils/chinaAreaData.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/utils/hostRegion.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/utils/pdfFromElement.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/views/BadgeLibraryView.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/views/BadgeManageView.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/views/BadgeTemplateListView.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/views/DeskLabelTemplateListView.vue.d.ts +0 -0
- /package/dist/components/{QiuBadge → FouBadge}/views/DeskLabelView.vue.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit/QiuCanvasRenderer.vue.d.ts → FouCanvasKit/FouCanvasRenderer.vue.d.ts} +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/assetUrl.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/components/DataModulesPanel.vue.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/export/html.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/export/pdf.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/export/png.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/modules/badgeCompat.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/modules/dataRegistry.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/modules/merge.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/presets/badge.d.ts +0 -0
- /package/dist/components/{QiuCanvasKit → FouCanvasKit}/presets/banner.d.ts +0 -0
- /package/dist/components/{QiuCarouselItem → FouCarouselItem}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuCheckbox/QiuCheckboxGroup.vue.d.ts → FouCheckbox/FouCheckboxGroup.vue.d.ts} +0 -0
- /package/dist/components/{QiuCheckbox → FouCheckbox}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuCode → FouCode}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuCollapseItem → FouCollapseItem}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuColorField → FouColorField}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuColorPicker → FouColorPicker}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuCombobox → FouCombobox}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuContextMenu → FouContextMenu}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuDescriptionsItem → FouDescriptionsItem}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuDigitalCard → FouDigitalCard}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuDropdown/QiuDropdownItem.vue.d.ts → FouDropdown/FouDropdownItem.vue.d.ts} +0 -0
- /package/dist/components/{QiuDropdown/QiuDropdownMenu.vue.d.ts → FouDropdown/FouDropdownMenu.vue.d.ts} +0 -0
- /package/dist/components/{QiuDropdown → FouDropdown}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuHoverCard → FouHoverCard}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuIcon → FouIcon}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuIconPicker → FouIconPicker}/iconify.libraries.d.ts +0 -0
- /package/dist/components/{QiuIconPicker → FouIconPicker}/icons.catalog.d.ts +0 -0
- /package/dist/components/{QiuInput → FouInput}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuInputNumber → FouInputNumber}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuInputOtp → FouInputOtp}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuKbd → FouKbd}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuLayoutContainer → FouLayoutContainer}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuLinkPreview → FouLinkPreview}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuMention → FouMention}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuMenu/QiuMenuRoot.vue.d.ts → FouMenu/FouMenuRoot.vue.d.ts} +0 -0
- /package/dist/components/{QiuMenuNav/QiuMenuNavItem.vue.d.ts → FouMenuNav/FouMenuNavItem.vue.d.ts} +0 -0
- /package/dist/components/{QiuMenuNav/QiuMenuNavSub.vue.d.ts → FouMenuNav/FouMenuNavSub.vue.d.ts} +0 -0
- /package/dist/components/{QiuMenuNav → FouMenuNav}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuPageMain → FouPageMain}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuPagination → FouPagination}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuPasswordStrength → FouPasswordStrength}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuQrcode → FouQrcode}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuRadio/QiuRadioGroup.vue.d.ts → FouRadio/FouRadioGroup.vue.d.ts} +0 -0
- /package/dist/components/{QiuSearchBar → FouSearchBar}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuSelect/QiuOption.vue.d.ts → FouSelect/FouOption.vue.d.ts} +0 -0
- /package/dist/components/{QiuSparkline → FouSparkline}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuSwitch → FouSwitch}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuTabPane → FouTabPane}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuTable → FouTable}/columns.d.ts +0 -0
- /package/dist/components/{QiuTable → FouTable}/useExtras.d.ts +0 -0
- /package/dist/components/{QiuTable → FouTable}/useResize.d.ts +0 -0
- /package/dist/components/{QiuTable → FouTable}/useVirtual.d.ts +0 -0
- /package/dist/components/{QiuTime → FouTime}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuTimeAgo → FouTimeAgo}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuTimelineItem → FouTimelineItem}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuTooltip → FouTooltip}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuTrend → FouTrend}/index.vue.d.ts +0 -0
- /package/dist/components/{QiuUploadCrop → FouUploadCrop}/index.vue.d.ts +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
FouCui 自研 Vue3 组件库(独立可发布包)。包名 **`foucui@1.0.1+`**。
|
|
4
4
|
|
|
5
|
-
原包名迁移路径:`
|
|
5
|
+
原包名迁移路径:`fouui-vue` →(短暂 `qiuye`)→ **`foucui`**。
|
|
6
6
|
|
|
7
7
|
## 安装
|
|
8
8
|
|
|
@@ -12,19 +12,19 @@ pnpm add foucui
|
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
```ts
|
|
15
|
-
import { setupFoucui,
|
|
15
|
+
import { setupFoucui, setupFou } from 'foucui'
|
|
16
16
|
import 'foucui/dist/foucui.css'
|
|
17
|
-
import 'foucui/styles/
|
|
17
|
+
import 'foucui/styles/fou.scss'
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
`setupFoucui` / `setupQiuye` / `
|
|
20
|
+
`setupFoucui` / `setupQiuye` / `setupFou` 行为一致。
|
|
21
21
|
|
|
22
|
-
## 画布套件
|
|
22
|
+
## 画布套件 FouCanvasKit
|
|
23
23
|
|
|
24
24
|
```ts
|
|
25
25
|
import {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
FouCanvasEditor,
|
|
27
|
+
FouCanvasRenderer,
|
|
28
28
|
mergeTemplateText,
|
|
29
29
|
createBannerDoc,
|
|
30
30
|
downloadCanvasHtml,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
## 发布
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
cd web/
|
|
39
|
+
cd web/fou-ui
|
|
40
40
|
pnpm install
|
|
41
41
|
pnpm run build
|
|
42
42
|
npm publish --access public
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 组件库 foucui:npm 发包说明(业务端禁止链本地源码)
|
|
3
|
+
* @author qiuye
|
|
4
|
+
* @email yjk150@qq.com
|
|
5
|
+
* @date 2026-08-17
|
|
6
|
+
*
|
|
7
|
+
* ## 消费端(apps / admin-shell)
|
|
8
|
+
* - package.json 使用 `"foucui": "^2.0.0"`(或更新版本),**禁止** `workspace:*`
|
|
9
|
+
* - 引入:`import { FouXxx, setupFoucui, fouMsg } from 'foucui'`
|
|
10
|
+
* - 模板标签:`<fou-button>` / `<FouButton>`(2.0 起前缀由 Qiu 改为 Fou)
|
|
11
|
+
* - 样式:`import 'foucui/dist/foucui.css'`;CSS 变量 `--fou-*`
|
|
12
|
+
* - 不要 `import 'foucui/components/...'`(发包已不再导出源码目录)
|
|
13
|
+
*
|
|
14
|
+
* ## 改组件并发布
|
|
15
|
+
* 1. 改 `packages/foucui` 源码(该目录已移出 pnpm workspace,不会被业务端链接)
|
|
16
|
+
* 2. `cd packages/foucui && pnpm run build`
|
|
17
|
+
* 3. 升 version 后 `npm publish --access public`(或根目录 `pnpm publish:foucui`)
|
|
18
|
+
* 4. 各端把依赖版本 bump 后 `pnpm install`
|
|
19
|
+
*/
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
|
-
export interface
|
|
2
|
+
export interface FouAnchorLinkRecord {
|
|
3
3
|
href: string;
|
|
4
4
|
title: string;
|
|
5
5
|
el: HTMLElement | null;
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface FouAnchorContext {
|
|
8
8
|
offset: Ref<number>;
|
|
9
9
|
bound: Ref<string>;
|
|
10
10
|
activeLink: Ref<string>;
|
|
11
|
-
registerLink: (link:
|
|
11
|
+
registerLink: (link: FouAnchorLinkRecord) => void;
|
|
12
12
|
unregisterLink: (href: string) => void;
|
|
13
13
|
scrollToLink: (href: string) => void;
|
|
14
14
|
}
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const FOU_ANCHOR_KEY: InjectionKey<FouAnchorContext>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** 测量容器高度供
|
|
1
|
+
/** 测量容器高度供 fou-table 的 `height` 使用,使表格占满剩余区域。
|
|
2
2
|
* 使用 ResizeObserver(宿主为表格外层 div,非表格根节点)+ window resize,避免仅靠窗口尺寸遗漏侧栏折叠等变化。 */
|
|
3
3
|
export declare function useTableHostHeight(minHeight?: number): {
|
|
4
4
|
hostRef: globalThis.Ref<HTMLElement, HTMLElement>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FouBadge — 证件 / 桌签制作插件
|
|
3
|
+
* 源码迁自 zhihui web-admin + shared,先落地再调。
|
|
4
|
+
*/
|
|
5
|
+
/** 编辑器真源在 FouCanvasKit;此入口保持兼容 */
|
|
6
|
+
export { default as FouBadgeTemplateEditor } from '../FouCanvasKit/FouCanvasEditor.vue';
|
|
7
|
+
export { default as FouBadgeTemplateList } from './views/BadgeTemplateListView.vue';
|
|
8
|
+
export { default as FouBadgeManage } from './views/BadgeManageView.vue';
|
|
9
|
+
export { default as FouBadgeLibrary } from './views/BadgeLibraryView.vue';
|
|
10
|
+
export { default as FouDeskLabel } from './views/DeskLabelView.vue';
|
|
11
|
+
export { default as FouDeskLabelTemplateList } from './views/DeskLabelTemplateListView.vue';
|
|
12
|
+
export { default as FouBadgeTemplateRenderer } from './shared/BadgeTemplateRenderer.vue';
|
|
13
|
+
export { default as FouBadgeImagePickerDialog } from './components/BadgeImagePickerDialog.vue';
|
|
14
|
+
export { default as FouBadgeLibraryManagerDialog } from './components/BadgeLibraryManagerDialog.vue';
|
|
15
|
+
export { default as FouBadgeLibraryPanel } from './components/BadgeLibraryPanel.vue';
|
|
16
|
+
export * from './shared/badgeTemplate';
|
|
17
|
+
export * from './shared/assetUrl';
|
|
18
|
+
export * as FouBadgeApi from './api/index';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BadgeTemplateDoc } from './badgeTemplate';
|
|
2
|
-
import { MergeContext } from '../../
|
|
2
|
+
import { MergeContext } from '../../FouCanvasKit/types';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
doc: BadgeTemplateDoc | null;
|
|
5
5
|
mergeData?: MergeContext | Record<string, string>;
|
|
@@ -106,7 +106,7 @@ export interface BadgeTemplateDoc {
|
|
|
106
106
|
elements: BadgeElement[];
|
|
107
107
|
guides?: BadgeGuideLine[];
|
|
108
108
|
regions?: BadgeCanvasRegion[];
|
|
109
|
-
/** 可选:画布级数据模块(与
|
|
109
|
+
/** 可选:画布级数据模块(与 FouCanvasKit 对齐) */
|
|
110
110
|
dataModules?: Array<{
|
|
111
111
|
id: string;
|
|
112
112
|
label: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
type
|
|
1
|
+
declare const FOU_BUTTON_COLORS: Record<string, string>;
|
|
2
|
+
type FouButtonType = 'default' | keyof typeof FOU_BUTTON_COLORS | string;
|
|
3
3
|
type __VLS_Props = {
|
|
4
|
-
type?:
|
|
4
|
+
type?: FouButtonType;
|
|
5
5
|
color?: string;
|
|
6
6
|
size?: 'large' | 'default' | 'small';
|
|
7
7
|
plain?: boolean;
|
|
@@ -34,7 +34,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
34
34
|
}>, {
|
|
35
35
|
link: boolean;
|
|
36
36
|
disabled: boolean;
|
|
37
|
-
type:
|
|
37
|
+
type: FouButtonType;
|
|
38
38
|
circle: boolean;
|
|
39
39
|
text: boolean;
|
|
40
40
|
round: boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* FouCanvasKit — 统一证件 / 桌签 / Banner 画布套件
|
|
3
3
|
* @author qiuye
|
|
4
4
|
* @email yjk150@qq.com
|
|
5
5
|
* @date 2026-08-16
|
|
6
6
|
*/
|
|
7
|
-
export { default as
|
|
8
|
-
export { default as
|
|
9
|
-
export { default as
|
|
7
|
+
export { default as FouCanvasEditor } from './FouCanvasEditor.vue';
|
|
8
|
+
export { default as FouCanvasRenderer } from './FouCanvasRenderer.vue';
|
|
9
|
+
export { default as FouCanvasDataModulesPanel } from './components/DataModulesPanel.vue';
|
|
10
10
|
export * from './types';
|
|
11
11
|
export * from './modules/dataRegistry';
|
|
12
12
|
export * from './modules/merge';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
|
-
export interface
|
|
2
|
+
export interface FouCarouselItemRegistration {
|
|
3
3
|
uid: number;
|
|
4
4
|
name?: string | number;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface FouCarouselContext {
|
|
7
7
|
activeIndex: Ref<number>;
|
|
8
8
|
itemCount: Ref<number>;
|
|
9
|
-
registerItem: (item:
|
|
9
|
+
registerItem: (item: FouCarouselItemRegistration) => number;
|
|
10
10
|
unregisterItem: (uid: number) => void;
|
|
11
11
|
loop: Ref<boolean>;
|
|
12
12
|
}
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const FOU_CAROUSEL_KEY: InjectionKey<FouCarouselContext>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** 级联选项(字段名可由 props 配置) */
|
|
2
|
-
export type
|
|
3
|
-
export interface
|
|
2
|
+
export type FouCascaderOption = Record<string, any>;
|
|
3
|
+
export interface FouCascaderPropsConfig {
|
|
4
4
|
/** 选项值字段,默认 value */
|
|
5
5
|
value?: string;
|
|
6
6
|
/** 选项文案字段,默认 label */
|
|
@@ -18,8 +18,8 @@ export interface QiuCascaderPropsConfig {
|
|
|
18
18
|
/** 展开方式 */
|
|
19
19
|
expandTrigger?: 'click' | 'hover';
|
|
20
20
|
}
|
|
21
|
-
export type
|
|
22
|
-
export declare function getOptValue(opt:
|
|
23
|
-
export declare function getOptLabel(opt:
|
|
24
|
-
export declare function getOptChildren(opt:
|
|
25
|
-
export declare function isOptDisabled(opt:
|
|
21
|
+
export type FouCascaderValue = string | number | Array<string | number> | Array<Array<string | number>> | null;
|
|
22
|
+
export declare function getOptValue(opt: FouCascaderOption, cfg: FouCascaderPropsConfig): string | number;
|
|
23
|
+
export declare function getOptLabel(opt: FouCascaderOption, cfg: FouCascaderPropsConfig): string;
|
|
24
|
+
export declare function getOptChildren(opt: FouCascaderOption, cfg: FouCascaderPropsConfig): FouCascaderOption[] | undefined;
|
|
25
|
+
export declare function isOptDisabled(opt: FouCascaderOption, cfg: FouCascaderPropsConfig): boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
|
-
export interface
|
|
2
|
+
export interface FouCollapseContext {
|
|
3
3
|
activeNames: Ref<(string | number)[]>;
|
|
4
4
|
accordion: Ref<boolean>;
|
|
5
5
|
toggleItem: (name: string | number) => void;
|
|
6
6
|
isActive: (name: string | number) => boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const FOU_COLLAPSE_KEY: InjectionKey<FouCollapseContext>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
|
-
export interface
|
|
2
|
+
export interface FouDescriptionsItemRegistration {
|
|
3
3
|
uid: number;
|
|
4
4
|
label: string;
|
|
5
5
|
span: number;
|
|
6
6
|
render: () => any;
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
8
|
+
export interface FouDescriptionsContext {
|
|
9
9
|
column: Ref<number>;
|
|
10
10
|
border: Ref<boolean>;
|
|
11
11
|
direction: Ref<'horizontal' | 'vertical'>;
|
|
12
12
|
size: Ref<'large' | 'default' | 'small'>;
|
|
13
|
-
registerItem: (item:
|
|
13
|
+
registerItem: (item: FouDescriptionsItemRegistration) => void;
|
|
14
14
|
unregisterItem: (uid: number) => void;
|
|
15
15
|
}
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const FOU_DESCRIPTIONS_KEY: InjectionKey<FouDescriptionsContext>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
|
-
export interface
|
|
2
|
+
export interface FouDropdownContext {
|
|
3
3
|
visible: Ref<boolean>;
|
|
4
4
|
close: () => void;
|
|
5
5
|
emitCommand: (command: string | number) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const FOU_DROPDOWN_KEY: InjectionKey<FouDropdownContext>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export type
|
|
1
|
+
export declare const FOU_FORM_KEY: unique symbol;
|
|
2
|
+
export declare const FOU_FORM_ITEM_KEY: unique symbol;
|
|
3
|
+
export type FouFormRule = {
|
|
4
4
|
required?: boolean;
|
|
5
5
|
message?: string;
|
|
6
6
|
min?: number;
|
|
@@ -8,24 +8,24 @@ export type QiuFormRule = {
|
|
|
8
8
|
pattern?: RegExp;
|
|
9
9
|
type?: string;
|
|
10
10
|
trigger?: 'blur' | 'change' | Array<'blur' | 'change'>;
|
|
11
|
-
validator?: (rule:
|
|
11
|
+
validator?: (rule: FouFormRule, value: any, callback: (error?: string | Error) => void) => void;
|
|
12
12
|
};
|
|
13
|
-
export type
|
|
14
|
-
export interface
|
|
13
|
+
export type FouFormRules = Record<string, FouFormRule | FouFormRule[]>;
|
|
14
|
+
export interface FouFormItemContext {
|
|
15
15
|
uid: number;
|
|
16
16
|
prop?: string;
|
|
17
17
|
validate: (trigger: string) => Promise<boolean>;
|
|
18
18
|
resetField: () => void;
|
|
19
19
|
clearValidate: () => void;
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface FouFormContext {
|
|
22
22
|
model: import('vue').ComputedRef<Record<string, any> | undefined>;
|
|
23
|
-
rules: import('vue').ComputedRef<
|
|
23
|
+
rules: import('vue').ComputedRef<FouFormRules | undefined>;
|
|
24
24
|
labelWidth: import('vue').ComputedRef<string>;
|
|
25
25
|
labelPosition: import('vue').ComputedRef<'left' | 'right' | 'top'>;
|
|
26
26
|
disabled: import('vue').ComputedRef<boolean>;
|
|
27
27
|
hideRequiredAsterisk: import('vue').ComputedRef<boolean>;
|
|
28
|
-
addField: (field:
|
|
29
|
-
removeField: (field:
|
|
28
|
+
addField: (field: FouFormItemContext) => void;
|
|
29
|
+
removeField: (field: FouFormItemContext) => void;
|
|
30
30
|
emitValidate: (prop: string, isValid: boolean, message: string) => void;
|
|
31
31
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { App, Directive } from 'vue';
|
|
2
|
+
import { default as FouLoadingSpinner } from './spinner.vue';
|
|
3
|
+
import { FOU_LOADING_EFFECTS, FouLoadingEffect } from './types';
|
|
4
|
+
export type { FouLoadingEffect };
|
|
5
|
+
export { FOU_LOADING_EFFECTS };
|
|
6
|
+
export interface FouLoadingOptions {
|
|
7
|
+
target?: HTMLElement | string;
|
|
8
|
+
text?: string;
|
|
9
|
+
fullscreen?: boolean;
|
|
10
|
+
transparent?: boolean;
|
|
11
|
+
/** 动画效果,见 FOU_LOADING_EFFECTS */
|
|
12
|
+
effect?: FouLoadingEffect;
|
|
13
|
+
/** directive 绑定值 */
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const vFouLoading: Directive<HTMLElement, boolean | FouLoadingOptions>;
|
|
17
|
+
export declare const fouLoading: {
|
|
18
|
+
service(options?: FouLoadingOptions): {
|
|
19
|
+
close: () => void;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
declare const _default: {
|
|
23
|
+
install(app: App): void;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
export { FouLoadingSpinner };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FouLoadingEffect } from './types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
text?: string;
|
|
4
4
|
fullscreen?: boolean;
|
|
5
5
|
transparent?: boolean;
|
|
6
|
-
effect?:
|
|
6
|
+
effect?: FouLoadingEffect;
|
|
7
7
|
};
|
|
8
8
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
9
|
text: string;
|
|
10
10
|
fullscreen: boolean;
|
|
11
11
|
transparent: boolean;
|
|
12
|
-
effect:
|
|
12
|
+
effect: FouLoadingEffect;
|
|
13
13
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
14
14
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export declare const
|
|
1
|
+
export type FouLoadingEffect = 'spinner' | 'dual-ring' | 'crescent' | 'gradient' | 'dash' | 'dots' | 'wave' | 'bounce' | 'bars' | 'bricks' | 'square' | 'flip' | 'pulse' | 'ripple' | 'orbit' | 'radar' | 'spiral' | 'infinity' | 'hourglass' | 'skeleton';
|
|
2
|
+
export declare const FOU_LOADING_EFFECTS: FouLoadingEffect[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
|
-
export interface
|
|
2
|
+
export interface FouRouteMenuContext {
|
|
3
3
|
mode: Ref<'vertical' | 'horizontal'>;
|
|
4
4
|
collapse: Ref<boolean>;
|
|
5
5
|
activeIndex: Ref<string>;
|
|
@@ -16,4 +16,4 @@ export interface QiuRouteMenuContext {
|
|
|
16
16
|
selectItem: (index: string) => void;
|
|
17
17
|
isActive: (index: string) => boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const FOU_ROUTE_MENU_KEY: InjectionKey<FouRouteMenuContext>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
|
-
export interface
|
|
2
|
+
export interface FouMenuNavContext {
|
|
3
3
|
mode: Ref<'vertical' | 'horizontal'>;
|
|
4
4
|
collapse: Ref<boolean>;
|
|
5
5
|
defaultActive: Ref<string>;
|
|
@@ -9,4 +9,4 @@ export interface QiuMenuNavContext {
|
|
|
9
9
|
isSubOpen: (index: string) => boolean;
|
|
10
10
|
toggleSub: (index: string) => void;
|
|
11
11
|
}
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const FOU_MENU_NAV_KEY: InjectionKey<FouMenuNavContext>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FouMsgPosition, FouMsgType } from './types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
id: string;
|
|
4
|
-
type:
|
|
5
|
-
position:
|
|
4
|
+
type: FouMsgType;
|
|
5
|
+
position: FouMsgPosition;
|
|
6
6
|
message: any;
|
|
7
7
|
showClose: boolean;
|
|
8
8
|
visible: boolean;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { FouMsgOptions, FouMsgPosition } from './types';
|
|
3
|
+
export type { FouMsgOptions, FouMsgPosition, FouMsgType } from './types';
|
|
4
|
+
export declare const fouMsg: FouMsgFn;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
install(app: App): void;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
export type FouMsgFn = ((options: FouMsgOptions | string) => {
|
|
10
|
+
close: () => void;
|
|
11
|
+
id: string;
|
|
12
|
+
}) & {
|
|
13
|
+
success: (message: string | FouMsgOptions, position?: FouMsgPosition) => {
|
|
14
|
+
close: () => void;
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
warning: (message: string | FouMsgOptions, position?: FouMsgPosition) => {
|
|
18
|
+
close: () => void;
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
info: (message: string | FouMsgOptions, position?: FouMsgPosition) => {
|
|
22
|
+
close: () => void;
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
25
|
+
error: (message: string | FouMsgOptions, position?: FouMsgPosition) => {
|
|
26
|
+
close: () => void;
|
|
27
|
+
id: string;
|
|
28
|
+
};
|
|
29
|
+
closeAll: (position?: FouMsgPosition) => void;
|
|
30
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export type
|
|
3
|
-
export interface
|
|
1
|
+
export type FouMsgPosition = 'center' | 'left-top' | 'left-center' | 'left-bottom' | 'top-center' | 'bottom-center' | 'right-top' | 'right-center' | 'right-bottom';
|
|
2
|
+
export type FouMsgType = 'success' | 'warning' | 'info' | 'error';
|
|
3
|
+
export interface FouMsgOptions {
|
|
4
4
|
message: string | import('vue').VNode;
|
|
5
|
-
type?:
|
|
6
|
-
position?:
|
|
5
|
+
type?: FouMsgType;
|
|
6
|
+
position?: FouMsgPosition;
|
|
7
7
|
duration?: number;
|
|
8
8
|
showClose?: boolean;
|
|
9
9
|
offset?: number;
|
|
@@ -7,8 +7,8 @@ type BoxOptions = {
|
|
|
7
7
|
cancelButtonText?: string;
|
|
8
8
|
dangerouslyUseHTMLString?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
10
|
+
export declare const fouAlert: (content: any, title?: string, callback?: () => void) => Promise<void>;
|
|
11
|
+
export declare const fouConfirm: (content: any, title?: string, onOk?: () => void, onCancel?: () => void, confirmButtonText?: string, cancelButtonText?: string) => Promise<void>;
|
|
12
12
|
/** Promise 版:返回 'confirm' | 'cancel',便于 async/await */
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const fouConfirmPromise: (content: any, title?: string, opts?: Pick<BoxOptions, "confirmButtonText" | "cancelButtonText" | "dangerouslyUseHTMLString">) => Promise<"cancel" | "confirm">;
|
|
14
14
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FouNotifyPosition, FouNotifyType } from './types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
id: string;
|
|
4
|
-
type:
|
|
5
|
-
position:
|
|
4
|
+
type: FouNotifyType;
|
|
5
|
+
position: FouNotifyPosition;
|
|
6
6
|
title: string;
|
|
7
7
|
message: string;
|
|
8
8
|
showClose: boolean;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { FouNotifyOptions, FouNotifyPosition } from './types';
|
|
3
|
+
export type { FouNotifyOptions, FouNotifyPosition, FouNotifyType } from './types';
|
|
4
|
+
export declare const fouNotify: FouNotifyFn;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
install(app: App): void;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
export type FouNotifyFn = ((options: FouNotifyOptions | string) => {
|
|
10
|
+
close: () => void;
|
|
11
|
+
id: string;
|
|
12
|
+
}) & {
|
|
13
|
+
success: (options: string | FouNotifyOptions) => {
|
|
14
|
+
close: () => void;
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
warning: (options: string | FouNotifyOptions) => {
|
|
18
|
+
close: () => void;
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
info: (options: string | FouNotifyOptions) => {
|
|
22
|
+
close: () => void;
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
25
|
+
error: (options: string | FouNotifyOptions) => {
|
|
26
|
+
close: () => void;
|
|
27
|
+
id: string;
|
|
28
|
+
};
|
|
29
|
+
closeAll: (position?: FouNotifyPosition) => void;
|
|
30
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type FouNotifyPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
2
|
+
export type FouNotifyType = 'success' | 'warning' | 'info' | 'error';
|
|
3
|
+
export interface FouNotifyOptions {
|
|
4
|
+
title?: string;
|
|
5
|
+
message?: string;
|
|
6
|
+
type?: FouNotifyType;
|
|
7
|
+
duration?: number;
|
|
8
|
+
position?: FouNotifyPosition;
|
|
9
|
+
offset?: number;
|
|
10
|
+
id?: string;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FouSelectOption } from './types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
modelValue?: string | number | boolean | null;
|
|
4
|
-
options?:
|
|
4
|
+
options?: FouSelectOption[];
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
clearable?: boolean;
|
|
7
7
|
disabled?: boolean;
|
|
@@ -37,7 +37,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
37
37
|
size: "large" | "default" | "small";
|
|
38
38
|
placeholder: string;
|
|
39
39
|
fit: boolean;
|
|
40
|
-
options:
|
|
40
|
+
options: FouSelectOption[];
|
|
41
41
|
clearable: boolean;
|
|
42
42
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
43
43
|
rootRef: HTMLDivElement;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
export interface
|
|
2
|
+
export interface FouSelectOption {
|
|
3
3
|
value: string | number | boolean;
|
|
4
4
|
label: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface FouSelectContext {
|
|
8
8
|
modelValue: Ref<string | number | boolean | null | undefined>;
|
|
9
9
|
selectOption: (value: string | number | boolean, label: string) => void;
|
|
10
10
|
setHoverOption: (value: string | number | boolean) => void;
|
|
11
|
-
registerOption: (option:
|
|
11
|
+
registerOption: (option: FouSelectOption) => void;
|
|
12
12
|
unregisterOption: (value: string | number | boolean) => void;
|
|
13
13
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
2
|
export type StepStatus = 'wait' | 'process' | 'finish' | 'error' | 'success';
|
|
3
|
-
export interface
|
|
3
|
+
export interface FouStepItem {
|
|
4
4
|
uid: number;
|
|
5
5
|
title: string;
|
|
6
6
|
description: string;
|
|
7
7
|
icon: string;
|
|
8
8
|
status: StepStatus | '';
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface FouStepsContext {
|
|
11
11
|
active: Ref<number>;
|
|
12
12
|
space: Ref<string | number | undefined>;
|
|
13
13
|
direction: Ref<'horizontal' | 'vertical'>;
|
|
14
14
|
processStatus: Ref<StepStatus>;
|
|
15
15
|
finishStatus: Ref<StepStatus>;
|
|
16
16
|
alignCenter: Ref<boolean>;
|
|
17
|
-
steps: Ref<
|
|
18
|
-
addStep: (step:
|
|
17
|
+
steps: Ref<FouStepItem[]>;
|
|
18
|
+
addStep: (step: FouStepItem) => void;
|
|
19
19
|
removeStep: (uid: number) => void;
|
|
20
20
|
}
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const FOU_STEPS_KEY: InjectionKey<FouStepsContext>;
|