1 Star 0 Fork 0

伯亚/ElementUi组件扩展

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
search.html 3.81 KB
一键复制 编辑 原始数据 按行查看 历史
伯亚 提交于 2024-08-24 21:39 . 尝试处理封装表单
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Element UI 扩展</title>
<link href="./wwwroot/elementui/index.min.css" rel="stylesheet" />
<style scoped>
</style>
</head>
<body>
<div id="main" v-cloak>
<el-main>
<el-extend-search :load-data="handleLoadData" :add="handleAdd" :filter-json="filterJson"
:show-search="true"
:show-add="true"
:show-refresh="true"
></el-extend-search>
</el-main>
</div>
<script type="text/javascript" src="./wwwroot/vue/vue.js?v=2.0"></script>
<script type="text/javascript" src="./wwwroot/vue/vue-i18n.min.js?v=2.0"></script>
<script type="text/javascript" src="./wwwroot/elementui/index.min.js"></script>
<script type="text/javascript" src="./wwwroot/vue/axios.min.min.js"></script>
<script>
var $taskVue = new Vue({
el: "#main",
data() {
return {
filterJson: [
{
"type": "input",
"label": "大大姓名",
"prop": "name",
"default": ""
},
{
"type": "select",
"label": "性别",
"prop": "gender",
"default": null,
"options": [
{ "label": "", "value": "male" },
{ "label": "", "value": "female" }
]
},
{
"type": "switch",
"label": "是否同意",
"prop": "isAgree",
"default": false
},
{
"type": "datetimepicker",
"label": "预约时间",
"prop": "appointmentTime",
"default": null,
"placeholder": "请选择预约时间",
"format": "yyyy-MM-dd HH:mm:ss",
"valueFormat": "yyyy-MM-dd HH:mm:ss",
"dateTimePickerType": "datetime"
},
{
"type": "radio",
"label": "爱好",
"prop": "hobby",
"default": undefined,
"options": [
{ "label": "足球", "value": "soccer" },
{ "label": "篮球", "value": "basketball" }
]
},
{
"type": "checkbox",
"label": "技能",
"prop": "skills",
"default": [],
"options": [
{ "label": "编程", "value": "coding" },
{ "label": "设计", "value": "design" },
{ "label": "测试", "value": "test" },
{ "label": "部署", "value": "uat" },
]
}
],
}
},
created() {
},
methods: {
handleAdd() { },
handleLoadData(data) {
console.log(data)
}
},
filters: {
}
});
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/starry123/element-ui-component-extension.git
git@gitee.com:starry123/element-ui-component-extension.git
starry123
element-ui-component-extension
ElementUi组件扩展
master

搜索帮助