first commit

This commit is contained in:
编码猿
2024-09-27 01:25:59 +08:00
commit 546fffb620
78 changed files with 30293 additions and 0 deletions

49
dist/core/ui/index.ui.js vendored Normal file
View File

@@ -0,0 +1,49 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApplicationUI = void 0;
/// <reference path = "../../types/index.d.ts" />
var OptionParams_model_1 = require("../model/OptionParams.model");
var index_utils_1 = require("../utils/index.utils");
var Ioc_annotation_1 = require("../annotation/Ioc.annotation");
var controls_ui_1 = require("./controls.ui");
var eventListeners_ui_1 = require("./eventListeners.ui");
var coreSettings_ui_1 = require("./coreSettings.ui");
/**
* 生成播放器的Dom树绑定各种事件处理
*/
var ApplicationUI = /** @class */ (function () {
function ApplicationUI() {
}
ApplicationUI.prototype.GenerateDom = function () {
// 获取用户传入的最外层父节点
this.el = this.Utils.$(OptionParams_model_1.default.OptionParams.el);
// 保存视频播放器的DOM树后面需要操作DOM树为各个按钮绑定事件处理
OptionParams_model_1.default.VideoDom = this.Utils.ParseDom(this.Utils.getLayout());
// 自动调用传入类中方法名包含 'BindEventxxx' 的方法
// 实现各种点击事件的自动绑定
this.Utils.callMethods([
coreSettings_ui_1.CoreSettingsUi, controls_ui_1.ControlsUi, eventListeners_ui_1.EventListenersUi
]);
// 将模板pug和参数配置渲染后得到html string转换为dom树
// 然后将已经绑定好各种事件的dom注入到用户传入的 div 中给用户使用!!
this.el.appendChild(OptionParams_model_1.default.VideoDom);
};
__decorate([
Ioc_annotation_1.Inject(),
__metadata("design:type", index_utils_1.Utils)
], ApplicationUI.prototype, "Utils", void 0);
ApplicationUI = __decorate([
Ioc_annotation_1.Injectable()
], ApplicationUI);
return ApplicationUI;
}());
exports.ApplicationUI = ApplicationUI;