yc-ui2 0.1.1-beta12 → 0.1.1-beta14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2372,10 +2372,211 @@ var YcCustomerService_component = normalizeComponent(
2372
2372
  )
2373
2373
 
2374
2374
  /* harmony default export */ var YcCustomerService = (YcCustomerService_component.exports);
2375
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcQuestion/index.vue?vue&type=template&id=1d6048bd&
2376
+ var YcQuestionvue_type_template_id_1d6048bd_render = function render() {
2377
+ var _vm = this,
2378
+ _c = _vm._self._c;
2379
+ return _c('div', {
2380
+ staticClass: "chatPage"
2381
+ }, [_vm._m(0), _c('div', {
2382
+ staticClass: "main"
2383
+ }, [_c('div', [_c('main', {
2384
+ ref: "main"
2385
+ }, [_c('p', [_vm._v("今天" + _vm._s(_vm.currData))]), _vm._l(_vm.messagelist, function (item, index) {
2386
+ return _c('div', {
2387
+ key: index,
2388
+ class: ['message', item.id]
2389
+ }, [_c('img', {
2390
+ staticClass: "avatar",
2391
+ attrs: {
2392
+ "src": '/cloud-img/customerService/' + item.id + '.jpg'
2393
+ }
2394
+ }), _c('div', {
2395
+ staticClass: "content"
2396
+ }, [_vm._l(item.msg, function (msg, index) {
2397
+ return _c('span', {
2398
+ key: msg + index,
2399
+ class: item.msg.length > 1 ? 'href' : '',
2400
+ domProps: {
2401
+ "innerHTML": _vm._s((item.msg.length > 1 ? 1 + index + '. ' : ' ') + msg)
2402
+ },
2403
+ on: {
2404
+ "click": function ($event) {
2405
+ item.msg.length > 1 && _vm.regularClick(msg);
2406
+ }
2407
+ }
2408
+ });
2409
+ }), item.based ? _c('div', {
2410
+ staticClass: "based",
2411
+ on: {
2412
+ "click": function ($event) {
2413
+ $event.preventDefault();
2414
+ return _vm.handExpand(item);
2415
+ }
2416
+ }
2417
+ }, [_c('span', [_vm._v("依据")]), _c('span', {
2418
+ class: {
2419
+ 'is-active': item.isActive
2420
+ }
2421
+ }, [_vm._v(_vm._s(item.based)), _c('i', {
2422
+ staticClass: "el-icon-d-arrow-right"
2423
+ })])]) : _vm._e()], 2)]);
2424
+ })], 2), _c('footer', [_c('el-input', {
2425
+ attrs: {
2426
+ "type": "textarea",
2427
+ "maxlength": "500",
2428
+ "autosize": {
2429
+ minRows: 6,
2430
+ maxRows: 6
2431
+ },
2432
+ "autofocus": "true",
2433
+ "resize": "none",
2434
+ "placeholder": "请输入你要咨询的问题"
2435
+ },
2436
+ nativeOn: {
2437
+ "keyup": function ($event) {
2438
+ if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
2439
+ return _vm.carriageReturn.apply(null, arguments);
2440
+ }
2441
+ },
2442
+ model: {
2443
+ value: _vm.textareaValue,
2444
+ callback: function ($$v) {
2445
+ _vm.textareaValue = $$v;
2446
+ },
2447
+ expression: "textareaValue"
2448
+ }
2449
+ }), _c('el-button', {
2450
+ style: !_vm.textareaValue ? 'background-color: #F7F7F9;color: #FF575F;border-color: transparent;' : '',
2451
+ attrs: {
2452
+ "type": "primary",
2453
+ "disabled": !_vm.textareaValue
2454
+ },
2455
+ on: {
2456
+ "click": _vm.send
2457
+ }
2458
+ }, [_vm._v("发送")])], 1)]), _c('aside', [_c('el-collapse', {
2459
+ attrs: {
2460
+ "accordion": ""
2461
+ },
2462
+ model: {
2463
+ value: _vm.activeNames,
2464
+ callback: function ($$v) {
2465
+ _vm.activeNames = $$v;
2466
+ },
2467
+ expression: "activeNames"
2468
+ }
2469
+ }, _vm._l(_vm.questionsList, function (item, key, index) {
2470
+ return _c('el-collapse-item', {
2471
+ key: key,
2472
+ attrs: {
2473
+ "name": index
2474
+ }
2475
+ }, [_c('template', {
2476
+ slot: "title"
2477
+ }, [_c('img', {
2478
+ attrs: {
2479
+ "src": "/cloud-img/customerService/ellipticalWenh.png"
2480
+ }
2481
+ }), _vm._v(_vm._s(key) + " ")]), _vm._l(item, function (faq) {
2482
+ return _c('div', {
2483
+ key: faq,
2484
+ domProps: {
2485
+ "innerHTML": _vm._s(faq)
2486
+ },
2487
+ on: {
2488
+ "click": function ($event) {
2489
+ return _vm.regularClick(faq);
2490
+ }
2491
+ }
2492
+ });
2493
+ })], 2);
2494
+ }), 1)], 1)])]);
2495
+ };
2496
+ var YcQuestionvue_type_template_id_1d6048bd_staticRenderFns = [function () {
2497
+ var _vm = this,
2498
+ _c = _vm._self._c;
2499
+ return _c('header', {
2500
+ staticStyle: {
2501
+ "background": "url('/cloud-img/customerService/chatTop.png') center",
2502
+ "background-size": "cover"
2503
+ }
2504
+ }, [_c('div', [_c('h3', [_vm._v("小优客服")]), _c('span', [_vm._v("Problem Help")])]), _c('p', [_vm._v("小优为您提供24小时服务")])]);
2505
+ }];
2506
+
2507
+ ;// CONCATENATED MODULE: ./src/components/YcQuestion/index.vue?vue&type=template&id=1d6048bd&
2508
+
2509
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcQuestion/index.vue?vue&type=script&lang=js&
2510
+
2511
+
2512
+ /* harmony default export */ var YcQuestionvue_type_script_lang_js_ = ({
2513
+ name: "QuestionChat",
2514
+ mixins: [chatMixin],
2515
+ data() {
2516
+ return {
2517
+ activeNames: [1]
2518
+ };
2519
+ },
2520
+ props: {
2521
+ page: {
2522
+ type: String,
2523
+ default: ""
2524
+ }
2525
+ },
2526
+ computed: {
2527
+ currData() {
2528
+ const currData = new Date();
2529
+ return `${currData.getHours()}:${currData.getMinutes()}`;
2530
+ },
2531
+ questionsList() {
2532
+ return this.questions.reduce((prev, curr) => {
2533
+ // eslint-disable-next-line no-prototype-builtins
2534
+ if (prev.hasOwnProperty(curr.type)) {
2535
+ prev[curr.type].push(curr.faq);
2536
+ } else {
2537
+ prev[curr.type] = [curr.faq];
2538
+ }
2539
+ return prev;
2540
+ }, {});
2541
+ }
2542
+ },
2543
+ mounted() {
2544
+ console.log("page", this.page);
2545
+ }
2546
+ });
2547
+ ;// CONCATENATED MODULE: ./src/components/YcQuestion/index.vue?vue&type=script&lang=js&
2548
+ /* harmony default export */ var components_YcQuestionvue_type_script_lang_js_ = (YcQuestionvue_type_script_lang_js_);
2549
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcQuestion/index.vue?vue&type=style&index=0&id=1d6048bd&prod&lang=scss&
2550
+ // extracted by mini-css-extract-plugin
2551
+
2552
+ ;// CONCATENATED MODULE: ./src/components/YcQuestion/index.vue?vue&type=style&index=0&id=1d6048bd&prod&lang=scss&
2553
+
2554
+ ;// CONCATENATED MODULE: ./src/components/YcQuestion/index.vue
2555
+
2556
+
2557
+
2558
+ ;
2559
+
2560
+
2561
+ /* normalize component */
2562
+
2563
+ var YcQuestion_component = normalizeComponent(
2564
+ components_YcQuestionvue_type_script_lang_js_,
2565
+ YcQuestionvue_type_template_id_1d6048bd_render,
2566
+ YcQuestionvue_type_template_id_1d6048bd_staticRenderFns,
2567
+ false,
2568
+ null,
2569
+ null,
2570
+ null
2571
+
2572
+ )
2573
+
2574
+ /* harmony default export */ var YcQuestion = (YcQuestion_component.exports);
2375
2575
  ;// CONCATENATED MODULE: ./src/packages/index.js
2376
2576
 
2377
2577
 
2378
- const components = [YcSlideVerify, YcCustomerService];
2578
+
2579
+ const components = [YcSlideVerify, YcCustomerService, YcQuestion];
2379
2580
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
2380
2581
  const install = function (Vue) {
2381
2582
  // 遍历注册全局组件