Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit609dff7

Browse files
committed
version: bump to next; demo: add number of examples and index; setup: add fix utf8 for reading file
1 parent62ff89c commit609dff7

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

‎demo/apps/apijson_demo/templates/index.html

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
{{use "ui.vue"}}
77
{{use "ui.iview"}}
88

9+
<style>
10+
.notice
11+
{
12+
color:red;
13+
font-size:150%;
14+
}
15+
</style>
16+
917
<divid="app"class='box'>
1018
<divclass="box-body">
1119
<tabsv-model:value="tab_current"type="card":animated="false">
@@ -29,10 +37,10 @@
2937
<i-colspan="8"><i-inputvalue="/apijson/get"readonly/></i-col>
3038
</Row>
3139
<Rowv-if="tab_current==='tab_get'">
32-
<i-colspan="3"><divalign="center"><strong>apijson get</strong> request examples</div></i-col>
40+
<i-colspan="3"><divalign="center"><strong>apijson get</strong> request<spanclass="notice">{request_get.length}</span>examples</div></i-col>
3341
<i-colspan="8">
3442
<i-selectv-model="select_current">
35-
<i-optionv-for="item in request_get":value="item.value":key="item.value">{item.label}</i-option>
43+
<i-optionv-for="(item,index) in request_get":value="item.value":key="item.value">{index+1}. {item.label}</i-option>
3644
</i-select>
3745
</i-col>
3846
</Row>
@@ -42,10 +50,10 @@
4250
<i-colspan="8"><i-inputvalue="/apijson/head"readonly/></i-col>
4351
</Row>
4452
<Rowv-if="tab_current==='tab_head'">
45-
<i-colspan="3"><divalign="center"><strong>apijson head</strong> request examples</div></i-col>
53+
<i-colspan="3"><divalign="center"><strong>apijson head</strong> request<spanclass="notice">{request_head.length}</span>examples</div></i-col>
4654
<i-colspan="8">
4755
<i-selectv-model="select_current">
48-
<i-optionv-for="item in request_head":value="item.value":key="item.value">{item.label}</i-option>
56+
<i-optionv-for="(item,index) in request_head":value="item.value":key="item.value">{index+1}. {item.label}</i-option>
4957
</i-select>
5058
</i-col>
5159
</Row>
@@ -55,10 +63,10 @@
5563
<i-colspan="8"><i-inputvalue="/apijson/post"readonly/></i-col>
5664
</Row>
5765
<Rowv-if="tab_current==='tab_post'">
58-
<i-colspan="3"><divalign="center"><strong>apijson post</strong> request examples</div></i-col>
66+
<i-colspan="3"><divalign="center"><strong>apijson post</strong> request<spanclass="notice">{request_post.length}</span>examples</div></i-col>
5967
<i-colspan="8">
6068
<i-selectv-model="select_current">
61-
<i-optionv-for="item in request_post":value="item.value":key="item.value">{item.label}</i-option>
69+
<i-optionv-for="(item,index) in request_post":value="item.value":key="item.value">{index+1}. {item.label}</i-option>
6270
</i-select>
6371
</i-col>
6472
</Row>
@@ -68,10 +76,10 @@
6876
<i-colspan="8"><i-inputvalue="/apijson/put"readonly/></i-col>
6977
</Row>
7078
<Rowv-if="tab_current==='tab_put'">
71-
<i-colspan="3"><divalign="center"><strong>apijson put</strong> request examples</div></i-col>
79+
<i-colspan="3"><divalign="center"><strong>apijson put</strong> request<spanclass="notice">{request_put.length}</span>examples</div></i-col>
7280
<i-colspan="8">
7381
<i-selectv-model="select_current">
74-
<i-optionv-for="item in request_put":value="item.value":key="item.value">{item.label}</i-option>
82+
<i-optionv-for="(item,index) in request_put":value="item.value":key="item.value">{index+1}. {item.label}</i-option>
7583
</i-select>
7684
</i-col>
7785
</Row>
@@ -81,10 +89,10 @@
8189
<i-colspan="8"><i-inputvalue="/apijson/delete"readonly/></i-col>
8290
</Row>
8391
<Rowv-if="tab_current==='tab_delete'">
84-
<i-colspan="3"><divalign="center"><strong>apijson delete</strong> request examples</div></i-col>
92+
<i-colspan="3"><divalign="center"><strong>apijson delete</strong> request<spanclass="notice">{request_delete.length}</span>examples</div></i-col>
8593
<i-colspan="8">
8694
<i-selectv-model="select_current">
87-
<i-optionv-for="item in request_delete":value="item.value":key="item.value">{item.label}</i-option>
95+
<i-optionv-for="(item,index) in request_delete":value="item.value":key="item.value">{index+1}. {item.label}</i-option>
8896
</i-select>
8997
</i-col>
9098
</Row>

‎setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def fpath(name):
1313
defread(fname,default=''):
1414
filename=fpath(fname)
1515
ifos.path.exists(filename):
16-
returnopen(fpath(fname)).read()
16+
returnopen(fpath(fname),encoding="utf8").read()
1717
else:
1818
returndefault
1919

‎uliweb_apijson/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__='0.1.3'
1+
__version__='0.1.4'
22
__url__='https://github.com/zhangchunlin/uliweb-apijson'
33
__author__='Chunlin Zhang'
44
__email__='zhangchunlin@gmail.com'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp