haiwei-ui 1.0.3 → 1.0.4

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 (109) hide show
  1. package/README.md +10 -0
  2. package/package.json +1 -1
  3. package/packages/components/box/index.vue +116 -125
  4. package/packages/components/box-col/index.vue +30 -33
  5. package/packages/components/box-row/index.vue +17 -17
  6. package/packages/components/box-small/index.vue +38 -38
  7. package/packages/components/button/index.vue +29 -42
  8. package/packages/components/button-copy/index.vue +46 -62
  9. package/packages/components/button-delete/index.vue +64 -77
  10. package/packages/components/button-delete-batch/index.vue +82 -95
  11. package/packages/components/button-has/index.vue +29 -42
  12. package/packages/components/checkbox-group/index.vue +85 -85
  13. package/packages/components/color-picker/index.vue +41 -50
  14. package/packages/components/container/index.vue +8 -8
  15. package/packages/components/date-range-picker/index.vue +92 -103
  16. package/packages/components/details/index.vue +72 -79
  17. package/packages/components/dialog/index.vue +281 -294
  18. package/packages/components/drag-sort/index.vue +36 -36
  19. package/packages/components/drag-sort-dialog/index.vue +58 -58
  20. package/packages/components/drawer/index.vue +157 -166
  21. package/packages/components/enums/sex/index.vue +1 -1
  22. package/packages/components/flex/index.vue +33 -33
  23. package/packages/components/form/index.vue +123 -138
  24. package/packages/components/form-dialog/index.vue +184 -217
  25. package/packages/components/form-page/index.vue +134 -151
  26. package/packages/components/icon/index.vue +6 -6
  27. package/packages/components/icon-picker/index.vue +30 -30
  28. package/packages/components/icon-picker/panel.vue +58 -58
  29. package/packages/components/label/index.vue +22 -30
  30. package/packages/components/list/components/export/index.vue +101 -99
  31. package/packages/components/list/components/footer/index.vue +42 -51
  32. package/packages/components/list/components/header/index.vue +34 -34
  33. package/packages/components/list/components/querybar/index.vue +144 -144
  34. package/packages/components/list/components/select-column/index.vue +30 -30
  35. package/packages/components/list/components/table/index.vue +169 -188
  36. package/packages/components/list/index.vue +337 -391
  37. package/packages/components/list-agile/index.vue +145 -145
  38. package/packages/components/list-dialog/index.vue +70 -84
  39. package/packages/components/listbox/index.vue +48 -48
  40. package/packages/components/login-default/index.vue +107 -107
  41. package/packages/components/login-neon/index.vue +104 -104
  42. package/packages/components/map/index.vue +229 -229
  43. package/packages/components/map-coord-picking/index.vue +220 -219
  44. package/packages/components/map-search/index.vue +75 -72
  45. package/packages/components/scrollbar/index.vue +11 -11
  46. package/packages/components/select-whether/index.vue +30 -30
  47. package/packages/components/split/index.vue +141 -141
  48. package/packages/components/split/trigger.vue +15 -15
  49. package/packages/components/tabnav/index.vue +125 -89
  50. package/packages/components/tabs/index.vue +31 -31
  51. package/packages/components/toolbar/components/fullscreen/index.vue +10 -10
  52. package/packages/components/toolbar/components/logout/index.vue +13 -13
  53. package/packages/components/toolbar/components/skin-toggle/form.vue +59 -59
  54. package/packages/components/toolbar/components/skin-toggle/index.vue +12 -12
  55. package/packages/components/toolbar/components/userInfo/index.vue +18 -18
  56. package/packages/components/toolbar/index.vue +12 -12
  57. package/packages/components/tree-select/mixins.vue +261 -270
  58. package/packages/components/txt/index.vue +17 -17
  59. package/packages/components/update-password/index.vue +45 -57
  60. package/packages/layout.vue +18 -18
  61. package/packages/mixins/components/checkbox.vue +71 -82
  62. package/packages/mixins/components/radio.vue +69 -69
  63. package/packages/page/403/index.vue +32 -28
  64. package/packages/page/404/index.vue +32 -28
  65. package/packages/page/default/index.vue +17 -13
  66. package/packages/page/iframe/index.vue +6 -6
  67. package/packages/page/login/index.vue +9 -9
  68. package/packages/page/userInfo/index.vue +5 -5
  69. package/packages/router/index.js +1 -9
  70. package/packages/skins/pretty/components/header/components/breadcrumb/index.vue +29 -29
  71. package/packages/skins/pretty/components/header/components/theme/index.vue +22 -21
  72. package/packages/skins/pretty/components/header/index.vue +12 -12
  73. package/packages/skins/pretty/components/main/index.vue +27 -27
  74. package/packages/skins/pretty/components/menus/index.vue +28 -28
  75. package/packages/skins/pretty/components/menus/item.vue +23 -23
  76. package/packages/skins/pretty/components/sidebar/index.vue +7 -7
  77. package/packages/skins/pretty/index.vue +6 -6
  78. package/packages/skins/pretty/styles/themes/blue-light/_index.scss +2 -2
  79. package/packages/skins/pretty/styles/themes/default/_index.scss +1 -1
  80. package/packages/skins/pretty/styles/themes/green/_index.scss +2 -2
  81. package/packages/skins/pretty/styles/themes/green-light/_index.scss +2 -2
  82. package/packages/styles/_mixins.scss +24 -25
  83. package/packages/styles/animation/_index.scss +22 -23
  84. package/packages/styles/animation/breadcrumb.scss +6 -6
  85. package/packages/styles/animation/fade.scss +11 -11
  86. package/packages/styles/animation/move.scss +98 -98
  87. package/packages/styles/components/box-small/_index.scss +58 -58
  88. package/packages/styles/components/button/_index.scss +7 -7
  89. package/packages/styles/components/container/_index.scss +26 -26
  90. package/packages/styles/components/date-range-picker/_index.scss +4 -4
  91. package/packages/styles/components/details/_index.scss +66 -67
  92. package/packages/styles/components/details-dialog/_index.scss +13 -13
  93. package/packages/styles/components/drag-sort/_index.scss +20 -20
  94. package/packages/styles/components/drag-sort-dialog/_index.scss +7 -7
  95. package/packages/styles/components/flex/_index.scss +56 -56
  96. package/packages/styles/components/form-dialog/_index.scss +11 -11
  97. package/packages/styles/components/icon/_index.scss +6 -6
  98. package/packages/styles/components/label/_index.scss +245 -245
  99. package/packages/styles/components/listbox/_index.scss +47 -47
  100. package/packages/styles/components/split/_index.scss +102 -102
  101. package/packages/styles/components/toolbar/_index.scss +98 -98
  102. package/packages/styles/components/txt/_index.scss +13 -13
  103. package/packages/styles/components/upload-dialog/_index.scss +44 -44
  104. package/packages/styles/components/upload-multiple/_index.scss +19 -19
  105. package/packages/styles/components/upload-single/_index.scss +16 -16
  106. package/packages/utils/resize-event.js +3 -3
  107. package/packages/vuter/attributes.json +30 -40
  108. package/packages/vuter/tags.json +11 -27
  109. package/public/lib/font/iconfont.js +47 -1
