function A(){}
A.prototype = {
constructor: A,
template: {
closed: []
}
}
function B(){
}
B.prototype = Object.create(A.prototype,{
template: {
value: {
static:[]
}
}
})
var b = new B()
console.log(b)
<button id="btn">点击</button>