qtsk-vue3 0.0.37 → 0.0.39

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.
@@ -24,6 +24,7 @@ import Checkbox from './components/CheckBox/index.vue'
24
24
  import Upload from './components/Upload/index.vue'
25
25
  import Tooltip from './components/Tooltip/index.vue'
26
26
  import Skeleton from './components/Skeleton/index.vue'
27
+ import Alert from './components/Alert/index.vue'
27
28
  const components =
28
29
  [
29
30
  CommonButton,
@@ -51,6 +52,7 @@ const components =
51
52
  Checkbox,
52
53
  Upload,
53
54
  Tooltip,
54
- Skeleton
55
+ Skeleton,
56
+ Alert
55
57
  ]
56
58
  export default components
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <div class="normalClass">
3
+ <el-alert :title="title" :type="type" :effect="effect" v-bind="$attrs"/>
4
+ </div>
5
+ </template>
6
+
7
+ <script setup>
8
+ import { ElAlert } from 'element-plus'
9
+
10
+ defineOptions({
11
+ name: 'Alert',
12
+ })
13
+ const props = defineProps({
14
+ title: {
15
+ type: String,
16
+ default: '这里输入内容'
17
+ },
18
+ type: {
19
+ type: String,
20
+ default: 'success' // Alert 类型 'success' | 'warning' | 'info' | 'error'
21
+ },
22
+ effect: {
23
+ type: String,
24
+ default: 'dark' // 主题样式 'light' | 'dark'
25
+ }
26
+ })
27
+ </script>
28
+
29
+ <style lang="less" scoped>
30
+ .normalClass{
31
+ margin: 0px;
32
+ }
33
+ </style>
@@ -1,12 +1,17 @@
1
1
  <template>
2
2
  <el-radio-group v-model="radioValue">
3
- <el-radio v-for="(item, index) in options" :value="item.value" :key="index">{{item.label}}</el-radio>
3
+ <template v-if="!type">
4
+ <el-radio v-for="(item, index) in options" :value="item.value" :key="index">{{item.label}}</el-radio>
5
+ </template>
6
+ <template v-else>
7
+ <el-radio-button v-for="(item, index) in options" :value="item.value" :label="item.label" :key="index"/>
8
+ </template>
4
9
  </el-radio-group>
5
10
  </template>
6
11
 
7
12
  <script setup>
8
13
  import { computed } from 'vue'
9
- import {ElRadioGroup, ElRadio} from 'element-plus'
14
+ import {ElRadioGroup, ElRadio, ElRadioButton} from 'element-plus'
10
15
  import '../../style/root.css'
11
16
 
12
17
  defineOptions({
@@ -16,6 +21,10 @@ const props = defineProps({
16
21
  options: {
17
22
  type: Array,
18
23
  default: () => ([])
24
+ },
25
+ type: {
26
+ type: String,
27
+ default:''
19
28
  }
20
29
  })
21
30
  const emits = defineEmits(['update:modelValue'])
@@ -1,22 +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'
4
+
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/index.js CHANGED
@@ -21,3 +21,5 @@ const install = makeInstaller(Components)
21
21
  export { Message, MessageBox, Loading, install, install as default }
22
22
 
23
23
  console.info('%c====== Editing in local package ======', 'font-size:16px;color:pink;')
24
+
25
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qtsk-vue3",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "vue3版组件库",
5
5
  "main": "./package/index.js",
6
6
  "scripts": {