123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <template>
- <span class="zxzx-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">
- .zxzx-btn {
- width: 154px;
- height: 48px;
- line-height: 48px;
- border-radius: 24px;
- border: 1px solid #00b96b;
- cursor: pointer;
- display: inline-block;
- text-align: center;
- &.level_1 {
- color: #00b96b;
- background: #fff;
- }
- &.level_2 {
- color: #fff;
- background: #00B96B;
- }
- @media (max-width: 768px) {
- width: 44%;height:35px;line-height:35px;max-width: 120px;margin: 0 3%;font-size: 14px;
- }
- }
- </style>
|