qtsk-vue3 0.0.19 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,10 +5,14 @@
5
5
  v-model="modelValue"
6
6
  :type="type"
7
7
  :placeholder="placeholder"
8
- :format="format"
8
+ :format="format"
9
+ :disabled-date="disabledDate"
9
10
  :value-format="format"
10
11
  :start-placeholder="startPlaceholder"
11
12
  :end-placeholder="endPlaceholder"
13
+ :disabled-hours="disabledHour"
14
+ :disabled-minutes="disabledMinute"
15
+ :disabled-seconds="disabledSecond"
12
16
  />
13
17
  </el-config-provider>
14
18
  </template>
@@ -45,7 +49,11 @@ const props = defineProps({
45
49
  endPlaceholder: {
46
50
  type: String,
47
51
  default: '结束日期'
48
- }
52
+ },
53
+ disabledDate: Function,
54
+ disabledHour: Function,
55
+ disabledMinute: Function,
56
+ disabledSecond: Function,
49
57
  })
50
58
 
51
59
  const modelValue = defineModel('modelValue', { type: [String, Array] })
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <el-dialog v-model="modelValue" :title="title" :width="width" align-center>
3
3
  <slot>内容</slot>
4
- <template #footer>
4
+ <template #footer v-if="showFooter">
5
5
  <div class="dialog-footer">
6
6
  <el-button @click="handleCancel">
7
7
  {{ cancelName }}
@@ -34,6 +34,10 @@ defineProps({
34
34
  confirmName: {
35
35
  type: String,
36
36
  default: '确认'
37
+ },
38
+ showFooter: {
39
+ type: Boolean,
40
+ default: true
37
41
  }
38
42
  })
39
43
 
@@ -0,0 +1,3 @@
1
+ import { ElLoading } from 'element-plus'
2
+
3
+ export const Loading = ElLoading
@@ -5,7 +5,7 @@
5
5
  v-bind="$attrs"
6
6
  :teleported="false"
7
7
  :no-data-text="'暂无数据项'"
8
- clearable
8
+ :clearable="clearable"
9
9
  >
10
10
  <el-option v-for="item in options" :key="item[valueName]" :label="item[keyName]" :value="item[valueName]">
11
11
  <div v-if="item.icon" style="display: flex;align-items: center;justify-content: space-between;">
@@ -39,6 +39,10 @@ defineProps({
39
39
  valueName: {
40
40
  type: String,
41
41
  default: 'value'
42
+ },
43
+ clearable: {
44
+ type: Boolean,
45
+ default: true
42
46
  }
43
47
  })
44
48
  const selectValue = defineModel('modelValue', { default: '', type: [Number, String, Array] })
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <el-tabs v-model="activeName" type="border-card" class="demo-tabs">
2
+ <el-tabs v-model="activeName" :type="type" class="demo-tabs">
3
3
  <slot/>
4
4
  </el-tabs>
5
5
  </template>
@@ -11,6 +11,13 @@ import '../../style/root.css'
11
11
  defineOptions({
12
12
  name: 'Tabs'
13
13
  })
14
+
15
+ defineProps({
16
+ type: {
17
+ type: String,
18
+ default: 'border-card', // '' | 'card' | 'border-card'
19
+ }
20
+ })
14
21
  const activeName = defineModel('activeName', {type: String})
15
22
  </script>
16
23
 
package/package/index.js CHANGED
@@ -1,24 +1,23 @@
1
- import Components from './component'
2
- import { Message, MessageBox } from './components/Message'
3
-
4
- const makeInstaller = (components = [], directives = []) => {
5
- const apps = []
6
- const install = (app, opts) => {
7
- const option = opts
8
- if (apps.includes(app)) return
9
- apps.push(app)
10
- components.forEach((c) => {
11
- app.component(c.name, c)
12
- })
13
- app.config.globalProperties.$ELEMENT = option
14
- }
15
- return install
16
- }
17
-
18
- const install = makeInstaller(Components)
19
-
20
- export { Message, MessageBox, install, install as default }
21
-
22
- console.info('%c====== Editing in local package ======', 'font-size:16px;color:pink;')
1
+ import Components from './component'
2
+ import { Message, MessageBox } from './components/Message'
3
+ import { Loading } from './components/Loading'
23
4
 
24
-
5
+ const makeInstaller = (components = [], directives = []) => {
6
+ const apps = []
7
+ const install = (app, opts) => {
8
+ const option = opts
9
+ if (apps.includes(app)) return
10
+ apps.push(app)
11
+ components.forEach((c) => {
12
+ app.component(c.name, c)
13
+ })
14
+ app.config.globalProperties.$ELEMENT = option
15
+ }
16
+ return install
17
+ }
18
+
19
+ const install = makeInstaller(Components)
20
+
21
+ export { Message, MessageBox, Loading, install, install as default }
22
+
23
+ console.info('%c====== Editing in local package ======', 'font-size:16px;color:pink;')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qtsk-vue3",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "description": "vue3版组件库",
5
5
  "main": "./package/index.js",
6
6
  "scripts": {