0.0.8 • Published 8 months ago

@moment-design/choose-mini-link v0.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

选择小程序链接组件

使用组件

安装依赖

npm install @moment-design/choose-mini-link --save

使用组件

<template>
  <!-- 按钮 -->
  <m-space>
    <m-button type="primary" @click="open">选择小程序链接</m-button>
  </m-space>
  <!-- 组件 -->
  <ChooseMiniLink
    ref="refChooseMiniLink"
    :config="config"
    @choose="(v) => (data = v)"
  ></ChooseMiniLink>
  <!-- 数据 -->
  <div style="margin-top: 16px">
    已选数据:
    {{ data }}
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import ChooseMiniLink from '@moment-design/choose-mini-link';
import "@moment-design/choose-mini-link/dist/css/index.css";
import {
  getActivityMarketingList,
  getCouponList,
  getDecorationList,
  getFunctionList,
  getGoodsDetail,
  getGoodsCategoryTree,
  getGoodsGroup,
  getMarketingList,
} from './api';

const refChooseMiniLink = ref();
const config = {
  title: '选择小程序链接',
  apis: {
    syy: {
      getActivityMarketingList,
      getCouponList,
      getDecorationList,
      getFunctionList,
      getGoodsDetail,
      getGoodsCategoryTree,
      getGoodsGroup,
      getMarketingList,
    },
    xsy: {
      getCouponList,
      getDecorationList,
      getFunctionList,
      getGoodsDetail,
      getGoodsCategoryTree,
    },
  },
  tabs: [1, 2, 3],
};
const data = ref();
const open = () => {
  refChooseMiniLink.value.open(data.value);
};
</script>

API

Props

参数名描述类型默认值
title弹出选择框的标题string选择小程序链接
apis列表请求接口ApiConfig-
tabstabs 显示数据(商业云: 1,销售云:2,其他:3)Array1,2,3
syyTabs商业云 Tabs(功能页面: 1,商品分组: 2,商品详情: 3,装修页面: 4,优惠券: 5,活动营销: 6,营销专区: 7)Array1, 2, 3, 4, 5, 6, 7
xsyTabs销售云 Tabs(功能页面: 1,商品分组: 3,装修页面: 4,优惠券: 5)Array1, 3, 4, 5

ApiConfig

参数名描述类型默认值
syy商业云列表请求接口SyyApiConfig-
xsy销售云列表请求接口XyyApiConfig-

SyyApiConfig

参数名描述类型默认值
getActivityMarketingList商业云功能页面请求接口Function-
getCouponList商业云商品分组请求接口Function-
getDecorationList商业云商品详情请求接口Function-
getFunctionList商业云商品分类请求接口Function-
getGoodsDetail商业云装修页面请求接口Function-
getGoodsCategoryTree商业云优惠券请求接口Function-
getGoodsGroup商业云活动营销请求接口Function-
getMarketingList商业云营销专区请求接口Function-

XyyApiConfig

参数名描述类型默认值
getCouponList销售云商品分组请求接口Function-
getDecorationList销售云商品详情请求接口Function-
getFunctionList销售云商品分类请求接口Function-
getGoodsDetail销售云装修页面请求接口Function-
getGoodsCategoryTree销售云优惠券请求接口Function-

Events

事件名描述参数
choose选中的数据(v: any[], item: any)

Expose

事件名描述参数
open主动触发打开弹窗-
0.0.8

8 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago