zartui 0.1.52 → 0.1.55

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 (70) hide show
  1. package/es/cascader/index.css +1 -0
  2. package/es/cascader/index.js +286 -0
  3. package/es/cascader/index.less +84 -0
  4. package/es/cascader/style/index.js +8 -0
  5. package/es/cascader/style/less.js +8 -0
  6. package/es/datetime-picker/shared.js +29 -8
  7. package/es/dialog/index.css +1 -1
  8. package/es/dialog/index.less +2 -0
  9. package/es/field/index.css +1 -1
  10. package/es/field/index.less +0 -20
  11. package/es/index-anchor/index.css +1 -0
  12. package/es/index-anchor/index.js +83 -0
  13. package/es/index-anchor/index.less +34 -0
  14. package/es/index-anchor/style/index.js +2 -0
  15. package/es/index-anchor/style/less.js +2 -0
  16. package/es/index-bar/IndexIndicate.js +41 -0
  17. package/es/index-bar/index.css +1 -0
  18. package/es/index-bar/index.js +256 -0
  19. package/es/index-bar/index.less +68 -0
  20. package/es/index-bar/style/index.js +2 -0
  21. package/es/index-bar/style/less.js +2 -0
  22. package/es/index.js +6 -3
  23. package/es/picker/index.js +3 -0
  24. package/es/step/index.css +1 -1
  25. package/es/step/index.js +45 -54
  26. package/es/step/index.less +25 -61
  27. package/es/steps/index.css +1 -1
  28. package/es/steps/index.js +6 -7
  29. package/es/steps/index.less +5 -3
  30. package/es/style/var.less +22 -27
  31. package/lib/a037f57fc4d92a8a1f1e.worker.js +60600 -0
  32. package/lib/b7cf90b4775181215df7.worker.js +10 -0
  33. package/lib/cascader/index.css +1 -0
  34. package/lib/cascader/index.js +299 -0
  35. package/lib/cascader/index.less +84 -0
  36. package/lib/cascader/style/index.js +8 -0
  37. package/lib/cascader/style/less.js +8 -0
  38. package/lib/datetime-picker/shared.js +29 -8
  39. package/lib/dialog/index.css +1 -1
  40. package/lib/dialog/index.less +2 -0
  41. package/lib/field/index.css +1 -1
  42. package/lib/field/index.less +0 -20
  43. package/lib/index-anchor/index.css +1 -0
  44. package/lib/index-anchor/index.js +93 -0
  45. package/lib/index-anchor/index.less +34 -0
  46. package/lib/index-anchor/style/index.js +2 -0
  47. package/lib/index-anchor/style/less.js +2 -0
  48. package/lib/index-bar/IndexIndicate.js +46 -0
  49. package/lib/index-bar/index.css +1 -0
  50. package/lib/index-bar/index.js +272 -0
  51. package/lib/index-bar/index.less +68 -0
  52. package/lib/index-bar/style/index.js +2 -0
  53. package/lib/index-bar/style/less.js +2 -0
  54. package/lib/index.css +1 -1
  55. package/lib/index.js +14 -2
  56. package/lib/index.less +7 -4
  57. package/lib/picker/index.js +3 -0
  58. package/lib/step/index.css +1 -1
  59. package/lib/step/index.js +46 -55
  60. package/lib/step/index.less +25 -61
  61. package/lib/steps/index.css +1 -1
  62. package/lib/steps/index.js +6 -7
  63. package/lib/steps/index.less +5 -3
  64. package/lib/style/var.less +22 -27
  65. package/lib/zart.js +58213 -25188
  66. package/lib/zart.min.js +4 -9
  67. package/package.json +1 -1
  68. package/changelog.generated.md +0 -5
  69. package/lib/7893e51cf0a4877dac80.worker.js +0 -10
  70. package/lib/be09b519a460e229fd8d.worker.js +0 -2527
