chain-saasui 1.0.6 → 1.0.7

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.
Files changed (46) hide show
  1. package/README.md +5 -5
  2. package/babel.config.js +13 -13
  3. package/build/version-alpha.js +51 -51
  4. package/build/version-patch.js +44 -44
  5. package/build/webpack.common.js +54 -54
  6. package/build/webpack.components.js +69 -69
  7. package/build/webpack.demo.js +40 -40
  8. package/components/css/card.scss +19 -19
  9. package/components/css/common.scss +10 -10
  10. package/components/css/container.scss +14 -14
  11. package/components/css/detail.scss +87 -87
  12. package/components/css/dialog.scss +83 -83
  13. package/components/css/group.scss +82 -82
  14. package/components/css/index.scss +11 -11
  15. package/components/css/messagebox.scss +59 -59
  16. package/components/css/pagetable.scss +89 -89
  17. package/components/css/tablebuttons.scss +15 -15
  18. package/components/css/unit.scss +25 -25
  19. package/components/src/SCard/index.vue +34 -34
  20. package/components/src/SContainer/index.vue +35 -35
  21. package/components/src/SDialog/index.vue +101 -101
  22. package/components/src/SDrawer/index.vue +97 -97
  23. package/components/src/SForm/SSelect/index.vue +108 -108
  24. package/components/src/SGroup/index.vue +81 -81
  25. package/components/src/SMessagebox/index.js +66 -66
  26. package/components/src/SMessagebox/messagebox.vue +83 -83
  27. package/components/src/SPage/Pagedetail.vue +112 -112
  28. package/components/src/SPage/Pagestep.vue +94 -94
  29. package/components/src/SPage/Pagetable.vue +112 -112
  30. package/components/src/STable/STablecolumn.vue +111 -111
  31. package/components/src/STable/index.vue +48 -48
  32. package/components/src/STableButtons/STableButtons.md +111 -111
  33. package/components/src/STableButtons/index.vue +96 -96
  34. package/components/src/SUnit/index.vue +74 -74
  35. package/components/src/index.js +48 -48
  36. package/gulpfile.js +20 -20
  37. package/jsconfig.json +25 -25
  38. package/lib/saasui.common.js +1 -1
  39. package/package.json +84 -84
  40. package/public/html/ie.html +45 -45
  41. package/public/index.html +273 -273
  42. package/public/robots.txt +1 -1
  43. package/src/App.vue +30 -30
  44. package/src/components/HelloWorld.vue +58 -58
  45. package/src/main.js +16 -16
  46. package/vue.config.js +40 -40
