@widget-js/cli 1.1.0 → 1.1.1

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": "@widget-js/cli",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "main": "lib/index.js",
5
5
  "author": "Neo Fu",
6
6
  "license": "MIT",
@@ -3,13 +3,6 @@
3
3
  <widget-edit-dialog :widget-params="widgetParams" :option="widgetConfigOption"
4
4
  :widget-data="widgetData"
5
5
  @confirm="onSaveClick()">
6
- <template v-slot:widget>
7
- <!-- 组件配置内容 -->
8
- <<%= paramCaseName %>-widget :style="{
9
- width:`${widgetParams.widthPx}px`,
10
- height:`${widgetParams.heightPx}px`
11
- }" :background-color="widgetData.backgroundColor"></<%= paramCaseName %>-widget>
12
- </template>
13
6
  <template v-slot:form>
14
7
  <!-- TODO 这里写自定义表单内容 -->
15
8
  </template>
@@ -20,7 +13,7 @@
20
13
 
21
14
  import <%= name %>Widget from "./<%= name%>Widget.vue";
22
15
  import {useWidget, WidgetConfigOption, WidgetEditDialog} from "@widget-js/vue3";
23
- import {WidgetData, WidgetDataRepository} from "@widget-js/core";
16
+ import {WidgetData, WidgetDataApi} from "@widget-js/core";
24
17
  import {reactive} from "vue";
25
18
 
26
19
  export default {
@@ -33,14 +26,15 @@ export default {
33
26
  const widgetConfigOption = reactive(new WidgetConfigOption({
34
27
  custom: true,
35
28
  backgroundColor: true,
36
- borderRadius: true
29
+ borderRadius: true,
30
+ preview: false
37
31
  }));
38
32
 
39
33
  return {widgetData, widgetParams, widgetConfigOption}
40
34
  },
41
35
  methods: {
42
36
  async onSaveClick() {
43
- await WidgetDataRepository.save(this.widgetData);
37
+ await WidgetDataApi.save(this.widgetData);
44
38
  window.close();
45
39
  }
46
40
  }