This commit is contained in:
神仙都没用 2023-10-10 17:59:15 +08:00
parent ddd9408878
commit e019f75456
11 changed files with 24 additions and 19 deletions

View File

@ -9,7 +9,7 @@
"lint:eslint": "eslint \"{src}/**/*.{vue,ts,tsx}\" --fix" "lint:eslint": "eslint \"{src}/**/*.{vue,ts,tsx}\" --fix"
}, },
"dependencies": { "dependencies": {
"@cool-vue/crud": "^7.0.1-beta2", "@cool-vue/crud": "^7.0.1-beta3",
"@element-plus/icons-vue": "^2.1.0", "@element-plus/icons-vue": "^2.1.0",
"@vueuse/core": "^10.4.0", "@vueuse/core": "^10.4.0",
"@wangeditor/editor": "^5.1.23", "@wangeditor/editor": "^5.1.23",

View File

@ -1,6 +1,6 @@
{ {
"name": "@cool-vue/crud", "name": "@cool-vue/crud",
"version": "7.0.1-beta2", "version": "7.0.1-beta3",
"private": false, "private": false,
"main": "./dist/index.umd.min.js", "main": "./dist/index.umd.min.js",
"typings": "types/index.d.ts", "typings": "types/index.d.ts",

View File

@ -1,7 +1,8 @@
import { ElMessageBox, ElMessage } from "element-plus"; import { ElMessageBox, ElMessage } from "element-plus";
import { Mitt } from "../../utils/mitt"; import { Mitt } from "../../utils/mitt";
import { ref } from "vue"; import { ref } from "vue";
import { isArray, isFunction, merge } from "lodash-es"; import { isArray, isFunction } from "lodash-es";
import { merge } from "../../utils";
interface Options { interface Options {
mitt: Mitt; mitt: Mitt;

View File

@ -1,8 +1,8 @@
import { defineComponent, h, nextTick } from "vue"; import { defineComponent, h, nextTick } from "vue";
import { cloneDeep, isBoolean, isEmpty, merge } from "lodash-es"; import { cloneDeep, isBoolean, isEmpty } from "lodash-es";
import { useAction, useForm, usePlugins, useTabs } from "./helper"; import { useAction, useForm, usePlugins, useTabs } from "./helper";
import { useBrowser, useConfig, useElApi } from "../../hooks"; import { useBrowser, useConfig, useElApi } from "../../hooks";
import { getValue } from "../../utils"; import { getValue, merge } from "../../utils";
import formHook from "../../utils/form-hook"; import formHook from "../../utils/form-hook";
import { renderNode } from "../../utils/vnode"; import { renderNode } from "../../utils/vnode";
import { parseFormHidden } from "../../utils/parse"; import { parseFormHidden } from "../../utils/parse";

View File

@ -7,7 +7,7 @@ declare const _default: import("vue").DefineComponent<{
}; };
title: StringConstructor; title: StringConstructor;
size: { size: {
type: (StringConstructor | NumberConstructor)[]; type: (NumberConstructor | StringConstructor)[];
default: string; default: string;
}; };
op: { op: {
@ -22,7 +22,7 @@ declare const _default: import("vue").DefineComponent<{
}; };
title: StringConstructor; title: StringConstructor;
size: { size: {
type: (StringConstructor | NumberConstructor)[]; type: (NumberConstructor | StringConstructor)[];
default: string; default: string;
}; };
op: { op: {

View File

@ -1,6 +1,6 @@
import { PropType } from "vue"; import { PropType } from "vue";
declare const _default: import("vue").DefineComponent<{ declare const _default: import("vue").DefineComponent<{
modelValue: (StringConstructor | NumberConstructor)[]; modelValue: (NumberConstructor | StringConstructor)[];
labels: { labels: {
type: ArrayConstructor; type: ArrayConstructor;
default: () => never[]; default: () => never[];
@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
default: string; default: string;
}; };
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
modelValue: (StringConstructor | NumberConstructor)[]; modelValue: (NumberConstructor | StringConstructor)[];
labels: { labels: {
type: ArrayConstructor; type: ArrayConstructor;
default: () => never[]; default: () => never[];

View File

@ -15,7 +15,7 @@ declare const _default: import("vue").DefineComponent<{
onSearch: FunctionConstructor; onSearch: FunctionConstructor;
placeholder: StringConstructor; placeholder: StringConstructor;
width: { width: {
type: (StringConstructor | NumberConstructor)[]; type: (NumberConstructor | StringConstructor)[];
default: number; default: number;
}; };
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue" | "field-change")[], "change" | "update:modelValue" | "field-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue" | "field-change")[], "change" | "update:modelValue" | "field-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@ -34,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
onSearch: FunctionConstructor; onSearch: FunctionConstructor;
placeholder: StringConstructor; placeholder: StringConstructor;
width: { width: {
type: (StringConstructor | NumberConstructor)[]; type: (NumberConstructor | StringConstructor)[];
default: number; default: number;
}; };
}>> & { }>> & {

View File

@ -129,6 +129,9 @@ function open() {
} }
} }
], ],
op: {
// buttons: ["save"]
},
on: { on: {
open() { open() {
refs.name.focus(); refs.name.focus();

View File

@ -1,12 +1,13 @@
export namespace Dict { export namespace Dict {
type List = { interface Item {
id: string; id: string;
label: string; label: string;
value: any; value: any;
children?: Item[];
[key: string]: any; [key: string]: any;
}[]; }
interface Data { interface Data {
[key: string]: List; [key: string]: Item[];
} }
} }

View File

@ -282,10 +282,10 @@
"@babel/helper-validator-identifier" "^7.22.20" "@babel/helper-validator-identifier" "^7.22.20"
to-fast-properties "^2.0.0" to-fast-properties "^2.0.0"
"@cool-vue/crud@^7.0.1-beta2": "@cool-vue/crud@^7.0.1-beta3":
version "7.0.1-beta2" version "7.0.1-beta3"
resolved "https://registry.yarnpkg.com/@cool-vue/crud/-/crud-7.0.1-beta2.tgz#1c43ad0d5af3fe009bfcfa312c71d8b99a676213" resolved "https://registry.yarnpkg.com/@cool-vue/crud/-/crud-7.0.1-beta3.tgz#70d116bc81fcb665a8abfe7adee6d3951fdd318b"
integrity sha512-CN9hlfsWKOU/qf7E1COjgLqEqJBOd3v8v8bHeivFt7BHdDmwxrgqGZWXvZ6zp4LXSBq7dacF7dqn1FOe7TYzCQ== integrity sha512-/vKd3WRdtwx6kD6H5YAqJt0bWPRdGhCElkx/i7QqUOszBKvpWVSeEvb+8NdVLG3w9s+xgz83+kTNJcq1L6PenQ==
dependencies: dependencies:
array.prototype.flat "^1.2.4" array.prototype.flat "^1.2.4"
core-js "^3.21.1" core-js "^3.21.1"