ci-plus 1.8.1 → 1.8.3

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.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  ## 历史更新
2
2
 
3
3
  ```js
4
+ 1.8.3
5
+ 1、优化ci-select组件中使用名组件称问题
4
6
  1.8.0
5
7
  1、移除原来标识卡模板组件
6
8
  1.7.9
@@ -45,7 +47,6 @@
45
47
  "sortablejs": "^1.15.1", # 拖拽库
46
48
  "vite-plugin-svg-icons": "^2.0.1", # svg图标库
47
49
  "jsbarcode": "^3.11.6", # 条形码库
48
- "dayjs": "^1.11.9", # 日期处理库
49
50
  "vue-draggable-plus": "^0.4.0", # 拖拽库
50
51
  "qrcode": "^1.5.3", #二维码库
51
52
 
package/index.ts CHANGED
@@ -5,7 +5,7 @@ import { default as Fn } from './src/utils'
5
5
  export default {
6
6
  install: (app: App) => {
7
7
  // 注册所有组件
8
- console.log('注册所有ci-plus组件1.7.7: ', components)
8
+ console.log('注册所有ci-plus组件1.8.2: ', components)
9
9
  for (const c in components) {
10
10
  app.use(components[c])
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ci-plus",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
4
4
  "description": "ci组件库",
5
5
  "main": "./index.ts",
6
6
  "scripts": {
@@ -22,7 +22,6 @@
22
22
  "dependencies": {
23
23
  "vue-i18n": ">=11.0.0",
24
24
  "less": ">=4.0.0",
25
- "dayjs": ">=1.0.0",
26
25
  "element-plus": ">=2.7.0",
27
26
  "vite-plugin-svg-icons": ">=2.0.0",
28
27
  "sortablejs": ">=1.0.0",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <component
3
- :is="!useVirtual ? 'el-select' : 'el-select-v2'"
3
+ :is="!useVirtual ? ElSelect : ElSelectV2"
4
4
  popper-class="t_select"
5
5
  v-model="childSelectedValue"
6
6
  :options="!useVirtual ? null : optionSource"
@@ -43,7 +43,7 @@
43
43
  :pager-count="paginationOption.pagerCount"
44
44
  :total="paginationOption.total"
45
45
  v-bind="{
46
- small: true,
46
+ size: 'small',
47
47
  background: true,
48
48
  ...$attrs,
49
49
  ...paginationOption.bind
@@ -60,7 +60,11 @@ import { computed, useSlots } from 'vue'
60
60
  import {
61
61
  ElPagination,
62
62
  ElCheckbox,
63
- ElOption
63
+ ElOption,
64
+ ElSelect,
65
+ ElSelectV2,
66
+ ElInput,
67
+ ElIcon
64
68
  } from 'element-plus'
65
69
  const props: any = defineProps({
66
70
  modelValue: {
@@ -92,7 +96,7 @@ const props: any = defineProps({
92
96
  // 下拉框组件数据源
93
97
  optionSource: {
94
98
  type: Array as unknown as any[],
95
- default: () => []
99
+ default: (): any[] => []
96
100
  },
97
101
  // 是否显示分页
98
102
  isShowPagination: {
@@ -170,9 +174,9 @@ const selectAll = (val: any) => {
170
174
  const customLabelHandler = (item) => {
171
175
  console.log('customLabelHandler', item)
172
176
  // return eval(props.customLabel)
173
- const expression = props.customLabel.replace(/item/g, 'item.value');
174
- const safeEval = new Function('item', `return ${expression};`);
175
- return safeEval({ value: item });
177
+ const expression = props.customLabel.replace(/item/g, 'item.value')
178
+ const safeEval = new Function('item', `return ${expression};`)
179
+ return safeEval({ value: item })
176
180
  }
177
181
  </script>
178
182
  <style lang="scss" scoped>
@@ -6,26 +6,18 @@
6
6
  * @param date 传入日期或者字符串
7
7
  * @param geshi? 想要输出的格式
8
8
  */
9
- // import dayjs from 'dayjs'
9
+ import dayjs from 'dayjs'
10
10
 
11
- // // 格式化日期
12
- // export const setDate = (date?: string | Date, geshi: string = 'YYYY-MM-DD') => {
13
- // if (date == '' || date == null || date == undefined) {
14
- // return ''
15
- // } else {
16
- // return dayjs(date).format(geshi)
17
- // }
18
- // }
19
- // // 格式化日期时间
20
- // export const setDateTime = (
21
- // date: string | Date,
22
- // geshi: string = 'YYYY-MM-DD hh:mm:ss',
23
- // ): string => {
24
- // return dayjs(date).format(geshi)
25
- // }
26
- let dayjs = 2
27
- export const setDate = () => { }
11
+ // 格式化日期
12
+ export const setDate = (date?: string | Date, geshi: string = 'YYYY-MM-DD') => {
13
+ if (date == '' || date == null || date == undefined) {
14
+ return ''
15
+ } else {
16
+ return dayjs(date).format(geshi)
17
+ }
18
+ }
28
19
  // 格式化日期时间
29
- export const setDateTime = () => { }
30
-
31
- export default dayjs
20
+ export const setDateTime = (date: string | Date, geshi: string = 'YYYY-MM-DD hh:mm:ss'): string => {
21
+ return dayjs(date).format(geshi)
22
+ }
23
+ export { dayjs }
@@ -5,8 +5,7 @@ export { default as withInstall } from './withinstall/index'
5
5
  import withInstall from './withinstall/index'
6
6
  import { cardPrint, setCardList } from './cardPrint'
7
7
  import apis from './baseApi'
8
- import { setDate, setDateTime } from './Dayjs'
9
- import dayjs from './Dayjs'
8
+ import { dayjs, setDate, setDateTime } from './Dayjs'
10
9
  import ajaxBox from './ajaxBox' // 处理文件下载方法
11
10
  import getAffiliationOptions from './getAffiliationOptions' // 处理文件下载方法
12
11
 
@@ -18,8 +17,8 @@ let func = {
18
17
  setDateTime,
19
18
  getAffiliationOptions,
20
19
  apis,
21
- dayjs,
22
- ajaxBox
20
+ ajaxBox,
21
+ dayjs
23
22
  }
24
23
  // 导出 所有方法
25
24
  export default func