ol-base-components 2.8.6 → 2.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/auto-install.js +1 -1
- package/scripts/install-vscode.js +1 -1
- package/src/assets/vscodecj.png +0 -0
- package/src/package/formSearch/src/index.vue +13 -4
- package/src/package/table/src/index.vue +594 -587
- package/src/utils/getEnum.js +8 -0
- package/src/utils/initData.js +49 -19
- package/src/vscode/extension.js +3 -2
package/package.json
CHANGED
package/scripts/auto-install.js
CHANGED
|
@@ -150,7 +150,7 @@ function autoInstallVSCodeExtension() {
|
|
|
150
150
|
};
|
|
151
151
|
|
|
152
152
|
const packageJsonPath = path.join(extensionDir, "package.json");
|
|
153
|
-
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
153
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf8");
|
|
154
154
|
console.log("✅ 创建文件: package.json");
|
|
155
155
|
|
|
156
156
|
console.log(`\n�� VSCode/Cursor 扩展自动安装成功!`);
|
|
@@ -150,7 +150,7 @@ function installVSCodeExtension() {
|
|
|
150
150
|
};
|
|
151
151
|
|
|
152
152
|
const packageJsonPath = path.join(extensionDir, "package.json");
|
|
153
|
-
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
153
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf8");
|
|
154
154
|
console.log("✅ 创建文件: package.json");
|
|
155
155
|
|
|
156
156
|
console.log(`\n�� VSCode/Cursor 扩展安装成功!`);
|
|
Binary file
|
|
@@ -176,6 +176,7 @@
|
|
|
176
176
|
|
|
177
177
|
<script>
|
|
178
178
|
import { getData } from "../../index.js";
|
|
179
|
+
import { getEnum } from "../../../utils/getEnum.js";
|
|
179
180
|
|
|
180
181
|
export default {
|
|
181
182
|
name: "search",
|
|
@@ -318,10 +319,15 @@ export default {
|
|
|
318
319
|
if (item.schema.enum && Array.isArray(item.schema.enum)) {
|
|
319
320
|
//枚举值
|
|
320
321
|
pushItem.inputType = "select";
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
322
|
+
const ref = item.schema["$$ref"].split("/");
|
|
323
|
+
const enumName = ref[ref.length - 1];
|
|
324
|
+
const tempEnum = getEnum(enumName);
|
|
325
|
+
pushItem.children = tempEnum.length
|
|
326
|
+
? tempEnum
|
|
327
|
+
: item.schema.enum.map(e => ({
|
|
328
|
+
key: e,
|
|
329
|
+
value: e,
|
|
330
|
+
}));
|
|
325
331
|
} else if (item.schema.format === "date-time") {
|
|
326
332
|
//日期
|
|
327
333
|
pushItem.inputType = "picker";
|
|
@@ -634,14 +640,17 @@ export default {
|
|
|
634
640
|
|
|
635
641
|
padding: 10px;
|
|
636
642
|
}
|
|
643
|
+
|
|
637
644
|
//解决type=number的上下箭头
|
|
638
645
|
::v-deep .numrule input::-webkit-outer-spin-button,
|
|
639
646
|
::v-deep .numrule input::-webkit-inner-spin-button {
|
|
640
647
|
-webkit-appearance: none !important;
|
|
641
648
|
}
|
|
649
|
+
|
|
642
650
|
::v-deep .numrule input[type="number"] {
|
|
643
651
|
-moz-appearance: textfield !important;
|
|
644
652
|
}
|
|
653
|
+
|
|
645
654
|
// 解决type=number输入中文后光标上移的问题
|
|
646
655
|
::v-deep .numrule .el-input__inner {
|
|
647
656
|
line-height: 1px !important;
|