Vue 语法
1、 {{subjectAlls}}
两个花括号=打印,可以打印在页面上
console.log("=111====>", subjectAlls),只能在方法里使用,在控制台查看
2、mounted(){}---调用后端接口时,才会用this引入后端接口
created() {},--------------------------------------------基本为空
mounted() {--------------------------------------------载入后,写入方案methods
methods:{
this.getSubjectAll();
this.getCostCenterGroup();
}
},
3、filterable,模糊搜索
<li-select----------------------------------------------选择框
v-model="formDataPriro.subjectAll"
placeholder="请下拉选择预算科目All"------------------底纹
clearable--------------------------------------------------------下拉框可清除
filterable-------------------------------------------------------- 模糊搜索
:style="{ width: '25%' }"
@change="onChangeSubjectAll"-----------------------change是值改变之后的通知,onChangeSubjectAll
>
<li-option------------------------------------------------下拉
v-for="item in subjectAlls"
:key="item.id"
:label="item.namePath"
:value="item.id"
></li-option>
</li-select>
4、标签<Li-input-number></Li-input-number>,输入数字,rules的type:integer
5、标签<Li-input></Li-input>,输入文本:字符串,rules的type:string

6、Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'type')
at Function.forEach.Bm.<computed> [as error]

问题原因:未捕获(承诺)类型错误:无法设置未定义的属性(设置“类型”),没有引入方法

浙公网安备 33010602011771号