From 9618be8f276f0501e509201c03ffdb4f94956dcf Mon Sep 17 00:00:00 2001 From: WuFeiyang <1029384756wfy@sina.com> Date: Sat, 28 Sep 2019 21:16:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B9=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ ...50\256\276\350\256\241\346\226\207\346\241\243.md" | 3 +++ src/App.vue | 11 +++-------- src/components/Config/Config.vue | 8 ++------ src/components/Method/Method.vue | 4 +--- src/components/State/State.vue | 4 +--- src/components/Status/Status.vue | 4 +--- src/components/Thing/Thing.vue | 4 +--- src/components/WaveView/WaveView.vue | 8 ++------ 9 files changed, 19 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 6083444..0aee752 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,8 @@ npm run lint ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/). + +### dist生æˆè·¯å¾„ +``` +在vue.config.jsä¸å°†outputDir更改为本地路径 +``` diff --git "a/WidgetUI\350\256\276\350\256\241\346\226\207\346\241\243/WidgetUI\350\256\276\350\256\241\346\226\207\346\241\243.md" "b/WidgetUI\350\256\276\350\256\241\346\226\207\346\241\243/WidgetUI\350\256\276\350\256\241\346\226\207\346\241\243.md" index 59ebcc9..6be4764 100644 --- "a/WidgetUI\350\256\276\350\256\241\346\226\207\346\241\243/WidgetUI\350\256\276\350\256\241\346\226\207\346\241\243.md" +++ "b/WidgetUI\350\256\276\350\256\241\346\226\207\346\241\243/WidgetUI\350\256\276\350\256\241\346\226\207\346\241\243.md" @@ -24,6 +24,9 @@ setConfigï¼šæ ¹æ®Parentæä¾›çš„æ•°æ®å¡«å……自己的路径和输入框ä¸çš„ 5. æ ¹æ®ç»™å®šè·¯å¾„自动填充返回完整路径 > è·¯å¾„çš„æ¥æºæœ‰ä¸¤ç§ã€‚一个是Parentå‘widgetæä¾›sampleï¼Œæ ¹æ®sampleä¸çš„傿•°ä¿¡æ¯å°†å˜é‡è¡¥å……在URLåŽã€‚äºŒæ˜¯æ ¹æ®ç”¨æˆ·åœ¨è¾“入框ä¸è¾“入的URL去å‘åŽå°è¯·æ±‚sample,从而对URL进行填充。 +### Widget Type +1. + ## Parent Parent是对所有widget进行管ç†çš„部分,是所有widget的父组件。 主è¦åŠŸèƒ½åˆ†ä¸ºä¸¤éƒ¨åˆ†ï¼Œä¸€æ˜¯å¯¹Widget的管ç†ï¼ŒäºŒæ˜¯æ”¯æŒæ ¹æ®å½“å‰URL生æˆå¯¹åº”widget或者customview。 diff --git a/src/App.vue b/src/App.vue index 76aff8f..1baa232 100644 --- a/src/App.vue +++ b/src/App.vue @@ -127,10 +127,8 @@ export default class App extends Vue { } dataAccess(URL: string) { - var dataURL = "a"; - dataURL = URL; axios - .get(dataURL, { + .get(URL, { headers: { Pragma: "no-cache", "Cache-Control": "no-cache" @@ -156,11 +154,8 @@ export default class App extends Vue { } async mounted() { - // var f1 = window.location.hash; - var f = window.location.hash; - var fragment = "a"; - fragment = f; - if (fragment != "#/" && fragment != "#") { + var fragment = window.location.hash; + if (fragment != "#blank" && fragment != "#Blank") { fragment = fragment.substring(1, fragment.length); var customViewURL = "/customView/template" + fragment; var isCustomview: boolean = false; diff --git a/src/components/Config/Config.vue b/src/components/Config/Config.vue index 2493be8..4425855 100644 --- a/src/components/Config/Config.vue +++ b/src/components/Config/Config.vue @@ -265,9 +265,7 @@ export default class Config extends Widget { } getPathPoke() { - var f = this.config.data.get.url; - var pokepath = "a"; - pokepath = f; + var pokepath = this.config.data.get.url; axios.get(pokepath).then(response => { this.isGetPoke = true; this.samplePoke(response.data); @@ -276,9 +274,7 @@ export default class Config extends Widget { } setPathPoke() { - var f = this.config.data.set.url; - var pokepath = "a"; - pokepath = f; + var pokepath = this.config.data.set.url; axios.get(pokepath).then(response => { this.isSetPoke = true; this.samplePoke(response.data); diff --git a/src/components/Method/Method.vue b/src/components/Method/Method.vue index 34c678c..c35675a 100644 --- a/src/components/Method/Method.vue +++ b/src/components/Method/Method.vue @@ -168,9 +168,7 @@ export default class Method extends Widget { } pathPoke() { - var f = this.config.data.url; - var pokepath = "a"; - pokepath = f; + var pokepath = this.config.data.url; axios.get(pokepath, { headers: { 'Pragma': 'no-cache', diff --git a/src/components/State/State.vue b/src/components/State/State.vue index 365b360..740f6f7 100644 --- a/src/components/State/State.vue +++ b/src/components/State/State.vue @@ -178,9 +178,7 @@ export default class State extends Widget { } pathPoke() { - var f = this.config.data.url; - var pokepath = "a"; - pokepath = f; + var pokepath = this.config.data.url; axios.get(pokepath, { headers: { 'Pragma': 'no-cache', diff --git a/src/components/Status/Status.vue b/src/components/Status/Status.vue index c3b8846..fc4538b 100644 --- a/src/components/Status/Status.vue +++ b/src/components/Status/Status.vue @@ -177,9 +177,7 @@ export default class Status extends Widget { } pathPoke() { - var f = this.config.data.url; - var pokepath = "a"; - pokepath = f; + var pokepath = this.config.data.url; axios.get(pokepath, { headers: { 'Pragma': 'no-cache', diff --git a/src/components/Thing/Thing.vue b/src/components/Thing/Thing.vue index 704a7ee..21b8412 100644 --- a/src/components/Thing/Thing.vue +++ b/src/components/Thing/Thing.vue @@ -158,9 +158,7 @@ export default class Thing extends Widget { } pathPoke() { - var f = this.config.data.url; - var pokepath = "a"; - pokepath = f; + var pokepath = this.config.data.url; axios.get(pokepath).then(response => { this.samplePoke(response.data); this.updateUI(); diff --git a/src/components/WaveView/WaveView.vue b/src/components/WaveView/WaveView.vue index e73e193..19505e1 100644 --- a/src/components/WaveView/WaveView.vue +++ b/src/components/WaveView/WaveView.vue @@ -156,9 +156,7 @@ export default class waveView extends Widget { async pathPoke() { (this.$refs.setBasicParams as setBasicParams).updateConfig(); - var f = this.config.data.url.path; - var pokepath = "a"; - pokepath = f; + var pokepath = this.config.data.url.path; console.log(this.config.data.url.path); await axios.get(this.config.data.url.path).then(response => { this.samplePoke(response.data); @@ -170,9 +168,7 @@ export default class waveView extends Widget { async pathPokeTime() { (this.$refs.setBasicParams as setBasicParams).updateConfig(); - var f = this.config.data.url.timePath; - var pokepath = "a"; - pokepath = f; + var pokepath = this.config.data.url.timePath; console.log(this.config.data.url.timePath); await axios.get(this.config.data.url.timePath).then(response => { this.samplePokeTime(response.data); -- GitLab