Compare commits

...

2 Commits

Author SHA1 Message Date
xiao-fajia
ad17736e30 修复杂项 2024-07-31 09:43:45 +08:00
xiao-fajia
c52a3bbcce 设置表格默认属性 2024-07-31 09:01:11 +08:00
3 changed files with 14 additions and 11 deletions

View File

@ -46,7 +46,7 @@
<label><input type="radio" id="J_setSizePage" name="size" />自定义页面宽度</label> <label><input type="radio" id="J_setSizePage" name="size" />自定义页面宽度</label>
</li> </li>
<li> <li>
<input id="J_setText" type="text" style="display:none;width:60px;" value="40%" onchange="SetText(this)"/> <input id="J_setText" type="text" style="display:none;width:60px;" value="100%" onchange="SetText(this)"/>
</li> </li>
<!--end--> <!--end-->
</ul> </ul>

View File

@ -147,6 +147,7 @@ export default {
handler(val) { handler(val) {
if (val !== undefined) { if (val !== undefined) {
this.reset() this.reset()
this.getCategoryList()
this.getContentById(val) this.getContentById(val)
} }
}, },
@ -223,16 +224,18 @@ export default {
getCategoryList() { getCategoryList() {
getLeavesCategoryList().then(response => { getLeavesCategoryList().then(response => {
this.categoryList = response.data this.categoryList = response.data
let flag = false; if (!!this.$route.query.categoryId){
this.categoryList.forEach(item => { let flag = false;
if (item.id === this.$route.query.categoryId) { this.categoryList.forEach(item => {
this.form.categoryId = this.$route.query.categoryId.toString() if (item.id === this.$route.query.categoryId) {
flag = true; this.form.categoryId = this.$route.query.categoryId.toString()
} flag = true;
if (!flag){ }
if (!flag){
this.form.categoryId = "" this.form.categoryId = ""
} }
}) })
}
}) })
}, },
handleChangeType() { handleChangeType() {