Skip to content

Commit 8c0d4a4

Browse files
committed
添加Alert组件
1 parent adaf823 commit 8c0d4a4

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed

public/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"/app.js": "/app.js?id=ebcf5ad45ebf6b98ef46",
2+
"/app.js": "/app.js?id=6776ce9fa532756a6ddc",
33
"/manifest.js": "/manifest.js?id=3c768977c2574a34506e",
44
"/vendor.js": "/vendor.js?id=38a9d2f43b98aaf4f7dd"
55
}

resources/js/components.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,7 @@ import Steps from './components/widgets/Steps'
114114
Vue.component('Steps', Steps)
115115

116116
import Html from './components/widgets/Html'
117-
Vue.component('Html', Html)
117+
Vue.component('Html', Html)
118+
119+
import Alert from './components/widgets/Alert'
120+
Vue.component('Alert', Alert)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<template>
2+
<el-alert
3+
:style="attrs.style"
4+
:class="attrs.className"
5+
:title="attrs.title"
6+
:type="attrs.type"
7+
:description="attrs.description"
8+
:closable="attrs.closable"
9+
:center="attrs.center"
10+
:close-text="attrs.closeText"
11+
:show-icon="attrs.showIcon"
12+
:effect="attrs.effect"
13+
/>
14+
</template>
15+
<script>
16+
export default {
17+
props: {
18+
attrs: Object
19+
}
20+
};
21+
</script>

src/Components/Alert.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
class Alert extends Component
88
{
9-
protected $componentValue = "Alert";
9+
protected $componentName = "Alert";
1010

1111
protected $title = "";
1212
protected $type = "info";
1313
protected $description = "";
1414
protected $closable = true;
15-
protected $center = true;
15+
protected $center = false;
1616
protected $closeText = "";
1717
protected $showIcon = false;
1818
protected $effect = "light";

0 commit comments

Comments
 (0)