@@ -0,0 +1 @@
1
+ .zt-cascader__header{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;height:44px;padding:0 16px}.zt-cascader__title{font-weight:700;font-size:16px;line-height:44px}.zt-cascader__close-icon{color:rgba(0,0,0,.4);font-size:20px}.zt-cascader__close-icon:active{color:rgba(0,0,0,.6)}.zt-cascader__tabs .zt-tab{-webkit-box-flex:0;-webkit-flex:none;flex:none;margin:0 8px;padding:0}.zt-cascader__tabs.zt-tabs--line .zt-tabs__wrap{height:48px}.zt-cascader__tabs .zt-tabs__nav--complete{padding-right:8px;padding-left:8px}.zt-cascader__tab{color:#000;font-weight:700;font-size:14px;line-height:44px}.zt-cascader__tab--unselected{color:rgba(0,0,0,.4);font-weight:400}.zt-cascader__option{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;padding:0 16px;font-weight:700;font-size:16px;line-height:44px}.zt-cascader__option:active{background-color:rgba(0,0,0,.04)}.zt-cascader__option--selected{color:#0091fa}.zt-cascader__selected-icon{font-size:24px}.zt-cascader__options{box-sizing:border-box;height:352px;overflow-y:auto;-webkit-overflow-scrolling:touch}
@@ -0,0 +1,286 @@
1
+ import { createNamespace } from '../utils';
2
+ import Tab from '../tab';
3
+ import Tabs from '../tabs';
4
+ import Icon from '../icon';
5
+ import Divider from "../divider";
6
+
7
+ var _createNamespace = createNamespace('cascader'),
8
+ createComponent = _createNamespace[0],
9
+ bem = _createNamespace[1],
10
+ t = _createNamespace[2];
11
+
12
+ export default createComponent({
13
+ props: {
14
+ title: String,
15
+ value: [Number, String],
16
+ fieldNames: Object,
17
+ placeholder: String,
18
+ activeColor: String,
19
+ options: {
20
+ type: Array,
21
+ default: function _default() {
22
+ return [];
23
+ }
24
+ },
25
+ closeable: {
26
+ type: Boolean,
27
+ default: true
28
+ }
29
+ },
30
+ data: function data() {
31
+ return {
32
+ tabs: [],
33
+ activeTab: 0
34
+ };
35
+ },
36
+ computed: {
37
+ textKey: function textKey() {
38
+ var _this$fieldNames;
39
+
40
+ return ((_this$fieldNames = this.fieldNames) == null ? void 0 : _this$fieldNames.text) || 'text';
41
+ },
42
+ valueKey: function valueKey() {
43
+ var _this$fieldNames2;
44
+
45
+ return ((_this$fieldNames2 = this.fieldNames) == null ? void 0 : _this$fieldNames2.value) || 'value';
46
+ },
47
+ childrenKey: function childrenKey() {
48
+ var _this$fieldNames3;
49
+
50
+ return ((_this$fieldNames3 = this.fieldNames) == null ? void 0 : _this$fieldNames3.children) || 'children';
51
+ }
52
+ },
53
+ watch: {
54
+ options: {
55
+ deep: true,
56
+ handler: 'updateTabs'
57
+ },
58
+ value: function value(_value) {
59
+ var _this = this;
60
+
61
+ if (_value || _value === 0) {
62
+ var values = this.tabs.map(function (tab) {
63
+ var _tab$selectedOption;
64
+
65
+ return (_tab$selectedOption = tab.selectedOption) == null ? void 0 : _tab$selectedOption[_this.valueKey];
66
+ });
67
+
68
+ if (values.indexOf(_value) !== -1) {
69
+ return;
70
+ }
71
+ }
72
+
73
+ this.updateTabs();
74
+ }
75
+ },
76
+ created: function created() {
77
+ this.updateTabs();
78
+ },
79
+ methods: {
80
+ getSelectedOptionsByValue: function getSelectedOptionsByValue(options, value) {
81
+ for (var i = 0; i < options.length; i++) {
82
+ var option = options[i];
83
+
84
+ if (option[this.valueKey] === value) {
85
+ return [option];
86
+ }
87
+
88
+ if (option[this.childrenKey]) {
89
+ var selectedOptions = this.getSelectedOptionsByValue(option[this.childrenKey], value);
90
+
91
+ if (selectedOptions) {
92
+ return [option].concat(selectedOptions);
93
+ }
94
+ }
95
+ }
96
+ },
97
+ updateTabs: function updateTabs() {
98
+ var _this2 = this;
99
+
100
+ if (this.value || this.value === 0) {
101
+ var selectedOptions = this.getSelectedOptionsByValue(this.options, this.value);
102
+
103
+ if (selectedOptions) {
104
+ var optionsCursor = this.options;
105
+ this.tabs = selectedOptions.map(function (option) {
106
+ var tab = {
107
+ options: optionsCursor,
108
+ selectedOption: option
109
+ };
110
+ var next = optionsCursor.filter(function (item) {
111
+ return item[_this2.valueKey] === option[_this2.valueKey];
112
+ });
113
+
114
+ if (next.length) {
115
+ optionsCursor = next[0][_this2.childrenKey];
116
+ }
117
+
118
+ return tab;
119
+ });
120
+
121
+ if (optionsCursor) {
122
+ this.tabs.push({
123
+ options: optionsCursor,
124
+ selectedOption: null
125
+ });
126
+ }
127
+
128
+ this.$nextTick(function () {
129
+ _this2.activeTab = _this2.tabs.length - 1;
130
+ });
131
+ return;
132
+ }
133
+ }
134
+
135
+ this.tabs = [{
136
+ options: this.options,
137
+ selectedOption: null
138
+ }];
139
+ },
140
+ onSelect: function onSelect(option, tabIndex) {
141
+ var _this3 = this;
142
+
143
+ this.tabs[tabIndex].selectedOption = option;
144
+
145
+ if (this.tabs.length > tabIndex + 1) {
146
+ this.tabs = this.tabs.slice(0, tabIndex + 1);
147
+ }
148
+
149
+ if (option[this.childrenKey]) {
150
+ var nextTab = {
151
+ options: option[this.childrenKey],
152
+ selectedOption: null
153
+ };
154
+
155
+ if (this.tabs[tabIndex + 1]) {
156
+ this.$set(this.tabs, tabIndex + 1, nextTab);
157
+ } else {
158
+ this.tabs.push(nextTab);
159
+ }
160
+
161
+ this.$nextTick(function () {
162
+ _this3.activeTab++;
163
+ });
164
+ }
165
+
166
+ var selectedOptions = this.tabs.map(function (tab) {
167
+ return tab.selectedOption;
168
+ }).filter(function (item) {
169
+ return !!item;
170
+ });
171
+ var eventParams = {
172
+ value: option[this.valueKey],
173
+ tabIndex: tabIndex,
174
+ selectedOptions: selectedOptions
175
+ };
176
+ this.$emit('input', option[this.valueKey]);
177
+ this.$emit('change', eventParams);
178
+
179
+ if (!option[this.childrenKey]) {
180
+ this.$emit('finish', eventParams);
181
+ }
182
+ },
183
+ onClose: function onClose() {
184
+ this.$emit('close');
185
+ },
186
+ renderHeader: function renderHeader() {
187
+ var h = this.$createElement;
188
+ return h("div", {
189
+ "class": bem('header')
190
+ }, [h("h2", {
191
+ "class": bem('title')
192
+ }, [this.slots('title') || this.title]), this.closeable ? h(Icon, {
193
+ "attrs": {
194
+ "name": "cross"
195
+ },
196
+ "class": bem('close-icon'),
197
+ "on": {
198
+ "click": this.onClose
199
+ }
200
+ }) : null]);
201
+ },
202
+ renderDivider: function renderDivider() {
203
+ var h = this.$createElement;
204
+ return h("zt-divider", {
205
+ "style": {
206
+ margin: 0
207
+ }
208
+ });
209
+ },
210
+ renderOptions: function renderOptions(options, selectedOption, tabIndex) {
211
+ var _this4 = this;
212
+
213
+ var h = this.$createElement;
214
+
215
+ var renderOption = function renderOption(option) {
216
+ var isSelected = selectedOption && option[_this4.valueKey] === selectedOption[_this4.valueKey];
217
+ var Text = _this4.slots('option', {
218
+ option: option,
219
+ selected: isSelected
220
+ }) || h("span", [option[_this4.textKey]]);
221
+ return h("li", {
222
+ "class": bem('option', {
223
+ selected: isSelected
224
+ }),
225
+ "style": {
226
+ color: isSelected ? _this4.activeColor : null
227
+ },
228
+ "on": {
229
+ "click": function click() {
230
+ _this4.onSelect(option, tabIndex);
231
+ }
232
+ }
233
+ }, [Text, isSelected ? h(Icon, {
234
+ "attrs": {
235
+ "name": "success"
236
+ },
237
+ "class": bem('selected-icon')
238
+ }) : null]);
239
+ };
240
+
241
+ return h("ul", {
242
+ "class": bem('options')
243
+ }, [options.map(renderOption)]);
244
+ },
245
+ renderTab: function renderTab(item, tabIndex) {
246
+ var h = this.$createElement;
247
+ var options = item.options,
248
+ selectedOption = item.selectedOption;
249
+ var title = selectedOption ? selectedOption[this.textKey] : this.placeholder || t('select');
250
+ return h(Tab, {
251
+ "attrs": {
252
+ "title": title,
253
+ "titleClass": bem('tab', {
254
+ unselected: !selectedOption
255
+ })
256
+ }
257
+ }, [this.renderOptions(options, selectedOption, tabIndex)]);
258
+ },
259
+ renderTabs: function renderTabs() {
260
+ var _this5 = this;
261
+
262
+ var h = this.$createElement;
263
+ return h(Tabs, {
264
+ "attrs": {
265
+ "animated": true,
266
+ "swipeable": true,
267
+ "swipeThreshold": 0,
268
+ "color": this.activeColor
269
+ },
270
+ "class": bem('tabs'),
271
+ "model": {
272
+ value: _this5.activeTab,
273
+ callback: function callback($$v) {
274
+ _this5.activeTab = $$v;
275
+ }
276
+ }
277
+ }, [this.tabs.map(this.renderTab)]);
278
+ }
279
+ },
280
+ render: function render() {
281
+ var h = arguments[0];
282
+ return h("div", {
283
+ "class": bem()
284
+ }, [this.renderHeader(), this.renderDivider(), this.renderTabs()]);
285
+ }
286
+ });
@@ -0,0 +1,84 @@
1
+ @import '../style/var';
2
+
3
+ .zt-cascader {
4
+ &__header {
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: space-between;
8
+ height: @cascader-header-height;
9
+ padding: 0 @padding-md;
10
+ }
11
+
12
+ &__title {
13
+ font-weight: @font-weight-bold;
14
+ font-size: @cascader-title-font-size;
15
+ line-height: @cascader-title-line-height;
16
+ }
17
+
18
+ &__close-icon {
19
+ color: @cascader-close-icon-color;
20
+ font-size: @cascader-close-icon-size;
21
+
22
+ &:active {
23
+ color: @cascader-close-icon-active-color;
24
+ }
25
+ }
26
+
27
+ &__tabs {
28
+ .zt-tab {
29
+ flex: none;
30
+ margin: 0 8px;
31
+ padding: 0;
32
+ }
33
+
34
+ &.zt-tabs--line .zt-tabs__wrap {
35
+ height: @cascader-tabs-height;
36
+ }
37
+
38
+ .zt-tabs__nav--complete {
39
+ padding-right: 8px;
40
+ padding-left: 8px;
41
+ }
42
+ }
43
+
44
+ &__tab {
45
+ color: @cascader-tab-color;
46
+ font-weight: @font-weight-bold;
47
+ font-size: @font-size-md;
48
+ line-height: 44px;
49
+
50
+ &--unselected {
51
+ color: @cascader-unselected-tab-color;
52
+ font-weight: normal;
53
+ }
54
+ }
55
+
56
+ &__option {
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: space-between;
60
+ padding: 0 @padding-md;
61
+ font-weight: @font-weight-bold;
62
+ font-size: @font-size-lg;
63
+ line-height: 44px;
64
+
65
+ &:active {
66
+ background-color: @active-color;
67
+ }
68
+
69
+ &--selected {
70
+ color: @cascader-active-color;
71
+ }
72
+ }
73
+
74
+ &__selected-icon {
75
+ font-size: @cascader-selected-icon-size;
76
+ }
77
+
78
+ &__options {
79
+ box-sizing: border-box;
80
+ height: @cascader-options-height;
81
+ overflow-y: auto;
82
+ -webkit-overflow-scrolling: touch;
83
+ }
84
+ }
@@ -0,0 +1,8 @@
1
+ import '../../style/base.css';
2
+ import '../../info/index.css';
3
+ import '../../icon/index.css';
4
+ import '../../tab/index.css';
5
+ import '../../sticky/index.css';
6
+ import '../../tabs/index.css';
7
+ import '../../divider/index.css';
8
+ import '../index.css';
@@ -0,0 +1,8 @@
1
+ import '../../style/base.less';
2
+ import '../../info/index.less';
3
+ import '../../icon/index.less';
4
+ import '../../tab/index.less';
5
+ import '../../sticky/index.less';
6
+ import '../../tabs/index.less';
7
+ import '../../divider/index.less';
8
+ import '../index.less';
@@ -24,7 +24,8 @@ export var sharedProps = _extends({}, pickerProps, {
24
24
  export var TimePickerMixin = {
25
25
  data: function data() {
26
26
  return {
27
- innerValue: this.formatValue(this.value)
27
+ innerValue: this.formatValue(this.value),
28
+ columnValueNotInited: false
28
29
  };
29
30
  },
30
31
  computed: {
@@ -91,15 +92,35 @@ export var TimePickerMixin = {
91
92
  } else {
92
93
  this.$emit('input', val);
93
94
  }
95
+ },
96
+ showPicker: function showPicker() {
97
+ var _this3 = this;
98
+
99
+ if (this.columnValueNotInited) {
100
+ this.updateColumnValue();
101
+ this.$nextTick(function () {
102
+ _this3.updateInnerValue();
103
+
104
+ _this3.columnValueNotInited = false;
105
+ });
106
+ }
94
107
  }
95
108
  },
96
109
  mounted: function mounted() {
97
- var _this3 = this;
110
+ var _this4 = this;
98
111
 
99
- this.updateColumnValue();
100
- this.$nextTick(function () {
101
- _this3.updateInnerValue();
102
- });
112
+ var picker = this.getPicker(); // picker UI元素没有准备好,没有columns
113
+
114
+ if (!picker || !picker.getColumnCount()) {
115
+ this.columnValueNotInited = true;
116
+ } else {
117
+ this.updateColumnValue();
118
+ this.$nextTick(function () {
119
+ _this4.updateInnerValue();
120
+
121
+ _this4.columnValueNotInited = false;
122
+ });
123
+ }
103
124
  },
104
125
  methods: {
105
126
  // @exposed-api
@@ -115,12 +136,12 @@ export var TimePickerMixin = {
115
136
  }
116
137
  },
117
138
  render: function render() {
118
- var _this4 = this;
139
+ var _this5 = this;
119
140
 
120
141
  var h = arguments[0];
121
142
  var props = {};
122
143
  Object.keys(pickerProps).forEach(function (key) {
123
- props[key] = _this4[key];
144
+ props[key] = _this5[key];
124
145
  });
125
146
  return h(Picker, {
126
147
  "ref": "picker",
@@ -1 +1 @@
1
- .zt-dialog{position:fixed;top:45%;left:50%;width:327px;overflow:hidden;font-size:16px;background-color:#fff;border-radius:4px;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:.3s;transition:.3s;-webkit-transition-property:opacity,-webkit-transform;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform}@media (max-width:328px){.zt-dialog{width:90%}}.zt-dialog__header{padding-top:24px;font-weight:700;line-height:24px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;word-break:break-all;padding-left:16px;padding-right:16px}.zt-dialog__header--isolated{padding:24px 0}.zt-dialog__header--custom-title{height:44px;padding-left:0;padding-right:0;padding-top:0}.zt-dialog__content{text-align:center}.zt-dialog__content--isolated{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;min-height:100px}.zt-dialog__message{max-height:60vh;padding:24px 16px;overflow-y:auto;font-size:16px;line-height:20px;color:rgba(0,0,0,.6);display:inline-block;text-align:left;white-space:pre-wrap;word-wrap:break-word;-webkit-overflow-scrolling:touch}.zt-dialog__message--has-title{padding-top:8px;font-size:14px}.zt-dialog__message--left{text-align:left}.zt-dialog__message--right{text-align:right}.zt-dialog__footer{display:-webkit-box;display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.zt-dialog__footer .zt-hairline--left::after{top:calc(-50% + 20px);bottom:calc(-50% + 20px)}.zt-dialog__cancel,.zt-dialog__confirm{-webkit-box-flex:1;-webkit-flex:1;flex:1;height:44px;margin:0;border:0}.zt-dialog__confirm,.zt-dialog__confirm:active{color:#0091fa}.zt-dialog__cancel{color:#000;font-weight:400}.zt-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.zt-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
1
+ .zt-dialog{position:fixed;top:45%;left:50%;width:327px;overflow:hidden;font-size:16px;background-color:#fff;border-radius:4px;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:.3s;transition:.3s;-webkit-transition-property:opacity,-webkit-transform;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform}@media (max-width:328px){.zt-dialog{width:90%}}.zt-dialog__header{padding-top:24px;font-weight:700;line-height:24px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;word-break:break-all;padding-left:16px;padding-right:16px}.zt-dialog__header--isolated{padding:24px 0}.zt-dialog__header--custom-title{height:44px;padding-left:0;padding-right:0;padding-top:0}.zt-dialog__content{text-align:center;word-break:break-all}.zt-dialog__content--isolated{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;min-height:100px}.zt-dialog__message{max-height:60vh;padding:24px 16px;overflow-y:auto;font-size:16px;line-height:20px;color:rgba(0,0,0,.6);display:inline-block;text-align:left;white-space:pre-wrap;word-wrap:break-word;-webkit-overflow-scrolling:touch}.zt-dialog__message--has-title{padding-top:8px;font-size:14px}.zt-dialog__message--left{text-align:left}.zt-dialog__message--right{text-align:right}.zt-dialog__footer{display:-webkit-box;display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.zt-dialog__footer .zt-hairline--left::after{top:calc(-50% + 20px);bottom:calc(-50% + 20px)}.zt-dialog__cancel,.zt-dialog__confirm{-webkit-box-flex:1;-webkit-flex:1;flex:1;height:44px;margin:0;border:0}.zt-dialog__confirm,.zt-dialog__confirm:active{color:#0091fa}.zt-dialog__cancel{color:#000;font-weight:400}.zt-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.zt-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
@@ -44,6 +44,8 @@
44
44
 
45
45
  &__content {
46
46
  text-align: center;
47
+ word-break:break-all;
48
+
47
49
  &--isolated {
48
50
  display: flex;
49
51
  align-items: center;
@@ -1 +1 @@
1
- .zt-field__label{-webkit-box-flex:0;-webkit-flex:none;flex:none;box-sizing:border-box;width:6.2em;margin-right:12px;color:#646566;text-align:left;word-wrap:break-word;vertical-align:middle}.zt-field__label--center{text-align:center}.zt-field__label--right{text-align:right}.zt-field--disabled .zt-field__label{color:#c8c9cc}.zt-field__value{overflow:visible}.zt-field__body{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-field__body input{text-align:right;direction:rtl;caret-color:#0091fa}.zt-field__body textarea::-webkit-textarea-placeholder{text-align:left}.zt-field__body textarea:-ms-textarea-placeholder{text-align:left}.zt-field__body textarea::-webkit-input-placeholder{text-align:left}.zt-field__body textarea::placeholder{text-align:left}.zt-field__body input::-webkit-input-placeholder{text-align:right}.zt-field__body input::placeholder{text-align:right}.zt-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:rgba(0,0,0,.6);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none}.zt-field__control::-webkit-input-placeholder{color:#c8c9cc}.zt-field__control::placeholder{color:#c8c9cc}.zt-field__control:disabled{color:#c8c9cc;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#c8c9cc}.zt-field__control:read-only{cursor:default}.zt-field__control--center{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-align:center}.zt-field__control--right{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;text-align:right}.zt-field__control--custom{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;min-height:24px}.zt-field__control[type=date],.zt-field__control[type=datetime-local],.zt-field__control[type=time]{min-height:24px}.zt-field__control[type=search]{-webkit-appearance:none}.zt-field__button,.zt-field__clear,.zt-field__icon,.zt-field__right-icon{-webkit-flex-shrink:0;flex-shrink:0}.zt-field__clear,.zt-field__right-icon{margin-right:-8px;padding:0 8px;line-height:inherit}.zt-field__zt-clear-icon{margin-right:-8px;padding:0 8px;height:20px}.zt-field__clear{color:#c8c9cc;font-size:16px;cursor:pointer}.zt-field__left-icon .zt-icon,.zt-field__right-icon .zt-icon{display:block;font-size:16px;line-height:inherit}.zt-field__zt-left-icon{margin-right:4px;height:20px}.zt-field__zt-clear-size,.zt-field__zt-left-icon-size{width:20px;height:20px}.zt-field__left-icon{margin-right:4px}.zt-field__right-icon{color:#969799}.zt-field__button{padding-left:8px}.zt-field__error-message{color:#e62314;font-size:12px;text-align:left}.zt-field__error-message--center{text-align:center}.zt-field__error-message--right{text-align:right}.zt-field__word-limit{margin-top:4px;color:#646566;font-size:12px;line-height:16px;text-align:left}.zt-field--error .zt-field__control::-webkit-input-placeholder{color:#e62314;-webkit-text-fill-color:currentColor}.zt-field--error .zt-field__control,.zt-field--error .zt-field__control::placeholder{color:#e62314;-webkit-text-fill-color:currentColor}
1
+ .zt-field__label{-webkit-box-flex:0;-webkit-flex:none;flex:none;box-sizing:border-box;width:6.2em;margin-right:12px;color:#646566;text-align:left;word-wrap:break-word;vertical-align:middle}.zt-field__label--center{text-align:center}.zt-field__label--right{text-align:right}.zt-field--disabled .zt-field__label{color:#c8c9cc}.zt-field__value{overflow:visible}.zt-field__body{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-field__body input{caret-color:#0091fa}.zt-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:rgba(0,0,0,.6);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none}.zt-field__control::-webkit-input-placeholder{color:#c8c9cc}.zt-field__control::placeholder{color:#c8c9cc}.zt-field__control:disabled{color:#c8c9cc;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#c8c9cc}.zt-field__control:read-only{cursor:default}.zt-field__control--center{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-align:center}.zt-field__control--right{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;text-align:right}.zt-field__control--custom{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;min-height:24px}.zt-field__control[type=date],.zt-field__control[type=datetime-local],.zt-field__control[type=time]{min-height:24px}.zt-field__control[type=search]{-webkit-appearance:none}.zt-field__button,.zt-field__clear,.zt-field__icon,.zt-field__right-icon{-webkit-flex-shrink:0;flex-shrink:0}.zt-field__clear,.zt-field__right-icon{margin-right:-8px;padding:0 8px;line-height:inherit}.zt-field__zt-clear-icon{margin-right:-8px;padding:0 8px;height:20px}.zt-field__clear{color:#c8c9cc;font-size:16px;cursor:pointer}.zt-field__left-icon .zt-icon,.zt-field__right-icon .zt-icon{display:block;font-size:16px;line-height:inherit}.zt-field__zt-left-icon{margin-right:4px;height:20px}.zt-field__zt-clear-size,.zt-field__zt-left-icon-size{width:20px;height:20px}.zt-field__left-icon{margin-right:4px}.zt-field__right-icon{color:#969799}.zt-field__button{padding-left:8px}.zt-field__error-message{color:#e62314;font-size:12px;text-align:left}.zt-field__error-message--center{text-align:center}.zt-field__error-message--right{text-align:right}.zt-field__word-limit{margin-top:4px;color:#646566;font-size:12px;line-height:16px;text-align:left}.zt-field--error .zt-field__control::-webkit-input-placeholder{color:#e62314;-webkit-text-fill-color:currentColor}.zt-field--error .zt-field__control,.zt-field--error .zt-field__control::placeholder{color:#e62314;-webkit-text-fill-color:currentColor}
@@ -33,28 +33,8 @@
33
33
  display: flex;
34
34
  align-items: center;
35
35
  input {
36
- text-align: right;
37
- direction: rtl;
38
36
  caret-color: @blue;
39
37
  }
40
- textarea::-webkit-textarea-placeholder { /* Edge */
41
- text-align: left;
42
- }
43
- textarea:-ms-textarea-placeholder { /* Internet Explorer 10-11 */
44
- text-align: left;
45
- }
46
- textarea::placeholder {
47
- text-align: left;
48
- }
49
- input::-webkit-input-placeholder { /* Edge */
50
- text-align: right;
51
- }
52
- input:-ms-input-placeholder { /* Internet Explorer 10-11 */
53
- text-align: right;
54
- }
55
- input::placeholder {
56
- text-align: right;
57
- }
58
38
  }
59
39
 
60
40
  &__control {
@@ -0,0 +1 @@
1
+ .zt-index-anchor{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-flex:0;-webkit-flex:none;flex:none;z-index:1;box-sizing:border-box;color:#000;font-weight:700;font-size:16px;line-height:24px;height:44px;background-color:#fff}.zt-index-anchor--sticky{position:fixed;top:0;right:0;left:0;color:#0091fa;background-color:#fff}.zt-index-anchor__anchor-icon{display:inline-block;width:4px;height:16px;background-color:#0091fa;margin-right:12px}
@@ -0,0 +1,83 @@
1
+ import { createNamespace } from '../utils';
2
+ import { ChildrenMixin } from '../mixins/relation';
3
+ import { BORDER_BOTTOM, BORDER_TOP_BOTTOM, BORDER_UNSET_TOP_BOTTOM } from '../utils/constant';
4
+ import { getScrollTop, getRootScrollTop } from '../utils/dom/scroll';
5
+
6
+ var _createNamespace = createNamespace('index-anchor'),
7
+ createComponent = _createNamespace[0],
8
+ bem = _createNamespace[1];
9
+
10
+ export default createComponent({
11
+ mixins: [ChildrenMixin('ztIndexBar', {
12
+ indexKey: 'childrenIndex'
13
+ })],
14
+ props: {
15
+ index: [Number, String]
16
+ },
17
+ data: function data() {
18
+ return {
19
+ top: 0,
20
+ left: null,
21
+ rect: {
22
+ top: 0,
23
+ height: 0
24
+ },
25
+ width: null,
26
+ active: false
27
+ };
28
+ },
29
+ computed: {
30
+ sticky: function sticky() {
31
+ return this.active && this.parent.sticky;
32
+ },
33
+ anchorStyle: function anchorStyle() {
34
+ if (this.sticky) {
35
+ return {
36
+ zIndex: "" + this.parent.zIndex,
37
+ left: this.left ? this.left + "px" : null,
38
+ width: this.width ? this.width + "px" : null,
39
+ transform: "translate3d(0, " + this.top + "px, 0)",
40
+ color: this.parent.highlightColor
41
+ };
42
+ }
43
+ }
44
+ },
45
+ mounted: function mounted() {
46
+ var rect = this.$el.getBoundingClientRect();
47
+ this.rect.height = rect.height;
48
+ },
49
+ methods: {
50
+ scrollIntoView: function scrollIntoView() {
51
+ this.$el.scrollIntoView();
52
+ },
53
+ getRect: function getRect(scroller, scrollerRect) {
54
+ var el = this.$el;
55
+ var elRect = el.getBoundingClientRect();
56
+ this.rect.height = elRect.height;
57
+
58
+ if (scroller === window || scroller === document.body) {
59
+ this.rect.top = elRect.top + getRootScrollTop();
60
+ } else {
61
+ this.rect.top = elRect.top + getScrollTop(scroller) - scrollerRect.top;
62
+ }
63
+
64
+ return this.rect;
65
+ }
66
+ },
67
+ render: function render() {
68
+ var h = arguments[0];
69
+ var sticky = this.sticky;
70
+ return h("div", {
71
+ "style": {
72
+ height: sticky ? this.rect.height + "px" : null
73
+ }
74
+ }, [h("div", {
75
+ "style": this.anchorStyle,
76
+ "class": [bem({
77
+ sticky: sticky
78
+ }), BORDER_TOP_BOTTOM]
79
+ }, [h("div", {
80
+ "class": bem('anchor-icon')
81
+ }), this.slots('default') || this.index])]);
82
+ }
83
+ });
@@ -0,0 +1,34 @@
1
+ @import '../style/var';
2
+
3
+ .zt-index-anchor {
4
+ display: flex;
5
+ align-items: center;
6
+ flex-flow: row nowrap;
7
+ flex: none;
8
+ z-index: @index-anchor-z-index;
9
+ box-sizing: border-box;
10
+ color: @index-anchor-text-color;
11
+ font-weight: @index-anchor-font-weight;
12
+ font-size: @index-anchor-font-size;
13
+ line-height: @index-anchor-line-height;
14
+ height: @index-anchor-height;
15
+ background-color: @index-anchor-background-color;
16
+
17
+
18
+ &--sticky {
19
+ position: fixed;
20
+ top: 0;
21
+ right: 0;
22
+ left: 0;
23
+ color: @index-anchor-sticky-text-color;
24
+ background-color: @index-anchor-sticky-background-color;
25
+ }
26
+
27
+ &__anchor-icon {
28
+ display: inline-block;
29
+ width: @index-anchor-icon-width;
30
+ height: @index-anchor-icon-height;
31
+ background-color: @index-anchor-icon-background-color;
32
+ margin-right: 12px;
33
+ }
34
+ }
@@ -0,0 +1,2 @@
1
+ import '../../style/base.css';
2
+ import '../index.css';
@@ -0,0 +1,2 @@
1
+ import '../../style/base.less';
2
+ import '../index.less';