Skip to content

Commit

Permalink
perf: ui package移除对fast-crud的依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Mar 18, 2023
1 parent f5a070e commit 89a9f2c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 25 deletions.
1 change: 1 addition & 0 deletions packages/ui/ui-antdv/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./src/index";
1 change: 0 additions & 1 deletion packages/ui/ui-antdv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
},
"devDependencies": {
"@ant-design/icons-vue": "^6.1.0",
"@fast-crud/fast-crud": "workspace:^1.11.1",
"@rollup/plugin-strip": "^3.0.2",
"@rollup/plugin-typescript": "^11.0.0",
"@types/lodash-es": "^4.17.7",
Expand Down
30 changes: 14 additions & 16 deletions packages/ui/ui-antdv/src/antdv.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import {
ButtonCI,
CascaderCI,
CheckboxCI,
CheckboxGroupCI,
CI,
CollapseCI,
CollapseItemCI,
DatePickerCI,
DialogCI,
DividerCI,
DrawerCI,
DropdownCI,
DropdownItemCI,
Expand All @@ -23,33 +27,27 @@ import {
MessageBoxCI,
MessageCI,
NotificationCI,
NotificationContext,
OptionCI,
PaginationCI,
PopoverCI,
ProgressCI,
RadioCI,
RadioGroupCI,
SelectCI,
OptionCI,
SwitchCI,
TableCI,
TableColumnCI,
TabPaneCI,
TabsCI,
TagCI,
TextAreaCI,
TimePickerCI,
UiInterface,
UploadCI,
TreeSelectCI,
TabsCI,
TabPaneCI,
CollapseCI,
CollapseItemCI,
ButtonCI,
PaginationCI,
DividerCI,
PopoverCI,
TooltipCI,
MessageContext,
NotificationContext
TreeSelectCI,
UiInterface,
UploadCI
} from "@fast-crud/ui-interface";
import _ from "lodash-es";

export type AntdvUiProvider = {
Notification: any;
Expand Down Expand Up @@ -248,7 +246,7 @@ export class Antdv implements UiInterface {
};

buttonGroup: CI = {
name: "a-button-group"
name: "a-space"
};

card: CI = {
Expand Down
3 changes: 1 addition & 2 deletions packages/ui/ui-antdv/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { message, notification, Modal } from "ant-design-vue";
// @ts-ignore
import { uiContext } from "@fast-crud/fast-crud";
import { uiContext } from "@fast-crud/ui-interface";
import setupIcons from "./icons";
import { Antdv } from "./antdv";

Expand Down
1 change: 0 additions & 1 deletion packages/ui/ui-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
},
"devDependencies": {
"@element-plus/icons-vue": "^2.1.0",
"@fast-crud/fast-crud": "workspace:^1.11.1",
"@rollup/plugin-strip": "^3.0.2",
"@rollup/plugin-typescript": "^11.0.0",
"@types/lodash-es": "^4.17.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/ui-element/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-ignore
import { ElMessage, ElNotification, ElMessageBox } from "element-plus";
// @ts-ignore
import { uiContext } from "@fast-crud/fast-crud";
import { uiContext } from "@fast-crud/ui-interface";
// @ts-ignore
import { Element } from "./element.ts";
import setupIcons from "./icons";
Expand Down
1 change: 0 additions & 1 deletion packages/ui/ui-naive/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
},
"devDependencies": {
"@ant-design/icons-vue": "^6.1.0",
"@fast-crud/fast-crud": "workspace:^1.11.1",
"@rollup/plugin-strip": "^3.0.2",
"@rollup/plugin-typescript": "^11.0.0",
"@types/lodash-es": "^4.17.7",
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/ui-naive/src/ui/util.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// @ts-ignore
import { uiContext } from "@fast-crud/fast-crud";
import { uiContext } from "@fast-crud/ui-interface";
import { useDialog, useMessage, useNotification } from "naive-ui";

export default {
init() {
if (uiContext.ref == null) {
if (uiContext.ref.value == null) {
throw new Error("请先安装ui:app.use(UiNaive);");
}
const message = useMessage();
const notification = useNotification();
const messageBox = useDialog();
// @ts-ignore
uiContext.ref.init({ message, notification, messageBox });
uiContext.ref.value.init({ message, notification, messageBox });
}
};

0 comments on commit 89a9f2c

Please sign in to comment.