Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
WidgetUI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WuFeiyang
WidgetUI
Commits
9618be8f
Commit
9618be8f
authored
Sep 28, 2019
by
WuFeiyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改根目录显示
parent
17d6e4b5
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
32 deletions
+19
-32
README.md
README.md
+5
-0
WidgetUI设计文档/WidgetUI设计文档.md
WidgetUI设计文档/WidgetUI设计文档.md
+3
-0
src/App.vue
src/App.vue
+3
-8
src/components/Config/Config.vue
src/components/Config/Config.vue
+2
-6
src/components/Method/Method.vue
src/components/Method/Method.vue
+1
-3
src/components/State/State.vue
src/components/State/State.vue
+1
-3
src/components/Status/Status.vue
src/components/Status/Status.vue
+1
-3
src/components/Thing/Thing.vue
src/components/Thing/Thing.vue
+1
-3
src/components/WaveView/WaveView.vue
src/components/WaveView/WaveView.vue
+2
-6
No files found.
README.md
View file @
9618be8f
...
...
@@ -27,3 +27,8 @@ npm run lint
### Customize configuration
See
[
Configuration Reference
](
https://cli.vuejs.org/config/
)
.
### dist生成路径
```
在vue.config.js中将outputDir更改为本地路径
```
WidgetUI设计文档/WidgetUI设计文档.md
View file @
9618be8f
...
...
@@ -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。
...
...
src/App.vue
View file @
9618be8f
...
...
@@ -127,10 +127,8 @@ export default class App extends Vue {
}
dataAccess
(
URL
:
string
)
{
var
dataURL
=
"
a
"
;
dataURL
=
URL
;
axios
.
get
(
data
URL
,
{
.
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
;
...
...
src/components/Config/Config.vue
View file @
9618be8f
...
...
@@ -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
);
...
...
src/components/Method/Method.vue
View file @
9618be8f
...
...
@@ -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
'
,
...
...
src/components/State/State.vue
View file @
9618be8f
...
...
@@ -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
'
,
...
...
src/components/Status/Status.vue
View file @
9618be8f
...
...
@@ -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
'
,
...
...
src/components/Thing/Thing.vue
View file @
9618be8f
...
...
@@ -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
();
...
...
src/components/WaveView/WaveView.vue
View file @
9618be8f
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment