master
yutent 2023-09-20 19:11:22 +08:00
parent 3908bf7fe6
commit fd154f1bcf
1 changed files with 8 additions and 8 deletions

View File

@ -330,10 +330,10 @@ class TemplateInstance {
for (let part of this._parts) {
if (part !== void 0) {
if (part.strings !== void 0) {
part._$setValue(values, i)
part.$setValue(values, i)
i += part.strings.length - 2
} else {
part._$setValue(values[i])
part.$setValue(values[i])
}
}
i++
@ -365,7 +365,7 @@ class ChildPart {
get endNode() {
return this._$endNode
}
_$setValue(value) {
$setValue(value) {
if (isPrimitive(value)) {
if (value === NOTHING || value == null || value === '') {
if (this._$committedValue !== NOTHING) {
@ -457,7 +457,7 @@ class ChildPart {
} else {
itemPart = itemParts[partIndex]
}
itemPart._$setValue(item)
itemPart.$setValue(item)
partIndex++
}
if (partIndex < itemParts.length) {
@ -495,7 +495,7 @@ class AttributePart {
return this.element.tagName
}
_$setValue(value, valueIndex) {
$setValue(value, valueIndex) {
let strings = this.strings
let changed = false
if (strings === void 0) {
@ -591,7 +591,7 @@ class EventPart extends AttributePart {
this.type = EVENT_PART
}
_$setValue(listener) {
$setValue(listener) {
let host = this.options.host
let options = {}
@ -672,7 +672,7 @@ class ElementPart {
this.options = options
}
_$setValue(value) {}
$setValue(value) {}
}
export function render(value, container, options = {}) {
@ -687,7 +687,7 @@ export function render(value, container, options = {}) {
)
container[WC_PART] = part
}
part._$setValue(value)
part.$setValue(value)
return part
}