web-component-gallery 2.2.5 → 2.2.7

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.
@@ -50,7 +50,10 @@ function addLessVariables(newVars, lessContent) {
50
50
  }
51
51
 
52
52
  // 初始化处理并输出主题文件
53
- async function processLessFiles(theme) {
53
+ async function createStyleFiles(resetTheme) {
54
+ // 初始化主题
55
+ const theme = resetTheme || 'dark'
56
+
54
57
  try {
55
58
 
56
59
  // 并行获取文件内容
@@ -191,7 +194,7 @@ function createGeneratorTheme(theme) {
191
194
  const notIncludes = ['@white', '@black']
192
195
 
193
196
  // 输出自定义样式文件
194
- processLessFiles(resetTheme).then(themeVariables => {
197
+ createStyleFiles(resetTheme).then(themeVariables => {
195
198
  // 输出AntdVue样式打包放置public引入
196
199
  const options = {
197
200
  antDir: path.join(hostPath, 'ant-design-vue'),
@@ -211,10 +214,9 @@ function createGeneratorTheme(theme) {
211
214
 
212
215
  // 生成传输信息文件
213
216
  async function createTransferFile(theme) {
214
- // 初始化主题
215
- const resetTheme = theme || 'dark'
216
217
  // 输出自定义样式文件
217
- processLessFiles(resetTheme)
218
+ createStyleFiles(theme)
219
+
218
220
  // 默认请求源地址
219
221
  const origin = process.env.VUE_APP_STATIC_URL || 'http://qxfnkj.com'
220
222
 
@@ -223,7 +225,7 @@ async function createTransferFile(theme) {
223
225
  const response = await fetch(`${origin}/base-subject/iframe/${fileName}`)
224
226
  if (!response.ok) throw new Error(`${fileName}文件请求失败!`)
225
227
 
226
- const responseText = await response.text()
228
+ const responseText = await response.text()
227
229
 
228
230
  // 写入传输文件
229
231
  const outPut = path.join(hostPath, `../src/utils/${fileName}`)
@@ -232,5 +234,6 @@ async function createTransferFile(theme) {
232
234
 
233
235
  module.exports = {
234
236
  customFunctions,
237
+ createStyleFiles,
235
238
  createTransferFile
236
239
  }
@@ -28,6 +28,6 @@
28
28
  &__Actions {
29
29
  flex: 1;
30
30
  text-align: right;
31
- margin-right: 16px;
31
+ // margin-right: 16px;
32
32
  }
33
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-component-gallery",
3
- "version": "2.2.5",
3
+ "version": "2.2.7",
4
4
  "description": "基础vue、antdvue、less实现的私有组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [