This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

细节更新

old
宇天 2018-07-31 16:35:43 +08:00
parent 8593a71f1d
commit a33cc30995
4 changed files with 28 additions and 56 deletions

View File

@ -92,14 +92,7 @@ const _Anot = (function() {
function generateID(mark) { function generateID(mark) {
mark = (mark && mark + '-') || 'anot-' mark = (mark && mark + '-') || 'anot-'
return ( return mark + (++bindingID).toString(16)
mark +
Math.random()
.toString(16)
.slice(-4) +
'-' +
++bindingID
)
} }
var Anot = function(el) { var Anot = function(el) {
@ -2108,7 +2101,7 @@ const _Anot = (function() {
function createTrack(n) { function createTrack(n) {
var ret = [] var ret = []
for (var i = 0; i < n; i++) { for (var i = 0; i < n; i++) {
ret[i] = generateID('$proxy$each') ret[i] = generateID('proxy-each')
} }
return ret return ret
} }
@ -3070,7 +3063,7 @@ const _Anot = (function() {
return ret return ret
} }
var rproxy = /(\$proxy\$[a-z]+)\-[\-0-9a-f]+$/ var rproxy = /(proxy\-[a-z]+)\-[\-0-9a-f]+$/
var variablePool = new Cache(218) var variablePool = new Cache(218)
//缓存求值函数,以便多次利用 //缓存求值函数,以便多次利用
var evaluatorPool = new Cache(128) var evaluatorPool = new Cache(128)
@ -3366,7 +3359,7 @@ const _Anot = (function() {
if (camelizeName.indexOf('@') === 0) { if (camelizeName.indexOf('@') === 0) {
camelizeName = camelizeName.slice(1) camelizeName = camelizeName.slice(1)
attr.value = attr.value.replace(/\(.*\)$/, '') attr.value = attr.value.replace(/\(.*\)$/, '')
if (vm.$id.slice(0, 11) === '$proxy$each') { if (vm.$id.slice(0, 10) === 'proxy-each') {
vm = vm.$up vm = vm.$up
} }
if ( if (
@ -5950,7 +5943,7 @@ const _Anot = (function() {
force: force force: force
} }
) )
proxy.$id = generateID('$proxy$each') proxy.$id = generateID('proxy-each')
return proxy return proxy
} }
@ -5983,7 +5976,7 @@ const _Anot = (function() {
force: force force: force
} }
) )
proxy.$id = generateID('$proxy$with') proxy.$id = generateID('proxy-with')
return proxy return proxy
} }
@ -5991,7 +5984,7 @@ const _Anot = (function() {
var proxy = cache[key] var proxy = cache[key]
if (proxy) { if (proxy) {
var proxyPool = var proxyPool =
proxy.$id.indexOf('$proxy$each') === 0 ? eachProxyPool : withProxyPool proxy.$id.indexOf('proxy-each') === 0 ? eachProxyPool : withProxyPool
proxy.$outer = {} proxy.$outer = {}
for (var i in proxy.$events) { for (var i in proxy.$events) {

View File

@ -107,14 +107,7 @@
function generateID(mark) { function generateID(mark) {
mark = (mark && mark + '-') || 'anot-' mark = (mark && mark + '-') || 'anot-'
return ( return mark + (++bindingID).toString(16)
mark +
Math.random()
.toString(16)
.slice(-4) +
'-' +
++bindingID
)
} }
var Anot = function(el) { var Anot = function(el) {
@ -2123,7 +2116,7 @@
function createTrack(n) { function createTrack(n) {
var ret = [] var ret = []
for (var i = 0; i < n; i++) { for (var i = 0; i < n; i++) {
ret[i] = generateID('$proxy$each') ret[i] = generateID('proxy-each')
} }
return ret return ret
} }
@ -3085,7 +3078,7 @@
return ret return ret
} }
var rproxy = /(\$proxy\$[a-z]+)\-[\-0-9a-f]+$/ var rproxy = /(proxy\-[a-z]+)\-[\-0-9a-f]+$/
var variablePool = new Cache(218) var variablePool = new Cache(218)
//缓存求值函数,以便多次利用 //缓存求值函数,以便多次利用
var evaluatorPool = new Cache(128) var evaluatorPool = new Cache(128)
@ -3381,7 +3374,7 @@
if (camelizeName.indexOf('@') === 0) { if (camelizeName.indexOf('@') === 0) {
camelizeName = camelizeName.slice(1) camelizeName = camelizeName.slice(1)
attr.value = attr.value.replace(/\(.*\)$/, '') attr.value = attr.value.replace(/\(.*\)$/, '')
if (vm.$id.slice(0, 11) === '$proxy$each') { if (vm.$id.slice(0, 10) === 'proxy-each') {
vm = vm.$up vm = vm.$up
} }
if ( if (
@ -5965,7 +5958,7 @@
force: force force: force
} }
) )
proxy.$id = generateID('$proxy$each') proxy.$id = generateID('proxy-each')
return proxy return proxy
} }
@ -5998,7 +5991,7 @@
force: force force: force
} }
) )
proxy.$id = generateID('$proxy$with') proxy.$id = generateID('proxy-with')
return proxy return proxy
} }
@ -6006,7 +5999,7 @@
var proxy = cache[key] var proxy = cache[key]
if (proxy) { if (proxy) {
var proxyPool = var proxyPool =
proxy.$id.indexOf('$proxy$each') === 0 ? eachProxyPool : withProxyPool proxy.$id.indexOf('proxy-each') === 0 ? eachProxyPool : withProxyPool
proxy.$outer = {} proxy.$outer = {}
for (var i in proxy.$events) { for (var i in proxy.$events) {

View File

@ -92,14 +92,7 @@ const _Anot = (function() {
function generateID(mark) { function generateID(mark) {
mark = (mark && mark + '-') || 'anot-' mark = (mark && mark + '-') || 'anot-'
return ( return mark + (++bindingID).toString(16)
mark +
Math.random()
.toString(16)
.slice(-4) +
'-' +
++bindingID
)
} }
var Anot = function(el) { var Anot = function(el) {
@ -2108,7 +2101,7 @@ const _Anot = (function() {
function createTrack(n) { function createTrack(n) {
var ret = [] var ret = []
for (var i = 0; i < n; i++) { for (var i = 0; i < n; i++) {
ret[i] = generateID('$proxy$each') ret[i] = generateID('proxy-each')
} }
return ret return ret
} }
@ -3070,7 +3063,7 @@ const _Anot = (function() {
return ret return ret
} }
var rproxy = /(\$proxy\$[a-z]+)\-[\-0-9a-f]+$/ var rproxy = /(proxy\-[a-z]+)\-[\-0-9a-f]+$/
var variablePool = new Cache(218) var variablePool = new Cache(218)
//缓存求值函数,以便多次利用 //缓存求值函数,以便多次利用
var evaluatorPool = new Cache(128) var evaluatorPool = new Cache(128)
@ -3366,7 +3359,7 @@ const _Anot = (function() {
if (camelizeName.indexOf('@') === 0) { if (camelizeName.indexOf('@') === 0) {
camelizeName = camelizeName.slice(1) camelizeName = camelizeName.slice(1)
attr.value = attr.value.replace(/\(.*\)$/, '') attr.value = attr.value.replace(/\(.*\)$/, '')
if (vm.$id.slice(0, 11) === '$proxy$each') { if (vm.$id.slice(0, 10) === 'proxy-each') {
vm = vm.$up vm = vm.$up
} }
if ( if (
@ -5950,7 +5943,7 @@ const _Anot = (function() {
force: force force: force
} }
) )
proxy.$id = generateID('$proxy$each') proxy.$id = generateID('proxy-each')
return proxy return proxy
} }
@ -5983,7 +5976,7 @@ const _Anot = (function() {
force: force force: force
} }
) )
proxy.$id = generateID('$proxy$with') proxy.$id = generateID('proxy-with')
return proxy return proxy
} }
@ -5991,7 +5984,7 @@ const _Anot = (function() {
var proxy = cache[key] var proxy = cache[key]
if (proxy) { if (proxy) {
var proxyPool = var proxyPool =
proxy.$id.indexOf('$proxy$each') === 0 ? eachProxyPool : withProxyPool proxy.$id.indexOf('proxy-each') === 0 ? eachProxyPool : withProxyPool
proxy.$outer = {} proxy.$outer = {}
for (var i in proxy.$events) { for (var i in proxy.$events) {

View File

@ -107,14 +107,7 @@
function generateID(mark) { function generateID(mark) {
mark = (mark && mark + '-') || 'anot-' mark = (mark && mark + '-') || 'anot-'
return ( return mark + (++bindingID).toString(16)
mark +
Math.random()
.toString(16)
.slice(-4) +
'-' +
++bindingID
)
} }
var Anot = function(el) { var Anot = function(el) {
@ -2123,7 +2116,7 @@
function createTrack(n) { function createTrack(n) {
var ret = [] var ret = []
for (var i = 0; i < n; i++) { for (var i = 0; i < n; i++) {
ret[i] = generateID('$proxy$each') ret[i] = generateID('proxy-each')
} }
return ret return ret
} }
@ -3085,7 +3078,7 @@
return ret return ret
} }
var rproxy = /(\$proxy\$[a-z]+)\-[\-0-9a-f]+$/ var rproxy = /(proxy\-[a-z]+)\-[\-0-9a-f]+$/
var variablePool = new Cache(218) var variablePool = new Cache(218)
//缓存求值函数,以便多次利用 //缓存求值函数,以便多次利用
var evaluatorPool = new Cache(128) var evaluatorPool = new Cache(128)
@ -3381,7 +3374,7 @@
if (camelizeName.indexOf('@') === 0) { if (camelizeName.indexOf('@') === 0) {
camelizeName = camelizeName.slice(1) camelizeName = camelizeName.slice(1)
attr.value = attr.value.replace(/\(.*\)$/, '') attr.value = attr.value.replace(/\(.*\)$/, '')
if (vm.$id.slice(0, 11) === '$proxy$each') { if (vm.$id.slice(0, 10) === 'proxy-each') {
vm = vm.$up vm = vm.$up
} }
if ( if (
@ -5965,7 +5958,7 @@
force: force force: force
} }
) )
proxy.$id = generateID('$proxy$each') proxy.$id = generateID('proxy-each')
return proxy return proxy
} }
@ -5998,7 +5991,7 @@
force: force force: force
} }
) )
proxy.$id = generateID('$proxy$with') proxy.$id = generateID('proxy-with')
return proxy return proxy
} }
@ -6006,7 +5999,7 @@
var proxy = cache[key] var proxy = cache[key]
if (proxy) { if (proxy) {
var proxyPool = var proxyPool =
proxy.$id.indexOf('$proxy$each') === 0 ? eachProxyPool : withProxyPool proxy.$id.indexOf('proxy-each') === 0 ? eachProxyPool : withProxyPool
proxy.$outer = {} proxy.$outer = {}
for (var i in proxy.$events) { for (var i in proxy.$events) {