解决代码编译问题

This commit is contained in:
yajun 2022-10-25 15:21:04 +08:00
parent 432e860d28
commit f6f3d8e750
1 changed files with 13 additions and 13 deletions

View File

@ -8,15 +8,15 @@ import {
import {customElement, property, query} from 'lit/decorators.js'
import datepickerCss from './datepicker.css.js'
function extend(...args: any[]) {
let name, options, src, copy
function extend(..._args: any[]) {
let name, options, /* src, */ copy
let length = arguments.length
let target = arguments[0]
for (let i = 1; i < length; i++) {
options = arguments[i]
if (options != null) {
for (name in options) {
src = target[name]
// src = target[name]
copy = options[name]
if (copy !== undefined) {
target[name] = copy
@ -362,7 +362,7 @@ export class PickerBase extends LitElement {
function getVal(
pos: number,
data: itemdate[],
infinite: boolean,
// infinite: boolean,
selectedIdx: number
) {
let len = data.length,
@ -474,7 +474,7 @@ export class PickerBase extends LitElement {
)
}
let self = this
// let self = this
if (_this.option.scrollType == '3d') {
//3d点击事件
this.itemClick(this.opt.item3d)
@ -615,7 +615,7 @@ export class PickerBase extends LitElement {
if (this.opt.clickDown) {
this.opt.curY = e.clientY
} else {
return false
// return false
}
}
@ -644,7 +644,7 @@ export class PickerBase extends LitElement {
this.opt.lastY = e.clientY
this.opt.clickDown = false
} else {
return false
// return false
}
}
this.opt.endTime = new Date()
@ -700,7 +700,7 @@ export class PickerBase extends LitElement {
let res = getVal(
this.opt.scrollY,
this.opt.data,
this.opt.infinite,
// this.opt.infinite,
this.opt.selectedIdx
)
_this.rs.result[this.index] = res
@ -738,7 +738,7 @@ export class PickerBase extends LitElement {
removeItem(valArr:any) {
let data = this.opt.data,
resultVal = _this.rs.result[this.index].value,
removeLen = 0,
// removeLen = 0,
moveEnd = false
for (let i = 0; i < data.length; i++) {
@ -746,7 +746,7 @@ export class PickerBase extends LitElement {
if (data[i].value == valArr[j]) {
//移除
data.splice(i--, 1)
removeLen++
// removeLen++
} else {
if (valArr[j] == resultVal) {
moveEnd = true
@ -785,7 +785,7 @@ export class PickerBase extends LitElement {
this.scrollTo(_this.rs.result[this.index].value, 0)
}
}
this.init = function init(wheels:any, target:any, isInput:any) {
this.init = function init(wheels:any, target:any, _isInput:any) {
//创建DOM
createEL(wheels)
let el = _this.shadowRoot!.querySelectorAll('.p-select-item')
@ -797,7 +797,7 @@ export class PickerBase extends LitElement {
let res = getVal(
scroll.opt.scrollY,
scroll.opt.data,
scroll.opt.infinite,
// scroll.opt.infinite,
scroll.opt.selectedIdx
)
_this.rs.result.push(res)
@ -1193,7 +1193,7 @@ export class PickerBase extends LitElement {
}
this.getLastVal(rs.result)
},
save: (rs:any, target:any) => {
save: (_rs:any, target:any) => {
if (target.isInput) {
target.value = this.lastValue
} else {