123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <template>
- <view>
- <van-button
- square
- :id="id"
- size="large"
- :lang="lang"
- :loading="loading"
- :disabled="disabled"
- :open-type="openType"
- :business-id="businessId"
- custom-class="van-goods-action-icon"
- :session-from="sessionFrom"
- :app-parameter="appParameter"
- :send-message-img="sendMessageImg"
- :send-message-path="sendMessagePath"
- :show-message-card="showMessageCard"
- :send-message-title="sendMessageTitle"
- @click="onClick($event, { tagId: id })"
- @error="bindError($event, { tagId: id })"
- @contact="bindContact($event, { tagId: id })"
- @opensetting="bindOpenSetting($event, { tagId: id })"
- @getuserinfo="bindGetUserInfo($event, { tagId: id })"
- @getphonenumber="bindGetPhoneNumber($event, { tagId: id })"
- @launchapp="bindLaunchApp($event, { tagId: id })"
- >
- <view class="van-goods-action-icon__content">
- <van-icon v-if="icon" size="20px" :name="icon" :dot="dot" :info="info" class="van-goods-action-icon__icon" custom-class="icon-class" />
- <slot name="icon" />
- <text class="text-class">{{ text }}</text>
- </view>
- </van-button>
- </view>
- </template>
- <script>
- import { VantComponent } from '../common/component';
- import { link } from '../mixins/link';
- import { button } from '../mixins/button';
- import { openType } from '../mixins/open-type';
- export default {
- data() {
- return {
- id: '',
- lang: '',
- openType: '',
- businessId: '',
- sessionFrom: '',
- appParameter: '',
- sendMessageImg: '',
- sendMessagePath: '',
- showMessageCard: '',
- sendMessageTitle: ''
- };
- },
- classes: ['icon-class', 'text-class'],
- mixins: [link, button, openType],
- props: {
- text: String,
- dot: Boolean,
- info: String,
- icon: String,
- disabled: Boolean,
- loading: Boolean
- },
- methods: {
- onClick(event, _dataset) {
- /* ---处理dataset begin--- */
- this.handleDataset(event, _dataset);
- /* ---处理dataset end--- */
- this.$emit('click', event.detail);
- this.jumpLink();
- },
- bindError(e, _dataset) {
- /* ---处理dataset begin--- */
- this.handleDataset(e, _dataset);
- /* ---处理dataset end--- */
- console.log('占位:函数 bindError 未声明');
- },
- bindContact(e, _dataset) {
- /* ---处理dataset begin--- */
- this.handleDataset(e, _dataset);
- /* ---处理dataset end--- */
- console.log('占位:函数 bindContact 未声明');
- },
- bindOpenSetting(e, _dataset) {
- /* ---处理dataset begin--- */
- this.handleDataset(e, _dataset);
- /* ---处理dataset end--- */
- console.log('占位:函数 bindOpenSetting 未声明');
- },
- bindGetUserInfo(e, _dataset) {
- /* ---处理dataset begin--- */
- this.handleDataset(e, _dataset);
- /* ---处理dataset end--- */
- console.log('占位:函数 bindGetUserInfo 未声明');
- },
- bindGetPhoneNumber(e, _dataset) {
- /* ---处理dataset begin--- */
- this.handleDataset(e, _dataset);
- /* ---处理dataset end--- */
- console.log('占位:函数 bindGetPhoneNumber 未声明');
- },
- bindLaunchApp(e, _dataset) {
- /* ---处理dataset begin--- */
- this.handleDataset(e, _dataset);
- /* ---处理dataset end--- */
- console.log('占位:函数 bindLaunchApp 未声明');
- }
- }
- };
- </script>
- <style>
- @import './index.css';
- </style>
|