This commit is contained in:
icssoa 2023-06-13 22:47:04 +08:00
parent 1de5b338ae
commit 8d8adf573c
10 changed files with 146 additions and 135 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "front-next", "name": "front-next",
"version": "6.3.2", "version": "6.3.3",
"scripts": { "scripts": {
"dev": "vite --host", "dev": "vite --host",
"build": "vite build", "build": "vite build",
@ -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": "^6.3.1", "@cool-vue/crud": "^6.3.2",
"@element-plus/icons-vue": "^2.0.10", "@element-plus/icons-vue": "^2.0.10",
"@vueuse/core": "^9.1.0", "@vueuse/core": "^9.1.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": "6.3.1", "version": "6.3.2",
"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

@ -6,7 +6,7 @@
background-color: #fff; background-color: #fff;
&.is-border { &.is-border {
border: 1px solid #eee; border: 1px solid var(--el-border-color);
} }
.el-input-number { .el-input-number {
@ -141,7 +141,7 @@
span { span {
display: inline-block; display: inline-block;
padding: 0 15px; padding: 0 15px;
border-right: 1px solid #ddd; border-right: 1px solid var(--el-border-color);
} }
&:last-child { &:last-child {
@ -258,7 +258,7 @@
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
height: 60px; height: 60px;
border-top: 1px solid #ebeef5; border-top: 1px solid var(--el-border-color);
padding: 0 10px; padding: 0 10px;
box-sizing: border-box; box-sizing: border-box;
} }
@ -365,7 +365,7 @@
} }
.cl-form-tabs { .cl-form-tabs {
border-bottom: 1px solid #dcdfe6; border-bottom: 1px solid var(--el-border-color);
overflow: hidden; overflow: hidden;
width: calc(100% - 10px); width: calc(100% - 10px);
margin: 0 5px 20px 5px; margin: 0 5px 20px 5px;
@ -422,15 +422,15 @@
} }
ul { ul {
border: 1px solid #dcdfe6; border: 1px solid var(--el-border-color);
border-top-left-radius: 5px; border-top-left-radius: 5px;
border-top-right-radius: 5px; border-top-right-radius: 5px;
li { li {
border-left: 1px solid #dcdfe6; border-left: 1px solid var(--el-border-color);
&:first-child { &:first-child {
border-left-color: transparent; border-left-width: 0;
} }
} }
} }

View File

@ -22,7 +22,7 @@
</template> </template>
<script lang="ts" name="sys-param" setup> <script lang="ts" name="sys-param" setup>
import { useCrud, useTable, useUpsert } from "@cool-vue/crud"; import { setFocus, useCrud, useTable, useUpsert } from "@cool-vue/crud";
import { Document } from "@element-plus/icons-vue"; import { Document } from "@element-plus/icons-vue";
import { reactive } from "vue"; import { reactive } from "vue";
import { useCool } from "/@/cool"; import { useCool } from "/@/cool";
@ -199,6 +199,8 @@ const Upsert = useUpsert({
data_1: undefined, data_1: undefined,
data_2: undefined data_2: undefined
}); });
} },
plugins: [setFocus()]
}); });
</script> </script>

View File

@ -36,7 +36,7 @@
</template> </template>
<script lang="ts" name="cloud-func-info" setup> <script lang="ts" name="cloud-func-info" setup>
import { useCrud, useTable, useUpsert } from "@cool-vue/crud"; import { setFocus, useCrud, useTable, useUpsert } from "@cool-vue/crud";
import { useCool } from "/@/cool"; import { useCool } from "/@/cool";
import { Status, CodeSnippets } from "../../dict"; import { Status, CodeSnippets } from "../../dict";
import FuncLogs from "../../components/func-logs.vue"; import FuncLogs from "../../components/func-logs.vue";
@ -89,7 +89,8 @@ const Upsert = useUpsert({
...data, ...data,
content content
}); });
} },
plugins: [setFocus("name")]
}); });
// cl-table // cl-table