@@ -11,101 +11,101 @@
11
11
  </nm-box>
12
12
  </template>
13
13
  <script>
14
- export default {
15
- name: 'CheckboxGroup',
16
- data() {
17
- return {
18
- value_: this.value,
19
- checkAll: false,
20
- isIndeterminate: true,
21
- options: []
22
- }
23
- },
24
- props: {
25
- value: {
26
- type: Array,
27
- default() {
28
- return []
14
+ export default {
15
+ name: 'CheckboxGroup',
16
+ data() {
17
+ return {
18
+ value_: this.value,
19
+ checkAll: false,
20
+ isIndeterminate: true,
21
+ options: []
29
22
  }
30
23
  },
31
- size: String,
32
- disabled: Boolean,
33
- min: Number,
34
- max: Number,
35
- border: {
36
- type: Boolean,
37
- default: true
38
- },
39
- action: Function
40
- },
41
- computed: {
42
- disabledCheckAll() {
43
- return !this.options || this.options.length < 1 || !this.options.every(o => !o.disabled)
24
+ props: {
25
+ value: {
26
+ type: Array,
27
+ default() {
28
+ return []
29
+ }
30
+ },
31
+ size: String,
32
+ disabled: Boolean,
33
+ min: Number,
34
+ max: Number,
35
+ border: {
36
+ type: Boolean,
37
+ default: true
38
+ },
39
+ action: Function
44
40
  },
45
- selection() {
46
- let list = []
47
- if (this.value_) {
48
- this.value_.forEach(item => {
49
- for (var i = 0; i < this.options.length; i++) {
50
- const opt = this.options[i]
51
- if (opt.value === item) {
52
- list.push(opt)
53
- break
41
+ computed: {
42
+ disabledCheckAll() {
43
+ return !this.options || this.options.length < 1 || !this.options.every(o => !o.disabled)
44
+ },
45
+ selection() {
46
+ let list = []
47
+ if (this.value_) {
48
+ this.value_.forEach(item => {
49
+ for (var i = 0; i < this.options.length; i++) {
50
+ const opt = this.options[i]
51
+ if (opt.value === item) {
52
+ list.push(opt)
53
+ break
54
+ }
54
55
  }
55
- }
56
- })
57
- }
56
+ })
57
+ }
58
58
 
59
- return list
60
- }
61
- },
62
- methods: {
63
- refresh() {
64
- this.action().then(options => {
65
- this.options = options
66
- this.setCheckAll()
67
- })
59
+ return list
60
+ }
68
61
  },
69
- // 设置全选状态
70
- setCheckAll() {
71
- if (this.value_) {
72
- let selectionCount = this.value_.length
73
- this.checkAll = selectionCount === this.options.length
74
- this.isIndeterminate = selectionCount > 0 && selectionCount < this.options.length
75
- } else {
62
+ methods: {
63
+ refresh() {
64
+ this.action().then(options => {
65
+ this.options = options
66
+ this.setCheckAll()
67
+ })
68
+ },
69
+ // 设置全选状态
70
+ setCheckAll() {
71
+ if (this.value_) {
72
+ let selectionCount = this.value_.length
73
+ this.checkAll = selectionCount === this.options.length
74
+ this.isIndeterminate = selectionCount > 0 && selectionCount < this.options.length
75
+ } else {
76
+ this.isIndeterminate = false
77
+ }
78
+ },
79
+ // 处理全选按钮事件
80
+ onCheckAllChange(val) {
81
+ this.value_ = val ? this.options.map(m => m.value) : []
76
82
  this.isIndeterminate = false
83
+ this.onChange()
84
+ },
85
+ onCheckedChange(value) {
86
+ let checkedCount = value.length
87
+ this.checkAll = checkedCount === this.options.length
88
+ this.isIndeterminate = checkedCount > 0 && checkedCount < this.options.length
89
+ this.onChange()
90
+ },
91
+ // 清楚已选项
92
+ clear() {
93
+ this.value_ = this.value
94
+ this.onChange()
95
+ },
96
+ onChange() {
97
+ this.$emit('input', this.value_)
98
+ this.$emit('change', this.value_, this.selection, this.options)
77
99
  }
78
100
  },
79
- // 处理全选按钮事件
80
- onCheckAllChange(val) {
81
- this.value_ = val ? this.options.map(m => m.value) : []
82
- this.isIndeterminate = false
83
- this.onChange()
84
- },
85
- onCheckedChange(value) {
86
- let checkedCount = value.length
87
- this.checkAll = checkedCount === this.options.length
88
- this.isIndeterminate = checkedCount > 0 && checkedCount < this.options.length
89
- this.onChange()
90
- },
91
- // 清楚已选项
92
- clear() {
93
- this.value_ = this.value
94
- this.onChange()
101
+ created() {
102
+ this.refresh()
95
103
  },
96
- onChange() {
97
- this.$emit('input', this.value_)
98
- this.$emit('change', this.value_, this.selection, this.options)
99
- }
100
- },
101
- created() {
102
- this.refresh()
103
- },
104
- watch: {
105
- value(val) {
106
- this.value_ = val
107
- this.setCheckAll()
104
+ watch: {
105
+ value(val) {
106
+ this.value_ = val
107
+ this.setCheckAll()
108
+ }
108
109
  }
109
110
  }
110
- }
111
111
  </script>
@@ -4,63 +4,54 @@
4
4
  <el-input placeholder="请选择颜色" v-model="color" :size="fontSize" :disabled="disabled" :clearable="clearable"></el-input>
5
5
  </div>
6
6
  <div class="nm-color-picker-color">
7
- <el-color-picker
8
- v-model="color"
9
- :size="fontSize"
10
- :disabled="disabled"
11
- :show-alpha="showAlpha"
12
- :color-format="colorFormat"
13
- :popper-class="popperClass"
14
- :predefine="predefine"
15
- @change="onChange"
16
- ></el-color-picker>
7
+ <el-color-picker v-model="color" :size="fontSize" :disabled="disabled" :show-alpha="showAlpha" :color-format="colorFormat" :popper-class="popperClass" :predefine="predefine" @change="onChange"></el-color-picker>
17
8
  </div>
18
9
  </div>
19
10
  </template>
20
11
  <script>
21
- export default {
22
- name: 'ColorPicker',
23
- data() {
24
- return {
25
- color: this.value
26
- }
27
- },
28
- props: {
29
- value: {
30
- type: String
12
+ export default {
13
+ name: 'ColorPicker',
14
+ data() {
15
+ return {
16
+ color: this.value
17
+ }
31
18
  },
32
- /** 可清空的 */
33
- clearable: {
34
- type: Boolean,
35
- default: true
19
+ props: {
20
+ value: {
21
+ type: String
22
+ },
23
+ /** 可清空的 */
24
+ clearable: {
25
+ type: Boolean,
26
+ default: true
27
+ },
28
+ /** 是否禁用 */
29
+ disabled: Boolean,
30
+ /** 尺寸 */
31
+ size: String,
32
+ /** 是否支持透明度选择 */
33
+ showAlpha: Boolean,
34
+ /** 写入 v-model 的颜色的格式 */
35
+ colorFormat: String,
36
+ /** ColorPicker 下拉框的类名 */
37
+ popperClass: String,
38
+ /** 预定义颜色 */
39
+ predefine: Array
36
40
  },
37
- /** 是否禁用 */
38
- disabled: Boolean,
39
- /** 尺寸 */
40
- size: String,
41
- /** 是否支持透明度选择 */
42
- showAlpha: Boolean,
43
- /** 写入 v-model 的颜色的格式 */
44
- colorFormat: String,
45
- /** ColorPicker 下拉框的类名 */
46
- popperClass: String,
47
- /** 预定义颜色 */
48
- predefine: Array
49
- },
50
- methods: {
51
- onChange(val) {
52
- this.$emit('input', val)
53
- this.$emit('change', val)
41
+ methods: {
42
+ onChange(val) {
43
+ this.$emit('input', val)
44
+ this.$emit('change', val)
45
+ },
46
+ reset() {
47
+ this.color = ''
48
+ this.onChange('')
49
+ }
54
50
  },
55
- reset() {
56
- this.color = ''
57
- this.onChange('')
58
- }
59
- },
60
- watch: {
61
- value() {
62
- this.color = this.value
51
+ watch: {
52
+ value() {
53
+ this.color = this.value
54
+ }
63
55
  }
64
56
  }
65
- }
66
57
  </script>
@@ -9,13 +9,13 @@
9
9
  </section>
10
10
  </template>
11
11
  <script>
12
- export default {
13
- name: 'Container',
14
- props: {
15
- /** 滚动条 */
16
- scrollbar: Boolean,
17
- /** 是否显示水平滚动条 */
18
- horizontal: Boolean
12
+ export default {
13
+ name: 'Container',
14
+ props: {
15
+ /** 滚动条 */
16
+ scrollbar: Boolean,
17
+ /** 是否显示水平滚动条 */
18
+ horizontal: Boolean
19
+ }
19
20
  }
20
- }
21
21
  </script>
@@ -1,117 +1,106 @@
1
1
  <template>
2
2
  <div class="nm-date-range-picker" :style="{ display: 'inline-block', width }">
3
- <el-date-picker
4
- v-model="value"
5
- :size="this.size || this.fontSize"
6
- type="daterange"
7
- range-separator="至"
8
- start-placeholder="开始日期"
9
- end-placeholder="结束日期"
10
- value-format="yyyy-MM-dd"
11
- :clearable="clearable"
12
- :picker-options="pickerOptions_"
13
- @change="onChange"
14
- />
3
+ <el-date-picker v-model="value" :size="this.size || this.fontSize" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :clearable="clearable" :picker-options="pickerOptions_" @change="onChange" />
15
4
  </div>
16
5
  </template>
17
6
  <script>
18
- export default {
19
- name: 'DateRangePicker',
20
- data() {
21
- return {
22
- value: []
23
- }
24
- },
25
- props: {
26
- // 开始日期,默认当前月1号
27
- start: [String, Date],
28
- // 结束日期,默认今日
29
- end: [String, Date],
30
- /** 尺寸 */
31
- size: String,
32
- /** 可清空的 */
33
- clearable: Boolean,
34
- width: {
35
- type: String,
36
- default: '240px'
7
+ export default {
8
+ name: 'DateRangePicker',
9
+ data() {
10
+ return {
11
+ value: []
12
+ }
37
13
  },
38
- /**当前时间日期选择器特有的选项 */
39
- pickerOptions: Object,
40
- /**是否显示日期快捷键 */
41
- showPickerOptions: Boolean
42
- },
43
- computed: {
44
- pickerOptions_() {
45
- return this.showPickerOptions
46
- ? {
47
- shortcuts: [
48
- {
49
- text: '最近一周',
50
- onClick(picker) {
51
- const end = new Date()
52
- const start = new Date()
53
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
54
- picker.$emit('pick', [start, end])
55
- }
56
- },
57
- {
58
- text: '最近一个月',
59
- onClick(picker) {
60
- const end = new Date()
61
- const start = new Date()
62
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
63
- picker.$emit('pick', [start, end])
64
- }
65
- },
66
- {
67
- text: '最近三个月',
68
- onClick(picker) {
69
- const end = new Date()
70
- const start = new Date()
71
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
72
- picker.$emit('pick', [start, end])
14
+ props: {
15
+ // 开始日期,默认当前月1号
16
+ start: [String, Date],
17
+ // 结束日期,默认今日
18
+ end: [String, Date],
19
+ /** 尺寸 */
20
+ size: String,
21
+ /** 可清空的 */
22
+ clearable: Boolean,
23
+ width: {
24
+ type: String,
25
+ default: '240px'
26
+ },
27
+ /**当前时间日期选择器特有的选项 */
28
+ pickerOptions: Object,
29
+ /**是否显示日期快捷键 */
30
+ showPickerOptions: Boolean
31
+ },
32
+ computed: {
33
+ pickerOptions_() {
34
+ return this.showPickerOptions
35
+ ? {
36
+ shortcuts: [
37
+ {
38
+ text: '最近一周',
39
+ onClick(picker) {
40
+ const end = new Date()
41
+ const start = new Date()
42
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
43
+ picker.$emit('pick', [start, end])
44
+ }
45
+ },
46
+ {
47
+ text: '最近一个月',
48
+ onClick(picker) {
49
+ const end = new Date()
50
+ const start = new Date()
51
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
52
+ picker.$emit('pick', [start, end])
53
+ }
54
+ },
55
+ {
56
+ text: '最近三个月',
57
+ onClick(picker) {
58
+ const end = new Date()
59
+ const start = new Date()
60
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
61
+ picker.$emit('pick', [start, end])
62
+ }
73
63
  }
74
- }
75
- ]
76
- }
77
- : null
78
- }
79
- },
80
- methods: {
81
- onChange(val) {
82
- if (!val || val.length < 2) {
83
- var date = new Date()
84
- this.value = [date, date]
64
+ ]
65
+ }
66
+ : null
85
67
  }
68
+ },
69
+ methods: {
70
+ onChange(val) {
71
+ if (!val || val.length < 2) {
72
+ var date = new Date()
73
+ this.value = [date, date]
74
+ }
86
75
 
87
- this.$emit('update:start', val[0])
88
- this.$emit('update:end', val[1])
89
- this.$emit('change', val)
90
- }
91
- },
92
- created() {
93
- var mow = new Date()
94
- const start = this.$dayjs(mow).format('YYYY-MM-01')
95
- const end = this.$dayjs(mow).format('YYYY-MM-DD')
76
+ this.$emit('update:start', val[0])
77
+ this.$emit('update:end', val[1])
78
+ this.$emit('change', val)
79
+ }
80
+ },
81
+ created() {
82
+ var mow = new Date()
83
+ const start = this.$dayjs(mow).format('YYYY-MM-01')
84
+ const end = this.$dayjs(mow).format('YYYY-MM-DD')
96
85
 
97
- let val = []
98
- val.push(this.start || start)
99
- val.push(this.end || end)
100
- if (!this.start) {
101
- this.$emit('update:start', val[0])
102
- }
103
- if (!this.end) {
104
- this.$emit('update:end', val[1])
105
- }
106
- this.value = val
107
- },
108
- watch: {
109
- start(val) {
110
- this.value = [val, this.end]
86
+ let val = []
87
+ val.push(this.start || start)
88
+ val.push(this.end || end)
89
+ if (!this.start) {
90
+ this.$emit('update:start', val[0])
91
+ }
92
+ if (!this.end) {
93
+ this.$emit('update:end', val[1])
94
+ }
95
+ this.value = val
111
96
  },
112
- end(val) {
113
- this.value = [this.start, val]
97
+ watch: {
98
+ start(val) {
99
+ this.value = [val, this.end]
100
+ },
101
+ end(val) {
102
+ this.value = [this.start, val]
103
+ }
114
104
  }
115
105
  }
116
- }
117
106
  </script>