12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <span class="btn" @click="btnClick" :class="topClass"> 在线咨询 </span>
- </template>
- <script>
- export default {
- name: "onlineInformation",
- props: {
- myType: {
- type: String,
- default: '1'
- }
- },
- methods: {
- btnClick() {
- this.$router.push({name: 'courseware'});
- }
- },
- computed: {
- topClass() {
- const obj = {
- 1: 'level_1',
- 2: 'level_2',
- 3: 'level_3',
- 4: 'level_4',
- }
- return [obj[this.myType]];
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .btn {
- &.level_1 {
- width: 154px;
- height: 47px;
- color: #00b96b;
- border-radius: 24px;
- padding: 10px 30px;
- background: #fff;
- border: 1px solid #00b96b;
- cursor: pointer;
- }
- &.level_2 {
- width: 154px;
- height: 47px;
- color: #fff;
- border-radius: 24px;
- padding: 10px 30px;
- background: #00B96B;
- border: 1px solid #00b96b;
- cursor: pointer;
- }
- }
- </style>
|