当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 142

上帝 / heyui
暂停

forked from heyui / heyui
暂停
 
加入 Gitee
与超过 600 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.html 1.84 KB
一键复制 编辑 Web IDE 原始数据 按行查看 历史
vvpvvp 提交于 2020-10-24 13:35 . doc: fix ie bugs for website
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>HeyUI</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/heyui/themes/index.css">
</head>
<body>
<div id="app" v-padding="20">
<div v-height="50">
<SwitchList :datas="labels" v-model="labelPosition" :small="true"></SwitchList>
</div>
<h-form ref="form" :label-position="labelPosition" :label-width="90" :rules="validationRules" :model="model">
<h-formitem label="用户名" prop="name">
<input type="text" v-model="model.name" />
</h-formitem>
<h-formitem label="密码" prop="password">
<input type="password" v-model="model.password" />
</h-formitem>
<h-formitem>
<h-button color="primary" :loading="isLoading" @click="submit">提交</h-button>&nbsp;&nbsp;&nbsp;
<h-button @click="reset">取消</h-button>
</h-formitem>
</h-form>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="./dist/heyui.js"></script>
<script>
var app = new Vue({
el: '#app',
data: {
isLoading: false,
labelPosition: "left",
labels: {
left: 'Label左对齐',
right: 'Label右对齐',
},
model: {
name: "",
password: ""
},
validationRules: {
required: [
'name',
'password'
]
}
},
methods: {
submit() {
this.isLoading = true;
let validResult = this.$refs.form.valid();
if (validResult.result) {
this.$Message("验证成功");
setTimeout(() => {
this.isLoading = false;
}, 1000);
} else {
this.isLoading = false;
}
},
reset() {
this.$refs.form.reset();
}
}
})
</script>
</html>

评论 ( 0 )

你可以在登录后,发表评论

JavaScript
1
https://gitee.com/TTDZ/heyui.git
git@gitee.com:TTDZ/heyui.git
TTDZ
heyui
heyui
master

搜索帮助

161121 f78d6d6f 1850385 154831 86f8c370 1850385