调整样式

This commit is contained in:
神仙都没用 2023-12-14 22:23:21 +08:00
parent 8554990783
commit bd6ae251e4
7 changed files with 23 additions and 8 deletions

View File

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

View File

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

View File

@ -54,5 +54,9 @@ export function renderHeader(item: ClTable.Column, { scope, slots }: any) {
}
});
return <div class="cl-table-header__search">{item.search.isInput ? input : text}</div>;
return (
<div class={["cl-table-header__search", { "is-input": item.search.isInput }]}>
{item.search.isInput ? input : text}
</div>
);
}

View File

@ -72,6 +72,16 @@
.cell {
line-height: normal;
}
&.is-sortable {
.cl-table-header__search {
width: auto;
&.is-input {
width: calc(100% - 24px) !important;
}
}
}
}
}

View File

@ -450,6 +450,7 @@ const Table = useTable({
orderNum: 1,
minWidth: 165,
prop: "createTime",
sortable: "custom",
search: {
component: (
<cl-date-picker type="date" value-format="YYYY-MM-DD" placeholder="搜索日期" />

File diff suppressed because one or more lines are too long

View File

@ -344,10 +344,10 @@
"@babel/helper-validator-identifier" "^7.22.20"
to-fast-properties "^2.0.0"
"@cool-vue/crud@^7.0.9":
version "7.0.9"
resolved "https://registry.yarnpkg.com/@cool-vue/crud/-/crud-7.0.9.tgz#06c169380c1536385877154b98fd86eea8ce635d"
integrity sha512-Saaqq3A6Hunctkfnyv+TFhpOyPr8XY5kyMdOflLgPKD8lhgsgu2/cN9wRM9q0rx7uar/D/oHYjN7/Vfn1Hfs9w==
"@cool-vue/crud@^7.0.10":
version "7.0.10"
resolved "https://registry.yarnpkg.com/@cool-vue/crud/-/crud-7.0.10.tgz#b4448414b43b8bfcbd4c9860c7ef9e5c1c89bb28"
integrity sha512-gsmnwUTOxhplbKdJu1RWyRa+auq3M9w83RdgLhFLrJg6aqoobT9qPmGxzVDpwIIDDyFmJTolTLbOK6kSRtnJSQ==
dependencies:
array.prototype.flat "^1.2.4"
core-js "^3.21.1"