View File

@ -1,5 +1,5 @@
<template> <template>
<cl-crud ref="Crud"> <cl-crud ref="Crud" border>
<cl-row> <cl-row>
<!-- 刷新按钮 --> <!-- 刷新按钮 -->
<cl-refresh-btn /> <cl-refresh-btn />

View File

@ -44,7 +44,7 @@
</template> </template>
<script lang="ts" name="dict-list" setup> <script lang="ts" name="dict-list" setup>
import { useCrud, useTable, useUpsert } from "@cool-vue/crud"; import { setFocus, useCrud, useTable, useUpsert } from "@cool-vue/crud";
import { useCool } from "/@/cool"; import { useCool } from "/@/cool";
import { computed } from "vue"; import { computed } from "vue";
import { deepTree } from "/@/cool/utils"; import { deepTree } from "/@/cool/utils";
@ -171,7 +171,8 @@ const Upsert = useUpsert({
...data, ...data,
typeId: ViewGroup.value?.selected?.id typeId: ViewGroup.value?.selected?.id
}); });
} },
plugins: [setFocus("name")]
}); });
// cl-table // cl-table

View File

@ -91,7 +91,7 @@
import { onActivated, ref } from "vue"; import { onActivated, ref } from "vue";
import { useBrowser, useCool } from "/@/cool"; import { useBrowser, useCool } from "/@/cool";
import { VideoPlay, VideoPause, Plus, Tickets, Delete } from "@element-plus/icons-vue"; import { VideoPlay, VideoPause, Plus, Tickets, Delete } from "@element-plus/icons-vue";
import { ContextMenu, useForm } from "@cool-vue/crud"; import { ContextMenu, setFocus, useForm } from "@cool-vue/crud";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import TaskLogs from "../components/logs.vue"; import TaskLogs from "../components/logs.vue";
@ -179,7 +179,8 @@ async function edit(item?: Eps.TaskInfoEntity) {
return false; return false;
} }
Form.value?.open({ Form.value?.open(
{
title: "编辑计划任务", title: "编辑计划任务",
width: "600px", width: "600px",
props: { props: {
@ -304,7 +305,9 @@ async function edit(item?: Eps.TaskInfoEntity) {
}); });
} }
} }
}); },
[setFocus()]
);
} }
// //

View File

@ -6,6 +6,10 @@ html.dark {
.cl-form-tabs { .cl-form-tabs {
border-bottom: 1px solid #222; border-bottom: 1px solid #222;
} }
.cl-form-tabs * {
border-color: #222;
}
} }
.cl-crud { .cl-crud {

View File

@ -280,10 +280,10 @@
"@babel/helper-validator-identifier" "^7.19.1" "@babel/helper-validator-identifier" "^7.19.1"
to-fast-properties "^2.0.0" to-fast-properties "^2.0.0"
"@cool-vue/crud@^6.3.1": "@cool-vue/crud@^6.3.2":
version "6.3.1" version "6.3.2"
resolved "https://registry.yarnpkg.com/@cool-vue/crud/-/crud-6.3.1.tgz#871d9788d43576337af92ebae5b770dd16ee7826" resolved "https://registry.yarnpkg.com/@cool-vue/crud/-/crud-6.3.2.tgz#211caf2f1400d3fbddcacb0f90644f321c6cf440"
integrity sha512-mbAaumXavoVW4wtShZpQb0lKG9VHGfvrsUgnVt78zi7TVB32+9duasMjf2Y3gz6HM1p1FODMPhfkCOXGbpOHyA== integrity sha512-aX00vWLrrr4SRc/52HxtEjrmyoqbbjPh/UQ+xip1VUiflNvgdCZ9Zq0PBScPTEE0gZK2G/EoWXMsFtdb5B+lLw==
dependencies: dependencies:
array.prototype.flat "^1.2.4" array.prototype.flat "^1.2.4"
core-js "^3.21.1" core-js "^3.21.1"