提交 5d24b0be 编写于 作者: ibizdev's avatar ibizdev

zhujiamin 发布系统代码 [TrainSys,网页端]

上级 e1fbc9ae
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
"dependencies": { "dependencies": {
"@floating-ui/dom": "^1.0.11", "@floating-ui/dom": "^1.0.11",
"@ibiz-template/command": "^0.0.1-beta.50", "@ibiz-template/command": "^0.0.1-beta.50",
"@ibiz-template/controller": "^0.0.1-beta.115", "@ibiz-template/controller": "^0.0.1-beta.116",
"@ibiz-template/core": "^0.0.1-beta.115", "@ibiz-template/core": "^0.0.1-beta.116",
"@ibiz-template/model": "^0.0.1-beta.115", "@ibiz-template/model": "^0.0.1-beta.116",
"@ibiz-template/runtime": "^0.0.1-beta.115", "@ibiz-template/runtime": "^0.0.1-beta.116",
"@ibiz-template/service": "^0.0.1-beta.115", "@ibiz-template/service": "^0.0.1-beta.116",
"@ibiz-template/theme": "^0.0.1-beta.115", "@ibiz-template/theme": "^0.0.1-beta.116",
"@ibiz-template/vue-util": "^0.0.1-beta.115", "@ibiz-template/vue-util": "^0.0.1-beta.116",
"@ibiz/dynamic-model-api": "^2.1.28", "@ibiz/dynamic-model-api": "^2.1.28",
"@riophae/vue-treeselect": "^0.4.0", "@riophae/vue-treeselect": "^0.4.0",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
......
此差异已折叠。
...@@ -16,6 +16,7 @@ export const IBizInput = defineComponent({ ...@@ -16,6 +16,7 @@ export const IBizInput = defineComponent({
const c = props.controller; const c = props.controller;
const editorModel = c.model; const editorModel = c.model;
const inputRef = ref(); const inputRef = ref();
let autoSize = false;
// 文本域默认行数,仅在 textarea 类型下有效 // 文本域默认行数,仅在 textarea 类型下有效
const rows = ref(2); const rows = ref(2);
...@@ -38,6 +39,15 @@ export const IBizInput = defineComponent({ ...@@ -38,6 +39,15 @@ export const IBizInput = defineComponent({
} }
}); });
if (editorModel.editorParams) {
if (editorModel.editorParams.autosize) {
try {
autoSize = JSON.parse(editorModel.editorParams.autosize);
} catch {
autoSize = false;
}
}
}
const currentVal = ref<string>(''); const currentVal = ref<string>('');
watch( watch(
...@@ -103,7 +113,10 @@ export const IBizInput = defineComponent({ ...@@ -103,7 +113,10 @@ export const IBizInput = defineComponent({
if (props.autoFocus) { if (props.autoFocus) {
watch(inputRef, newVal => { watch(inputRef, newVal => {
if (newVal) { if (newVal) {
const input = newVal.$el.getElementsByTagName('input')[0]; let input = newVal.$el.getElementsByTagName('input')[0];
if (!input) {
input = newVal.$el.getElementsByTagName('textarea')[0];
}
input.focus(); input.focus();
} }
}); });
...@@ -118,6 +131,7 @@ export const IBizInput = defineComponent({ ...@@ -118,6 +131,7 @@ export const IBizInput = defineComponent({
handleKeyUp, handleKeyUp,
handleBlur, handleBlur,
inputRef, inputRef,
autoSize,
}; };
}, },
render() { render() {
...@@ -144,6 +158,7 @@ export const IBizInput = defineComponent({ ...@@ -144,6 +158,7 @@ export const IBizInput = defineComponent({
nativeOnkeyup={this.handleKeyUp} nativeOnkeyup={this.handleKeyUp}
class={this.ns.b('input')} class={this.ns.b('input')}
disabled={this.disabled} disabled={this.disabled}
autosize={this.autoSize}
> >
{this.controller.model.unitName && ( {this.controller.model.unitName && (
<i class={this.ns.e('unit')} slot='suffix'> <i class={this.ns.e('unit')} slot='suffix'>
......
...@@ -9703,95 +9703,89 @@ ...@@ -9703,95 +9703,89 @@
"codeName" : "VMGroup4", "codeName" : "VMGroup4",
"name" : "视图消息位置测试", "name" : "视图消息位置测试",
"getPSAppViewMsgGroupDetails" : [ { "getPSAppViewMsgGroupDetails" : [ {
"name" : "消息位置-弹出", "name" : "消息位置-视图上方",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg10" "id" : "ViewMsg7"
} }
}, { }, {
"name" : "消息位置-视图内容区", "name" : "消息位置-视图下方",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg9" "id" : "ViewMsg8"
} }
}, { }, {
"name" : "消息位置-视图上方", "name" : "消息位置-弹出",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg7" "id" : "ViewMsg10"
} }
}, { }, {
"name" : "消息位置-视图下方", "name" : "消息位置-视图内容区",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg8" "id" : "ViewMsg9"
} }
} ] } ]
}, { }, {
"codeName" : "VMGroup8", "codeName" : "VMGroup8",
"name" : "【静态测试】", "name" : "【静态测试】",
"getPSAppViewMsgGroupDetails" : [ { "getPSAppViewMsgGroupDetails" : [ {
"name" : "消息类型-错误信息", "name" : "关闭模式-默认删除-上方-错误",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg6"
},
"position" : "POPUP"
}, {
"name" : "消息位置-视图下方",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg8" "id" : "ViewMsg12"
} }
}, { }, {
"name" : "关闭模式-无删除-上方-常规", "name" : "消息位置-视图内容区",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg11" "id" : "ViewMsg9"
} }
}, { }, {
"name" : "消息类型-常规信息", "name" : "消息类型-警告信息",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg4" "id" : "ViewMsg5"
}, },
"position" : "POPUP" "position" : "POPUP"
}, { }, {
"name" : "消息类型-警告信息", "name" : "关闭模式-本次删除-上方-警告",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg5" "id" : "ViewMsg13"
}
}, {
"name" : "消息类型-错误信息",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg6"
}, },
"position" : "POPUP" "position" : "POPUP"
}, { }, {
"name" : "关闭模式-默认删除-上方-错误", "name" : "消息类型-常规信息",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg12" "id" : "ViewMsg4"
} },
"position" : "POPUP"
}, { }, {
"name" : "消息位置-视图内容区", "name" : "关闭模式-无删除-上方-常规",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg9" "id" : "ViewMsg11"
} }
}, { }, {
"name" : "关闭模式-本次删除-上方-警告", "name" : "消息位置-视图下方",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg13" "id" : "ViewMsg8"
} }
} ] } ]
}, { }, {
"codeName" : "VMGroup5", "codeName" : "VMGroup5",
"name" : "视图消息关闭模式", "name" : "视图消息关闭模式",
"getPSAppViewMsgGroupDetails" : [ { "getPSAppViewMsgGroupDetails" : [ {
"name" : "关闭模式-默认删除",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg12"
}
}, {
"name" : "关闭模式-本次删除", "name" : "关闭模式-本次删除",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
...@@ -9803,21 +9797,27 @@ ...@@ -9803,21 +9797,27 @@
"modelref" : true, "modelref" : true,
"id" : "ViewMsg11" "id" : "ViewMsg11"
} }
}, {
"name" : "关闭模式-默认删除",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg12"
}
} ] } ]
}, { }, {
"codeName" : "VMGroup6", "codeName" : "VMGroup6",
"name" : "视图消息动态模式测试", "name" : "视图消息动态模式测试",
"getPSAppViewMsgGroupDetails" : [ { "getPSAppViewMsgGroupDetails" : [ {
"name" : "动态模式-实体数据集", "name" : "动态模式-静态内容",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg14" "id" : "ViewMsg15"
} }
}, { }, {
"name" : "动态模式-静态内容", "name" : "动态模式-实体数据集",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg15" "id" : "ViewMsg14"
} }
} ] } ]
} ], } ],
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册