Commit a4b78d64 by chenwq

create

1 parent 415f39ef
Showing 415 changed files with 4043 additions and 0 deletions
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 12);
/******/ })
/************************************************************************/
/******/ ({
/***/ 12:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Component({
/**
* 组件的属性列表
*/
properties: {
pickerShow: {
type: Boolean,
value: false
}
},
/**
* 组件的初始数据
*/
data: {
date: '2016-09-01'
},
/**
* 组件的方法列表
*/
methods: {
initDate: function initDate() {
var now = new Date();
var dateArray = [];
for (var i = 1; i < 16; i++) {
dateArray.push(new Date(new Date().setDate(now.getDate() + i)).format('yyyy-MM-dd'));
}
var hour = 9;
var hourList = [];
for (var _i = 0; _i < 8; _i++) {
var _hour = _i + hour < 10 ? '0' + (_i + hour) : _i + hour;
hourList.push(_hour);
}
this.setData({
dateArray: dateArray,
timeArray: [hourList, ['00', '30']]
});
}
},
lifetimes: {
attached: function attached() {
this.initDate();
}
}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/DatePicker/index.js"],"names":["Component","properties","pickerShow","type","Boolean","value","data","date","methods","initDate","now","Date","dateArray","i","push","setDate","getDate","format","hour","hourList","_hour","setData","timeArray","lifetimes","attached"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACR;;;AAGAC,cAAY;AACVC,gBAAY;AACVC,YAAMC,OADI;AAEVC,aAAO;AAFG;AADF,GAJJ;;AAWR;;;AAGAC,QAAM;AACJC,UAAM;AADF,GAdE;;AAkBR;;;AAGAC,WAAS;AACPC,YADO,sBACI;AACT,UAAMC,MAAM,IAAIC,IAAJ,EAAZ;AACA,UAAMC,YAAY,EAAlB;AACA,WAAK,IAAIC,IAAI,CAAb,EAAgBA,IAAI,EAApB,EAAwBA,GAAxB,EAA6B;AAC3BD,kBAAUE,IAAV,CAAe,IAAIH,IAAJ,CAAS,IAAIA,IAAJ,GAAWI,OAAX,CAAmBL,IAAIM,OAAJ,KAAgBH,CAAnC,CAAT,EAAgDI,MAAhD,CAAuD,YAAvD,CAAf;AACD;AACD,UAAMC,OAAO,CAAb;AACA,UAAMC,WAAW,EAAjB;AACA,WAAK,IAAIN,KAAI,CAAb,EAAgBA,KAAI,CAApB,EAAuBA,IAAvB,EAA4B;AAC1B,YAAMO,QAAQP,KAAIK,IAAJ,GAAW,EAAX,UAAoBL,KAAIK,IAAxB,IAAiCL,KAAIK,IAAnD;AACAC,iBAASL,IAAT,CAAcM,KAAd;AACD;AACD,WAAKC,OAAL,CAAa;AACXT,4BADW;AAEXU,mBAAW,CAACH,QAAD,EAAW,CAAC,IAAD,EAAO,IAAP,CAAX;AAFA,OAAb;AAID;AAjBM,GArBD;AAwCRI,aAAW;AACTC,YADS,sBACE;AACT,WAAKf,QAAL;AACD;AAHQ;AAxCH,CAAV,E","file":"DatePicker\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 12);\n","Component({\n /**\n * 组件的属性列表\n */\n properties: {\n pickerShow: {\n type: Boolean,\n value: false,\n },\n },\n\n /**\n * 组件的初始数据\n */\n data: {\n date: '2016-09-01',\n },\n\n /**\n * 组件的方法列表\n */\n methods: {\n initDate() {\n const now = new Date()\n const dateArray = []\n for (let i = 1; i < 16; i++) {\n dateArray.push(new Date(new Date().setDate(now.getDate() + i)).format('yyyy-MM-dd'))\n }\n const hour = 9\n const hourList = []\n for (let i = 0; i < 8; i++) {\n const _hour = i + hour < 10 ? `0${i + hour}` : i + hour\n hourList.push(_hour)\n }\n this.setData({\n dateArray,\n timeArray: [hourList, ['00', '30']]\n })\n },\n },\n lifetimes: {\n attached() {\n this.initDate()\n }\n }\n});\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<!-- <view wx:if="{{pickerShow}}" class="dialog_mask {{pickerShow?'dialog_show':''}}">
<view class="dialog_mask" bindtap="bindCancelDate"></view>
<view class="dialog_container">
<view class="header flex_scb">
<view class="cancle" bindtap="bindCancelDate">取消</view>
<view class="title">日期选择</view>
<view class="comfirm" bindtap="bindConfirmDate">确定</view>
</view>
<view class="main">
<picker mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange">
<view class="picker">
当前选择: {{date}}
</view>
</picker>
</view>
</view>
</view> -->
<picker wx:if="{{pickerShow}}" mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange">
<view class="picker">
当前选择: {{date}}
</view>
</picker>
\ No newline at end of file
.dialog_mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
background: rgba(0, 0, 0, 0.5);
}
.dialog_container {
position: absolute;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 70%;
background: white;
border-radius: 40rpx 40rpx 0 0;
box-shadow: 0px -2rpx 4rpx 0px rgba(0, 0, 0, 0.06);
z-index: 9999;
}
.header {
height: 112rpx;
box-sizing: border-box;
padding: 0 32rpx;
}
.header .cancle {
font-size: 28rpx;
font-weight: 500;
color: #969799;
}
.header .title {
font-size: 32rpx;
font-weight: 500;
color: #323233;
}
.header .comfirm {
font-size: 28rpx;
font-weight: 500;
color: #FC5B32;
}
.main {
height: calc(100% - 112rpx);
box-sizing: border-box;
padding: 0 32rpx;
}
.flex_scb {
display: flex;
align-items: center;
justify-content: space-between;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 15);
/******/ })
/************************************************************************/
/******/ ({
/***/ 15:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Component({
externalClasses: ['icon-class-customer', 'dot-class-customer', 'info-class-customer'],
data: {},
properties: {
iconName: String,
fontSize: Number,
color: String,
info: null,
dot: Boolean
},
methods: {}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/GLIcon/index.js"],"names":["Component","externalClasses","data","properties","iconName","String","fontSize","Number","color","info","dot","Boolean","methods"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,mBAAiB,CAAC,qBAAD,EAAwB,oBAAxB,EAA8C,qBAA9C,CADT;AAERC,QAAM,EAFE;AAGRC,cAAY;AACVC,cAAUC,MADA;AAEVC,cAAUC,MAFA;AAGVC,WAAOH,MAHG;AAIVI,UAAM,IAJI;AAKVC,SAAKC;AALK,GAHJ;AAURC,WAAS;AAVD,CAAV,E","file":"GLIcon\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 15);\n","Component({\n externalClasses: ['icon-class-customer', 'dot-class-customer', 'info-class-customer'],\n data: {},\n properties: {\n iconName: String,\n fontSize: Number,\n color: String,\n info: null,\n dot: Boolean,\n },\n methods: {}\n})\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true,
"usingComponents": {
"info": "../Info/index"
}
}
\ No newline at end of file
<view class="{{iconName}} gl-iconfont icon-box icon-class-customer" style="font-size: {{fontSize+'rpx'}};color: {{color}};width: {{fontSize+'rpx'}}">
<block wx:if="{{info!==null || dot}}">
<info dot="{{dot}}" info="{{info}}" dot-class-customer="dot-class-customer" info-class-customer="info-class-customer"></info>
</block>
</view>
\ No newline at end of file
@import './iconfont.wxss';
.icon-box {
position: relative;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 21);
/******/ })
/************************************************************************/
/******/ ({
/***/ 21:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Component({
externalClasses: ['plat-num-item-customer'],
data: {},
properties: {
platObj: Object,
platNumberList: Array
},
methods: {
chooseLicensePlate: function chooseLicensePlate() {
this.triggerEvent('chooseLicensePlate');
}
}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/GLPlate/index.js"],"names":["Component","externalClasses","data","properties","platObj","Object","platNumberList","Array","methods","chooseLicensePlate","triggerEvent"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,mBAAiB,CAAC,wBAAD,CADT;AAERC,QAAM,EAFE;AAGRC,cAAY;AACVC,aAASC,MADC;AAEVC,oBAAgBC;AAFN,GAHJ;AAORC,WAAS;AACPC,sBADO,gCACc;AACnB,WAAKC,YAAL,CAAkB,oBAAlB;AACD;AAHM;AAPD,CAAV,E","file":"GLPlate\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 21);\n","Component({\n externalClasses: ['plat-num-item-customer'],\n data: {},\n properties: {\n platObj: Object,\n platNumberList: Array\n },\n methods: {\n chooseLicensePlate() {\n this.triggerEvent('chooseLicensePlate')\n }\n }\n})\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="value {{!platObj.platNumber?'placeholder-style':''}}" bindtap="chooseLicensePlate">
<!-- <block wx:if="{{platObj.platNumber}}">{{platObj.platPrefix || ''}}{{platObj.platNumber}}</block>
<block wx:else>请选择</block> -->
<view class="plat-num-box">
<view class="plat-num-item plat-num-item-customer">{{!platObj.platNumber ? '京' : platObj.platPrefix}}</view>
<view class="plat-num-item plat-num-item-customer">{{!platObj.platNumber ? '' : platNumberList[0]}}</view>
<view class="plat-num-item plat-num-item-customer">{{!platObj.platNumber ? '' : platNumberList[1]}}</view>
<view class="plat-num-item plat-num-item-customer">{{!platObj.platNumber ? '' : platNumberList[2]}}</view>
<view class="plat-num-item plat-num-item-customer">{{!platObj.platNumber ? '' : platNumberList[3]}}</view>
<view class="plat-num-item plat-num-item-customer">{{!platObj.platNumber ? '' : platNumberList[4]}}</view>
<view class="plat-num-item plat-num-item-customer">{{!platObj.platNumber ? '' : platNumberList[5]}}</view>
<view class="plat-num-item plat-num-item-customer {{platNumberList.length <= 6 ? 'plat-num-placeholder' : ''}}">
{{platNumberList.length <= 6 ? '新能源' : platNumberList[6]}}
</view>
</view>
</view>
\ No newline at end of file
.plat-num-box {
display: flex;
justify-content: space-between;
}
.plat-num-item {
box-sizing: border-box;
flex-shrink: 0;
text-align: center;
width: 60rpx;
height: 80rpx;
padding: 20rpx 16rpx;
background: rgba(50, 127, 250, 0.1);
border-radius: 8rpx;
border: 2rpx solid rgba(50, 127, 250, 0.15);
margin-right: 20rpx;
}
.plat-num-item:last-child {
background: #f3ffe7;
border: 2rpx solid #e0f8c9;
margin-right: 0;
}
.plat-num-placeholder {
font-size: 18rpx;
line-height: 40rpx;
padding: 20rpx 0;
color: #b1b1b3;
}
.placeholder-style {
color: #b1b1b3;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 20);
/******/ })
/************************************************************************/
/******/ ({
/***/ 20:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Component({
data: {},
properties: {
popupShow: Boolean,
height: {
type: String,
value: '70%'
}
},
options: {
multipleSlots: true // 复数插槽: 是
},
methods: {
// 关闭弹窗
close: function close() {
this.triggerEvent('closePopup');
}
}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/GLPopup/index.js"],"names":["Component","data","properties","popupShow","Boolean","height","type","String","value","options","multipleSlots","methods","close","triggerEvent"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,QAAM,EADE;AAERC,cAAY;AACVC,eAAWC,OADD;AAEVC,YAAQ;AACNC,YAAMC,MADA;AAENC,aAAO;AAFD;AAFE,GAFJ;AASRC,WAAS;AACPC,mBAAe,IADR,CACa;AADb,GATD;AAYRC,WAAS;AACP;AACAC,SAFO,mBAEC;AACN,WAAKC,YAAL,CAAkB,YAAlB;AACD;AAJM;AAZD,CAAV,E","file":"GLPopup\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 20);\n","Component({\n data: {},\n properties: {\n popupShow: Boolean,\n height: {\n type: String,\n value: '70%',\n }\n },\n options: {\n multipleSlots: true // 复数插槽: 是\n },\n methods: {\n // 关闭弹窗\n close() {\n this.triggerEvent('closePopup')\n }\n }\n})\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view wx:if="{{popupShow}}" class="dialog_mask {{popupShow?'dialog_show':''}}">
<view class="dialog_mask" bindtap="close"></view>
<view class="dialog_container" style="height:{{ height }}">
<view class="header flex_scb">
<slot name="left-widget"></slot>
<slot name="title"></slot>
<slot name="right-widget"></slot>
</view>
<view class="main">
<slot name="body"></slot>
</view>
</view>
</view>
\ No newline at end of file
.dialog_mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
background: rgba(0, 0, 0, 0.5);
}
.dialog_container {
position: absolute;
left: 0;
right: 0;
bottom: 0;
width: 100%;
background: white;
border-radius: 40rpx 40rpx 0 0;
box-shadow: 0px -2rpx 4rpx 0px rgba(0, 0, 0, 0.06);
z-index: 9999;
}
.header {
height: 112rpx;
box-sizing: border-box;
padding: 0 32rpx;
}
.header .cancle {
font-size: 28rpx;
font-weight: 500;
color: #969799;
}
.header .title {
font-size: 32rpx;
font-weight: 500;
color: #323233;
}
.header .comfirm {
font-size: 28rpx;
font-weight: 500;
color: #FC5B32;
}
.main {
height: calc(100% - 112rpx);
box-sizing: border-box;
padding: 0 32rpx;
}
.flex_scb {
display: flex;
align-items: center;
justify-content: space-between;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 22);
/******/ })
/************************************************************************/
/******/ ({
/***/ 22:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Component({
data: {
deactiveStyle: {},
activeStyle: {},
tabActive: 0
},
properties: {
tabObj: {
type: Object,
value: {},
observer: function observer(n) {
this.setData({
deactiveStyle: n.mainStyle.deactiveClass,
activeStyle: n.mainStyle.activeClass
});
}
}
},
methods: {
changeTab: function changeTab(e) {
console.log(e);
this.setData({
tabActive: e.currentTarget.dataset.index
});
}
}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/GLTab/index.js"],"names":["Component","data","deactiveStyle","activeStyle","tabActive","properties","tabObj","type","Object","value","observer","n","setData","mainStyle","deactiveClass","activeClass","methods","changeTab","e","console","log","currentTarget","dataset","index"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,QAAM;AACJC,mBAAe,EADX;AAEJC,iBAAa,EAFT;AAGJC,eAAW;AAHP,GADE;AAMRC,cAAY;AACVC,YAAQ;AACNC,YAAMC,MADA;AAENC,aAAO,EAFD;AAGNC,gBAAU,kBAAUC,CAAV,EAAa;AACrB,aAAKC,OAAL,CAAa;AACXV,yBAAeS,EAAEE,SAAF,CAAYC,aADhB;AAEXX,uBAAaQ,EAAEE,SAAF,CAAYE;AAFd,SAAb;AAID;AARK;AADE,GANJ;AAkBRC,WAAS;AACPC,aADO,qBACGC,CADH,EACM;AACXC,cAAQC,GAAR,CAAYF,CAAZ;AACA,WAAKN,OAAL,CAAa;AACXR,mBAAWc,EAAEG,aAAF,CAAgBC,OAAhB,CAAwBC;AADxB,OAAb;AAGD;AANM;AAlBD,CAAV,E","file":"GLTab\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 22);\n","Component({\n data: {\n deactiveStyle: {},\n activeStyle: {},\n tabActive: 0\n },\n properties: {\n tabObj: {\n type: Object,\n value: {},\n observer: function (n) {\n this.setData({\n deactiveStyle: n.mainStyle.deactiveClass,\n activeStyle: n.mainStyle.activeClass\n })\n },\n }\n },\n methods: {\n changeTab(e) {\n console.log(e);\n this.setData({\n tabActive: e.currentTarget.dataset.index\n })\n }\n }\n})\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="tab-box" style="justify-content: {{tabObj.mainStyle.flexClass}}">
<block wx:for="{{tabObj.tabList}}" wx:key="index">
<view style="font-size: {{index == tabActive? activeStyle.fontSize+'rpx':deactiveStyle.fontSize+'rpx'}};color: {{index == tabActive? activeStyle.color:deactiveStyle.color}}; font-weight: {{index == tabActive? activeStyle.fontWeight:deactiveStyle.fontWeight}}" bind:tap="changeTab" data-index="{{index}}">
{{item.name}}{{index}}
</view>
</block>
</view>
\ No newline at end of file
{
"component": true,
"usingComponents": {
"GlsxFormItem": "../GlsxFormItem/index"
}
}
\ No newline at end of file
<view class="container">
<form>
<view class="apply-info">
<block wx:for="{{formDataList}}" wx:key="index">
<block wx:if="{{!item.isHidden}}">
<GlsxFormItem
switch-item-class="switch-item-class"
switch-active-class="switch-active-class"
switch-class="switch-class"
lable-class="lable-class"
inline="{{inline}}"
textPostion="{{textPostion}}"
formItem="{{item}}"
formObj="{{formDataObj}}"
bind:getFormItemValue="getFormItemValue"
bind:customClick="customClick"
themeStyle="{{themeStyle}}"
>
<slot name="{{item.name}}"></slot>
<slot name="{{item.lableStyle}}"></slot>
</GlsxFormItem>
</block>
</block>
</view>
</form>
</view>
.info-item {
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
}
.info-item:last-child {
border-bottom: none;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 16);
/******/ })
/************************************************************************/
/******/ ({
/***/ 16:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/*
* @Description:
* @Author: huyue
* @Date: 2023-04-28 16:19:53
* @LastEditors: huyue
* @LastEditTime: 2023-05-05 10:00:50
*/
Component({
externalClasses: ['switch-active-class', 'switch-class', 'switch-item-class', 'lable-class'],
data: {
// 显示省市
provinceShow: false,
// 显示日期时间
dateTimeShow: false,
// 图片地址前缀
prefix: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/glsx-applet-comonents/'
},
properties: {
/**
* formItem:表单某一项的配置数据
* 其中的参数:
* type:标签类型 必填
* lable:标签页面显示名称 必填
* name:标签名称 必填
* rules: 验证规则,Object, 非必填
* textLeft: 输入框文字的位置,非必填,默认靠右,填了靠左
*/
formItem: {
type: Object,
value: {},
observer: function observer() {
// this.init(n)
}
},
/**
* formObj:表单数据绑定的对象
*/
formObj: {
type: Object,
value: {}
},
/**
* inline:表单配置是否一行展示
*/
inline: {
type: Boolean,
value: true
},
/**
* themeStyle: 主题样式
*/
themeStyle: {
type: String,
value: '#3582EE'
},
textPostion: {
type: String,
value: 'right'
}
},
methods: {
// 输入框输入触发
handleInput: function handleInput(e) {
var name = e.currentTarget.dataset.name;
var inputValue = e.detail.value;
this.triggerEvent('getFormItemValue', { name: name, value: inputValue });
},
// 点击触发省市弹框
// showProvince() {
// console.log(333);
// this.setData({
// provinceShow: !this.data.provinceShow
// })
// },
// 获取省市数据
// getProvinceCode(e) {
// let address = e.detail.provinceNameData.toString()
// address = address.replace(/,/g, '-')
// this.setData({
// 'platformObj.code': e.detail.codeData,
// 'platformObj.address': address,
// 'platformObj.name': e.detail.provinceNameData,
// })
// },
// 默认开关切换
switch1Change: function switch1Change(e) {
console.log(e);
var name = e.currentTarget.dataset.name;
this.triggerEvent('getFormItemValue', { name: name, value: e.detail.value });
},
// 自定义开关切换
switch2Change: function switch2Change(e) {
console.log(e);
var _e$currentTarget$data = e.currentTarget.dataset,
index = _e$currentTarget$data.index,
name = _e$currentTarget$data.name;
this.triggerEvent('getFormItemValue', { name: name, value: index });
},
// 点击触发时间日期弹框
// showDatePicker() {
// this.setData({
// dateTimeShow: !this.data.dateTimeShow
// })
// }
// 自定义框点击事件
customClick: function customClick(e) {
console.log(e);
var name = e.currentTarget.dataset.name;
this.triggerEvent('customClick', name);
},
// 单选框点击
radioChange: function radioChange(e) {
console.log(e);
var name = e.currentTarget.dataset.name;
var checkValue = e.detail.value;
this.triggerEvent('getFormItemValue', { name: name, value: checkValue });
},
// 获取选择时间
changeTime: function changeTime(e) {
console.log(e);
var name = e.currentTarget.dataset.name;
var timeValue = e.detail.value;
this.triggerEvent('getFormItemValue', { name: name, value: timeValue });
},
// 获取选择日期
changeDate: function changeDate(e) {
console.log(e);
var name = e.currentTarget.dataset.name;
var dateValue = e.detail.value;
this.triggerEvent('getFormItemValue', { name: name, value: dateValue });
},
// 图片删除(单个)
delSingleImg: function delSingleImg(e) {
console.log(e);
var name = e.currentTarget.dataset.name;
this.triggerEvent('getFormItemValue', { name: name, value: '' });
},
// 图片删除(多个)
delmultiImg: function delmultiImg(e) {
console.log(e);
var _e$currentTarget$data2 = e.currentTarget.dataset,
name = _e$currentTarget$data2.name,
index = _e$currentTarget$data2.index;
this.triggerEvent('getFormItemValue', { name: name, value: index, type: 'muiltiImg' });
}
},
// 组件生命周期
lifetimes: {}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{
"component": true,
"usingComponents": {
"province": "../province/index",
"date-picker": "../DatePicker/index",
"gl-image": "../Image/index",
"gl-icon": "../GLIcon/index"
}
}
\ No newline at end of file
<view class="info-list switch-flex {{inline ? 'flex' : ''}}" data-name="{{formItem.name}}">
<view class="info-label label-class {{formItem.rules.required ? 'require':''}}">
<!-- lable插槽 -->
<block wx:if="{{formItem.lableStyle}}">
<slot name="{{item.lableStyle}}"></slot>
</block>
<!-- 可选输入lable -->
<!-- <block wx:if="{{formItem.type == 'selectInput'}}">
<view>
{{formItem.selectLable[0]]}}
</view>
</block> -->
<!-- 普通lable -->
<block wx:else>
<view class="{{inline? '' : 'bottom-class'}}">{{formItem.label}}</view>
</block>
</view>
<!-- input 框 -->
<block wx:if="{{formItem.type == 'input'}}">
<input name="{{formItem.name}}" type="text" class="form-input" style="text-align: {{textPostion}}" placeholder-class="placeholder" placeholder="{{formItem.placeholder || '请输入'+formItem.label}}" value="{{formObj[formItem.name]}}" bindinput="handleInput" data-name="{{formItem.name}}"></input>
</block>
<!-- 单选框 -->
<block wx:if="{{formItem.type == 'radio'}}">
<radio-group name="{{formItem.name}}" class="radio-wrap" bindchange="radioChange" data-name="{{formItem.name}}">
<label class="radio-label" wx:for="{{formItem.valueList}}" wx:for-item="i" wx:key="*this">
<radio value="{{i[formItem.valueName] || i.value}}" color="{{themeStyle}}" checked="{{formObj[formItem.name] == index}}" />
{{i[formItem.valueLabel] || i.label}}
</label>
</radio-group>
</block>
<!-- switch -->
<block wx:if="{{formItem.type == 'switch'}}">
<!-- 判断是否是自定义的 -->
<block wx:if="{{!formItem.isUserDefined}}">
<switch checked="{{formObj[formItem.name]}}" color="{{themeStyle}}" data-name="{{formItem.name}}" bindchange="switch1Change" />
</block>
<block wx:else>
<view class="user-defined-switch switch-class">
<block wx:for="{{formItem.valueList}}" wx:for-item="i" wx:key="*this">
<view class="user-defined-switch-item switch-item-class {{formObj[formItem.name] == i[formItem.valueName] ? 'switch-active-class switch-item-active': ''}}" data-index="{{i[formItem.valueName]}}" data-name="{{formItem.name}}" catchtap="switch2Change">
{{i[formItem.valueLabel] || i.label}}
</view>
</block>
</view>
</block>
</block>
<!-- timePicker 框 -->
<block wx:if="{{formItem.type == 'timePicker'}}">
<picker class="relative {{inline ? 'content-width' : ''}}" mode="time" value="{{formObj[formItem.name]}}" bindchange="changeTime" data-name="{{formItem.name}}" start="{{formItem.startTime || ''}}" end="{{formItem.endTime || ''}}">
<view class="cell {{formObj[formItem.name] ? 'value' : 'placeholder'}} {{ 'cell-' + textPostion }}">
<view class="cell-text" style="text-align: {{textPostion}}">{{formObj[formItem.name] ? formObj[formItem.name] : (formItem.placeholder ||'请选择时间')}}</view>
<gl-image class='arrow' imagePath="{{formItem.icon || prefix+'icon/arrow-x.png'}}"></gl-image>
</view>
</picker>
</block>
<!-- datePicker 框 -->
<block wx:if="{{formItem.type == 'datePicker'}}">
<picker class="relative {{inline ? 'content-width' : ''}}" mode="date" bindchange="changeDate" data-name="{{formItem.name}}" value="{{formObj[formItem.name]}}" start="{{formItem.startDate || ''}}" end="{{formItem.endDate || ''}}">
<view class="cell {{formObj[formItem.name] ? 'value' : 'placeholder'}}">
<view class="cell-text" style="text-align: {{textPostion}}">
{{formObj[formItem.name] ? formObj[formItem.name] : (formItem.placeholder ||'请选择日期')}}
</view>
<gl-image class="arrow" imagePath="{{formItem.icon || prefix+'icon/arrow-x.png'}}"></gl-image>
</view>
</picker>
</block>
<!-- 选择框 -->
<block wx:if="{{formItem.type == 'customSelect'}}">
<view class="{{inline ? 'content-width' : ''}}" bindtap="customClick" data-name="{{formItem.name}}">
<view class="info-content relative">
<block wx:if="{{!formObj[formItem.name].length}}">
<view class="cell placeholder {{ 'cell-' + textPostion }}">{{formItem.placeholder || '请选择' + formItem.label }}</view>
</block>
<block wx:else>
<view class="cell-text" style="text-align: {{textPostion}}">{{formObj[formItem.name]}}</view>
</block>
<view>
<image webp class="arrow" src="{{formItem.icon || prefix+'icon/arrow-x.png'}}" />
</view>
</view>
</view>
</block>
<!-- 自定义插槽框 -->
<block wx:if="{{formItem.type == 'customSlot'}}">
<view class="{{inline ? 'content-width' : ''}}">
<slot name="{{item.name}}"></slot>
</view>
</block>
<!-- 图片上传 -->
<block wx:if="{{formItem.type == 'imgUpload'}}">
<!-- 多个且有值 -->
<block wx:if="{{formItem.multiple && formObj[formItem.name].length}}">
<view class="multi-img-box">
<block wx:for="{{formObj[formItem.name]}}" wx:for-item="imgItem" wx:for-index="imgIndex" wx:key="imgIndex">
<view class="upload-box">
<image webp src="{{imgItem}}" alt="" />
<gl-icon class="del-icon" color="#999999" iconName="{{'gl-icon-error'}}" fontSize="{{32}}" bindtap="delmultiImg" data-index="{{imgIndex}}" data-name="{{formItem.name}}"></gl-icon>
</view>
</block>
</view>
</block>
<!-- 单个且有值 -->
<block wx:if="{{!formItem.multiple && formObj[formItem.name]}}">
<view class="upload-box">
<image webp src="{{formObj[formItem.name]}}" alt="" />
<gl-icon class="del-icon" color="#999999" iconName="{{'gl-icon-error'}}" fontSize="{{32}}" bindtap="delSingleImg" data-name="{{formItem.name}}"></gl-icon>
</view>
</block>
<!-- 无值 -->
<block wx:if="{{formItem.multiple ? (!formObj[formItem.name].length || formObj[formItem.name].length < formItem.multiple) : !formObj[formItem.name]}}">
<view class="upload-box center">
<view class="upload-box-item">
<gl-icon class="center" iconName="{{formItem.iconName || 'gl-icon-plus'}}" fontSize="{{formItem.fontSize || 70}}"></gl-icon>
<view>{{formItem.placeholder}}</view>
</view>
</view>
</block>
</block>
</view>
\ No newline at end of file
.flex {
display: flex;
}
.info-list {
/* display: flex; */
/* position: relative; */
align-content: center;
padding: 40rpx;
}
.info-lable {
display: inline-flex;
align-items: center;
width: 25%;
font-weight: 400;
font-size: 28rpx;
color: #2d2d33;
}
.form-input {
width: 75%;
/* margin-left: 26rpx; */
}
.require.info-lable::after {
content: "*";
display: inline-block;
color: #eb4e4e;
margin-left: 4rpx;
}
.cell {
display: flex;
align-items: center;
width: 100%;
}
.cell-right {
justify-content: flex-end;
}
.cell-center {
justify-content: center;
}
.cell-left {
justify-content: space-between;
}
.cell-text {
width: 100%;
}
.placeholder {
color: #C3C3C3;
font-size: 28rpx;
}
.form-input.right {
text-align: right;
direction: rtl;
}
.radio-wrap {
display: flex;
flex: 1;
font-size: 28rpx;
justify-content: space-evenly;
}
.info-content {
width: 100%;
display: flex;
justify-content: space-between;
}
.select-img {
width: 40rpx;
height: 40rpx;
}
/* cell */
.cell-value {
flex: 1;
}
.arrow {
display: inline-block;
/* position: absolute;
right: 0rpx;
top: 50%;
transform: translateY(-50%); */
width: 28rpx;
height: 28rpx;
}
.arrow image {
width: 28rpx;
height: 28rpx;
}
.user-defined-switch {
display: flex;
border: 2rpx solid #3582EE;
border-radius: 15rpx;
width: 240rpx;
height: 64rpx;
line-height: 64rpx;
text-align: center;
-webkit-border-radius: 15rpx;
-moz-border-radius: 15rpx;
-ms-border-radius: 15rpx;
-o-border-radius: 15rpx;
}
.user-defined-switch-item {
width: 120rpx;
height: 64rpx;
border-radius: 12rpx;
-webkit-border-radius: 12rpx;
-moz-border-radius: 12rpx;
-ms-border-radius: 12rpx;
-o-border-radius: 12rpx;
}
.switch-item-active {
background: #3582EE;
color: #fff;
}
.switch-flex {
justify-content: space-between;
}
.relative {
position: relative;
}
.content-width {
width: 75%;
}
.upload-box {
width: 202rpx;
height: 202rpx;
background: #F4F5F7;
border: 2rpx solid #EFF0F2;
border-radius: 12rpx;
position: relative;
margin-bottom: 10rpx;
}
.upload-box-item {
font-weight: 400;
font-size: 28rpx;
color: #888888;
}
.upload-box image {
width: 202rpx;
height: 202rpx;
}
.center {
display: flex;
justify-content: center;
align-items: center;
}
.del-icon {
position: absolute;
top: -10rpx;
right: -10rpx;
}
.multi-img-box {
display: flex;
justify-content: inherit;
flex-wrap: wrap;
}
.bottom-class {
margin-bottom: 10rpx;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 23);
/******/ })
/************************************************************************/
/******/ ({
/***/ 23:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var privacyHandler = void 0;
var privacyResolves = new Set();
var closeOtherPagePopUpHooks = new Set();
if (wx.onNeedPrivacyAuthorization) {
wx.onNeedPrivacyAuthorization(function (resolve) {
console.log(resolve, '-=-=-=-=-=-');
if (typeof privacyHandler === 'function') {
privacyHandler(resolve);
}
});
}
var closeOtherPagePopUp = function closeOtherPagePopUp(closePopUp) {
closeOtherPagePopUpHooks.forEach(function (hook) {
if (closePopUp !== hook) {
hook();
}
});
};
Component({
properties: {
appletName: {
type: String,
value: ''
},
text: {
type: String,
value: ''
}
},
data: {
showPrivacy: false
},
pageLifetimes: {
show: function show() {
var _this = this;
var closePopUp = function closePopUp() {
_this.disPopUp();
};
privacyHandler = function privacyHandler(resolve) {
privacyResolves.add(resolve);
_this.popUp();
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
closeOtherPagePopUp(closePopUp);
};
closeOtherPagePopUpHooks.add(closePopUp);
this.closePopUp = closePopUp;
},
hide: function hide() {
closeOtherPagePopUpHooks.delete(this.closePopUp);
}
},
methods: {
handleAgree: function handleAgree() {
this.disPopUp();
// 这里演示了同时调用多个wx隐私接口时要如何处理:让隐私弹窗保持单例,点击一次同意按钮即可让所有pending中的wx隐私接口继续执行 (看page/index/index中的 wx.getClipboardData 和 wx.startCompass)
privacyResolves.forEach(function (resolve) {
resolve({
event: 'agree',
buttonId: 'agree-btn'
});
});
privacyResolves.clear();
this.triggerEvent('agreeClick');
},
handleDisagree: function handleDisagree() {
this.disPopUp();
privacyResolves.forEach(function (resolve) {
resolve({
event: 'disagree'
});
});
privacyResolves.clear();
this.triggerEvent('disagreeClick');
},
popUp: function popUp() {
console.log('showPrivacy', this.data.showPrivacy);
if (this.data.showPrivacy === false) {
this.setData({
showPrivacy: true
});
}
},
disPopUp: function disPopUp() {
if (this.data.showPrivacy === true) {
this.setData({
showPrivacy: false
});
}
},
openPrivacyContract: function openPrivacyContract() {
wx.openPrivacyContract({
success: function success() {
console.log('openPrivacyContract success');
},
fail: function fail(res) {
console.error('openPrivacyContract fail', res);
}
});
},
handleOpenPrivacyContract: function handleOpenPrivacyContract() {
// 打开隐私协议页面
wx.openPrivacyContract({
success: function success() {}, // 打开成功
fail: function fail() {}, // 打开失败
complete: function complete() {}
});
}
}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/GlsxPrivacy/index.js"],"names":["privacyHandler","privacyResolves","Set","closeOtherPagePopUpHooks","wx","onNeedPrivacyAuthorization","console","log","resolve","closeOtherPagePopUp","closePopUp","forEach","hook","Component","properties","appletName","type","String","value","text","data","showPrivacy","pageLifetimes","show","disPopUp","add","popUp","hide","delete","methods","handleAgree","event","buttonId","clear","triggerEvent","handleDisagree","setData","openPrivacyContract","success","fail","error","res","handleOpenPrivacyContract","complete"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFA,IAAIA,uBAAJ;AACA,IAAMC,kBAAkB,IAAIC,GAAJ,EAAxB;AACA,IAAMC,2BAA2B,IAAID,GAAJ,EAAjC;;AAEA,IAAIE,GAAGC,0BAAP,EAAmC;AACjCD,KAAGC,0BAAH,CAA8B,mBAAW;AACvCC,YAAQC,GAAR,CAAYC,OAAZ,EAAqB,aAArB;AACA,QAAI,OAAOR,cAAP,KAA0B,UAA9B,EAA0C;AACxCA,qBAAeQ,OAAf;AACD;AACF,GALD;AAMD;AACD,IAAMC,sBAAsB,SAAtBA,mBAAsB,CAACC,UAAD,EAAgB;AAC1CP,2BAAyBQ,OAAzB,CAAiC,gBAAQ;AACvC,QAAID,eAAeE,IAAnB,EAAyB;AACvBA;AACD;AACF,GAJD;AAKD,CAND;;AAQAC,UAAU;AACRC,cAAY;AACVC,gBAAY;AACVC,YAAMC,MADI;AAEVC,aAAO;AAFG,KADF;AAKVC,UAAM;AACJH,YAAMC,MADF;AAEJC,aAAO;AAFH;AALI,GADJ;AAWRE,QAAM;AACJC,iBAAa;AADT,GAXE;AAcRC,iBAAe;AACbC,UAAM,gBAAY;AAAA;;AAChB,UAAMb,aAAa,SAAbA,UAAa,GAAM;AACvB,cAAKc,QAAL;AACD,OAFD;AAGAxB,uBAAiB,iCAAW;AAC1BC,wBAAgBwB,GAAhB,CAAoBjB,OAApB;AACA,cAAKkB,KAAL;AACA;AACAjB,4BAAoBC,UAApB;AACD,OALD;AAMAP,+BAAyBsB,GAAzB,CAA6Bf,UAA7B;;AAEA,WAAKA,UAAL,GAAkBA,UAAlB;AACD,KAdY;AAebiB,UAAM,gBAAY;AAChBxB,+BAAyByB,MAAzB,CAAgC,KAAKlB,UAArC;AACD;AAjBY,GAdP;AAiCRmB,WAAS;AACPC,eADO,yBACO;AACZ,WAAKN,QAAL;AACA;AACAvB,sBAAgBU,OAAhB,CAAwB,mBAAW;AACjCH,gBAAQ;AACNuB,iBAAO,OADD;AAENC,oBAAU;AAFJ,SAAR;AAID,OALD;AAMA/B,sBAAgBgC,KAAhB;AACA,WAAKC,YAAL,CAAkB,YAAlB;AACD,KAZM;AAaPC,kBAbO,4BAaU;AACf,WAAKX,QAAL;AACAvB,sBAAgBU,OAAhB,CAAwB,mBAAW;AACjCH,gBAAQ;AACNuB,iBAAO;AADD,SAAR;AAGD,OAJD;AAKA9B,sBAAgBgC,KAAhB;AACA,WAAKC,YAAL,CAAkB,eAAlB;AACD,KAtBM;AAuBPR,SAvBO,mBAuBC;AACNpB,cAAQC,GAAR,CAAY,aAAZ,EAA2B,KAAKa,IAAL,CAAUC,WAArC;AACA,UAAI,KAAKD,IAAL,CAAUC,WAAV,KAA0B,KAA9B,EAAqC;AACnC,aAAKe,OAAL,CAAa;AACXf,uBAAa;AADF,SAAb;AAGD;AACF,KA9BM;AA+BPG,YA/BO,sBA+BI;AACT,UAAI,KAAKJ,IAAL,CAAUC,WAAV,KAA0B,IAA9B,EAAoC;AAClC,aAAKe,OAAL,CAAa;AACXf,uBAAa;AADF,SAAb;AAGD;AACF,KArCM;AAsCPgB,uBAtCO,iCAsCe;AACpBjC,SAAGiC,mBAAH,CAAuB;AACrBC,iBAAS,mBAAM;AACbhC,kBAAQC,GAAR,CAAY,6BAAZ;AACD,SAHoB;AAIrBgC,cAAM,mBAAO;AACXjC,kBAAQkC,KAAR,CAAc,0BAAd,EAA0CC,GAA1C;AACD;AANoB,OAAvB;AAQD,KA/CM;AAgDPC,6BAhDO,uCAgDqB;AAC1B;AACAtC,SAAGiC,mBAAH,CAAuB;AACrBC,iBAAS,mBAAM,CAAE,CADI,EACF;AACnBC,cAAM,gBAAM,CAAE,CAFO,EAEL;AAChBI,kBAAU,oBAAM,CAAE;AAHG,OAAvB;AAKD;AAvDM;AAjCD,CAAV,E","file":"GlsxPrivacy\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 23);\n","let privacyHandler\r\nconst privacyResolves = new Set()\r\nconst closeOtherPagePopUpHooks = new Set()\r\n\r\nif (wx.onNeedPrivacyAuthorization) {\r\n wx.onNeedPrivacyAuthorization(resolve => {\r\n console.log(resolve, '-=-=-=-=-=-')\r\n if (typeof privacyHandler === 'function') {\r\n privacyHandler(resolve)\r\n }\r\n })\r\n}\r\nconst closeOtherPagePopUp = (closePopUp) => {\r\n closeOtherPagePopUpHooks.forEach(hook => {\r\n if (closePopUp !== hook) {\r\n hook()\r\n }\r\n })\r\n}\r\n\r\nComponent({\r\n properties: {\r\n appletName: {\r\n type: String,\r\n value: ''\r\n },\r\n text: {\r\n type: String,\r\n value: ''\r\n }\r\n },\r\n data: {\r\n showPrivacy: false,\r\n },\r\n pageLifetimes: {\r\n show: function () {\r\n const closePopUp = () => {\r\n this.disPopUp()\r\n }\r\n privacyHandler = resolve => {\r\n privacyResolves.add(resolve)\r\n this.popUp()\r\n // 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗\r\n closeOtherPagePopUp(closePopUp)\r\n }\r\n closeOtherPagePopUpHooks.add(closePopUp)\r\n\r\n this.closePopUp = closePopUp\r\n },\r\n hide: function () {\r\n closeOtherPagePopUpHooks.delete(this.closePopUp)\r\n }\r\n },\r\n methods: {\r\n handleAgree() {\r\n this.disPopUp()\r\n // 这里演示了同时调用多个wx隐私接口时要如何处理:让隐私弹窗保持单例,点击一次同意按钮即可让所有pending中的wx隐私接口继续执行 (看page/index/index中的 wx.getClipboardData 和 wx.startCompass)\r\n privacyResolves.forEach(resolve => {\r\n resolve({\r\n event: 'agree',\r\n buttonId: 'agree-btn'\r\n })\r\n })\r\n privacyResolves.clear()\r\n this.triggerEvent('agreeClick')\r\n },\r\n handleDisagree() {\r\n this.disPopUp()\r\n privacyResolves.forEach(resolve => {\r\n resolve({\r\n event: 'disagree',\r\n })\r\n })\r\n privacyResolves.clear()\r\n this.triggerEvent('disagreeClick')\r\n },\r\n popUp() {\r\n console.log('showPrivacy', this.data.showPrivacy);\r\n if (this.data.showPrivacy === false) {\r\n this.setData({\r\n showPrivacy: true\r\n })\r\n }\r\n },\r\n disPopUp() {\r\n if (this.data.showPrivacy === true) {\r\n this.setData({\r\n showPrivacy: false\r\n })\r\n }\r\n },\r\n openPrivacyContract() {\r\n wx.openPrivacyContract({\r\n success: () => {\r\n console.log('openPrivacyContract success')\r\n },\r\n fail: res => {\r\n console.error('openPrivacyContract fail', res)\r\n }\r\n })\r\n },\r\n handleOpenPrivacyContract() {\r\n // 打开隐私协议页面\r\n wx.openPrivacyContract({\r\n success: () => {}, // 打开成功\r\n fail: () => {}, // 打开失败\r\n complete: () => {}\r\n })\r\n }\r\n }\r\n})\r\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<cover-view hidden="{{!showPrivacy}}" class="pop-wrapper">
<cover-view class="pop-box">
<cover-view class="pop-content">
<cover-view class="pop-title">{{appletName ? appletName : '隐私协议'}}</cover-view>
<cover-view class="pop-text">{{ text ? text : '在您使用' + appletName + '服务之前,请仔细阅读《用户隐私保护指引》。如您同意协议内容,请点击“同意”开始使用' + appletName + '。' }}</cover-view>
<cover-view class="pop-privacy" bindtap="handleOpenPrivacyContract">《用户隐私保护指引》</cover-view>
</cover-view>
<cover-view class="pop-bottom">
<button id="disagree-btn"
type="default"
class="pop-btn disagree-btn"
bindtap="handleDisagree"
>拒绝</button>
<button id="agree-btn"
type="default"
open-type="agreePrivacyAuthorization"
class="pop-btn agree-btn"
bindagreeprivacyauthorization="handleAgree"
>同意</button>
</cover-view>
</cover-view>
</cover-view>
\ No newline at end of file
.pop-wrapper {
position: fixed;
background-color: rgba(0, 0, 0, 0.5);
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 99999999;
}
.pop-box {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 85%;
/* height: 640rpx; */
background: #FFFFFF;
border-radius: 16rpx;
}
.pop-content {
padding: 64rpx 48rpx;
box-sizing: border-box;
}
.pop-title {
width: 100%;
height: 48rpx;
text-align: center;
font-weight: 500;
font-size: 34rpx;
color: rgba(0, 0, 0, 0.9);
}
.pop-text {
margin: 32rpx 0 32rpx;
word-wrap: break-word;
word-break: break-all;
white-space: pre-wrap;
font-weight: 400;
font-size: 34rpx;
color: rgba(0, 0, 0, 0.5);
line-height: 48rpx;
letter-spacing: 0;
}
.pop-privacy {
font-weight: 400;
font-size: 30rpx;
color: #576B95;
letter-spacing: 0;
margin-top: 16rpx;
}
.pop-bottom {
display: flex;
border-top: 1px solid #ededed;
height: 112rpx;
/* border-radius: 0 0 16rpx 16rpx; */
}
.pop-btn {
width: 50%;
background-color: #fff !important;
font-weight: 500;
font-size: 34rpx;
letter-spacing: 2rpx;
line-height: 48rpx;
padding: 32rpx 0;
}
.disagree-btn {
border-right: 2rpx solid #ededed;
border-bottom-right-radius: 0;
border-top-right-radius: 0;
color: #000 !important;
}
.agree-btn {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
color: #576B95 !important;
}
.pop-btn::after {
border: none;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 13);
/******/ })
/************************************************************************/
/******/ ({
/***/ 13:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Component({
data: {},
properties: {
imagePath: {
type: String,
value: ''
}
},
methods: {}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/Image/index.js"],"names":["Component","data","properties","imagePath","type","String","value","methods"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,QAAM,EADE;AAERC,cAAY;AACVC,eAAW;AACTC,YAAMC,MADG;AAETC,aAAO;AAFE;AADD,GAFJ;AAQRC,WAAS;AARD,CAAV,E","file":"Image\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 13);\n","Component({\n data: {},\n properties: {\n imagePath: {\n type: String,\n value: ''\n }\n },\n methods: {}\n})\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<image src="{{imagePath}}" mode="{{mode}}" lazy-load></image>
\ No newline at end of file
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 14);
/******/ })
/************************************************************************/
/******/ ({
/***/ 14:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Component({
externalClasses: ['dot-class-customer', 'info-class-customer'],
data: {},
properties: {
info: null,
dot: Boolean
},
methods: {}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/Info/index.js"],"names":["Component","externalClasses","data","properties","info","dot","Boolean","methods"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,mBAAiB,CAAC,oBAAD,EAAuB,qBAAvB,CADT;AAERC,QAAM,EAFE;AAGRC,cAAY;AACVC,UAAM,IADI;AAEVC,SAAKC;AAFK,GAHJ;AAORC,WAAS;AAPD,CAAV,E","file":"Info\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 14);\n","Component({\n externalClasses: ['dot-class-customer', 'info-class-customer'],\n data: {},\n properties: {\n info: null,\n dot: Boolean,\n },\n methods: {}\n})\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="info {{dot? 'dot-class':'info-class'}} dot-class-customer info-class-customer">
{{dot ? '' : info}}
</view>
\ No newline at end of file
.info {
position: absolute;
}
.dot-class {
top: 0;
right: -2rpx;
width: 10rpx;
height: 10rpx;
border-radius: 50%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
background: #F36261;
}
.info-class {
top: 0;
right: -10rpx;
color: #fff;
font-size: 20rpx;
width: 36rpx;
height: 22rpx;
line-height: 22rpx;
border-radius: 22rpx;
background: #F36261;
border-radius: 12rpx;
text-align: center;
-webkit-border-radius: 22rpx;
-moz-border-radius: 22rpx;
-ms-border-radius: 22rpx;
-o-border-radius: 22rpx;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 8);
/******/ })
/************************************************************************/
/******/ ({
/***/ 8:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/*
* @Description: huyue
* @Author: huyue
* @Date: 2022-12-13 14:26:56
* @LastEditors: huyue
* @LastEditTime: 2022-12-16 18:01:02
*/
Component({
/**
* 组件的属性列表
*/
properties: {
activityList: {
type: Array,
value: []
}
},
/**
* 组件的初始数据
*/
data: {
current: 0,
statusMap: {
1: '活动未开始',
2: '活动进行中',
3: '活动已结束'
}
},
/**
* 组件的方法列表
*/
methods: {
toActivity: function toActivity(e) {
var activityid = e.currentTarget.dataset.activityid;
this.triggerEvent('activityClick', activityid);
}
}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/activity-swiper/index.js"],"names":["Component","properties","activityList","type","Array","value","data","current","statusMap","methods","toActivity","e","activityid","currentTarget","dataset","triggerEvent"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFA;;;;;;;AAOAA,UAAU;AACR;;;AAGAC,cAAY;AACVC,kBAAc;AACZC,YAAMC,KADM;AAEZC,aAAO;AAFK;AADJ,GAJJ;;AAWR;;;AAGAC,QAAM;AACJC,aAAS,CADL;AAEJC,eAAW;AACT,SAAG,OADM;AAET,SAAG,OAFM;AAGT,SAAG;AAHM;AAFP,GAdE;;AAuBR;;;AAGAC,WAAS;AACPC,cADO,sBACIC,CADJ,EACO;AAAA,UACLC,UADK,GACSD,EAAEE,aAAF,CAAgBC,OADzB,CACLF,UADK;;AAEZ,WAAKG,YAAL,CAAkB,eAAlB,EAAmCH,UAAnC;AACD;AAJM;AA1BD,CAAV,E","file":"activity-swiper\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","/*\r\n * @Description: huyue\r\n * @Author: huyue\r\n * @Date: 2022-12-13 14:26:56\r\n * @LastEditors: huyue\r\n * @LastEditTime: 2022-12-16 18:01:02\r\n */\r\nComponent({\r\n /**\r\n * 组件的属性列表\r\n */\r\n properties: {\r\n activityList: {\r\n type: Array,\r\n value: []\r\n }\r\n },\r\n\r\n /**\r\n * 组件的初始数据\r\n */\r\n data: {\r\n current: 0,\r\n statusMap: {\r\n 1: '活动未开始',\r\n 2: '活动进行中',\r\n 3: '活动已结束'\r\n }\r\n },\r\n\r\n /**\r\n * 组件的方法列表\r\n */\r\n methods: {\r\n toActivity(e) {\r\n const {activityid} = e.currentTarget.dataset\r\n this.triggerEvent('activityClick', activityid)\r\n }\r\n }\r\n})\r\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<block wx:if="{{activityList.length}}">
<swiper class="activity-scroll" vertical="true" circular="true" autoplay current="{{current}}" interval="3000">
<block wx:for="{{activityList}}" wx:key="index">
<swiper-item class="swiper-item" bindtap="toActivity" data-activityId="{{item.id}}">
<view class="bg-activity">
<image webp src="../assets/bg-activity.png"></image>
<view class="activity-status">{{statusMap[item.status]}}</view>
</view>
<view class="acitvity-name">{{item.activityName}} <text wx:if="{{item.provinceCity}}"> {{'(' + item.provinceCity + ')'}} </text></view>
</swiper-item>
</block>
</swiper>
</block>
.activity-scroll {
display: flex;
justify-items: center;
background: #FFF4D8;
border-radius: 8rpx;
margin: 12rpx 20rpx 26rpx;
font-weight: 400;
font-size: 26rpx;
color: #F68B0C;
letter-spacing: 0;
padding: 11rpx 12rpx;
height: 36rpx;
}
.swiper-item {
display: flex;
align-items: center;
}
.bg-activity {
position: relative;
width: 126rpx;
height: 36rpx;
margin-right: 12rpx;
}
.bg-activity image {
width: 100%;
height: 100%;
}
.bg-activity .activity-status {
position: absolute;
width: 126rpx;
font-weight: 500;
font-size: 20rpx;
color: #FFFFFF;
letter-spacing: 0;
text-align: center;
line-height: 32rpx;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.acitvity-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 商品card
Component({
externalClasses: ['custom-class'],
/**
* 组件的属性列表
*/
properties: {
src: {
type: String,
value: ''
},
mode: {
type: String,
value: 'widthFix'
},
lazyLoad: {
type: Boolean,
value: true
},
tag: {
type: [String, Number],
value: ''
},
title: {
type: [String, Number],
value: ''
}
},
/**
* 组件的初始数据
*/
data: {
imagePath: ''
}
});
/***/ })
/******/ ]);
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/card/index.js"],"names":["Component","externalClasses","properties","src","type","String","value","mode","lazyLoad","Boolean","tag","Number","title","data","imagePath"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;AClFA;AACAA,UAAU;AACRC,mBAAiB,CAAC,cAAD,CADT;AAER;;;AAGAC,cAAY;AACVC,SAAK;AACHC,YAAMC,MADH;AAEHC,aAAO;AAFJ,KADK;AAKVC,UAAM;AACJH,YAAMC,MADF;AAEJC,aAAO;AAFH,KALI;AASVE,cAAU;AACRJ,YAAMK,OADE;AAERH,aAAO;AAFC,KATA;AAaVI,SAAK;AACHN,YAAM,CAACC,MAAD,EAASM,MAAT,CADH;AAEHL,aAAO;AAFJ,KAbK;AAiBVM,WAAO;AACLR,YAAM,CAACC,MAAD,EAASM,MAAT,CADD;AAELL,aAAO;AAFF;AAjBG,GALJ;;AA4BR;;;AAGAO,QAAM;AACJC,eAAW;AADP;;AA/BE,CAAV,E","file":"card\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","// 商品card\r\nComponent({\r\n externalClasses: ['custom-class'],\r\n /**\r\n * 组件的属性列表\r\n */\r\n properties: {\r\n src: {\r\n type: String,\r\n value: ''\r\n },\r\n mode: {\r\n type: String,\r\n value: 'widthFix'\r\n },\r\n lazyLoad: {\r\n type: Boolean,\r\n value: true\r\n },\r\n tag: {\r\n type: [String, Number],\r\n value: ''\r\n },\r\n title: {\r\n type: [String, Number],\r\n value: ''\r\n }\r\n },\r\n\r\n /**\r\n * 组件的初始数据\r\n */\r\n data: {\r\n imagePath: ''\r\n },\r\n\r\n})\r\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--components/image/index.wxml-->
<view class="gl_card custom-class">
<view class="img_box">
<image class="img" src="{{src}}" webp mode="{{mode}}" lazy-load="{{lazyLoad}}" />
<view class="tag" wx:if="{{tag}}">
{{tag}}
</view>
</view>
<view class="title" wx:if="{{title}}">
{{title}}
</view>
</view>
\ No newline at end of file
.gl_card {
width: 176rpx;
/* height: 172rpx; */
background: #FFFFFF;
border: 2rpx solid #FFFFFF;
box-shadow: 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.32);
border-radius: 8rpx;
/* margin:20rpx; */
}
.gl_card .img_box {
position: relative;
width: 100%;
height: 120rpx;
overflow: hidden;
background: #c6c6c6;
border-radius: 8rpx 8rpx 0 0;
}
.gl_card .img_box .img {
width: 100%;
}
.gl_card .img_box .tag {
position: absolute;
top: 0;
left: 0;
/* width: 41px; */
height: 32rpx;
background: #D7F5E5;
border-radius: 4rpx;
padding: 0 8rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 22rpx;
color: #21AB60;
}
.title {
/* height: 52rpx; */
/* line-height: 52rpx; */
padding: 10rpx 16rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 24rpx;
color: #323436;
/* overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis; */
}
{
"component": true,
"usingComponents": {
"gl-sidebar": "../sidebar/index",
"gl-sidebar-item": "../sidebar-item/index",
"gl-card": "../card/index",
"gl-video": "../video/index",
"gl-posters": "../posters/index"
}
}
\ No newline at end of file
<view class="gl-discover custom-class">
<!-- 左侧菜单 开始 -->
<view class="left-sidebar" wx:if="{{list && list.length}}">
<gl-sidebar active-key="{{menusActive}}" bind:change="onChange">
<block wx:for="{{listData}}" wx:key="index">
<gl-sidebar-item wx:if="{{item.isShow}}" data-id="{{index}}" data-info="{{item}}" catchtap="menuClick" sidebar-active-custom="sidebar-active-custom">
{{item.name}}
</gl-sidebar-item>
</block>
</gl-sidebar>
</view>
<!-- 左侧菜单 end -->
<!-- 右侧内容 开始 -->
<view class="right-content">
<!-- 三级菜单 -->
<scroll-view wx:if="{{subMenuList.length}}" class="sub-menu-scroll" enable-flex scroll-x>
<block wx:for="{{subMenuList}}" wx:key="index">
<view wx:if="{{item.isShow}}" class="sub-menu-item {{index == subMenusActive ? 'sub-menu-active-custom sub-menu-active-item' : ''}}" data-id="{{index}}" data-info="{{item}}" catchtap="subMenuClick">
{{item.name}}
</view>
</block>
</scroll-view>
<!-- 产品列表 开始 -->
<block wx:if="{{productList && productList.length}}">
<view class="head" wx:if="{{productList && productList.length}}">特色方案</view>
<view class="list-box">
<gl-card wx:for="{{productList}}" wx:key="index" title="{{item.proName}}" src="{{item.prodImg}}" custom-class="card" data-info="{{item}}" data-index="{{index}}" catchtap="productClick"></gl-card>
<view class="hidden_cell" wx:for="{{3-productList.length%3}}" wx:key="index"></view>
</view>
</block>
<!-- 产品列表 end -->
<view class="head-menu">
<view class="cell {{tabsActive == 1?'cell-active':''}}" data-id="1" catchtap="tabsClick" wx:if="{{videoList && videoList.length}}">
案例视频
</view>
<view class="cell {{tabsActive == 2?'cell-active':''}}" data-id="2" catchtap="tabsClick" wx:if="{{posterList && posterList.length}}">
营销海报
</view>
<view class="cell {{tabsActive == 3?'cell-active':''}}" data-id="3" catchtap="tabsClick" wx:if="{{operationVideoList && operationVideoList.length}}">
操作指引
</view>
</view>
<view class="list-box" wx:if="{{tabsActive == 1}}">
<!-- <block wx:if="{{!videoList.length}}">
<image class="no-video novideo-img" src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/no-video.png" />
</block> -->
<!-- <block wx:else> -->
<gl-video wx:for="{{videoList}}" wx:key="index" title="{{item.name}}" src="{{item.posterUrl}}" user-avatar="{{item.avatar}}" user-name="{{item.manufacturer || '嘀加智慧'}}" visit="{{item.view}}" custom-class="card" data-info="{{item}}" data-index="{{index}}" catchtap="videoClick"></gl-video>
<!-- </block> -->
</view>
<view class="list-box" wx:if="{{tabsActive == 2}}">
<gl-posters wx:for="{{posterList}}" wx:key="index" title="{{item.name}}" src="{{item.src}}" custom-class="card"></gl-posters>
</view>
<view class="list-box" wx:if="{{tabsActive == 3}}">
<!-- <block wx:if="{{!operationVideoList.length}}">
<image class="no-video novideo-img" src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/no-video.png" />
</block> -->
<!-- <block wx:else> -->
<gl-video wx:for="{{operationVideoList}}" wx:key="index" title="{{item.name}}" src="{{item.posterUrl}}" user-avatar="{{item.avatar}}" user-name="{{item.manufacturer || '嘀加智慧'}}" visit="{{item.view}}" custom-class="card" data-info="{{item}}" data-index="{{index}}" catchtap="videoClick"></gl-video>
<!-- </block> -->
</view>
</view>
<!-- 右侧内容 end -->
</view>
\ No newline at end of file
.gl-discover {
display: flex;
height: 100%;
width: 100%;
overflow: hidden;
}
.left-sidebar {
flex-shrink: 0;
width: 116rpx;
}
.right-content {
flex: 1;
overflow: hidden;
background: #fff;
box-sizing: border-box;
}
.head {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 26rpx;
color: #323436;
padding: 0 32rpx;
margin-bottom: 16rpx;
}
.hidden_cell {
width: 176rpx;
}
.list-box {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 0 32rpx;
margin-bottom: 12rpx;
}
.list-box .card {
margin: 0 0 20rpx 0;
}
.list-box .video_cell {
margin: 0 0 20rpx 0;
}
.head-menu {
display: flex;
align-items: center;
padding: 0 32rpx;
margin-bottom: 16rpx;
}
.head-menu .cell {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 26rpx;
color: #8A8C90;
margin-right: 40rpx;
}
.head-menu .cell-active {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 26rpx;
color: #323436;
}
.no-video {
margin: 16rpx auto 32rpx;
display: block;
width: 100%;
border-radius: 16rpx;
}
.sub-menu-scroll {
padding: 0 32rpx 20rpx 32rpx;
display: flex;
flex-direction: row;
height: 48rpx;
flex: 1;
}
.sub-menu-item {
height: 48rpx;
background: #F7F7F7;
border-radius: 24rpx;
padding: 0 24rpx;
font-weight: 400;
font-size: 24rpx;
color: #333333;
line-height: 48rpx;
margin-right: 24rpx;
word-break: keep-all;
}
.sub-menu-active-item {
background: #5850FF;
font-weight: 600;
font-size: 24rpx;
color: #FFFFFF;
}
.sub-menu-item:last-child {
margin-right: 0;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 4);
/******/ })
/************************************************************************/
/******/ ({
/***/ 4:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 商品card
Component({
externalClasses: ['custom-class'],
/**
* 组件的属性列表
*/
properties: {
src: {
type: String,
value: ''
},
mode: {
type: String,
value: ''
},
lazyLoad: {
type: Boolean,
value: true
},
title: {
type: [String, Number],
value: ''
}
},
/**
* 组件的初始数据
*/
data: {
imagePath: '',
showPreviewPoster: false,
posterPath: ''
},
methods: {
// 预览海报
previewPoster: function previewPoster() {
var url = this.data.src;
this.setData({
posterPath: url,
showPreviewPoster: true
});
},
// 关闭海报预览
closePreviewPoster: function closePreviewPoster() {
this.setData({
posterPath: '',
showPreviewPoster: false
});
}
}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/posters/index.js"],"names":["Component","externalClasses","properties","src","type","String","value","mode","lazyLoad","Boolean","title","Number","data","imagePath","showPreviewPoster","posterPath","methods","previewPoster","url","setData","closePreviewPoster"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFA;AACAA,UAAU;AACRC,mBAAiB,CAAC,cAAD,CADT;AAER;;;AAGAC,cAAY;AACVC,SAAK;AACHC,YAAMC,MADH;AAEHC,aAAO;AAFJ,KADK;AAKVC,UAAM;AACJH,YAAMC,MADF;AAEJC,aAAO;AAFH,KALI;AASVE,cAAU;AACRJ,YAAMK,OADE;AAERH,aAAO;AAFC,KATA;AAaVI,WAAO;AACLN,YAAM,CAACC,MAAD,EAASM,MAAT,CADD;AAELL,aAAO;AAFF;AAbG,GALJ;;AAwBR;;;AAGAM,QAAM;AACJC,eAAW,EADP;AAEJC,uBAAmB,KAFf;AAGJC,gBAAY;AAHR,GA3BE;;AAiCRC,WAAS;AACP;AACAC,iBAFO,2BAES;AACd,UAAMC,MAAM,KAAKN,IAAL,CAAUT,GAAtB;AACA,WAAKgB,OAAL,CAAa;AACXJ,oBAAYG,GADD;AAEXJ,2BAAmB;AAFR,OAAb;AAID,KARM;;;AAUP;AACAM,sBAXO,gCAWc;AACnB,WAAKD,OAAL,CAAa;AACXJ,oBAAY,EADD;AAEXD,2BAAmB;AAFR,OAAb;AAID;AAhBM;;AAjCD,CAAV,E","file":"posters\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","// 商品card\r\nComponent({\r\n externalClasses: ['custom-class'],\r\n /**\r\n * 组件的属性列表\r\n */\r\n properties: {\r\n src: {\r\n type: String,\r\n value: ''\r\n },\r\n mode: {\r\n type: String,\r\n value: ''\r\n },\r\n lazyLoad: {\r\n type: Boolean,\r\n value: true\r\n },\r\n title: {\r\n type: [String, Number],\r\n value: ''\r\n }\r\n },\r\n\r\n /**\r\n * 组件的初始数据\r\n */\r\n data: {\r\n imagePath: '',\r\n showPreviewPoster: false,\r\n posterPath: ''\r\n },\r\n\r\n methods: {\r\n // 预览海报\r\n previewPoster() {\r\n const url = this.data.src;\r\n this.setData({\r\n posterPath: url,\r\n showPreviewPoster: true\r\n })\r\n },\r\n\r\n // 关闭海报预览\r\n closePreviewPoster() {\r\n this.setData({\r\n posterPath: '',\r\n showPreviewPoster: false\r\n })\r\n }\r\n }\r\n\r\n})\r\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
<!--components/image/index.wxml-->
<view class="gl-poster custom-class" catchtap="previewPoster">
<view class="img_box">
<image
class="img"
src="{{src}}"
mode="{{mode}}"
lazy-load="{{lazyLoad}}"
/>
</view>
<view class="title" wx:if="{{title}}">
{{title}}
</view>
</view>
<!--预览海报弹框 开始-->
<view class="preview-poster" wx:if="{{showPreviewPoster}}">
<view class="preview-blk" catchtap="closePreviewPoster"></view>
<view class="preview-box">
<view class="preview-box-inner">
<view class="perview-cloese" catchtap="closePreviewPoster">
<image
class="img"
src="../assets/close.png"
mode="widthFix"
lazy-load
/>
</view>
<view class="preview-image">
<image
class="img"
src="{{posterPath}}"
mode="widthFix"
lazy-load
show-menu-by-longpress
/>
</view>
<view class="perview-title">
<image class="img" src="../assets/fingerprint.png" />
<text class="cl">长按图片转发</text>
</view>
</view>
</view>
</view>
<!--预览海报弹框 end-->
.gl-poster {
width: 276rpx;
height: 552rpx;
background: #FFFFFF;
border-radius: 8rpx;
/* margin: 20rpx; */
}
.gl-poster .img_box {
position: relative;
width: 100%;
height: 492rpx;
overflow: hidden;
background: #c6c6c6;
border-radius: 8rpx 8rpx 0 0;
}
.gl-poster .img_box .img {
width: 100%;
height: 100%;
}
.title {
height: 60rpx;
line-height: 60rpx;
/* padding: 0 16rpx; */
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 24rpx;
color: #3666FE;
background: rgba(54, 102, 254, 0.1);
border-radius: 0 0 12rpx 12rpx;
text-align: center;
}
/* .preview-poster{
position: fixed;
top:50%;
left:50%;
transform: translate(-50%,-50%);
} */
.preview-poster .preview-blk {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: #000;
opacity: 0.5;
filter: blur(2px);
z-index: 10;
}
.preview-poster .preview-box {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 11;
padding: 0 96rpx;
width: 100%;
box-sizing: border-box;
}
.preview-box-inner {
position: relative;
background: #fff;
display: flex;
flex-direction: column;
border-radius: 16rpx;
}
.perview-cloese {
position: absolute;
width: 56rpx;
height: 56rpx;
top: -92rpx;
right: 0;
}
.perview-cloese .img {
width: 100%;
height: 100%;
}
.preview-image {
padding: 32rpx;
overflow: scroll;
max-height: 880rpx;
}
.preview-image .img {
width: 100%;
border-radius: 8rpx;
}
.perview-title {
display: flex;
align-items: center;
justify-content: center;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 16px;
color: #5850FF;
height: 90rpx;
}
.perview-title .img {
width: 40rpx;
height: 40rpx;
margin-right: 12rpx;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 11);
/******/ })
/************************************************************************/
/******/ ({
/***/ 11:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Component({
/**
* 组件的属性列表
*/
properties: {
provinceShow: Boolean,
provinceList: {
type: Array,
observer: function observer(val) {
console.log(val, '++++');
this.setData({
provinceList: val
});
}
}
},
/**
* 组件的初始数据
*/
data: {
region: [0, 0, 0], // 地址每列的index
regionCode: [],
provinceList: []
},
/**
* 组件的方法列表
*/
methods: {
// emitHideRegion(){},
// 省市切换
bindChange: function bindChange(e) {
// 用于对比滑动的是哪一列数据
var val = e.detail.value;
if (this.data.region[0] !== val[0]) {
// 如果滑动的是第一列数据,让二三列恢复到0
this.setData({
region: [val[0], 0, 0]
});
} else if (this.data.region[1] !== val[1]) {
// 滑动的是第二列数据
this.setData({
region: [val[0], val[1], 0]
});
} else {
this.setData({
region: e.detail.value
});
}
},
// 确定提交
comfirm: function comfirm() {
var _data = this.data,
provinceList = _data.provinceList,
region = _data.region;
// 省市code
var provinceCode = provinceList[region[0]].value;
var cityCode = provinceList[region[0]].children[region[1]].value;
var townCode = provinceList[region[0]].children[region[1]].children[region[2]].value;
var codeData = [provinceCode, cityCode, townCode];
// 省市名称
var provinceName = provinceList[region[0]].label;
var cityName = provinceList[region[0]].children[region[1]].label;
var townName = provinceList[region[0]].children[region[1]].children[region[2]].label;
var provinceNameData = [provinceName, cityName, townName];
this.triggerEvent('getProvinceCode', { codeData: codeData, provinceNameData: provinceNameData });
this.triggerEvent('cancelProvince');
},
// 取消
cancel: function cancel() {
this.triggerEvent('cancelProvince');
}
}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/province/index.js"],"names":["Component","properties","provinceShow","Boolean","provinceList","type","Array","observer","val","console","log","setData","data","region","regionCode","methods","bindChange","e","detail","value","comfirm","provinceCode","cityCode","children","townCode","codeData","provinceName","label","cityName","townName","provinceNameData","triggerEvent","cancel"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACR;;;AAGAC,cAAY;AACVC,kBAAcC,OADJ;AAEVC,kBAAc;AACZC,YAAMC,KADM;AAEZC,gBAAU,kBAAUC,GAAV,EAAe;AACvBC,gBAAQC,GAAR,CAAYF,GAAZ,EAAiB,MAAjB;AACA,aAAKG,OAAL,CAAa;AACXP,wBAAcI;AADH,SAAb;AAGD;AAPW;AAFJ,GAJJ;;AAiBR;;;AAGAI,QAAM;AACJC,YAAQ,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,CADJ,EACe;AACnBC,gBAAY,EAFR;AAGJV,kBAAc;AAHV,GApBE;;AA0BR;;;AAGAW,WAAS;AACP;AACA;AACAC,cAHO,sBAGIC,CAHJ,EAGO;AACZ;AACA,UAAMT,MAAMS,EAAEC,MAAF,CAASC,KAArB;AACA,UAAI,KAAKP,IAAL,CAAUC,MAAV,CAAiB,CAAjB,MAAwBL,IAAI,CAAJ,CAA5B,EAAoC;AAClC;AACA,aAAKG,OAAL,CAAa;AACXE,kBAAQ,CAACL,IAAI,CAAJ,CAAD,EAAS,CAAT,EAAY,CAAZ;AADG,SAAb;AAGD,OALD,MAKO,IAAI,KAAKI,IAAL,CAAUC,MAAV,CAAiB,CAAjB,MAAwBL,IAAI,CAAJ,CAA5B,EAAoC;AACzC;AACA,aAAKG,OAAL,CAAa;AACXE,kBAAQ,CAACL,IAAI,CAAJ,CAAD,EAASA,IAAI,CAAJ,CAAT,EAAiB,CAAjB;AADG,SAAb;AAGD,OALM,MAKA;AACL,aAAKG,OAAL,CAAa;AACXE,kBAAQI,EAAEC,MAAF,CAASC;AADN,SAAb;AAGD;AACF,KArBM;;AAsBP;AACAC,WAvBO,qBAuBG;AAAA,kBACuB,KAAKR,IAD5B;AAAA,UACDR,YADC,SACDA,YADC;AAAA,UACaS,MADb,SACaA,MADb;AAER;;AACA,UAAMQ,eAAejB,aAAaS,OAAO,CAAP,CAAb,EAAwBM,KAA7C;AACA,UAAMG,WAAWlB,aAAaS,OAAO,CAAP,CAAb,EAAwBU,QAAxB,CAAiCV,OAAO,CAAP,CAAjC,EAA4CM,KAA7D;AACA,UAAMK,WAAWpB,aAAaS,OAAO,CAAP,CAAb,EAAwBU,QAAxB,CAAiCV,OAAO,CAAP,CAAjC,EAA4CU,QAA5C,CAAqDV,OAAO,CAAP,CAArD,EAAgEM,KAAjF;AACA,UAAMM,WAAW,CAACJ,YAAD,EAAeC,QAAf,EAAyBE,QAAzB,CAAjB;AACA;AACA,UAAME,eAAetB,aAAaS,OAAO,CAAP,CAAb,EAAwBc,KAA7C;AACA,UAAMC,WAAWxB,aAAaS,OAAO,CAAP,CAAb,EAAwBU,QAAxB,CAAiCV,OAAO,CAAP,CAAjC,EAA4Cc,KAA7D;AACA,UAAME,WAAWzB,aAAaS,OAAO,CAAP,CAAb,EAAwBU,QAAxB,CAAiCV,OAAO,CAAP,CAAjC,EAA4CU,QAA5C,CAAqDV,OAAO,CAAP,CAArD,EAAgEc,KAAjF;AACA,UAAMG,mBAAmB,CAACJ,YAAD,EAAeE,QAAf,EAAyBC,QAAzB,CAAzB;AACA,WAAKE,YAAL,CAAkB,iBAAlB,EAAqC,EAACN,kBAAD,EAAWK,kCAAX,EAArC;AACA,WAAKC,YAAL,CAAkB,gBAAlB;AACD,KArCM;;AAsCP;AACAC,UAvCO,oBAuCE;AACP,WAAKD,YAAL,CAAkB,gBAAlB;AACD;AAzCM;AA7BD,CAAV,E","file":"province\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 11);\n","Component({\n /**\n * 组件的属性列表\n */\n properties: {\n provinceShow: Boolean,\n provinceList: {\n type: Array,\n observer: function (val) {\n console.log(val, '++++');\n this.setData({\n provinceList: val\n })\n }\n }\n },\n\n /**\n * 组件的初始数据\n */\n data: {\n region: [0, 0, 0], // 地址每列的index\n regionCode: [],\n provinceList: []\n },\n\n /**\n * 组件的方法列表\n */\n methods: {\n // emitHideRegion(){},\n // 省市切换\n bindChange(e) {\n // 用于对比滑动的是哪一列数据\n const val = e.detail.value\n if (this.data.region[0] !== val[0]) {\n // 如果滑动的是第一列数据,让二三列恢复到0\n this.setData({\n region: [val[0], 0, 0]\n })\n } else if (this.data.region[1] !== val[1]) {\n // 滑动的是第二列数据\n this.setData({\n region: [val[0], val[1], 0]\n })\n } else {\n this.setData({\n region: e.detail.value\n })\n }\n },\n // 确定提交\n comfirm() {\n const {provinceList, region} = this.data\n // 省市code\n const provinceCode = provinceList[region[0]].value\n const cityCode = provinceList[region[0]].children[region[1]].value\n const townCode = provinceList[region[0]].children[region[1]].children[region[2]].value\n const codeData = [provinceCode, cityCode, townCode]\n // 省市名称\n const provinceName = provinceList[region[0]].label\n const cityName = provinceList[region[0]].children[region[1]].label\n const townName = provinceList[region[0]].children[region[1]].children[region[2]].label\n const provinceNameData = [provinceName, cityName, townName]\n this.triggerEvent('getProvinceCode', {codeData, provinceNameData})\n this.triggerEvent('cancelProvince')\n },\n // 取消\n cancel() {\n this.triggerEvent('cancelProvince')\n }\n }\n})\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view wx:if="{{provinceShow}}" class="dialog_mask {{provinceShow?'dialog_show':''}}">
<view class="dialog_mask" bindtap="cancel"></view>
<view class="dialog_container">
<view class="header flex_scb">
<view class="cancle" bindtap="cancel">取消</view>
<view class="title">城市地区</view>
<view class="comfirm" bindtap="comfirm">确定</view>
</view>
<view class="main">
<picker-view indicator-style="height: 50px;" style="width: 100%; height: 100%;" value="{{region}}" bindchange="bindChange">
<picker-view-column>
<view wx:for="{{provinceList}}" wx:key="{{item.value}}" style="line-height: 50px; text-align: center;">{{item.label}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{provinceList[region[0]].children}}" wx:key="{{item.value}}" style="line-height: 50px; text-align: center;">{{item.label}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{provinceList[region[0]].children[region[1]].children}}" wx:key="{{item.value}}" style="line-height: 50px; text-align: center;">{{item.label}}</view>
</picker-view-column>
</picker-view>
</view>
</view>
</view>
\ No newline at end of file
.dialog_mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
background: rgba(0, 0, 0, 0.5);
}
.dialog_container {
position: absolute;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 70%;
background: white;
border-radius: 40rpx 40rpx 0 0;
box-shadow: 0px -2rpx 4rpx 0px rgba(0, 0, 0, 0.06);
z-index: 9999;
}
.header {
height: 112rpx;
box-sizing: border-box;
padding: 0 32rpx;
}
.header .cancle {
font-size: 28rpx;
font-weight: 500;
color: #969799;
}
.header .title {
font-size: 32rpx;
font-weight: 500;
color: #323233;
}
.header .comfirm {
font-size: 28rpx;
font-weight: 500;
color: #FC5B32;
}
.main {
height: calc(100% - 112rpx);
box-sizing: border-box;
padding: 0 32rpx;
}
.flex_scb {
display: flex;
align-items: center;
justify-content: space-between;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 9);
/******/ })
/************************************************************************/
/******/ ({
/***/ 9:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/*
* @Description: huyue
* @Author: huyue
* @Date: 2022-12-15 17:13:19
* @LastEditors: huyue
* @LastEditTime: 2023-02-06 15:28:18
*/
Component({
externalClasses: ['custom-class', 'novideo-img', 'sub-menu-active-custom', 'sidebar-active-custom'],
/**
* 组件的属性列表
*/
properties: {
// 顶部菜单
hasMenu: {
type: Boolean,
value: false
},
// 增值转化Data
list: {
type: Array,
observer: function observer(n) {
this.init(n);
}
},
// banner下活动轮播数据
activityList: {
type: Array,
value: []
},
// currentScenIndex: {
// type: Number,
// observer(n) {
// this.setData({
// currentScen: n,
// });
// },
// },
// 选中活动tab下标,默认第一个
discoverIndex: {
type: Number,
value: 0
}
},
/**
* 组件的初始数据
*/
data: {
currentScen: 0,
scrollLeft: 0,
bannerSrc: '',
defaultBannerSrc: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/banner/banner_default.png',
sceneCode: '',
listData: []
},
/**
* 组件的方法列表
*/
methods: {
// 初始化数据,新增数字化转型案例视频
init: function init(n) {
if (n.length === 0) return;
var operationVideoList = [];
var videoList = [];
// 递归算出得到所有视频
n.forEach(function (item) {
operationVideoList = operationVideoList.concat(item.operationVideoList);
videoList = videoList.concat(item.videoList);
if (item.subList.length) {
item.subList.forEach(function (itm) {
operationVideoList = operationVideoList.concat(itm.operationVideoList);
videoList = videoList.concat(itm.videoList);
});
}
});
n.push({
name: '数字化转型案例',
videoList: videoList,
operationVideoList: operationVideoList
});
this.setData({
listData: n
});
},
// 点击特色产品
proClick: function proClick(e) {
var sceneCode = this.data.sceneCode || this.data.listData[this.data.discoverIndex].sceneCode;
console.log(e.detail, sceneCode);
this.triggerEvent('proClick', { info: e.detail, sceneCode: sceneCode });
},
// 点击案例视频
videoClick: function videoClick(e) {
var sceneCode = this.data.sceneCode || this.data.listData[this.data.discoverIndex].sceneCode;
console.log(sceneCode);
this.triggerEvent('videoClick', { info: e.detail, sceneCode: sceneCode });
},
// 活动点击
activityClick: function activityClick(e) {
this.triggerEvent('activityClick', e.detail);
},
// 点击场景banner
senceClick: function senceClick() {
var _this = this;
var info = this.data.listData.find(function (item) {
return item.sceneCode === _this.data.sceneCode;
});
console.log(info);
this.triggerEvent('senceClick', info);
},
// 点击切换菜单
menuClick: function menuClick(e) {
var menuInfo = this.data.listData.find(function (item) {
return item.sceneCode === e.detail.info.sceneCode;
});
var bannerSrc = menuInfo.banner;
var sceneCode = menuInfo.sceneCode;
this.setData({
discoverIndex: e.detail.id,
bannerSrc: bannerSrc,
sceneCode: sceneCode
});
},
// 初始化
initMenu: function initMenu(e) {
var menuInfo = e.detail;
var bannerSrc = menuInfo.banner;
var sceneCode = menuInfo.sceneCode;
this.setData({
bannerSrc: bannerSrc,
sceneCode: sceneCode
});
}
}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{
"component": true,
"usingComponents": {
"gl-scene": "../scene/index",
"glsx-discover": "../discover/index",
"activity-swiper": "../activity-swiper/index"
}
}
\ No newline at end of file
<view class="scenario-menu custom-class" wx:if="{{hasMenu}}">
<scroll-view scroll-x scroll-with-animation scroll-left="{{scrollLeft}}" class="menu-list">
<view wx:for="{{listData}}" wx:key="index" class="menu-item {{item.sceneid==currentScen?'menu-active':''}}" catchtap="selectScenario" data-id="{{item.sceneid}}">{{item.name}}</view>
</scroll-view>
</view>
<gl-scene wx:if="{{listData.length}}" src="{{bannerSrc ? bannerSrc : defaultBannerSrc}}" bind:click="senceClick"></gl-scene>
<activity-swiper activityList="{{activityList}}" bindactivityClick="activityClick"></activity-swiper>
<!-- <glsx-discover index="{{discoverIndex}}" list="{{productData[currentScen]}}" bindchange="onchange" bind:proClick="proClick" bind:videoClick="videoClick"></glsx-discover> -->
<glsx-discover
wx:if="{{listData.length}}"
index="{{discoverIndex}}"
list="{{listData}}"
bindchange="onchange"
bind:menuClick="menuClick"
bind:initMenu="initMenu"
bind:proClick="proClick"
bind:videoClick="videoClick"
novideo-img="novideo-img"
sub-menu-active-custom="sub-menu-active-custom"
sidebar-active-custom="sidebar-active-custom"
>
</glsx-discover>
.scenario-menu {
width: 100%;
height: 88rpx;
/* overflow-x: auto; */
-webkit-overflow-scrolling: touch;
}
.scenario-menu::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
.scenario-menu .menu-list {
padding: 0 20rpx;
display: inline-block;
white-space: nowrap;
box-sizing: border-box;
}
.scenario-menu .menu-list .menu-item {
display: inline-block;
width: 150rpx;
text-align: center;
line-height: 80rpx;
font-weight: 400;
font-size: 28rpx;
color: #323436;
}
.scenario-menu .menu-list .menu-item.menu-active {
position: relative;
font-weight: 600;
width: 190rpx;
font-size: 36rpx;
color: #323436;
}
.menu-active::after {
display: inline-block;
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 40rpx;
height: 8rpx;
background-color: #5850FF;
border-radius: 4rpx;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 6);
/******/ })
/************************************************************************/
/******/ ({
/***/ 6:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 商品card
Component({
externalClasses: ['custom-class'],
/**
* 组件的属性列表
*/
properties: {
src: {
type: String,
value: '',
observer: function observer(n) {
this.setData({
imagePath: n
});
}
},
mode: {
type: String,
value: 'widthFix'
},
lazyLoad: {
type: Boolean,
value: true
},
useSlot: {
type: Boolean,
value: false
}
},
/**
* 组件的初始数据
*/
data: {
imagePath: ''
},
methods: {
// 点击事件
clickEvent: function clickEvent() {
this.triggerEvent('click');
}
}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/scene/index.js"],"names":["Component","externalClasses","properties","src","type","String","value","observer","n","setData","imagePath","mode","lazyLoad","Boolean","useSlot","data","methods","clickEvent","triggerEvent"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFA;AACAA,UAAU;AACRC,mBAAiB,CAAC,cAAD,CADT;AAER;;;AAGAC,cAAY;AACVC,SAAK;AACHC,YAAMC,MADH;AAEHC,aAAO,EAFJ;AAGHC,gBAAU,kBAAUC,CAAV,EAAa;AACrB,aAAKC,OAAL,CAAa;AACXC,qBAAWF;AADA,SAAb;AAGD;AAPE,KADK;AAUVG,UAAM;AACJP,YAAMC,MADF;AAEJC,aAAO;AAFH,KAVI;AAcVM,cAAU;AACRR,YAAMS,OADE;AAERP,aAAO;AAFC,KAdA;AAkBVQ,aAAS;AACPV,YAAMS,OADC;AAEPP,aAAO;AAFA;AAlBC,GALJ;;AA6BR;;;AAGAS,QAAM;AACJL,eAAW;AADP,GAhCE;;AAoCRM,WAAS;;AAEP;AACAC,cAHO,wBAGM;AACX,WAAKC,YAAL,CAAkB,OAAlB;AACD;AALM;;AApCD,CAAV,E","file":"scene\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","// 商品card\r\nComponent({\r\n externalClasses: ['custom-class'],\r\n /**\r\n * 组件的属性列表\r\n */\r\n properties: {\r\n src: {\r\n type: String,\r\n value: '',\r\n observer: function (n) {\r\n this.setData({\r\n imagePath: n\r\n })\r\n }\r\n },\r\n mode: {\r\n type: String,\r\n value: 'widthFix'\r\n },\r\n lazyLoad: {\r\n type: Boolean,\r\n value: true\r\n },\r\n useSlot: {\r\n type: Boolean,\r\n value: false\r\n }\r\n },\r\n\r\n /**\r\n * 组件的初始数据\r\n */\r\n data: {\r\n imagePath: ''\r\n },\r\n\r\n methods: {\r\n\r\n // 点击事件\r\n clickEvent() {\r\n this.triggerEvent('click')\r\n }\r\n\r\n }\r\n\r\n})\r\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
<view class="gl-scene custom-class" catchtap="clickEvent">
<image
class="img"
src="{{imagePath}}"
mode="{{mode}}"
lazy-load
webp
wx:if="{{imagePath}}"
/>
<view class="inner" wx:if="{{useSlot}}">
<slot/>
</view>
</view>
.gl-scene {
position: relative;
margin: 20rpx;
height: 254rpx;
overflow: hidden;
border-radius: 20rpx;
}
.gl-scene .img {
width: 100%;
height: 100%;
}
.inner {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 3);
/******/ })
/************************************************************************/
/******/ ({
/***/ 3:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 商品card
Component({
externalClasses: ['custom-class', 'active-class', 'sidebar-active-custom'],
relations: {
'../sidebar/index': {
type: 'parent',
linked: function linked() {
// 每次被插入到 custom-ul 时执行,target是 custom-ul 节点实例对象,触发在 attached 生命周期之后
},
linkChanged: function linkChanged() {
// 每次被移动后执行,target是 custom-ul 节点实例对象,触发在 moved 生命周期之后
},
unlinked: function unlinked() {
// 每次被移除时执行,target是 custom-ul 节点实例对象,触发在 detached 生命周期之后
}
}
},
/**
* 组件的属性列表
*/
properties: {
title: {
type: String,
value: ''
}
},
/**
* 组件的初始数据
*/
data: {
selected: ''
},
methods: {
// 设置选中
setActive: function setActive(selected) {
return this.setData({ selected: selected });
},
// 点击事件
onClick: function onClick() {
var _this = this;
var parent = this.getParents();
if (!parent || this.data.disabled) {
return;
}
var index = parent.data.children.indexOf(this);
parent.setActive(index);
_this.triggerEvent('click', index);
parent.triggerEvent('change', index);
},
// 获取父级元素
getParents: function getParents() {
var nodes = this.getRelationNodes('../sidebar/index');
var node = nodes[0];
return node;
}
}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/sidebar-item/index.js"],"names":["Component","externalClasses","relations","type","linked","linkChanged","unlinked","properties","title","String","value","data","selected","methods","setActive","setData","onClick","_this","parent","getParents","disabled","index","children","indexOf","triggerEvent","nodes","getRelationNodes","node"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFA;AACAA,UAAU;AACRC,mBAAiB,CAAC,cAAD,EAAiB,cAAjB,EAAiC,uBAAjC,CADT;AAERC,aAAW;AACT,wBAAoB;AAClBC,YAAM,QADY;AAElBC,cAAQ,kBAAY;AAClB;AACD,OAJiB;AAKlBC,mBAAa,uBAAY;AACvB;AACD,OAPiB;AAQlBC,gBAAU,oBAAY;AACpB;AACD;;AAViB;AADX,GAFH;AAiBR;;;AAGAC,cAAY;AACVC,WAAO;AACLL,YAAMM,MADD;AAELC,aAAO;AAFF;AADG,GApBJ;;AA2BR;;;AAGAC,QAAM;AACJC,cAAU;AADN,GA9BE;AAiCRC,WAAS;AACP;AACAC,eAAW,mBAAUF,QAAV,EAAoB;AAC7B,aAAO,KAAKG,OAAL,CAAa,EAACH,UAAUA,QAAX,EAAb,CAAP;AACD,KAJM;;AAMP;AACAI,WAPO,qBAOG;AACR,UAAMC,QAAQ,IAAd;AACA,UAAMC,SAAS,KAAKC,UAAL,EAAf;AACA,UAAI,CAACD,MAAD,IAAW,KAAKP,IAAL,CAAUS,QAAzB,EAAmC;AACjC;AACD;AACD,UAAMC,QAAQH,OAAOP,IAAP,CAAYW,QAAZ,CAAqBC,OAArB,CAA6B,IAA7B,CAAd;AACAL,aAAOJ,SAAP,CAAiBO,KAAjB;AACAJ,YAAMO,YAAN,CAAmB,OAAnB,EAA4BH,KAA5B;AACAH,aAAOM,YAAP,CAAoB,QAApB,EAA8BH,KAA9B;AACD,KAjBM;;;AAmBP;AACAF,cApBO,wBAoBM;AACX,UAAMM,QAAQ,KAAKC,gBAAL,CAAsB,kBAAtB,CAAd;AACA,UAAMC,OAAOF,MAAM,CAAN,CAAb;AACA,aAAOE,IAAP;AACD;AAxBM;;AAjCD,CAAV,E","file":"sidebar-item\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n","// 商品card\r\nComponent({\r\n externalClasses: ['custom-class', 'active-class', 'sidebar-active-custom'],\r\n relations: {\r\n '../sidebar/index': {\r\n type: 'parent',\r\n linked: function () {\r\n // 每次被插入到 custom-ul 时执行,target是 custom-ul 节点实例对象,触发在 attached 生命周期之后\r\n },\r\n linkChanged: function () {\r\n // 每次被移动后执行,target是 custom-ul 节点实例对象,触发在 moved 生命周期之后\r\n },\r\n unlinked: function () {\r\n // 每次被移除时执行,target是 custom-ul 节点实例对象,触发在 detached 生命周期之后\r\n }\r\n\r\n }\r\n },\r\n /**\r\n * 组件的属性列表\r\n */\r\n properties: {\r\n title: {\r\n type: String,\r\n value: ''\r\n },\r\n },\r\n\r\n /**\r\n * 组件的初始数据\r\n */\r\n data: {\r\n selected: ''\r\n },\r\n methods: {\r\n // 设置选中\r\n setActive: function (selected) {\r\n return this.setData({selected: selected});\r\n },\r\n\r\n // 点击事件\r\n onClick() {\r\n const _this = this;\r\n const parent = this.getParents();\r\n if (!parent || this.data.disabled) {\r\n return;\r\n }\r\n const index = parent.data.children.indexOf(this);\r\n parent.setActive(index)\r\n _this.triggerEvent('click', index);\r\n parent.triggerEvent('change', index);\r\n },\r\n\r\n // 获取父级元素\r\n getParents() {\r\n const nodes = this.getRelationNodes('../sidebar/index')\r\n const node = nodes[0]\r\n return node;\r\n }\r\n\r\n }\r\n\r\n})\r\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="sidebar-item custom-class" bind:tap="onClick">
<view class="inner-text {{selected?'sidebar-item-active sidebar-active-custom':''}}">
<view class="text" wx:if="{{ title }}">{{ title }}</view>
<slot wx:else />
</view>
</view>
.sidebar-item {
height: 88rpx;
line-height: 88rpx;
/* background: rgba(204, 206, 209, 0.20); */
}
.inner-text {
position: relative;
display: flex;
align-items: center;
justify-content: center;
font-family: PingFangSC-Medium;
font-size: 24rpx;
color: #2D2D33;
text-align: center;
padding-left: 10rpx;
line-height: 30rpx;
height: 100%;
}
.sidebar-item-active {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 24rpx;
color: #5850FF;
background: #fff;
}
.sidebar-item-active:after {
display: block;
content: "";
width: 6rpx;
height: 40rpx;
background: #5850FF;
border-radius: 0 4rpx 4rpx 0;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 2);
/******/ })
/************************************************************************/
/******/ ({
/***/ 2:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 商品card
Component({
externalClasses: ['custom-class'],
relations: {
'../sidebar-item/index': {
type: 'child',
linked: function linked(target) {
// 每次有 custom-li 被插入时执行,target是该节点实例对象,触发在该节点 attached 生命周期之后
console.log(target);
this.setActive(this.data.activeKey);
},
linkChanged: function linkChanged() {
// 每次有 custom-li 被移动后执行,target是该节点实例对象,触发在该节点 moved 生命周期之后
},
unlinked: function unlinked() {
// 每次有 custom-li 被移除时执行,target是该节点实例对象,触发在该节点 detached 生命周期之后
}
}
},
/**
* 组件的属性列表
*/
properties: {
activeKey: {
type: Number,
default: 0,
observer: function observer(key) {
this.setActive(key);
}
}
},
/**
* 组件的初始数据
*/
data: {
currentActive: 0,
children: []
},
methods: {
// 设置选中
setActive: function setActive(key) {
var child = this.getAllChild();
var currentActive = this.data.currentActive;
var stack = [];
this.setData({
currentActive: key
});
if (currentActive !== key && child[currentActive]) {
stack.push(child[currentActive].setActive(false));
}
if (child[key]) {
stack.push(child[key].setActive(true));
}
return Promise.all(stack);
},
// 获取所有的子nodes
getAllChild: function getAllChild() {
var nodes = this.getRelationNodes('../sidebar-item/index');
this.setData({
children: nodes
});
return nodes;
}
}
});
/***/ })
/******/ });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/sidebar/index.js"],"names":["Component","externalClasses","relations","type","linked","target","console","log","setActive","data","activeKey","linkChanged","unlinked","properties","Number","default","observer","key","currentActive","children","methods","child","getAllChild","stack","setData","push","Promise","all","nodes","getRelationNodes"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFA;AACAA,UAAU;AACRC,mBAAiB,CAAC,cAAD,CADT;AAERC,aAAW;AACT,6BAAyB;AACvBC,YAAM,OADiB;AAEvBC,cAAQ,gBAAUC,MAAV,EAAkB;AACxB;AACAC,gBAAQC,GAAR,CAAYF,MAAZ;AACA,aAAKG,SAAL,CAAe,KAAKC,IAAL,CAAUC,SAAzB;AACD,OANsB;AAOvBC,mBAAa,uBAAY;AACvB;AACD,OATsB;AAUvBC,gBAAU,oBAAY;AACpB;AACD;AAZsB;;AADhB,GAFH;AAmBR;;;AAGAC,cAAY;AACVH,eAAW;AACTP,YAAMW,MADG;AAETC,eAAS,CAFA;AAGTC,gBAAU,kBAAUC,GAAV,EAAe;AACvB,aAAKT,SAAL,CAAeS,GAAf;AACD;AALQ;AADD,GAtBJ;;AAgCR;;;AAGAR,QAAM;AACJS,mBAAe,CADX;AAEJC,cAAU;AAFN,GAnCE;;AAwCRC,WAAS;;AAEP;AACAZ,aAHO,qBAGGS,GAHH,EAGQ;AACb,UAAMI,QAAQ,KAAKC,WAAL,EAAd;AACA,UAAMJ,gBAAgB,KAAKT,IAAL,CAAUS,aAAhC;AACA,UAAMK,QAAQ,EAAd;AACA,WAAKC,OAAL,CAAa;AACXN,uBAAeD;AADJ,OAAb;AAGA,UAAIC,kBAAkBD,GAAlB,IAAyBI,MAAMH,aAAN,CAA7B,EAAmD;AACjDK,cAAME,IAAN,CAAWJ,MAAMH,aAAN,EAAqBV,SAArB,CAA+B,KAA/B,CAAX;AACD;AACD,UAAIa,MAAMJ,GAAN,CAAJ,EAAgB;AACdM,cAAME,IAAN,CAAWJ,MAAMJ,GAAN,EAAWT,SAAX,CAAqB,IAArB,CAAX;AACD;AACD,aAAOkB,QAAQC,GAAR,CAAYJ,KAAZ,CAAP;AACD,KAjBM;;;AAmBP;AACAD,eApBO,yBAoBO;AACZ,UAAMM,QAAQ,KAAKC,gBAAL,CAAsB,uBAAtB,CAAd;AACA,WAAKL,OAAL,CAAa;AACXL,kBAAUS;AADC,OAAb;AAGA,aAAOA,KAAP;AACD;AA1BM;;AAxCD,CAAV,E","file":"sidebar\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","// 商品card\r\nComponent({\r\n externalClasses: ['custom-class'],\r\n relations: {\r\n '../sidebar-item/index': {\r\n type: 'child',\r\n linked: function (target) {\r\n // 每次有 custom-li 被插入时执行,target是该节点实例对象,触发在该节点 attached 生命周期之后\r\n console.log(target)\r\n this.setActive(this.data.activeKey);\r\n },\r\n linkChanged: function () {\r\n // 每次有 custom-li 被移动后执行,target是该节点实例对象,触发在该节点 moved 生命周期之后\r\n },\r\n unlinked: function () {\r\n // 每次有 custom-li 被移除时执行,target是该节点实例对象,触发在该节点 detached 生命周期之后\r\n }\r\n }\r\n\r\n },\r\n /**\r\n * 组件的属性列表\r\n */\r\n properties: {\r\n activeKey: {\r\n type: Number,\r\n default: 0,\r\n observer: function (key) {\r\n this.setActive(key)\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * 组件的初始数据\r\n */\r\n data: {\r\n currentActive: 0,\r\n children: []\r\n },\r\n\r\n methods: {\r\n\r\n // 设置选中\r\n setActive(key) {\r\n const child = this.getAllChild()\r\n const currentActive = this.data.currentActive\r\n const stack = [];\r\n this.setData({\r\n currentActive: key\r\n })\r\n if (currentActive !== key && child[currentActive]) {\r\n stack.push(child[currentActive].setActive(false));\r\n }\r\n if (child[key]) {\r\n stack.push(child[key].setActive(true));\r\n }\r\n return Promise.all(stack);\r\n },\r\n\r\n // 获取所有的子nodes\r\n getAllChild() {\r\n const nodes = this.getRelationNodes('../sidebar-item/index')\r\n this.setData({\r\n children: nodes\r\n })\r\n return nodes;\r\n },\r\n\r\n }\r\n\r\n})\r\n"],"sourceRoot":""}
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!