Commit fe15f2f2 authored by XieXiaohan's avatar XieXiaohan

add CustomView

parent 1d742ca8
This diff is collapsed.
This diff is collapsed.
...@@ -20,16 +20,58 @@ ...@@ -20,16 +20,58 @@
</tr> </tr>
<tr v-if="EditData.edit.type != 'config'"> <tr v-if="EditData.edit.type == 'Navigation'">
<td><button class="button has-text-primary" style="margin-left: 15px;" @click="addInput">Add Input</button></td>
<td><table class="table">
<tbody v-for="(data,index) in EditData.edit.url">
<tr>
<input class="input has-text-primary" v-model="data.url"></tr>
<tr>
<button @click="deleteRow(index)">删除</button>
</tr>
</tbody>
</table></td>
</tr>
<tr v-if="EditData.edit.type != 'Navigation'">
<th>url:</th> <th>url:</th>
<td> <input class="input has-text-primary" v-model="EditData.edit.url" type="text"></td> <td> <input class="input has-text-primary" v-model="EditData.edit.url" type="text"></td>
<td><button class="button has-text-primary" style="margin-left: 15px;" @click="pathPoke">POKE</button></td> <td><button class="button has-text-primary" style="margin-left: 15px;" @click="pathPoke">POKE</button></td>
</tr> </tr>
<tr v-for="(prop,key) in EditData.props"> <tr v-for="(prop,key) in EditData.props" v-if="key != 'StateIndicatorFile'">
<th>{{key}}</th>
<td><input v-if="key != 'titleSize'" class="input has-text-primary" v-model="EditData.props[key]" type="text">
<div class="select" v-if="key == 'titleSize'">
<select v-model="EditData.props.titleSize">
<option>is-small</option>
<option>is-medium</option>
<option>is-large</option>
</select>
</div>
</td>
<!--<td v-if="key == 'setPathPoke' || key == 'getPathPoke'"><button class="button has-text-primary" style="margin-left: 15px;" @click="pathPoke(key)">POKE</button></td>-->
</tr>
<tr v-for="(prop,key) in EditData.props.StateIndicatorFile">
<th>{{key}}</th> <th>{{key}}</th>
<td> <input class="input has-text-primary" v-model="EditData.props[key]" type="text">{{prop}}</td> <td>
<td v-if="key == 'setPathPoke' || key == 'getPathPoke'"><button class="button has-text-primary" style="margin-left: 15px;" @click="pathPoke(key)">POKE</button></td> <input class="input has-text-primary" v-model="EditData.props.StateIndicatorFile[key]" type="text">
</td>
</tr>
<tr v-if="EditData.edit.type == 'state'">
<th>ShowStateValue</th>
<td>
<toggle-button v-model="EditData.edit.isShowStateVlaue"
width="80"
height="30"
switch-color="{checked: '#25EF02', unchecked: 'linear-gradient(red, yellow)'}"
:labels="{checked: 'show', unchecked: 'hide'}"/>
</td>
</tr> </tr>
...@@ -45,7 +87,7 @@ ...@@ -45,7 +87,7 @@
<div class="field-body"> <div class="field-body">
<div class="field"> <div class="field">
<div class="control"> <div class="control">
<input class="input" type="text" v-model="tempUserInputData[label]"> <input class="input" type="text" v-model="EditData.params.tempUserInputData[label]">
</div> </div>
</div> </div>
</div> </div>
...@@ -65,6 +107,7 @@ ...@@ -65,6 +107,7 @@
</table> </table>
</div> </div>
...@@ -128,10 +171,6 @@ export default class WindowsApp extends Vue { ...@@ -128,10 +171,6 @@ export default class WindowsApp extends Vue {
this.EditData = data; this.EditData = data;
} }
if(this.EditData.props.StateFile != null){
this.EditData.props.StateFile = JSON.stringify(this.EditData.props.StateFile);
this.EditData.props.StateIndicatorFile = JSON.stringify(this.EditData.props.StateIndicatorFile);
}
} }
mounted(){ mounted(){
...@@ -144,42 +183,42 @@ export default class WindowsApp extends Vue { ...@@ -144,42 +183,42 @@ export default class WindowsApp extends Vue {
this.setVariableList( this.setVariableList(
this.pathProcessor.extractVarFromPath(this.EditData.params.PokedPath) this.pathProcessor.extractVarFromPath(this.EditData.params.PokedPath)
); );
if(this.EditData.edit.type == 'config'){
this.setVariableList(
this.pathProcessor.extractVarFromPath(this.EditData.params.GetPokedPath)
);
this.setVariableList(
this.pathProcessor.extractVarFromPath(this.EditData.params.SetPokedPath)
);
}
} }
/*loadTextFromStateFile(ev: any){ addInput(){
const file = ev.target.files[0]; this.EditData.edit.url.push({});
//console.log(file); }
const reader = new FileReader();
reader.readAsText(file);
reader.onload = e => {
this.StateFile = JSON.parse((e.target as any).result);
this.EditData.params.StateFile = this.StateFile;
};
deleteRow(index) {
this.EditData.edit.url.splice(index, 1);
}
/*loadTextFromStateFile(ev: any){
const file = ev.target.files[0];
//console.log(file);
const reader = new FileReader();
reader.readAsText(file);
reader.onload = e => {
this.StateFile = JSON.parse((e.target as any).result);
this.EditData.params.StateFile = this.StateFile;
};
}
loadTextFromStateIndicatorFile(ev: any){
const file = ev.target.files[0];
const reader = new FileReader();
reader.readAsText(file);
reader.onload = e => {
this.StateIndicatorFile = JSON.parse((e.target as any).result);
this.EditData.params.StateIndicatorFile = this.StateIndicatorFile;
};
}
}*/ loadTextFromStateIndicatorFile(ev: any){
const file = ev.target.files[0];
const reader = new FileReader();
reader.readAsText(file);
reader.onload = e => {
this.StateIndicatorFile = JSON.parse((e.target as any).result);
this.EditData.params.StateIndicatorFile = this.StateIndicatorFile;
};
}*/
apply(){ apply(){
var Args: UpdatePayload = { var Args: UpdatePayload = {
...@@ -188,7 +227,7 @@ export default class WindowsApp extends Vue { ...@@ -188,7 +227,7 @@ export default class WindowsApp extends Vue {
target: ["self"] target: ["self"]
}; };
this.EditData.params.Args = Args; this.EditData.params.Args = Args;
this.EditData.params.tempUserInputData = this.tempUserInputData; //this.EditData.params.tempUserInputData = this.tempUserInputData;
window.opener.UpdateWidget(this.EditData); window.opener.UpdateWidget(this.EditData);
} }
...@@ -196,13 +235,8 @@ export default class WindowsApp extends Vue { ...@@ -196,13 +235,8 @@ export default class WindowsApp extends Vue {
pathPoke(key:string) { pathPoke() {
this.isShowParams = true; this.isShowParams = true;
if(key == 'setPathPoke'){
this.EditData.params.action = 'set';
}else if(key == 'getPathPoke'){
this.EditData.params.action = 'get';
}
window.opener.UpdateWidget(this.EditData); window.opener.UpdateWidget(this.EditData);
} }
...@@ -211,12 +245,10 @@ export default class WindowsApp extends Vue { ...@@ -211,12 +245,10 @@ export default class WindowsApp extends Vue {
setVariableList(path: string[]) { setVariableList(path: string[]) {
console.log(path);
this.userInputData.clear(); this.userInputData.clear();
path.forEach(element => { path.forEach(element => {
this.userInputData.set(element, ''); this.userInputData.set(element, '');
}); });
console.log(this.userInputData);
this.$forceUpdate(); this.$forceUpdate();
} }
...@@ -225,7 +257,7 @@ export default class WindowsApp extends Vue { ...@@ -225,7 +257,7 @@ export default class WindowsApp extends Vue {
getVariableValues(): Map<string, string> { getVariableValues(): Map<string, string> {
for(var key of this.userInputData.keys()) { for(var key of this.userInputData.keys()) {
this.userInputData.set(key, this.tempUserInputData[key]); this.userInputData.set(key, this.EditData.params.tempUserInputData[key]);
} }
return this.userInputData; return this.userInputData;
......
...@@ -5,6 +5,8 @@ import 'buefy/dist/buefy.css' ...@@ -5,6 +5,8 @@ import 'buefy/dist/buefy.css'
import 'font-awesome/css/font-awesome.min.css' import 'font-awesome/css/font-awesome.min.css'
//import hscmap from '@hscmap/vue-window' //import hscmap from '@hscmap/vue-window'
import * as VueWindow from '@hscmap/vue-window' import * as VueWindow from '@hscmap/vue-window'
import ToggleButton from 'vue-js-toggle-button'
Vue.use(ToggleButton)
import router from 'vue-router' import router from 'vue-router'
......
...@@ -5,6 +5,7 @@ export default class PathProcessor { ...@@ -5,6 +5,7 @@ export default class PathProcessor {
let str = ''; let str = '';
//取出path中的$ $,数组 //取出path中的$ $,数组
const result = path.match(urlRegExp); const result = path.match(urlRegExp);
console.log(result);
if (result != null) { if (result != null) {
//遍历map和数组 //遍历map和数组
variables.forEach((value: string, key: string) => { variables.forEach((value: string, key: string) => {
...@@ -14,6 +15,7 @@ export default class PathProcessor { ...@@ -14,6 +15,7 @@ export default class PathProcessor {
str = '\$' + label + '\$'; str = '\$' + label + '\$';
//将$xxx$替换成参数值 path为/card0/length/0 //将$xxx$替换成参数值 path为/card0/length/0
path = path.replace(str, value); path = path.replace(str, value);
console.log(path);
} }
}); });
}); });
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<div class="container" id="RightClick">
<div class="columns">
<button class="column button has-text-info is-light is-10 is-offset-1" style="padding: 4px;margin-top: 25px;" @click="isShowParams = true">Navigation</button>
</div>
<div v-for="url in EditData.edit.url" v-if="isShowParams">
<a v-bind:href="url.url" target="_blank">{{url.url}}</a>
</div>
</div>
</template>
<script lang="ts">
import Component from "vue-class-component";
import { Prop, Watch } from "vue-property-decorator";
import { WidgetConfig } from "@/models/WidgetConfig";
import { UpdatePayload } from "@/models/UpdatePayload";
import { Widget } from "@/models/widget";
import { ResourceInfo } from "@/models/Customview";
import { WidgetRef } from "@/models/WidgetRef";
import PathProcessor from "@/models/PathProcessor";
import StrMapObjChange from "@/models/StrMapObjChange";
@Component({
components: {
}
})
export default class Navigation extends Widget {
@Prop() index!:number;
@Prop() refIndex!:number;
@Prop() widgetList:WidgetRef[] = [];
pathProcessor = new PathProcessor();
strMapObjChange = new StrMapObjChange();
WidgetComponentName: string = "Navigation";
pathId: string = "";
userInputData = new Map<string, string>();
isShowParams: boolean = false;
config: WidgetConfig = {
WidgetComponentName: "Navigation",
data: {
url: "",
displayname:"",
userInputData: ""
}
};
EditData = {
edit:{
url:[],
type:'Navigation',
index:this.refIndex,
},
props:{
},
params:{
action:'get',
Args : {},
tempUserInputData:{},
},
};
created() {
this.config.data.userInputData = this.strMapObjChange.strMapToObj(
this.userInputData
);
}
mounted() {
let containerlist = document.getElementsByClassName('container');
//CreateContainerId
var self = this;
let RightClickField = containerlist[this.index];
RightClickField.oncontextmenu = function (e) {
e.preventDefault();//demo区域停止原鼠标右击菜单
//this.popMenu('itemMenu',100,"100");
let menu = document.querySelector('.menu');//获取盒子menu。
if(menu) menu.remove();//判断清除初始盒子
menu = document.createElement('div');//创建盒子。
menu.classList.add('menu');//添加类
let menu1 = document.createElement('BUTTON');//创建盒子menu1。
menu1.innerHTML = 'del';//盒子menu1添加文本XXXX
menu1.onclick = self.del;
menu.appendChild(menu1);//menu末尾添加新的节点menu1
let menu2 = document.createElement('BUTTON');//创建盒子menu1。
menu2.innerHTML = 'edit';//盒子menu1添加文本XXXX
menu2.onclick = self.openWindows;
//menu2.setAttribute("onclick", this.openWindows);
menu.appendChild(menu2);//menu末尾添加新的节点menu1
RightClickField.appendChild(menu);//body末尾添加新的节点menu
//盒子跟随鼠标光标。
//menu.style.top = $('#RightClick').offset().top;
menu.style.left = e.offsetX +"px";
menu.style.top = e.offsetY +"px";
menu.style.position = 'absolute';
//menu.style.top = '${e.clientY}px';
//menu.style.left = '${e.clientX}px';
console.log(menu.style.top);
console.log(menu);
};
//全局点击时消失。
RightClickField.onclick = e => {
let menu = document.querySelector('.menu')
if (menu && !menu.contains(e.target))
menu.remove()
}
}
del(){
this.$emit('del', this.index);
}
openWindows(){
//windows.open -> another single page application
var JsonData = JSON.stringify(this.EditData);
var url ="http://localhost:8080/WindowsAppIndex.html/?";
window.open(url+JsonData, "WidgetWindow",'height=100, width=100, top=10, left=10, toolbar=no');
}
//app
updateUI() {
this.openWindows();
}
//app
getConfig(): [WidgetConfig,object] {
return [this.config,this.EditData];
}
//app
setConfig(setConfigData: [WidgetConfig,object],fragment:string): void {
console.log(setConfigData);
this.config = setConfigData[0];
console.log(this.config);
this.EditData = setConfigData[1];
}
}
</script>
<style scoped>
.waveView {
width: 100%;
height: auto;
}
.hflex{
display: flex;
flex-direction: row-reverse;
align-items: center;
}
</style>
This diff is collapsed.
<template> <template>
<div class="container"> <div class="container">
<div class="columns content " v-bind:class="EditData.props.titleSize" style="margin-bottom: 0px;">
<div class="columns" style="margin-top:10px"> <div class="column content-table-cell-heading-color is-narrow" style="margin: 0px;">
<h3>{{EditData.props.title}}</h3>
<span style="float:left;" v-show = "!isShowPath" class="largeFont" v-if = "config.data.displayname != ''">{{ config.data.displayname }}</span> </div>
<span style="float:left;" v-show = "!isShowPath" class="largeFont" v-if = "config.data.displayname == ''">{{ config.data.url }}</span>
<input class="input colmumn is-8" type="text" v-show="isShowPath" v-model="config.data.displayname">
</div> </div>
<div class="columns" style="margin-top:5px"> <div class="columns" style="padding: 5px;margin-top: 5px;">
<span style="background-color: #bbb;border-radius: 50%;display: inline-block;" <span style="background-color: #bbb;border-radius: 50%;display: inline-block;"
v-bind:style="{ backgroundColor: activeColor, height: fontSize + 'px' ,width: fontSize + 'px'}"></span> v-bind:style="{ backgroundColor: activeColor, height: EditData.props.fontSize + 'px' ,width: EditData.props.fontSize + 'px'}"></span>
<div class="column is-2" v-bind:style="{ fontColor: activeColor}" v-if="EditData.edit.isShowStateVlaue">{{stateKey}}</div>
</div> </div>
...@@ -71,8 +70,9 @@ export default class State extends Widget { ...@@ -71,8 +70,9 @@ export default class State extends Widget {
isShowPath: boolean = false; isShowPath: boolean = false;
isShowParams: boolean = false; isShowParams: boolean = false;
EditPathPoke : string = ""; EditPathPoke : string = "";
fontSize:number = 40; fontSize:number = 60;
activeColor:string = '#bbb'; activeColor:string = '#bbb';
stateKey:string = '';
config: WidgetConfig = { config: WidgetConfig = {
WidgetComponentName: "State", WidgetComponentName: "State",
...@@ -84,18 +84,18 @@ export default class State extends Widget { ...@@ -84,18 +84,18 @@ export default class State extends Widget {
}; };
EditData = { EditData = {
props:{ edit:{
type:'state', type:'state',
url:this.config.data.url, url:this.config.data.url,
index:this.refIndex, index:this.refIndex,
isShowStateVlaue:false,
},
props:{
fontSize:this.fontSize, fontSize:this.fontSize,
StateFile:{ title:'',
"0":"yellow", titleSize:'',
"1":"orange", StateFile:'{"Idle":"yellow","prepare":"orange","run":"green","error":"red" }' ,
"2":"green", StateIndicator:'{"0":"Idle","1":"prepare","2":"run","255":"error"}',
"255":"red"
},
StateIndicatorFile:null,
}, },
params:{ params:{
PokedPath:this.EditPathPoke, PokedPath:this.EditPathPoke,
...@@ -145,10 +145,6 @@ export default class State extends Widget { ...@@ -145,10 +145,6 @@ export default class State extends Widget {
menu.style.left = e.offsetX +"px"; menu.style.left = e.offsetX +"px";
menu.style.top = e.offsetY +"px"; menu.style.top = e.offsetY +"px";
menu.style.position = 'absolute'; menu.style.position = 'absolute';
//menu.style.top = '${e.clientY}px';
//menu.style.left = '${e.clientX}px';
console.log(menu.style.top);
console.log(menu);
}; };
...@@ -176,14 +172,13 @@ export default class State extends Widget { ...@@ -176,14 +172,13 @@ export default class State extends Widget {
del() del()
{ {
this.$emit('del', this.index); this.$emit('del', this.index);
console.log("del"+this.index);
} }
updateUI() { updateUI() {
this.isShowPath = false; this.isShowPath = false;
this.EditData.params.PokedPath = this.config.data.url; this.EditData.params.PokedPath = this.config.data.url;
this.EditData.props.url = this.config.data.url; this.EditData.edit.url = this.config.data.url;
this.openWindows(); this.openWindows();
} }
...@@ -191,35 +186,39 @@ export default class State extends Widget { ...@@ -191,35 +186,39 @@ export default class State extends Widget {
this.isShowPath = !this.isShowPath; this.isShowPath = !this.isShowPath;
} }
getConfig(): WidgetConfig { getConfig(): [WidgetConfig,object] {
// this.config.data.userInputData =(this.$refs.WidgetParams as WidgetParams).getVariableValues(); return [this.config,this.EditData];
this.config.data.userInputData = this.strMapObjChange.strMapToObj(
(this.$refs.WidgetParams as WidgetParams).getVariableValues()
);
return this.config;
} }
setConfig(widgetConfig: WidgetConfig): void { setConfig(setConfigData: [WidgetConfig,object],fragment:string): void {
this.config = widgetConfig; this.config = setConfigData[0];
//this.updateUI(); this.EditData = setConfigData[1];
(this.$refs.WidgetParams as WidgetParams).setVariableList(
this.pathProcessor.extractVarFromPath(this.config.data.url) if(this.EditData.edit.url.search("startpath") != -1 ){this.replaceStartPath(fragment)}
);
//map不能序列化,必须要单独处理,这里的处理方法仅限map<string,string>类型
var temp = this.config.data.userInputData; var temp = this.EditData.params.tempUserInputData;
temp = JSON.parse(JSON.stringify(temp)); temp = JSON.parse(JSON.stringify(temp));
temp = this.strMapObjChange.objToStrMap(temp); temp = this.strMapObjChange.objToStrMap(temp);
this.userInputData = temp; //this.EditData.params.tempUserInputData = temp;
(this.$refs.WidgetParams as WidgetParams).setVariableInput(
this.userInputData
); var Args: UpdatePayload = {
action: this.EditData.params.action,
variables: temp,
target: ["self"]
};
this.EditData.params.Args = Args;
this.viewLoad(Args);
} }
pathPoke(url:string) { pathPoke() {
this.config.data.url = url; this.config.data.url = this.EditData.edit.url;
this.EditPathPoke = url; this.EditPathPoke = this.EditData.edit.url;
console.log("dddd"); var pokepath = this.EditData.edit.url;
var pokepath = url;
//todo:config文件 //todo:config文件
axios.defaults.timeout = 1000; axios.defaults.timeout = 1000;
axios.get(pokepath, { axios.get(pokepath, {
...@@ -228,13 +227,14 @@ export default class State extends Widget { ...@@ -228,13 +227,14 @@ export default class State extends Widget {
'Cache-Control': 'no-cache' 'Cache-Control': 'no-cache'
} }
}).then(response => { }).then(response => {
console.log("update");
this.samplePoke(response.data); this.samplePoke(response.data);
this.updateUI(); this.updateUI();
//test
//this.colourViewLoad();
}).catch(err => { }).catch(err => {
console.log('catch'); this.colourViewLoad();
this.EditData.params.PokedPath = this.config.data.url; this.EditData.params.PokedPath = this.config.data.url;
this.openWindows(); //this.openWindows();
}); });
//var url = this.config.data.url; //var url = this.config.data.url;
...@@ -269,7 +269,8 @@ export default class State extends Widget { ...@@ -269,7 +269,8 @@ export default class State extends Widget {
replaceStartPath(startPath: string): void { replaceStartPath(startPath: string): void {
this.config.data.url.replace("$startPath$", startPath); this.config.data.url = this.config.data.url.replace("$startpath$", startPath);
this.EditData.edit.url = this.EditData.edit.url.replace("$startpath$", startPath);
} }
parentUpdate(payload: UpdatePayload): void { parentUpdate(payload: UpdatePayload): void {
...@@ -300,7 +301,7 @@ export default class State extends Widget { ...@@ -300,7 +301,7 @@ export default class State extends Widget {
} }
refresh() { refresh() {
this.viewLoad(this.EditData.params.Args); this.viewLoad(this.EditData.params.Args);
} }
async getData(url: string) { async getData(url: string) {
...@@ -312,27 +313,22 @@ export default class State extends Widget { ...@@ -312,27 +313,22 @@ export default class State extends Widget {
} }
}).then(response => { }).then(response => {
this.StatusValue = response.data.CFET2CORE_SAMPLE_VAL; this.StatusValue = response.data.CFET2CORE_SAMPLE_VAL;
switch (this.StatusValue.toString()) { //this.colourViewLoad();
case "0": {
this.activeColor = this.EditData.props.StateFile['0'];
break;
}
case "1": {
this.activeColor = this.EditData.props.StateFile['1'];
break;
}
case "2": {
this.activeColor = this.EditData.props.StateFile['2'];
break;
}
case "255": {
this.activeColor = this.EditData.props.StateFile['255'];
break;
}
}
}); });
} }
colourViewLoad(){
var stateFile = JSON.parse(this.EditData.props.StateFile);
var stateIndicator = JSON.parse(this.EditData.props.StateIndicator);
this.stateKey = stateIndicator[this.StatusValue];
this.activeColor = stateFile[this.stateKey];
if(this.activeColor == undefined){
this.activeColor = '#bbb';
}
}
//called when widgetParams action clicked //called when widgetParams action clicked
async viewLoad(Args: UpdatePayload) { async viewLoad(Args: UpdatePayload) {
// this.config.data.userInputData = Args.variables; // this.config.data.userInputData = Args.variables;
...@@ -343,6 +339,7 @@ export default class State extends Widget { ...@@ -343,6 +339,7 @@ export default class State extends Widget {
this.config.data.url this.config.data.url
); );
await this.getData(this.pathwithVar); await this.getData(this.pathwithVar);
this.colourViewLoad();
} }
} }
</script> </script>
......
This diff is collapsed.
...@@ -5,7 +5,7 @@ export class WidgetRef { ...@@ -5,7 +5,7 @@ export class WidgetRef {
// the parameters of a resource should be probed by the widget itself // the parameters of a resource should be probed by the widget itself
public widgetComponentName: string = ''; public widgetComponentName: string = '';
public ref: string = ''; public ref: string = '';
public widgetConfig?: WidgetConfig; public widgetConfig?: [WidgetConfig,object];
//below is for grid layout //below is for grid layout
public x:number=0; public x:number=0;
public y:number=0; public y:number=0;
......
...@@ -11,7 +11,7 @@ export interface PokePath { ...@@ -11,7 +11,7 @@ export interface PokePath {
export abstract class Widget extends Vue { export abstract class Widget extends Vue {
public WidgetComponentName?: string; public WidgetComponentName?: string;
public abstract setConfig(wid: WidgetConfig): void; public abstract setConfig(wid: WidgetConfig,fragment:string): void;
public abstract getConfig(): WidgetConfig; public abstract getConfig(): WidgetConfig;
public abstract parentUpdate(payload: UpdatePayload): void; public abstract parentUpdate(payload: UpdatePayload): void;
public abstract refresh(): void; public abstract refresh(): void;
......
{ {
"compilerOptions": { "compilerOptions": {
//"declaration": true, //// xjl add
//"resolveJsonModule": true,
//"declarationDir": "src/types",
"target": "esnext", "target": "esnext",
//"target": "es5", //"target": "es5",
"module": "esnext", "module": "esnext",
//"module": "commonjs", //"module": "commonjs",
...@@ -14,9 +19,10 @@ ...@@ -14,9 +19,10 @@
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"sourceMap": true, "sourceMap": true,
"baseUrl": ".", "baseUrl": ".",
"noEmit": true,
"typeRoots": ["./src/types"], "typeRoots": ["./src/types"],
"types": [ "types": [
"webpack-env" "webpack-env",
], ],
"paths": { "paths": {
"@/*": [ "@/*": [
...@@ -30,12 +36,18 @@ ...@@ -30,12 +36,18 @@
"scripthost" "scripthost"
] ]
}, },
"include": [ "include": [
"src/**/*.ts", "src/**/*.ts",
"src/**/*.tsx", "src/**/*.tsx",
"src/**/*.vue", "src/**/*.vue",
"tests/**/*.ts", "tests/**/*.ts",
"tests/**/*.tsx", "node_modules/vue-grid-layout/dist/vue-grid-item.d.ts" "tests/**/*.tsx",
"node_modules/vue-grid-layout/dist/vue-grid-item.d.ts",
"/node_modules/@antv/g2plot/lib/index.d.ts",
"src/types/g2plot/g2plot.d.ts",
"src/types/g2plot/global.d.ts"
], ],
"exclude": [ "exclude": [
"node_modules" "node_modules"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* Basic Options */ /* Basic Options */
// "incremental": true, /* Enable incremental compilation */ // "incremental": true, /* Enable incremental compilation */
//"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ //"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
// "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ //"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */ // "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */ // "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */ // "checkJs": true, /* Report errors in .js files. */
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
// "outDir": "./js", /* Redirect output structure to the directory. */ // "outDir": "./js", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */ // "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ //"tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
// "removeComments": true, /* Do not emit comments to output. */ //"removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */ // "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
......
...@@ -16,7 +16,7 @@ module.exports = { ...@@ -16,7 +16,7 @@ module.exports = {
devServer: { devServer: {
proxy: { proxy: {
"/": { "/": {
target: "http://192.168.0.195:8001", target: "http://192.168.0.197:8001",
secure: false, secure: false,
changeOrigin: true changeOrigin: true
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment