12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <div class="hello">
- <h1>{{ msg }}</h1>
- <p>
- <a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-clidocumentation</a>.
- </p>
- <h3>Installed CLI Plugins</h3>
- <ul>
- <li>
- <Button @click="test">00000</Button>
- </li>
- <Tabs value="name1">
- <TabPane label="标签一" name="name1">标签一的内容</TabPane>
- <TabPane label="标签二" name="name2">标签二的内容</TabPane>
- <TabPane label="标签三" name="name3">标签三的内容</TabPane>
- </Tabs>
- </ul>
- </div>
- </template>
- <script>
- export default {
- name: 'HelloWorld',
- props: {
- msg: String
- },
- data() {
- return {
- }
- },
- methods: {
- test() {
- this.$api.getTest({}).then(res => {
- alert(res);
- })
- }
- }
- }
- </script>
- <!-- Add "scoped" attribute to limit CSS to this component only -->
- <style scoped lang="less">
- h3 {
- margin: 40px 0 0;
- }
- ul {
- list-style-type: none;
- padding: 0;
- }
- li {
- display: inline-block;
- margin: 0 10px;
- }
- a {
- color: #42b983;
- }
- </style>
|