初始化
This commit is contained in:
@@ -0,0 +1,165 @@
|
||||
module.exports =
|
||||
/** *** */ (function (modules) { // webpackBootstrap
|
||||
/** *** */ // The module cache
|
||||
/** *** */ const 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)
|
||||
/** *** */ const 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
|
||||
/** *** */ const ns = Object.create(null)
|
||||
/** *** */ __webpack_require__.r(ns)
|
||||
/** *** */ Object.defineProperty(ns, 'default', {enumerable: true, value})
|
||||
/** *** */ if (mode & 2 && typeof value !== 'string') for (const 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) {
|
||||
/** *** */ const 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 = 24)
|
||||
/** *** */ }({
|
||||
|
||||
/***/ 24:
|
||||
/***/ (function (module, exports, __webpack_require__) {
|
||||
Component({
|
||||
options: {
|
||||
addGlobalClass: true,
|
||||
multipleSlots: true
|
||||
},
|
||||
properties: {
|
||||
multi: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
checked: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
value: 'label'
|
||||
},
|
||||
extClass: {
|
||||
type: String,
|
||||
value: ''
|
||||
}
|
||||
},
|
||||
data: {},
|
||||
relations: {
|
||||
'../checkbox-group/checkbox-group': {
|
||||
type: 'ancestor',
|
||||
linked: function linked(target) {
|
||||
this.data.group = target
|
||||
},
|
||||
unlinked: function unlinked() {
|
||||
this.data.group = null
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setMulti: function setMulti(multi) {
|
||||
this.setData({
|
||||
multi
|
||||
})
|
||||
},
|
||||
setOuterClass: function setOuterClass(className) {
|
||||
this.setData({
|
||||
outerClass: className
|
||||
})
|
||||
},
|
||||
checkedChange: function checkedChange(e) {
|
||||
if (this.data.multi) {
|
||||
const checked = !this.data.checked
|
||||
this.setData({
|
||||
checked
|
||||
})
|
||||
if (this.data.group) {
|
||||
this.data.group.checkedChange(checked, this)
|
||||
}
|
||||
} else {
|
||||
const _checked = this.data.checked
|
||||
if (_checked) return
|
||||
this.setData({
|
||||
checked: true
|
||||
})
|
||||
if (this.data.group) {
|
||||
this.data.group.checkedChange(_checked, this)
|
||||
}
|
||||
}
|
||||
this.triggerEvent('change', {value: this.data.value, checked: this.data.checked})
|
||||
}
|
||||
}
|
||||
})
|
||||
/***/ })
|
||||
|
||||
/** *** */}))
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"mp-cell": "../cell/cell",
|
||||
"mp-checkbox-group": "../checkbox-group/checkbox-group"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<mp-cell
|
||||
has-footer="{{!multi}}"
|
||||
has-header="{{multi}}"
|
||||
bindtap="checkedChange"
|
||||
ext-class="weui-check__label {{outerClass}} {{extClass}} {{!multi ? '^weui-cell_radio' : '^weui-cell_checkbox'}}">
|
||||
|
||||
<view slot="icon" wx:if="{{multi}}">
|
||||
<checkbox value="{{value}}" checked="{{checked}}" disabled="{{disabled}}" color="{{color}}" class="weui-check">
|
||||
</checkbox>
|
||||
<icon class="weui-icon-checked"></icon>
|
||||
|
||||
</view>
|
||||
<view>{{label}}</view>
|
||||
<view slot="footer" wx:if="{{!multi}}">
|
||||
<radio value="{{value}}" checked="{{checked}}" disabled="{{disabled}}" color="{{color}}" class="weui-check"></radio>
|
||||
<!-- 已勾选 -->
|
||||
<icon class="weui-icon-checked"></icon>
|
||||
|
||||
</view>
|
||||
</mp-cell>
|
||||
@@ -0,0 +1 @@
|
||||
.weui-cell_radio .weui-check+.weui-icon-checked{color:transparent}.weui-check[checked]+.weui-icon-checked{color:var(--weui-BRAND);-webkit-mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.657%2018.435L3%2012.778l1.414-1.414%204.95%204.95L20.678%205l1.414%201.414-12.02%2012.021a1%201%200%2001-1.415%200z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);mask-image:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.657%2018.435L3%2012.778l1.414-1.414%204.95%204.95L20.678%205l1.414%201.414-12.02%2012.021a1%201%200%2001-1.415%200z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E)}
|
||||
Reference in New Issue
Block a user