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

Sync#47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
TommyLemon merged 3 commits intoAPIJSON:masterfromzhangchunlin:master
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletionsLICENSE
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2020, Chunlin Zhang
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 1 addition & 1 deletiondemo/apps/tables/templates/Tables/list.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
<card>
<div style="min-height: 600px;">
{{if role!="ADMIN":}}
<div class="alert alert-warning" role="alert">You should <a class="btn btn-primary btn-sm" href="{{=url_for('uliweb_apps.login.views.login')}}" role="button">login</a> with user <strong>admin</strong> to view all the tables</div>
<div class="alert alert-warning" role="alert">You should <a class="btn btn-primary btn-sm" href="{{=url_for('uliweb_comapps.auth.login.views.login')}}" role="button">login</a> with user <strong>admin</strong> to view all the tables</div>
{{pass #if}}
<div id="app" class='box'>
<div class="box-body">
Expand Down
12 changes: 9 additions & 3 deletionsuliweb_apijson/apijson/templates/vue/inc_apijson_table.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,15 +8,16 @@
"custom_tcolumns_render_generator",
"hook_init", //hook_init(vm), will invoke in mounted()
"hook_ajax_params", //hook_ajax_params(method,action,params), will invoke before ajax action
"hook_add" //hook_add(vm), customize the add action
"hook_add", //hook_add(vm), customize the add action
"hook_viewedit" //hook_viewedit(vm), customize the add action
],
template: `<div>
<div v-if="config_editable && config_add_fields!=null"><i-button type="primary" @click="add">Add</i-button> <br><br> </div>
<Spin size="large" fix v-if="loading"></Spin>
<i-table stripe border :columns="tcolumns" :data="tlist" @on-sort-change="table_on_sort_change"></i-table>
<page :total="total" :page-size="query_count" :current.sync="current_page" :page-size-opts="[10, 20, 50, 100]" show-sizer @on-change="page_on_change" @on-page-size-change="page_on_page_size_change"></page>
<modal v-model="modal_add" title="Add">
<i-form @submit.native.prevent :label-width="80">
<i-form @submit.native.prevent :label-width="100">
<form-item v-for="item in add_items" :key="item.key" :label="item.title">
<i-input v-if="item.component=='input'" v-model="item.value"></i-input>
<checkbox v-if="item.component=='checkbox'" v-model="item.value"></checkbox>
Expand All@@ -31,7 +32,7 @@
</div>
</modal>
<modal v-model="modal_view" :title="viewedit_label">
<i-form @submit.native.prevent :label-width="80">
<i-form @submit.native.prevent :label-width="100">
<form-item v-for="item in viewedit_items" :key="item.key" :label="item.title">
<i-input v-if="item.component=='input'" v-model="item.value" :readonly="!editable(item)"></i-input>
<checkbox v-if="item.component=='checkbox'" v-model="item.value" :disabled="!editable(item)"></checkbox>
Expand DownExpand Up@@ -246,6 +247,11 @@
})
},
show: function(params){
if (this.hook_viewedit!=null) {
this.hook_viewedit(this)
return
}

var row = params.row
this.viewedit_items = []
if (this.config_viewedit_fields!=null) {
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
<i-input v-if="item.component=='input'" v-model="item.value" :readonly="!editable(item)"></i-input>
<checkbox v-if="item.component=='checkbox'" v-model="item.value" :disabled="!editable(item)"></checkbox>
<i-input v-if="item.component=='textarea'" v-model="item.value" type="textarea" :autosize="{minRows: 2,maxRows: 5}"></i-input>
{{blockcustom_viewedit_componet}}{{endcustom_viewedit_componet}}
{{blockcustom_viewedit_component}}{{endcustom_viewedit_component}}
</form-item>
<form-item v-if="config_editable" label="Action">
<i-button type="info" icon="ios-download" size="large" @click="save">Save</i-button>
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp