This commit is contained in:
2024-07-10 12:19:52 +08:00
parent 5baf00de64
commit adbf4750cc
16 changed files with 1176 additions and 722 deletions

View File

@ -1,19 +1,10 @@
import { createElement, createCheckbox, createRadiobox, Dropdown, validation, toDateValue } from "../ui";
import { r as lang } from "../utility";
import { createElement, createCheckbox, createRadiobox, Dropdown, validation, toDateValue, OptionBase } from "../ui";
let r = lang;
export default class ScheduleItem {
export default class ScheduleItem extends OptionBase {
_var = {};
constructor(opt) {
this._var.option = opt ?? {};
const getText = opt?.getText;
if (typeof getText === 'function') {
r = getText;
} else if (typeof GetTextByKey === 'function') {
r = GetTextByKey;
}
constructor(opt = {}) {
super(opt);
}
get checkOccurOnce() { return this._var.container.querySelector('.schedule-id-box-occur-once>input'); }
@ -99,7 +90,7 @@ export default class ScheduleItem {
}
create() {
const option = this._var.option;
const option = this._option;
const drop = new Dropdown({ selected: '0' });
this.dropFrequency = drop;
drop.source = [