提交 21345738 编写于 作者: Skyeye云's avatar Skyeye云

feat: 文字模型优化

上级 2b3c33af
......@@ -405,20 +405,20 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
// 显示在编辑框
let optional = item.propertyMation.optional;
let value = optional == 0 ? item.propertyMation.defaultValue : '';
let editorChooseValue = "";
let optionalValue = "";
if (optional == 1) {
// 属性值可选
editorChooseValue = [];
optionalValue = [];
item.propertyMation.propertyValueList.forEach(function (bean) {
if (value.defaultChoose == 1) {
if (bean.defaultChoose == 1) {
value = bean.value;
}
editorChooseValue.push({
optionalValue.push({
id: bean.value,
name: bean.name
});
});
editorChooseValue = JSON.stringify(editorChooseValue);
optionalValue = JSON.stringify(optionalValue);
}
wordStyleMation.attr[item.propertyMation.attrCode] = {
"defaultValue": value,
......@@ -426,7 +426,7 @@ layui.define(["jquery", 'form', 'element'], function(exports) {
"remark": item.propertyMation.name,
"name": item.propertyMation.name,
"editorType": item.propertyMation.editorType,
"editorChooseValue": editorChooseValue,
"optionalValue": optionalValue,
"typeName": "Style属性"
}
}
......
......@@ -64,7 +64,8 @@ layui.config({
tableData.push({
propertyId: choosePropertyList[trId].id,
editor: dataShowType.getData('editor' + rowNum),
showToEditor: dataShowType.getData('whetherShow' + rowNum)
showToEditor: dataShowType.getData('whetherShow' + rowNum),
orderBy: i + 1
});
});
if (tableData.length == 0) {
......
......@@ -44,7 +44,7 @@
<div class="layui-form-item layui-col-xs12" id="canNotChoose">
<label class="layui-form-label">默认值<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="defaultValue" name="defaultValue" placeholder="请输入默认值" class="layui-input" maxlength="300"/>
<textarea id="defaultValue" name="defaultValue" placeholder="请输入默认值" class="layui-textarea" style="height: 100px;"></textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12" style="display: none" id="canChoose">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册