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