fix plugin form
This commit is contained in:
parent
d95808edef
commit
1bf48e7c57
@ -118,6 +118,9 @@ class AutoSignIn(_PluginBase):
|
|||||||
"""
|
"""
|
||||||
拼装插件配置页面,需要返回两块数据:1、页面配置;2、数据结构
|
拼装插件配置页面,需要返回两块数据:1、页面配置;2、数据结构
|
||||||
"""
|
"""
|
||||||
|
# 站点的可选项
|
||||||
|
site_options = [{"title": site.get("name"), "value": site.get("id")}
|
||||||
|
for site in self.sites.get_indexers()]
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
'component': 'VForm',
|
'component': 'VForm',
|
||||||
@ -127,6 +130,10 @@ class AutoSignIn(_PluginBase):
|
|||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
|
'props': {
|
||||||
|
'cols': 12,
|
||||||
|
'md': 6
|
||||||
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSwitch',
|
'component': 'VSwitch',
|
||||||
@ -134,7 +141,16 @@ class AutoSignIn(_PluginBase):
|
|||||||
'model': 'enabled',
|
'model': 'enabled',
|
||||||
'label': '启用插件',
|
'label': '启用插件',
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'component': 'VCol',
|
||||||
|
'props': {
|
||||||
|
'cols': 12,
|
||||||
|
'md': 6
|
||||||
|
},
|
||||||
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSwitch',
|
'component': 'VSwitch',
|
||||||
'props': {
|
'props': {
|
||||||
@ -151,31 +167,47 @@ class AutoSignIn(_PluginBase):
|
|||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
|
'props': {
|
||||||
|
'cols': 12,
|
||||||
|
'md': 6
|
||||||
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VTextField',
|
'component': 'VTextField',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
|
||||||
'md': 6,
|
|
||||||
'model': 'cron',
|
'model': 'cron',
|
||||||
'label': '执行周期',
|
'label': '执行周期',
|
||||||
'placeholder': '0 9,18 * * *'
|
'placeholder': '0 9,18 * * *'
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'component': 'VCol',
|
||||||
|
'props': {
|
||||||
|
'cols': 12,
|
||||||
|
'md': 6
|
||||||
|
},
|
||||||
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VTextField',
|
'component': 'VTextField',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
|
||||||
'md': 6,
|
|
||||||
'model': 'queue_cnt',
|
'model': 'queue_cnt',
|
||||||
'label': '队列数量'
|
'label': '队列数量'
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'component': 'VCol',
|
||||||
|
'props': {
|
||||||
|
'cols': 12,
|
||||||
|
'md': 6
|
||||||
|
},
|
||||||
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VTextField',
|
'component': 'VTextField',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
|
||||||
'md': 6,
|
|
||||||
'model': 'retry_keyword',
|
'model': 'retry_keyword',
|
||||||
'label': '重试关键字'
|
'label': '重试关键字'
|
||||||
}
|
}
|
||||||
@ -197,7 +229,7 @@ class AutoSignIn(_PluginBase):
|
|||||||
'multiple': True,
|
'multiple': True,
|
||||||
'model': 'sign_sites',
|
'model': 'sign_sites',
|
||||||
'label': '签到站点',
|
'label': '签到站点',
|
||||||
'items': []
|
'items': site_options
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -215,9 +247,9 @@ class AutoSignIn(_PluginBase):
|
|||||||
'props': {
|
'props': {
|
||||||
'chips': True,
|
'chips': True,
|
||||||
'multiple': True,
|
'multiple': True,
|
||||||
'model': 'sign_sites',
|
'model': 'special_sites',
|
||||||
'label': '签到站点',
|
'label': '特殊站点',
|
||||||
'items': []
|
'items': site_options
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -122,6 +122,9 @@ class SiteStatistic(_PluginBase):
|
|||||||
"""
|
"""
|
||||||
拼装插件配置页面,需要返回两块数据:1、页面配置;2、数据结构
|
拼装插件配置页面,需要返回两块数据:1、页面配置;2、数据结构
|
||||||
"""
|
"""
|
||||||
|
# 站点的可选项
|
||||||
|
site_options = [{"title": site.get("name"), "value": site.get("id")}
|
||||||
|
for site in self.sites.get_indexers()]
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
'component': 'VForm',
|
'component': 'VForm',
|
||||||
@ -131,6 +134,10 @@ class SiteStatistic(_PluginBase):
|
|||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
|
'props': {
|
||||||
|
'cols': 12,
|
||||||
|
'md': 6
|
||||||
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSwitch',
|
'component': 'VSwitch',
|
||||||
@ -138,7 +145,16 @@ class SiteStatistic(_PluginBase):
|
|||||||
'model': 'enabled',
|
'model': 'enabled',
|
||||||
'label': '启用插件',
|
'label': '启用插件',
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'component': 'VCol',
|
||||||
|
'props': {
|
||||||
|
'cols': 12,
|
||||||
|
'md': 6
|
||||||
|
},
|
||||||
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSwitch',
|
'component': 'VSwitch',
|
||||||
'props': {
|
'props': {
|
||||||
@ -155,22 +171,31 @@ class SiteStatistic(_PluginBase):
|
|||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
|
'props': {
|
||||||
|
'cols': 12,
|
||||||
|
'md': 6
|
||||||
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VTextField',
|
'component': 'VTextField',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
|
||||||
'md': 6,
|
|
||||||
'model': 'cron',
|
'model': 'cron',
|
||||||
'label': '执行周期',
|
'label': '执行周期',
|
||||||
'placeholder': '0 9,18 * * *'
|
'placeholder': '0 9,18 * * *'
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'component': 'VCol',
|
||||||
|
'props': {
|
||||||
|
'cols': 12,
|
||||||
|
'md': 6
|
||||||
|
},
|
||||||
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VTextField',
|
'component': 'VTextField',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
|
||||||
'md': 6,
|
|
||||||
'model': 'queue_cnt',
|
'model': 'queue_cnt',
|
||||||
'label': '队列数量'
|
'label': '队列数量'
|
||||||
}
|
}
|
||||||
@ -192,7 +217,7 @@ class SiteStatistic(_PluginBase):
|
|||||||
'multiple': True,
|
'multiple': True,
|
||||||
'model': 'statistic_sites',
|
'model': 'statistic_sites',
|
||||||
'label': '统计站点',
|
'label': '统计站点',
|
||||||
'items': []
|
'items': site_options
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user