mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
🔱: [client] sync upgrade with 5 commits [trident-sync]
build: publish success perf: antdv 异步加载,加快首页打开速度 perf: 精简lodash chore: 兼容手机版
This commit is contained in:
@@ -0,0 +1,162 @@
|
||||
import { defineAsyncComponent } from "vue";
|
||||
|
||||
export default {
|
||||
install(app: any) {
|
||||
app.component(
|
||||
"AInput",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/input/Input"))
|
||||
);
|
||||
app.component(
|
||||
"AInputPassword",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/input/Password"))
|
||||
);
|
||||
app.component(
|
||||
"AButton",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/button/button"))
|
||||
);
|
||||
app.component(
|
||||
"AButtonGroup",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/button/button-group"))
|
||||
);
|
||||
app.component(
|
||||
"ARadio",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/radio/Radio"))
|
||||
);
|
||||
app.component(
|
||||
"ARadioGroup",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/radio/Group"))
|
||||
);
|
||||
app.component(
|
||||
"ATable",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/table/Table"))
|
||||
);
|
||||
app.component(
|
||||
"AModal",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/modal/Modal"))
|
||||
);
|
||||
app.component(
|
||||
"AForm",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/form/Form"))
|
||||
);
|
||||
app.component(
|
||||
"AFormItem",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/form/FormItem"))
|
||||
);
|
||||
app.component(
|
||||
"ATabs",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/tabs/src/Tabs"))
|
||||
);
|
||||
|
||||
app.component(
|
||||
"ATabPane",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/tabs/src/TabPanelList/TabPane"))
|
||||
);
|
||||
app.component(
|
||||
"ATextarea",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/input/TextArea"))
|
||||
);
|
||||
app.component(
|
||||
"AInputNumber",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/input-number/index"))
|
||||
);
|
||||
app.component(
|
||||
"ASelect",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/select/index"))
|
||||
);
|
||||
app.component(
|
||||
"ADrawer",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/drawer/index"))
|
||||
);
|
||||
app.component(
|
||||
"ASwitch",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/switch/index"))
|
||||
);
|
||||
app.component(
|
||||
"AUpload",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/upload/index"))
|
||||
);
|
||||
app.component(
|
||||
"ADatePicker",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/date-picker/index"))
|
||||
);
|
||||
app.component(
|
||||
"ARangePicker",
|
||||
defineAsyncComponent(async () => {
|
||||
const { RangePicker } = await import("ant-design-vue/es/date-picker/index");
|
||||
return RangePicker;
|
||||
})
|
||||
);
|
||||
app.component(
|
||||
"ATimePicker",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/time-picker/index"))
|
||||
);
|
||||
app.component(
|
||||
"ATag",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/tag/index"))
|
||||
);
|
||||
app.component(
|
||||
"AAlert",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/alert/index"))
|
||||
);
|
||||
app.component(
|
||||
"AInputAutoComplete",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/auto-complete/index"))
|
||||
);
|
||||
app.component(
|
||||
"ACard",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/card/index"))
|
||||
);
|
||||
app.component(
|
||||
"ACascader",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/cascader/index"))
|
||||
);
|
||||
app.component(
|
||||
"ACheckbox",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/checkbox"))
|
||||
);
|
||||
app.component(
|
||||
"ACheckboxGroup",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/checkbox/Group"))
|
||||
);
|
||||
app.component(
|
||||
"ACol",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/col"))
|
||||
);
|
||||
app.component(
|
||||
"ARow",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/row"))
|
||||
);
|
||||
app.component(
|
||||
"ADropdown",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/dropdown"))
|
||||
);
|
||||
app.component(
|
||||
"AGrid",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/grid"))
|
||||
);
|
||||
app.component(
|
||||
"AImage",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/image"))
|
||||
);
|
||||
app.component(
|
||||
"APagination",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/pagination"))
|
||||
);
|
||||
app.component(
|
||||
"ATooltip",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/tooltip"))
|
||||
);
|
||||
app.component(
|
||||
"ATree",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/tree"))
|
||||
);
|
||||
app.component(
|
||||
"ATreeSelect",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/tree-select"))
|
||||
);
|
||||
app.component(
|
||||
"AToar",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/tree-select"))
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -6,7 +6,7 @@ import { FsExtendsCopyable, FsExtendsEditor, FsExtendsJson, FsExtendsTime, FsExt
|
||||
import "@fast-crud/fast-extends/dist/style.css";
|
||||
import UiAntdv from "@fast-crud/ui-antdv4";
|
||||
import "@fast-crud/ui-antdv4/dist/style.css";
|
||||
import _ from "lodash-es";
|
||||
import { merge } from "lodash-es";
|
||||
import { useCrudPermission } from "../permission";
|
||||
import { GetSignedUrl } from "/@/views/crud/component/uploader/s3/api";
|
||||
import { notification } from "ant-design-vue";
|
||||
@@ -362,7 +362,7 @@ function install(app: any, options: any = {}) {
|
||||
// 比如你可以定义一个readonly的公共属性,处理该字段只读,不能编辑
|
||||
if (columnProps.readonly) {
|
||||
// 合并column配置
|
||||
_.merge(columnProps, {
|
||||
merge(columnProps, {
|
||||
form: { show: false },
|
||||
viewForm: { show: true }
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { usePermission } from "/@/plugin/permission";
|
||||
import _ from "lodash-es";
|
||||
import { merge as LodashMerge } from "lodash-es";
|
||||
|
||||
export type UseCrudPermissionExtraProps = {
|
||||
hasActionPermission: (action: string) => boolean;
|
||||
@@ -30,7 +30,7 @@ export function useCrudPermission({ permission }: UseCrudPermissionProps) {
|
||||
return hasPermissions(prefix + ":" + action);
|
||||
}
|
||||
|
||||
function buildCrudPermission() {
|
||||
function buildCrudPermission(): any {
|
||||
if (permission == null) {
|
||||
return {};
|
||||
}
|
||||
@@ -43,7 +43,7 @@ export function useCrudPermission({ permission }: UseCrudPermissionProps) {
|
||||
}
|
||||
}
|
||||
|
||||
return _.merge(
|
||||
return LodashMerge(
|
||||
{
|
||||
actionbar: {
|
||||
buttons: {
|
||||
@@ -64,7 +64,7 @@ export function useCrudPermission({ permission }: UseCrudPermissionProps) {
|
||||
|
||||
function merge(userOptions: any) {
|
||||
const permissionOptions = buildCrudPermission();
|
||||
_.merge(permissionOptions, userOptions);
|
||||
LodashMerge(permissionOptions, userOptions);
|
||||
return permissionOptions;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user