"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);
};
var core_1 = require("@angular/core");
var AppComponent = (function () {
function AppComponent() {
}
AppComponent.prototype.loadocx = function () {
var ss = bldStr("BCV1.TreeList", "AF", "", "100%");
$('#container').html(ss);
$('#src').val(ss);
//可以通过下面直接加载
// $('#container').html(` <Object id=AF Width=100% height=390px CLASSID="clsid:619F1AC0-2644-40D3-9EB1-22F81C5FE097" Codebase="app/providers/supcan/supcan2.cab#Version=1,0,0,3"><param Name="CtlName" Value="BCV1.TreeList"><param Name="CtlVersion" Value="1.0.102.0"><param Name="ZipUrl" Value="app/providers/supcan/BCV1.bin"><param Name="id" Value="AF"><param Name="Cookie" Value=""><param Name="CtlPara" Value=""></Object>`);
};
AppComponent.prototype.execMethod = function () {
AF.func("Build", "app/examples/ocx/t1.xml");
AF.func("Load", "app/examples/ocx/data.xml");
};
return AppComponent;
}());
AppComponent = __decorate([
core_1.Component({
selector: 'my-app',
template: "\n <button id=\"test\" (click)=\"loadocx()\">\u52A0\u8F7DOCX</button>\n <button id=\"func\" (click)=\"execMethod()\">OCX\u65B9\u6CD5\u8C03\u7528</button>\n <textarea id=\"src\" style=\"position:relative;width:97%;height:50px;\"></textarea>\n <div id=\"container\" style=\"width:98%;height:500px\"></div>\n "
}),
__metadata("design:paramtypes", [])
], AppComponent);
exports.AppComponent = AppComponent;
//# sourceMappingURL=app.component.js.map
typescript 调用ocx例子
3星 · 超过75%的资源 需积分: 41 28 浏览量
2017-06-28
16:43:35
上传
评论 1
收藏 17KB RAR 举报
gg88w
- 粉丝: 0
- 资源: 1