7.js
12.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
webpackJsonp([7],{
/***/ 337:
/* no static exports found */
/* all exports used */
/*!***********************************!*\
!*** ./src/pages/TeamSetting.vue ***!
\***********************************/
/***/ (function(module, exports, __webpack_require__) {
/* styles */
__webpack_require__(/*! !vue-style-loader!css-loader?sourceMap!../../~/vue-loader/lib/style-compiler/index?{"id":"data-v-f6263b5e","scoped":true,"hasInlineConfig":true}!../../~/vux-loader/src/style-loader.js!../../~/vue-loader/lib/selector?type=styles&index=0!./TeamSetting.vue */ 486)
var Component = __webpack_require__(/*! ../../~/vue-loader/lib/component-normalizer */ 2)(
/* script */
__webpack_require__(/*! !babel-loader!../../~/vux-loader/src/script-loader.js!../../~/vue-loader/lib/selector?type=script&index=0!./TeamSetting.vue */ 428),
/* template */
__webpack_require__(/*! !../../~/vue-loader/lib/template-compiler/index?{"id":"data-v-f6263b5e"}!../../~/vux-loader/src/before-template-compiler-loader.js!../../~/vux-loader/src/template-loader.js!../../~/vue-loader/lib/selector?type=template&index=0!./TeamSetting.vue */ 468),
/* scopeId */
"data-v-f6263b5e",
/* cssModules */
null
)
Component.options.__file = "D:\\Cassie-project\\netease-h5-demo\\src\\pages\\TeamSetting.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key !== "__esModule"})) {console.error("named exports are not supported in *.vue files.")}
if (Component.options.functional) {console.error("[vue-loader] TeamSetting.vue: functional components are not supported with templates, they should use render functions.")}
/* hot reload */
if (false) {(function () {
var hotAPI = require("vue-hot-reload-api")
hotAPI.install(require("vue"), false)
if (!hotAPI.compatible) return
module.hot.accept()
if (!module.hot.data) {
hotAPI.createRecord("data-v-f6263b5e", Component.options)
} else {
hotAPI.reload("data-v-f6263b5e", Component.options)
}
})()}
module.exports = Component.exports
/***/ }),
/***/ 428:
/* no static exports found */
/* all exports used */
/*!***********************************************************************************************************************************************!*\
!*** ./~/babel-loader/lib!./~/vux-loader/src/script-loader.js!./~/vue-loader/lib/selector.js?type=script&index=0!./src/pages/TeamSetting.vue ***!
\***********************************************************************************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _utils = __webpack_require__(/*! ../utils */ 16);
var _utils2 = _interopRequireDefault(_utils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = {
data: function data() {
return {
inputModel: '',
placeHolder: ''
};
},
computed: {
config: function config() {
var config = this.$store.state.teamSettingConfig;
this.inputModel = config.defaultValue ? config.defaultValue : '';
this.placeHolder = config.placeHolder ? config.placeHolder : config.enable ? '请输入' : '无';
return config;
},
selects: function selects() {
var map = _utils2.default.teamConfigMap[this.config.updateKey];
var list = [];
for (var key in map) {
if (map.hasOwnProperty(key)) {
list.push({ 'key': key, 'value': map[key] });
}
}
return list;
}
},
mounted: function mounted() {
var _this = this;
setTimeout(function () {
_this.$refs.input && _this.$refs.input.focus();
}, 500);
},
methods: {
update: function update(value) {
var _this2 = this,
_options;
if (value === undefined && this.inputModel.length < 1) {
this.$toast('请输入内容后提交');
return;
}
var callback = this.config.confirmCallback;
if (callback && typeof callback === 'function') {
callback(this.config.teamId, this.config.updateKey, value ? value : this.inputModel);
return;
}
this.$store.dispatch('showLoading');
var action = this.config.updateInfoInTeam ? 'updateInfoInTeam' : 'updateTeam';
this.$store.dispatch('delegateTeamFunction', {
functionName: action,
options: (_options = {
teamId: this.config.teamId
}, _options[this.config.updateKey] = value ? value : this.inputModel, _options.done = function done(error, team) {
_this2.$store.dispatch('hideLoading');
if (error) {
_this2.$toast(error);
} else {
_this2.$toast('更改成功');
setTimeout(function () {
history.go(-1);
}, 200);
}
}, _options)
});
}
}
};
module.exports = exports['default'];
/***/ }),
/***/ 447:
/* no static exports found */
/* all exports used */
/*!**************************************************************************************************************************************************************************************************************************************************!*\
!*** ./~/css-loader?sourceMap!./~/vue-loader/lib/style-compiler?{"id":"data-v-f6263b5e","scoped":true,"hasInlineConfig":true}!./~/vux-loader/src/style-loader.js!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/pages/TeamSetting.vue ***!
\**************************************************************************************************************************************************************************************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(/*! ../../~/css-loader/lib/css-base.js */ 3)(true);
// imports
// module
exports.push([module.i, "\n.p-setting[data-v-f6263b5e]{\n background-color: #e6ebf0;\n padding-top: 4.6rem;\n}\n.weui-cell[data-v-f6263b5e]{\n background-color: white;\n}\n.select img[data-v-f6263b5e]{\n position: absolute;\n right: 0;\n}\n.icon-selected[data-v-f6263b5e]{\n display: inline-block;\n width: 1.4rem;\n height: 1.4rem;\n background-size: 20rem;\n background-image: url(http://yx-web.nos.netease.com/webdoc/h5/im/icons.png);\n background-position: -3.7rem -2.95rem;\n}\n", "", {"version":3,"sources":["D:/Cassie-project/netease-h5-demo/src/pages/TeamSetting.vue"],"names":[],"mappings":";AAyFA;EACE,0BAA0B;EAC1B,oBAAoB;CACrB;AACD;EACE,wBAAwB;CACzB;AAEC;EACE,mBAAmB;EACnB,SAAS;CACV;AAEH;EACE,sBAAsB;EACtB,cAAc;EACd,eAAe;EACf,uBAAuB;EACvB,4EAA4E;EAC5E,sCAAsC;CACvC","file":"TeamSetting.vue","sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.p-setting{\n background-color: #e6ebf0;\n padding-top: 4.6rem;\n}\n.weui-cell{\n background-color: white;\n}\n.select {\n img{\n position: absolute;\n right: 0;\n }\n}\n.icon-selected{\n display: inline-block;\n width: 1.4rem;\n height: 1.4rem;\n background-size: 20rem;\n background-image: url(http://yx-web.nos.netease.com/webdoc/h5/im/icons.png);\n background-position: -3.7rem -2.95rem;\n}\n"],"sourceRoot":""}]);
// exports
/***/ }),
/***/ 468:
/* no static exports found */
/* all exports used */
/*!**************************************************************************************************************************************************************************************************************************************************!*\
!*** ./~/vue-loader/lib/template-compiler?{"id":"data-v-f6263b5e"}!./~/vux-loader/src/before-template-compiler-loader.js!./~/vux-loader/src/template-loader.js!./~/vue-loader/lib/selector.js?type=template&index=0!./src/pages/TeamSetting.vue ***!
\**************************************************************************************************************************************************************************************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
return _c('div', {
staticClass: "g-inherit m-article p-setting"
}, [_c('x-header', {
staticClass: "m-tab",
attrs: {
"left-options": {
backText: ' '
}
}
}, [_c('h1', {
staticClass: "m-tab-top"
}, [_vm._v(_vm._s(_vm.config.title))]), _vm._v(" "), _c('a', {
attrs: {
"slot": "left"
},
slot: "left"
}), _vm._v(" "), (_vm.config.inputType !== "select" && _vm.config.enable) ? _c('a', {
attrs: {
"slot": "right"
},
on: {
"click": function () { return _vm.update(); }
},
slot: "right"
}, [_vm._v("确定")]) : _vm._e()]), _vm._v(" "), _c('group', [(_vm.config.inputType === "text") ? _c('x-input', {
ref: "input",
attrs: {
"placeholder": _vm.placeHolder,
"disabled": !_vm.config.enable,
"max": 10
},
model: {
value: (_vm.inputModel),
callback: function($$v) {
_vm.inputModel = $$v
},
expression: "inputModel"
}
}) : (_vm.config.inputType === "textarea") ? _c('x-textarea', {
ref: "input",
attrs: {
"placeholder": _vm.placeHolder,
"readonly": !_vm.config.enable,
"max": 30
},
model: {
value: (_vm.inputModel),
callback: function($$v) {
_vm.inputModel = $$v
},
expression: "inputModel"
}
}) : (_vm.config.inputType === "select") ? _vm._l((_vm.selects), function(item, index) {
return _c('cell', {
key: index,
attrs: {
"value-align": "left"
},
nativeOn: {
"click": function($event) {
(function () { return _vm.update(item.key); })($event)
}
}
}, [_vm._v("\n " + _vm._s(item.value) + "\n "), (_vm.inputModel === item.key) ? _c('span', {
staticClass: "icon-selected",
attrs: {
"slot": "child",
"width": "25",
"height": "25"
},
slot: "child"
}) : _vm._e()])
}) : _vm._e()], 2)], 1)
},staticRenderFns: []}
module.exports.render._withStripped = true
if (false) {
module.hot.accept()
if (module.hot.data) {
require("vue-hot-reload-api").rerender("data-v-f6263b5e", module.exports)
}
}
/***/ }),
/***/ 486:
/* no static exports found */
/* all exports used */
/*!***********************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./~/vue-style-loader!./~/css-loader?sourceMap!./~/vue-loader/lib/style-compiler?{"id":"data-v-f6263b5e","scoped":true,"hasInlineConfig":true}!./~/vux-loader/src/style-loader.js!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/pages/TeamSetting.vue ***!
\***********************************************************************************************************************************************************************************************************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(/*! !../../~/css-loader?sourceMap!../../~/vue-loader/lib/style-compiler?{"id":"data-v-f6263b5e","scoped":true,"hasInlineConfig":true}!../../~/vux-loader/src/style-loader.js!../../~/vue-loader/lib/selector.js?type=styles&index=0!./TeamSetting.vue */ 447);
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var update = __webpack_require__(/*! ../../~/vue-style-loader/lib/addStylesClient.js */ 4)("b9b31068", content, false);
// Hot Module Replacement
if(false) {
// When the styles change, update the <style> tags
if(!content.locals) {
module.hot.accept("!!../../node_modules/css-loader/index.js?sourceMap!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"id\":\"data-v-f6263b5e\",\"scoped\":true,\"hasInlineConfig\":true}!../../node_modules/vux-loader/src/style-loader.js!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./TeamSetting.vue", function() {
var newContent = require("!!../../node_modules/css-loader/index.js?sourceMap!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"id\":\"data-v-f6263b5e\",\"scoped\":true,\"hasInlineConfig\":true}!../../node_modules/vux-loader/src/style-loader.js!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./TeamSetting.vue");
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
update(newContent);
});
}
// When the module is disposed, remove the <style> tags
module.hot.dispose(function() { update(); });
}
/***/ })
});
//# sourceMappingURL=7.js.map