浏览代码

调整样式

神仙都没用 1 年之前
父节点
当前提交
bd6ae251e4

+ 1 - 1
package.json

@@ -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",

+ 1 - 1
packages/crud/package.json

@@ -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",

+ 5 - 1
packages/crud/src/components/table/helper/header.tsx

@@ -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>
+	);
 }

+ 10 - 0
packages/crud/src/static/index.scss

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

+ 1 - 0
src/modules/demo/views/crud.vue

@@ -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="搜索日期" />

文件差异内容过多而无法显示
+ 0 - 0
stats.html


+ 4 - 4
yarn.lock

@@ -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"

部分文件因为文件数量过多而无法显示