<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<div id="my"></div>
<script>
// 表 属性名 属性值
var wyLook = function(i, ii, iii) {
if (shu_jv_ku[i] == undefined) {
shu_jv_ku[i] = {
id: 0
}
} else if (shu_jv_ku[i][ii] == undefined) {
shu_jv_ku[i][ii] == {}
}
shu_jv_ku[i][ii] = iii
shu_jv_ku[i].id++
}
var getwyLook = function(i, ii) {
if (ii == undefined) {
return shu_jv_ku[i]
} else {
return shu_jv_ku[i][ii]
}
}
// 数据库
var shu_jv_ku = {};
// 类
var cal = (function() {
var cal = function(cal1) {
// 继承防止出
var ee = ''
// 公共的放置处
var pu = '' // 是否开启继承
if (cal1.e != undefined) {
ee = cal.prototype.e(cal1.e)
} else if (cal1.public != undefined) {
cal.prototype.public(cal1.public)
}
wyLook(cal1.shu.biao, cal1.shu.name, cal1.wy(ee, getwyLook('public')))
}
cal.prototype.e = function(e = [], ee = {}) {
var er = e.shift()
if (er) {
ee[er[1]] = getwyLook(er[0], er[1])
return cal.prototype.e(e, ee)
} else {
return ee
}
}
cal.prototype.public = function(e = {}) {
for (ww in e) {
wyLook('public', ww, e[ww])
}
}
return cal
})()
// 包容盒
cal({
//写入数据库
shu: {
biao: 'gong_jv',
name: 'node'
},
// 数据库值 i 继承的参数
wy: function(i, ii) {
return {
}
},
// 共享资源 给wy 的第二个参数
public: {
cc: {
name: '121'
}
}
})
cal({
shu: {
biao: 'gong_jv',
name: 'ww'
},
wy: function(i) {
return {
}
}
})
cal({
// 继承数据库的值 表 属性名
shu: {
biao: 'gong_jv',
name: 'w'
},
wy: function(i) {
return {
}
}
}),
console.log(shu_jv_ku)
</script>
<script>
</script>
</body>
</html>