@@ -1,66 +1,66 @@
1
- import MessageBox from './messagebox.vue';
2
-
3
- // MessageBoxManager.js
4
- export default class MessageBoxManager {
5
- constructor(Vue, i18n, Component = MessageBox) {
6
- if (!Vue) throw new Error('[MessageBox] Vue instance is required');
7
- if (!Component) throw new Error('[MessageBox] Vue component is required');
8
-
9
- this.Vue = Vue;
10
- this.i18n = i18n;
11
- this.Component = Component;
12
- this.instance = null;
13
- }
14
-
15
- _t(key) {
16
- return this.i18n ? this.i18n.t(key) : key;
17
- }
18
-
19
- _createInstance() {
20
- const Constructor = this.Vue.extend(this.Component);
21
- this.instance = new Constructor({
22
- el: document.createElement('div'),
23
- });
24
- document.body.appendChild(this.instance.$el);
25
- }
26
-
27
- _getInstance() {
28
- if (!this.instance) this._createInstance();
29
- return this.instance;
30
- }
31
-
32
- alert(options) {
33
- const instance = this._getInstance();
34
- return instance.open({
35
- ...options,
36
- title: options.title || this._t('deletemsg.hint'),
37
- confirmText: options.confirmText || this._t("buttonGroup.sure"),
38
- cancelText: options.cancelText || this._t("buttonGroup.cancel"),
39
- message: options.message,
40
- showCancelButton: false,
41
- });
42
- }
43
-
44
- confirm(options) {
45
- const instance = this._getInstance();
46
- return instance.open({
47
- ...options,
48
- title: options.title || this._t('deletemsg.hint'),
49
- confirmText: options.confirmText || this._t("buttonGroup.sure"),
50
- cancelText: options.cancelText || this._t("buttonGroup.cancel"),
51
- message: options.message,
52
- });
53
- }
54
-
55
- prompt(options) {
56
- const instance = this._getInstance();
57
- return instance.open({
58
- ...options,
59
- title: options.title || this._t('deletemsg.hint'),
60
- confirmText: options.confirmText || this._t("buttonGroup.sure"),
61
- cancelText: options.cancelText || this._t("buttonGroup.cancel"),
62
- message: options.message,
63
- showInput: true,
64
- });
65
- }
66
- }
1
+ import MessageBox from './messagebox.vue';
2
+
3
+ // MessageBoxManager.js
4
+ export default class MessageBoxManager {
5
+ constructor(Vue, i18n, Component = MessageBox) {
6
+ if (!Vue) throw new Error('[MessageBox] Vue instance is required');
7
+ if (!Component) throw new Error('[MessageBox] Vue component is required');
8
+
9
+ this.Vue = Vue;
10
+ this.i18n = i18n;
11
+ this.Component = Component;
12
+ this.instance = null;
13
+ }
14
+
15
+ _t(key) {
16
+ return this.i18n ? this.i18n.t(key) : key;
17
+ }
18
+
19
+ _createInstance() {
20
+ const Constructor = this.Vue.extend(this.Component);
21
+ this.instance = new Constructor({
22
+ el: document.createElement('div'),
23
+ });
24
+ document.body.appendChild(this.instance.$el);
25
+ }
26
+
27
+ _getInstance() {
28
+ if (!this.instance) this._createInstance();
29
+ return this.instance;
30
+ }
31
+
32
+ alert(options) {
33
+ const instance = this._getInstance();
34
+ return instance.open({
35
+ ...options,
36
+ title: options.title || this._t('deletemsg.hint'),
37
+ confirmText: options.confirmText || this._t("buttonGroup.sure"),
38
+ cancelText: options.cancelText || this._t("buttonGroup.cancel"),
39
+ message: options.message,
40
+ showCancelButton: false,
41
+ });
42
+ }
43
+
44
+ confirm(options) {
45
+ const instance = this._getInstance();
46
+ return instance.open({
47
+ ...options,
48
+ title: options.title || this._t('deletemsg.hint'),
49
+ confirmText: options.confirmText || this._t("buttonGroup.sure"),
50
+ cancelText: options.cancelText || this._t("buttonGroup.cancel"),
51
+ message: options.message,
52
+ });
53
+ }
54
+
55
+ prompt(options) {
56
+ const instance = this._getInstance();
57
+ return instance.open({
58
+ ...options,
59
+ title: options.title || this._t('deletemsg.hint'),
60
+ confirmText: options.confirmText || this._t("buttonGroup.sure"),
61
+ cancelText: options.cancelText || this._t("buttonGroup.cancel"),
62
+ message: options.message,
63
+ showInput: true,
64
+ });
65
+ }
66
+ }
@@ -1,83 +1,83 @@
1
- <template>
2
- <transition name="el-fade-in-linear">
3
- <div v-if="visible" class="message-box-overlay">
4
- <div class="message-box">
5
- <div class="message-box_main">
6
- <div class="message-box_icon">
7
- <span class="el-icon-warning"></span>
8
- </div>
9
- <div class="message-box_right">
10
- <div class="message-box__header">
11
- <span class="message-box__title">{{ title }}</span>
12
- </div>
13
- <div class="message-box__content">
14
- <div v-if="message && dangerouslyUseHTMLString == false">{{ message }}</div>
15
- <div v-if="message && dangerouslyUseHTMLString" v-html="message"></div>
16
- <el-input v-if="showInput" v-model="inputValue" class="message-box__input" :placeholder="inputPlaceholder" />
17
- </div>
18
- </div>
19
- </div>
20
- <div class="message-box__footer">
21
- <el-button v-if="showCancelButton" @click="handleCancel" size="mini">{{ cancelText }}</el-button>
22
- <el-button @click="handleConfirm" type="primary" size="mini">{{ confirmText }}</el-button>
23
- </div>
24
- </div>
25
- </div>
26
- </transition>
27
- </template>
28
-
29
- <script>
30
- import { isEmpty } from 'chain-lodash';
31
- export default {
32
- name: 'SMessageBox',
33
- props: {},
34
- data() {
35
- return {
36
- visible: false,
37
- title: '',
38
- message: '',
39
- showInput: false,
40
- inputValue: '',
41
- inputPlaceholder: '',
42
- showCancelButton: false,
43
- resolve: null,
44
- reject: null,
45
- confirmText: '',
46
- cancelText: '',
47
- dangerouslyUseHTMLString: false,
48
- };
49
- },
50
- methods: {
51
- open(options) {
52
- this.title = options.title;
53
- this.message = options.message || '';
54
- this.showClose = isEmpty(options.showClose) ? true : options.showClose;
55
- this.showInput = options.showInput || false;
56
- this.dangerouslyUseHTMLString = options.dangerouslyUseHTMLString || false;
57
- this.inputPlaceholder = options.inputPlaceholder || '';
58
- this.showCancelButton = isEmpty(options.showCancelButton) ? true : options.showCancelButton;
59
- this.confirmText = options.confirmText;
60
- this.cancelText = options.cancelText;
61
- this.visible = true;
62
- this.inputValue = '';
63
-
64
- return new Promise((resolve, reject) => {
65
- this.resolve = resolve;
66
- this.reject = reject;
67
- });
68
- },
69
- handleConfirm() {
70
- this.visible = false;
71
- if (this.showInput) {
72
- this.resolve(this.inputValue);
73
- } else {
74
- this.resolve(true);
75
- }
76
- },
77
- handleCancel() {
78
- this.visible = false;
79
- this.reject('cancel');
80
- },
81
- },
82
- };
83
- </script>
1
+ <template>
2
+ <transition name="el-fade-in-linear">
3
+ <div v-if="visible" class="message-box-overlay">
4
+ <div class="message-box">
5
+ <div class="message-box_main">
6
+ <div class="message-box_icon">
7
+ <span class="el-icon-warning"></span>
8
+ </div>
9
+ <div class="message-box_right">
10
+ <div class="message-box__header">
11
+ <span class="message-box__title">{{ title }}</span>
12
+ </div>
13
+ <div class="message-box__content">
14
+ <div v-if="message && dangerouslyUseHTMLString == false">{{ message }}</div>
15
+ <div v-if="message && dangerouslyUseHTMLString" v-html="message"></div>
16
+ <el-input v-if="showInput" v-model="inputValue" class="message-box__input" :placeholder="inputPlaceholder" />
17
+ </div>
18
+ </div>
19
+ </div>
20
+ <div class="message-box__footer">
21
+ <el-button v-if="showCancelButton" @click="handleCancel" size="mini">{{ cancelText }}</el-button>
22
+ <el-button @click="handleConfirm" type="primary" size="mini">{{ confirmText }}</el-button>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </transition>
27
+ </template>
28
+
29
+ <script>
30
+ import { isEmpty } from 'chain-lodash';
31
+ export default {
32
+ name: 'SMessageBox',
33
+ props: {},
34
+ data() {
35
+ return {
36
+ visible: false,
37
+ title: '',
38
+ message: '',
39
+ showInput: false,
40
+ inputValue: '',
41
+ inputPlaceholder: '',
42
+ showCancelButton: false,
43
+ resolve: null,
44
+ reject: null,
45
+ confirmText: '',
46
+ cancelText: '',
47
+ dangerouslyUseHTMLString: false,
48
+ };
49
+ },
50
+ methods: {
51
+ open(options) {
52
+ this.title = options.title;
53
+ this.message = options.message || '';
54
+ this.showClose = isEmpty(options.showClose) ? true : options.showClose;
55
+ this.showInput = options.showInput || false;
56
+ this.dangerouslyUseHTMLString = options.dangerouslyUseHTMLString || false;
57
+ this.inputPlaceholder = options.inputPlaceholder || '';
58
+ this.showCancelButton = isEmpty(options.showCancelButton) ? true : options.showCancelButton;
59
+ this.confirmText = options.confirmText;
60
+ this.cancelText = options.cancelText;
61
+ this.visible = true;
62
+ this.inputValue = '';
63
+
64
+ return new Promise((resolve, reject) => {
65
+ this.resolve = resolve;
66
+ this.reject = reject;
67
+ });
68
+ },
69
+ handleConfirm() {
70
+ this.visible = false;
71
+ if (this.showInput) {
72
+ this.resolve(this.inputValue);
73
+ } else {
74
+ this.resolve(true);
75
+ }
76
+ },
77
+ handleCancel() {
78
+ this.visible = false;
79
+ this.reject('cancel');
80
+ },
81
+ },
82
+ };
83
+ </script>
@@ -1,112 +1,112 @@
1
- <template>
2
- <div class="saas-detail">
3
- <div class="saas-detail-top">
4
- <div class="saas-detail-header">
5
- <div class="saas-detail-backbox">
6
- <div v-if="showClose" class="saas-detail-back" @click="goBack">
7
- <span class="el-icon-arrow-left"></span>
8
- </div>
9
- </div>
10
- <div class="saas-detail-titlebox" :style="computeStyle">
11
- <div class="saas-detail-title">
12
- <span class="saas-title-line"></span>
13
- <template v-if="$slots.title">
14
- <slot name="title"></slot>
15
- </template>
16
- <span v-else>
17
- {{ title }}
18
- </span>
19
- </div>
20
- <div v-if="titleSub" class="saas-detail-sub">{{ titleSub }}</div>
21
- </div>
22
- <slot name="header-append"></slot>
23
- </div>
24
- <div class="saas-detail-content">
25
- <slot></slot>
26
- </div>
27
- </div>
28
- <template v-if="showFooter">
29
- <div class="saas-detail-footer">
30
- <slot v-if="$slots.footer" name="footer"></slot>
31
- <template v-else>
32
- <el-button @click="handleClose">{{ cancelText }}</el-button>
33
- <el-button :loading="loadingBtn" type="primary" @click="handleSubmit" v-preventReClick="5000">{{ confirmText }}</el-button>
34
- </template>
35
- </div>
36
- </template>
37
- </div>
38
- </template>
39
- <script>
40
- export default {
41
- name: 'SPagedetail',
42
- props: {
43
- showFooter: {
44
- type: Boolean,
45
- default: () => true,
46
- },
47
- showClose: {
48
- type: Boolean,
49
- default: () => true,
50
- },
51
- loadingBtn: {
52
- type: Boolean,
53
- default: () => false,
54
- },
55
- computeStyle: {
56
- type: Object,
57
- default: () => ({
58
- width: '1000px',
59
- margin: '0 auto',
60
- }),
61
- },
62
- title: {
63
- type: String,
64
- default: '',
65
- },
66
- titleSub: {
67
- type: String,
68
- default: '',
69
- },
70
- confirmText: {
71
- type: String,
72
- default() {
73
- return this.$t('buttonGroup.sure');
74
- },
75
- },
76
- cancelText: {
77
- type: String,
78
- default() {
79
- return this.$t('buttonGroup.cancel');
80
- },
81
- },
82
- },
83
- data() {
84
- return {};
85
- },
86
- computed: {
87
- show: {
88
- get() {
89
- return this.visible;
90
- },
91
- set(val) {
92
- this.$emit('update:visible', val);
93
- },
94
- },
95
- },
96
- deactivated() {
97
- this.handleClose(); // 在缓存组件时关闭弹窗
98
- },
99
- methods: {
100
- handleSubmit() {
101
- this.$emit('confirm');
102
- },
103
- handleClose() {
104
- this.$emit('close');
105
- },
106
- goBack() {
107
- this.$emit('close');
108
- },
109
- },
110
- };
111
- </script>
112
- <style lang="scss" scoped></style>
1
+ <template>
2
+ <div class="saas-detail">
3
+ <div class="saas-detail-top">
4
+ <div class="saas-detail-header">
5
+ <div class="saas-detail-backbox">
6
+ <div v-if="showClose" class="saas-detail-back" @click="goBack">
7
+ <span class="el-icon-arrow-left"></span>
8
+ </div>
9
+ </div>
10
+ <div class="saas-detail-titlebox" :style="computeStyle">
11
+ <div class="saas-detail-title">
12
+ <span class="saas-title-line"></span>
13
+ <template v-if="$slots.title">
14
+ <slot name="title"></slot>
15
+ </template>
16
+ <span v-else>
17
+ {{ title }}
18
+ </span>
19
+ </div>
20
+ <div v-if="titleSub" class="saas-detail-sub">{{ titleSub }}</div>
21
+ </div>
22
+ <slot name="header-append"></slot>
23
+ </div>
24
+ <div class="saas-detail-content">
25
+ <slot></slot>
26
+ </div>
27
+ </div>
28
+ <template v-if="showFooter">
29
+ <div class="saas-detail-footer">
30
+ <slot v-if="$slots.footer" name="footer"></slot>
31
+ <template v-else>
32
+ <el-button @click="handleClose">{{ cancelText }}</el-button>
33
+ <el-button :loading="loadingBtn" type="primary" @click="handleSubmit" v-preventReClick="5000">{{ confirmText }}</el-button>
34
+ </template>
35
+ </div>
36
+ </template>
37
+ </div>
38
+ </template>
39
+ <script>
40
+ export default {
41
+ name: 'SPagedetail',
42
+ props: {
43
+ showFooter: {
44
+ type: Boolean,
45
+ default: () => true,
46
+ },
47
+ showClose: {
48
+ type: Boolean,
49
+ default: () => true,
50
+ },
51
+ loadingBtn: {
52
+ type: Boolean,
53
+ default: () => false,
54
+ },
55
+ computeStyle: {
56
+ type: Object,
57
+ default: () => ({
58
+ width: '1000px',
59
+ margin: '0 auto',
60
+ }),
61
+ },
62
+ title: {
63
+ type: String,
64
+ default: '',
65
+ },
66
+ titleSub: {
67
+ type: String,
68
+ default: '',
69
+ },
70
+ confirmText: {
71
+ type: String,
72
+ default() {
73
+ return this.$t('buttonGroup.sure');
74
+ },
75
+ },
76
+ cancelText: {
77
+ type: String,
78
+ default() {
79
+ return this.$t('buttonGroup.cancel');
80
+ },
81
+ },
82
+ },
83
+ data() {
84
+ return {};
85
+ },
86
+ computed: {
87
+ show: {
88
+ get() {
89
+ return this.visible;
90
+ },
91
+ set(val) {
92
+ this.$emit('update:visible', val);
93
+ },
94
+ },
95
+ },
96
+ deactivated() {
97
+ this.handleClose(); // 在缓存组件时关闭弹窗
98
+ },
99
+ methods: {
100
+ handleSubmit() {
101
+ this.$emit('confirm');
102
+ },
103
+ handleClose() {
104
+ this.$emit('close');
105
+ },
106
+ goBack() {
107
+ this.$emit('close');
108
+ },
109
+ },
110
+ };
111
+ </script>
112
+ <style lang="scss" scoped></style>