@2kog/pkg-widget 0.1.12 → 0.1.13

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": "@2kog/pkg-widget",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -9,8 +9,8 @@
9
9
  "update": "npm install @2kog/pkg-common@latest --registry=https://registry.npmjs.org"
10
10
  },
11
11
  "dependencies": {
12
- "@element-plus/icons-vue": "^2.3.1",
13
12
  "@2kog/pkg-common": "^0.1.21",
13
+ "@element-plus/icons-vue": "^2.3.1",
14
14
  "csslab": "^4.0.4",
15
15
  "element-plus": "^2.8.4",
16
16
  "flag-icons": "^7.2.3",
@@ -24,6 +24,7 @@
24
24
  "@vitejs/plugin-vue": "^5.1.2",
25
25
  "less": "^4.2.0",
26
26
  "vite": "^5.4.1",
27
+ "vite-svg-loader": "^5.1.0",
27
28
  "vite-plugin-require": "^1.2.14"
28
29
  },
29
30
  "repository": {
@@ -2,7 +2,9 @@
2
2
  <div class="c-lang-select">
3
3
  <div class="u-select-label">
4
4
  <span v-show="showFlag" class="fi u-flag" :class="flag"></span>
5
- <img v-if="!showFlag" class="u-earth" :src="earthIcon" alt="earth" />
5
+ <!-- <img v-if="!showFlag" class="u-earth" :src="earthIcon" alt="earth" /> -->
6
+ <earthIcon v-if="!showFlag" class="u-earth"></earthIcon>
7
+ <!-- <img v-if="!showFlag" class="u-earth" :src="earthIcon" alt="earth" /> -->
6
8
  <span class="u-name" v-show="showName">{{ name }}</span>
7
9
  </div>
8
10
  <el-select class="u-select" v-model="current" popper-class="c-lang-select__pop" filterable :filter-method="filterMethod" @change="onLangChange">
@@ -21,6 +23,9 @@ import User from "@2kog/pkg-common/utils/user";
21
23
  import earthIcon from "../../assets/img/earth.svg";
22
24
  export default {
23
25
  name: "LangSelect",
26
+ components: {
27
+ earthIcon,
28
+ },
24
29
  props: {
25
30
  lang: {
26
31
  type: String,
@@ -42,7 +47,6 @@ export default {
42
47
  data() {
43
48
  return {
44
49
  current: "",
45
- earthIcon,
46
50
  filterLanguages: [],
47
51
  };
48
52
  },
@@ -133,6 +137,7 @@ export default {
133
137
 
134
138
  .u-earth {
135
139
  height: 14px;
140
+ width: 14px;
136
141
  }
137
142
  }
138
143
  .c-lang-select__pop {
@@ -22,7 +22,7 @@
22
22
  <el-tab-pane :label="t('payment.wepay')" name="wepay">
23
23
  <template #label>
24
24
  <span class="u-tab">
25
- <img :src="wePay" />
25
+ <wePay></wePay>
26
26
  {{ t('payment.wepay') }}
27
27
  <em>{{ t('payment.wepayTip') }}</em>
28
28
  </span>
@@ -31,7 +31,7 @@
31
31
  <el-tab-pane :label="t('payment.alipay')" name="alipay">
32
32
  <template #label>
33
33
  <span class="u-tab">
34
- <img :src="aliPay" />
34
+ <aliPay></aliPay>
35
35
  {{ t('payment.alipay') }}
36
36
  <em>{{ t('payment.alipayTip') }}</em>
37
37
  </span>
@@ -142,7 +142,8 @@ export default {
142
142
  Loading,
143
143
  CircleCheck,
144
144
  QrcodeVue,
145
-
145
+ wePay,
146
+ aliPay,
146
147
  },
147
148
  // 使用独立的 i18n 实例
148
149
  i18n: payI18n,
@@ -235,9 +236,6 @@ export default {
235
236
  orderPollingTimer: null,
236
237
  paymentPollingTimer: null,
237
238
  pollingRetries: 0,
238
-
239
- wePay,
240
- aliPay,
241
239
  };
242
240
  },
243
241
  computed: {
@@ -647,7 +645,7 @@ export default {
647
645
  align-items: center;
648
646
  color: @color;
649
647
 
650
- img {
648
+ svg {
651
649
  width: 24px;
652
650
  height: 24px;
653
651
  vertical-align: middle;
package/vite.config.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import { defineConfig } from "vite";
2
2
  import vue from "@vitejs/plugin-vue";
3
3
  import vitePluginRequire from "vite-plugin-require";
4
+ import svgLoader from "vite-svg-loader";
4
5
 
5
6
  // https://vitejs.dev/config/
6
7
  export default defineConfig({
7
- plugins: [vue(), vitePluginRequire.default()],
8
+ plugins: [vue(), svgLoader(), vitePluginRequire.default()],
8
9
  server: {
9
10
  proxy: {
10
11
  '/api': {