|
@@ -340,6 +340,13 @@ export default {
|
|
pageInit () {
|
|
pageInit () {
|
|
this.getProductType()
|
|
this.getProductType()
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
|
|
+ // 默认首项获取焦点
|
|
|
|
+ const _this = this
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ if (_this.$refs['name']) {
|
|
|
|
+ _this.$refs['name'].focus()
|
|
|
|
+ }
|
|
|
|
+ }, 300)
|
|
if (this.$route.params.id) { // 编辑页
|
|
if (this.$route.params.id) { // 编辑页
|
|
this.getGoodsDetail()
|
|
this.getGoodsDetail()
|
|
}
|
|
}
|