@xdmp-open/ui-shared 0.1.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/CHANGELOG.md +8 -0
- package/LICENSE +201 -0
- package/README.md +109 -0
- package/dist/api/binary.d.ts +42 -0
- package/dist/components/AvatarUpload/index.vue.d.ts +479 -0
- package/dist/components/BackPage/index.vue.d.ts +14 -0
- package/dist/components/ChartComponent/index.vue.d.ts +29 -0
- package/dist/components/Charts/Keyboard.vue.d.ts +53 -0
- package/dist/components/Charts/LineMarker.vue.d.ts +53 -0
- package/dist/components/Charts/MixChart.vue.d.ts +53 -0
- package/dist/components/Charts/mixins/resize.d.ts +10 -0
- package/dist/components/FileUpload/index.vue.d.ts +501 -0
- package/dist/components/IconSelect/index.vue.d.ts +51 -0
- package/dist/components/IconSelect/svgIconRegistry.d.ts +9 -0
- package/dist/components/IconSelect/useIcons.d.ts +7 -0
- package/dist/components/MultipleTree/index.vue.d.ts +3 -0
- package/dist/components/PageDataInfo/index.vue.d.ts +582 -0
- package/dist/components/PageDecs/index.vue.d.ts +52 -0
- package/dist/components/PageMoreDataInfo/index.vue.d.ts +474 -0
- package/dist/components/Pagination/index.vue.d.ts +184 -0
- package/dist/components/ScaleSrceen/index.vue.d.ts +96 -0
- package/dist/components/SearchForm/formItem.vue.d.ts +3 -0
- package/dist/components/SearchForm/index.vue.d.ts +3 -0
- package/dist/components/SearchForm/tools.d.ts +24 -0
- package/dist/components/SvgIcon/index.vue.d.ts +27 -0
- package/dist/components/TreeSelect/index.vue.d.ts +3 -0
- package/dist/components/UiapDrawer/index.vue.d.ts +371 -0
- package/dist/components/VueCountTo/index.vue.d.ts +147 -0
- package/dist/components/VueCountTo/requestAnimationFrame.d.ts +3 -0
- package/dist/directives/emoji.d.ts +3 -0
- package/dist/directives/highlight.d.ts +3 -0
- package/dist/directives/permission.d.ts +15 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +3907 -0
- package/dist/style.css +1 -0
- package/dist/styles/btn.scss +119 -0
- package/dist/styles/element-variables.scss +42 -0
- package/dist/styles/index.scss +11 -0
- package/dist/styles/mixin.scss +61 -0
- package/dist/styles/transition.scss +48 -0
- package/dist/styles/variables.scss +34 -0
- package/dist/styles.css +254 -0
- package/dist/utils/debounce.d.ts +4 -0
- package/dist/utils/encrypt.d.ts +21 -0
- package/dist/utils/gogocodeTransfer.d.ts +15 -0
- package/dist/utils/scroll-to.d.ts +9 -0
- package/dist/utils/validate.d.ts +40 -0
- package/package.json +74 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { App, Directive } from 'vue';
|
|
2
|
+
/** 权限判定函数:传入指令声明的角色列表,返回是否有权限 */
|
|
3
|
+
export type HasPermissionFn = (roles: string[]) => boolean;
|
|
4
|
+
/** 创建 v-permission 指令对象(供测试或手动注册使用) */
|
|
5
|
+
export declare function createPermissionDirective(hasPermission: HasPermissionFn): Directive;
|
|
6
|
+
/**
|
|
7
|
+
* 在宿主应用上注册 v-permission 指令。
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* setupPermissionDirective(app, (roles) =>
|
|
11
|
+
* roles.some((role) => store.getters.roles.includes(role))
|
|
12
|
+
* )
|
|
13
|
+
*/
|
|
14
|
+
export declare function setupPermissionDirective(app: App, hasPermission: HasPermissionFn): void;
|
|
15
|
+
export default setupPermissionDirective;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as UiapDrawer } from './components/UiapDrawer/index.vue';
|
|
3
|
+
import { default as SearchForm } from './components/SearchForm/index.vue';
|
|
4
|
+
import { default as Pagination } from './components/Pagination/index.vue';
|
|
5
|
+
import { default as TreeSelect } from './components/TreeSelect/index.vue';
|
|
6
|
+
import { default as MultipleTree } from './components/MultipleTree/index.vue';
|
|
7
|
+
import { default as BackPage } from './components/BackPage/index.vue';
|
|
8
|
+
import { default as PageDataInfo } from './components/PageDataInfo/index.vue';
|
|
9
|
+
import { default as PageDecs } from './components/PageDecs/index.vue';
|
|
10
|
+
import { default as PageMoreDataInfo } from './components/PageMoreDataInfo/index.vue';
|
|
11
|
+
import { default as IconSelect } from './components/IconSelect/index.vue';
|
|
12
|
+
import { default as SvgIcon } from './components/SvgIcon/index.vue';
|
|
13
|
+
import { default as KeyboardChart } from './components/Charts/Keyboard.vue';
|
|
14
|
+
import { default as LineMarkerChart } from './components/Charts/LineMarker.vue';
|
|
15
|
+
import { default as MixChart } from './components/Charts/MixChart.vue';
|
|
16
|
+
import { default as ChartComponent } from './components/ChartComponent/index.vue';
|
|
17
|
+
import { default as VueCountTo } from './components/VueCountTo/index.vue';
|
|
18
|
+
import { default as ScaleSrceen } from './components/ScaleSrceen/index.vue';
|
|
19
|
+
import { default as AvatarUpload } from './components/AvatarUpload/index.vue';
|
|
20
|
+
import { default as FileUpload } from './components/FileUpload/index.vue';
|
|
21
|
+
import { default as chartResizeMixin } from './components/Charts/mixins/resize';
|
|
22
|
+
import { emoji } from './directives/emoji';
|
|
23
|
+
import { highlight } from './directives/highlight';
|
|
24
|
+
import { createPermissionDirective, setupPermissionDirective, HasPermissionFn } from './directives/permission';
|
|
25
|
+
import { registerSvgIcons, getSvgIconNames, isRegisteredSvgIcon } from './components/IconSelect/svgIconRegistry';
|
|
26
|
+
import { useIcons } from './components/IconSelect/useIcons';
|
|
27
|
+
import { setupBinaryApi, getBinaryResource, binaryUpload, binaryDownloadBlob, BinaryUploadQuery } from './api/binary';
|
|
28
|
+
import { $on, $off, $once, $emit } from './utils/gogocodeTransfer';
|
|
29
|
+
import { scrollTo } from './utils/scroll-to';
|
|
30
|
+
import { isExternal, validPassword, validMoblie, validInputLength, validSpecialName, validLegalInput, validBitMapString, validEnumString, isInteger } from './utils/validate';
|
|
31
|
+
import { debounce } from './utils/debounce';
|
|
32
|
+
import { Encrypt } from './utils/encrypt';
|
|
33
|
+
/**
|
|
34
|
+
* 插件入口:全局注册全部组件与 emoji/highlight 指令。
|
|
35
|
+
* v-permission 指令需单独调用 setupPermissionDirective 注入判定函数后注册。
|
|
36
|
+
*/
|
|
37
|
+
declare function install(app: App): void;
|
|
38
|
+
export { UiapDrawer, SearchForm, Pagination, TreeSelect, MultipleTree, BackPage, PageDataInfo, PageDecs, PageMoreDataInfo, IconSelect, SvgIcon, KeyboardChart, LineMarkerChart, MixChart, ChartComponent, VueCountTo, ScaleSrceen, AvatarUpload, FileUpload, chartResizeMixin, setupBinaryApi, getBinaryResource, binaryUpload, binaryDownloadBlob, emoji, highlight, createPermissionDirective, setupPermissionDirective, registerSvgIcons, getSvgIconNames, isRegisteredSvgIcon, useIcons, $on, $off, $once, $emit, scrollTo, isExternal, validPassword, validMoblie, validInputLength, validSpecialName, validLegalInput, validBitMapString, validEnumString, isInteger, debounce, Encrypt, install };
|
|
39
|
+
export type { HasPermissionFn, BinaryUploadQuery };
|
|
40
|
+
declare const _default: {
|
|
41
|
+
install: typeof install;
|
|
42
|
+
};
|
|
43
|
+
export default _default;
|