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

Commit 609dff7

Browse files
version: bump to next; demo: add number of examples and index; setup: add fix utf8 for reading file
1 parent 62ff89c commit 609dff7

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
<div id="app" class='box'>
1018
<div class="box-body">
1119
<tabs v-model:value="tab_current" type="card" :animated="false">
@@ -29,10 +37,10 @@
2937
<i-col span="8"><i-input value="/apijson/get" readonly/></i-col>
3038
</Row>
3139
<Row v-if="tab_current==='tab_get'">
32-
<i-col span="3"><div align="center"><strong>apijson get</strong> request examples</div></i-col>
40+
<i-col span="3"><div align="center"><strong>apijson get</strong> request <spanclass="notice">{request_get.length}</span>examples</div></i-col>
3341
<i-col span="8">
3442
<i-select v-model="select_current">
35-
<i-option v-for="item in request_get" :value="item.value" :key="item.value">{item.label}</i-option>
43+
<i-option v-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-col span="8"><i-input value="/apijson/head" readonly/></i-col>
4351
</Row>
4452
<Row v-if="tab_current==='tab_head'">
45-
<i-col span="3"><div align="center"><strong>apijson head</strong> request examples</div></i-col>
53+
<i-col span="3"><div align="center"><strong>apijson head</strong> request <spanclass="notice">{request_head.length}</span>examples</div></i-col>
4654
<i-col span="8">
4755
<i-select v-model="select_current">
48-
<i-option v-for="item in request_head" :value="item.value" :key="item.value">{item.label}</i-option>
56+
<i-option v-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-col span="8"><i-input value="/apijson/post" readonly/></i-col>
5664
</Row>
5765
<Row v-if="tab_current==='tab_post'">
58-
<i-col span="3"><div align="center"><strong>apijson post</strong> request examples</div></i-col>
66+
<i-col span="3"><div align="center"><strong>apijson post</strong> request <spanclass="notice">{request_post.length}</span>examples</div></i-col>
5967
<i-col span="8">
6068
<i-select v-model="select_current">
61-
<i-option v-for="item in request_post" :value="item.value" :key="item.value">{item.label}</i-option>
69+
<i-option v-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-col span="8"><i-input value="/apijson/put" readonly/></i-col>
6977
</Row>
7078
<Row v-if="tab_current==='tab_put'">
71-
<i-col span="3"><div align="center"><strong>apijson put</strong> request examples</div></i-col>
79+
<i-col span="3"><div align="center"><strong>apijson put</strong> request <spanclass="notice">{request_put.length}</span>examples</div></i-col>
7280
<i-col span="8">
7381
<i-select v-model="select_current">
74-
<i-option v-for="item in request_put" :value="item.value" :key="item.value">{item.label}</i-option>
82+
<i-option v-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-col span="8"><i-input value="/apijson/delete" readonly/></i-col>
8290
</Row>
8391
<Row v-if="tab_current==='tab_delete'">
84-
<i-col span="3"><div align="center"><strong>apijson delete</strong> request examples</div></i-col>
92+
<i-col span="3"><div align="center"><strong>apijson delete</strong> request <spanclass="notice">{request_delete.length}</span>examples</div></i-col>
8593
<i-col span="8">
8694
<i-select v-model="select_current">
87-
<i-option v-for="item in request_delete" :value="item.value" :key="item.value">{item.label}</i-option>
95+
<i-option v-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
def read(fname, default=''):
1414
filename = fpath(fname)
1515
if os.path.exists(filename):
16-
return open(fpath(fname)).read()
16+
return open(fpath(fname),encoding="utf8").read()
1717
else:
1818
return default
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)

AltStyle によって変換されたページ (->オリジナル) /