add a svgicon table
This commit is contained in:
parent
809ef77898
commit
34450ca2f7
13
json/svgicon.json
Normal file
13
json/svgicon.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"tblname":"svgicon",
|
||||||
|
"params":{
|
||||||
|
"title":"图标",
|
||||||
|
"description":"系统中使用的图标",
|
||||||
|
"sortby":"id",
|
||||||
|
"browserfields":{
|
||||||
|
"exclouded":[],
|
||||||
|
"alters":{}
|
||||||
|
},
|
||||||
|
"editexclouded":[]
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
models/svgicon.xlsx
Normal file
BIN
models/svgicon.xlsx
Normal file
Binary file not shown.
8
wwwroot/get_icons.dspy
Normal file
8
wwwroot/get_icons.dspy
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
db = DBPools()
|
||||||
|
dbname = get_serverenv('get_module_dbname')('appbase')
|
||||||
|
async with db.sqlorContext(dbname) as sor:
|
||||||
|
recs = await sor.R('svgicon', {})
|
||||||
|
for r in recs:
|
||||||
|
r.icon = f'<svg>{r.icon}</svg>'
|
||||||
|
return recs
|
||||||
|
return []
|
||||||
7
wwwroot/show_icon.dspy
Normal file
7
wwwroot/show_icon.dspy
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
db = DBPools()
|
||||||
|
dbname = get_severenv('get_module_dbname')('appbase')
|
||||||
|
async with db.sqlorContext(dbname) as sor:
|
||||||
|
recs = await sor.R('svgicon', {'id':params_kw.id})
|
||||||
|
if len(recs) > 0:
|
||||||
|
return recs[0].icon
|
||||||
|
return None
|
||||||
Loading…
x
Reference in New Issue
Block a user