代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html>
<head>
${@view('./admin/head.html')}
</head>
<body class="${@hook_action('theme', 'admin')}">
<div id="app">
<div class="mm_row">
<div class="mm_col">
<div class="mm_card">
<div class="card_head">
<h5>管理组</h5>
</div>
<div class="card_body">
<div class="bar_action">
<h5><span>操作</span></h5>
<div class="btns">
<a target="_parent" class="mm_btn btn_primary-x" @click="add_show">添加</a>
</div>
</div>
<div class="mm_table table-2">
<div class="table_body">
<table>
<thead class="table-sm">
<tr>
<th class="th_name">
<control_reverse title="名称" v-model="query.orderby" field="name"
:func="search">
</control_reverse>
</th>
<th class="th_description">
<span>介绍</span>
</th>
<th class="th_handle">
<span>操作</span>
</th>
</tr>
</thead>
<tbody>
<tr v-for="(o,i) in list" :key="i">
<td class="td_name">
<input class="input_hover" type="text" v-model="o.name"
@blur="set_item(o)">
</td>
<td class="td_description">
<input class="input_hover" type="text" v-model="o.description"
@blur="set_item(o)">
</td>
<td class="td_handle">
<button class="btn_error" @click="del(o)">删除</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<mm_modal v-model="show" mask="true">
<div class="mm_card">
<div class="card_head">
<h5>{{ form.group_id ? '修改' : '添加' }}组</h5>
</div>
<div class="card_body pa">
<div class="mm_form">
<dl>
<dt>名称</dt>
<dd>
<control_input v-model="form.name" :minlength="0" :maxlength="32" placeholder="" />
</dd>
<dt>介绍</dt>
<dd>
<control_textarea v-model="form.description" :minlength="0" :maxlength="255"
placeholder="" />
</dd>
</dl>
</div>
</div>
<div class="card_foot">
<div class="mm_group">
<button class="btn_default" @click="show = false">取消</button>
<button class="btn_primary" type="button" @click="submit()">提交</button>
</div>
</div>
</div>
</mm_modal>
</div>
${@view('./admin/foot.html')}
<script src="/js/vue/mm_vue.js"></script>
<script src="/js/vue/mm_vue_ui.js"></script>
<script src="/src/mixins/page.js"></script>
<script>
Vue.use(mm_vue);
Vue.use(mm_vue_ui);
var app = new Vue({
el: "#app",
mixins: [mixin_page],
data() {
return {
field: "admin_id",
url_set: "~/apis/user/admin?method=set&",
url_add: "~/apis/user/admin?method=add&",
url_get_list: "~/apis/user/admin?",
show_filter: true,
query: {
orderby: "",
//页码
page: 1,
//页面大小
size: 10000,
}
}
},
methods: {
add_show() {
if (this.form.admin_id) {
this.form = {
admin_id: 0,
name: "",
description: ""
};
}
this.show = true;
},
set_item(o) {
this.set(o, {
admin_id: o.admin_id
});
}
}
});
</script>
<style>
</style>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。