2 Star 1 Fork 0

Admin/超级美眉-用户-模板

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
admin.html 3.47 KB
一键复制 编辑 原始数据 按行查看 历史
573242395 提交于 2024-07-23 16:57 . 更新
<!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>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/qiuwenwu91/mm_tpl_user.git
git@gitee.com:qiuwenwu91/mm_tpl_user.git
qiuwenwu91
mm_tpl_user
超级美眉-用户-模板
master

搜索帮助