agilebuilder-ui 1.1.65-tmp27 → 1.1.65-tmp28

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agilebuilder-ui",
3
- "version": "1.1.65-tmp27",
3
+ "version": "1.1.65-tmp28",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/index.cjs",
@@ -2,7 +2,7 @@
2
2
  import { defineComponent, h } from 'vue'
3
3
  import SvgIcon from '../../../svg-icon/src/svg-icon.vue'
4
4
  import { ElBadge } from 'element-plus'
5
- import SuperIcon from '../../../../../packages/super-icon/index'
5
+ import SuperIcon from '../../../super-icon/index'
6
6
  export default defineComponent({
7
7
  name: 'MenuItem',
8
8
  functional: true,
@@ -0,0 +1,6 @@
1
+ import SuperIcon from './src/index.vue'
2
+ SuperIcon.install = function (Vue) {
3
+ Vue.component('SuperIcon', SuperIcon)
4
+ }
5
+
6
+ export default SuperIcon
@@ -0,0 +1,52 @@
1
+ <template>
2
+ <i v-if="iconValue.indexOf('amb-icon-') === 0" class="amb-iconfont" :class="iconValue" />
3
+ <i v-else-if="iconValue.indexOf('amb-color-icon-') === 0" class="amb-color-iconfont super-icon" :class="iconValue" />
4
+ <i v-else-if="iconValue.indexOf('fa-') === 0" :class="'fa ' + iconValue" />
5
+ <img
6
+ v-else-if="iconValue.indexOf('svg-img-') === 0"
7
+ :src="defaultShowSvgAction + iconValue"
8
+ style="width: 1em; height: 1em"
9
+ />
10
+ <SvgIcon v-else-if="iconValue.indexOf('svg-') === 0" :icon-class="iconValue.substring('svg-'.length)" />
11
+ <img
12
+ v-else-if="iconValue.indexOf('http') === 0 || iconValue.indexOf('//') === 0 || iconValue.indexOf('data:') === 0"
13
+ :src="iconValue"
14
+ style="width: 1em; height: 1em"
15
+ />
16
+ <el-icon v-else><component :is="iconValue" /></el-icon>
17
+ </template>
18
+ <script lang="ts">
19
+ export default {
20
+ name: 'SuperIcon'
21
+ }
22
+ </script>
23
+
24
+ <script setup lang="ts">
25
+ import { ref } from 'vue'
26
+ import SvgIcon from '../../svg-icon/src/svg-icon.vue'
27
+ const props = defineProps({
28
+ // 值为:ElementUI、custom
29
+ iconType: {
30
+ type: String,
31
+ default: 'custom'
32
+ },
33
+ iconValue: {
34
+ type: String,
35
+ required: true,
36
+ default: ''
37
+ }
38
+ })
39
+ const defaultShowImageAction = ref(
40
+ window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/show-image?serverPath='
41
+ )
42
+ const defaultShowSvgAction = ref(
43
+ window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/show-svg?svgName='
44
+ )
45
+ </script>
46
+ <style lang="scss" scoped>
47
+ .super-icon {
48
+ width: 1em; // 继承父类的 font-size
49
+ height: 1em; // 继承父类的 font-size
50
+ font-size: 14px; // 默认 font-size 为 14px
51
+ }
52
+ </style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <svg :class="svgClass" aria-hidden="true">
3
- <use :href="iconName" />
3
+ <use :xlink:href="iconName" />
4
4
  </svg>
5
5
  </template>
6
6
 
@@ -10,12 +10,12 @@ export default {
10
10
  props: {
11
11
  iconClass: {
12
12
  type: String,
13
- required: true
13
+ required: true,
14
14
  },
15
15
  className: {
16
16
  type: String,
17
- default: ''
18
- }
17
+ default: '',
18
+ },
19
19
  },
20
20
  computed: {
21
21
  iconName() {
@@ -27,11 +27,8 @@ export default {
27
27
  } else {
28
28
  return 'svg-icon'
29
29
  }
30
- }
30
+ },
31
31
  },
32
- created(){
33
- console.log('====', this.iconClass)
34
- }
35
32
  }
36
33
  </script>
37
34