@bsgoal/common 1.5.10 → 1.5.11
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/package.json
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-05-10 13:40:43
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-05-10 13:55:36
|
|
6
|
+
* @FilePath: \common\src\components\bsgoal-base-link\demo.vue
|
|
7
|
+
* @Description: 链接公共组件 演示
|
|
8
|
+
*
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: "BsgoalBaseLinkDemo",
|
|
14
|
+
};
|
|
15
|
+
</script>
|
|
16
|
+
<script setup>
|
|
17
|
+
/* setup模板
|
|
18
|
+
---------------------------------------------------------------- */
|
|
19
|
+
import { ref } from 'vue';
|
|
20
|
+
import BsgoalBaseLink from './index.vue'
|
|
21
|
+
// props
|
|
22
|
+
const props = defineProps({
|
|
23
|
+
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const clickLink = () => {
|
|
27
|
+
console.log('点击链接了');
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
30
|
+
<template>
|
|
31
|
+
<div class="bsgoal-base-link-demo">
|
|
32
|
+
<BsgoalBaseLink content="这是链接" @on-click="clickLink" />
|
|
33
|
+
<BsgoalBaseLink underline content="这是链接" @on-click="clickLink" />
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
<style lang="scss" scoped>
|
|
37
|
+
/* 自定义样式
|
|
38
|
+
---------------------------------------------------------------- */
|
|
39
|
+
</style>
|
|
40
|
+
<style lang="scss">
|
|
41
|
+
/* 覆盖样式
|
|
42
|
+
---------------------------------------------------------------- */
|
|
43
|
+
</style>
|
|
44
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-05-10 13:40:36
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-05-10 13:55:15
|
|
6
|
+
* @FilePath: \common\src\components\bsgoal-base-link\index.vue
|
|
7
|
+
* @Description: 链接 公共组件
|
|
8
|
+
*
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: "BsgoalBaseLink",
|
|
14
|
+
};
|
|
15
|
+
</script>
|
|
16
|
+
<script setup>
|
|
17
|
+
/* setup模板
|
|
18
|
+
---------------------------------------------------------------- */
|
|
19
|
+
import { ref } from 'vue';
|
|
20
|
+
// props
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
/**
|
|
23
|
+
* 内容
|
|
24
|
+
*/
|
|
25
|
+
content: {
|
|
26
|
+
type: [String],
|
|
27
|
+
default: 'link'
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* 是否下划线
|
|
31
|
+
*/
|
|
32
|
+
underline: {
|
|
33
|
+
type: [Boolean],
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* style 对象
|
|
38
|
+
*/
|
|
39
|
+
styler: {
|
|
40
|
+
type: [Object],
|
|
41
|
+
default: () => ({})
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
const emits = defineEmits(['on-click'])
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @Author: canlong.shen
|
|
49
|
+
* @description: 点击链接
|
|
50
|
+
* @default:
|
|
51
|
+
* @return {*}
|
|
52
|
+
*/
|
|
53
|
+
const clickLink = () => {
|
|
54
|
+
emits('on-click')
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</script>
|
|
60
|
+
<template>
|
|
61
|
+
<div class="bsgoal-base-link">
|
|
62
|
+
<el-link class="bsgoal_base_link" type="primary" :underline="underline" :style="styler" @click="clickLink">
|
|
63
|
+
<slot>{{ content }}</slot>
|
|
64
|
+
</el-link>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
<style lang="scss" scoped>
|
|
68
|
+
/* 自定义样式
|
|
69
|
+
---------------------------------------------------------------- */
|
|
70
|
+
</style>
|
|
71
|
+
<style lang="scss">
|
|
72
|
+
/* 覆盖样式
|
|
73
|
+
---------------------------------------------------------------- */
|
|
74
|
+
</style>
|
package/src/router/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-10 10:41:52
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-05-
|
|
5
|
+
* @LastEditTime: 2023-05-10 13:54:41
|
|
6
6
|
* @FilePath: \common\src\router\index.js
|
|
7
7
|
* @Description: 路由配置
|
|
8
8
|
*
|
|
@@ -78,6 +78,11 @@ const router = createRouter({
|
|
|
78
78
|
name: '文字提示',
|
|
79
79
|
component: import('@/components/bsgoal-base-tooltip/demo.vue')
|
|
80
80
|
},
|
|
81
|
+
{
|
|
82
|
+
path: 'bsgoal-base-link-demo',
|
|
83
|
+
name: '链接公共组件',
|
|
84
|
+
component: import('@/components/bsgoal-base-link/demo.vue')
|
|
85
|
+
},
|
|
81
86
|
]
|
|
82
87
|
}
|
|
83
88
|
]
|