uview-plus 3.4.39 → 3.4.41

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.
Files changed (129) hide show
  1. package/changelog.md +10 -0
  2. package/components/u-action-sheet/u-action-sheet.vue +0 -1
  3. package/components/u-album/u-album.vue +0 -2
  4. package/components/u-alert/u-alert.vue +0 -1
  5. package/components/u-avatar/u-avatar.vue +0 -1
  6. package/components/u-avatar-group/u-avatar-group.vue +0 -1
  7. package/components/u-back-top/u-back-top.vue +0 -1
  8. package/components/u-badge/u-badge.vue +0 -1
  9. package/components/u-box/u-box.vue +0 -1
  10. package/components/u-button/u-button.vue +0 -2
  11. package/components/u-calendar/header.vue +0 -1
  12. package/components/u-calendar/month.vue +0 -1
  13. package/components/u-calendar/u-calendar.vue +0 -2
  14. package/components/u-car-keyboard/u-car-keyboard.vue +0 -1
  15. package/components/u-card/u-card.vue +0 -2
  16. package/components/u-cell/u-cell.vue +0 -1
  17. package/components/u-cell-group/u-cell-group.vue +0 -1
  18. package/components/u-checkbox/u-checkbox.vue +0 -1
  19. package/components/u-checkbox-group/u-checkbox-group.vue +0 -1
  20. package/components/u-circle-progress/u-circle-progress.vue +0 -1
  21. package/components/u-code/u-code.vue +0 -1
  22. package/components/u-code-input/u-code-input.vue +0 -1
  23. package/components/u-col/u-col.vue +0 -1
  24. package/components/u-collapse/u-collapse.vue +0 -1
  25. package/components/u-collapse-item/u-collapse-item.vue +0 -1
  26. package/components/u-column-notice/u-column-notice.vue +0 -1
  27. package/components/u-count-down/u-count-down.vue +0 -1
  28. package/components/u-count-to/u-count-to.vue +0 -2
  29. package/components/u-datetime-picker/u-datetime-picker.vue +0 -1
  30. package/components/u-divider/u-divider.vue +0 -1
  31. package/components/u-dropdown/u-dropdown.vue +0 -1
  32. package/components/u-dropdown-item/u-dropdown-item.vue +0 -1
  33. package/components/u-empty/u-empty.vue +0 -1
  34. package/components/u-float-button/u-float-button.vue +0 -2
  35. package/components/u-form-item/u-form-item.vue +0 -1
  36. package/components/u-gap/u-gap.vue +0 -1
  37. package/components/u-grid/u-grid.vue +0 -1
  38. package/components/u-grid-item/u-grid-item.vue +0 -1
  39. package/components/u-icon/u-icon.vue +0 -1
  40. package/components/u-image/u-image.vue +0 -2
  41. package/components/u-index-anchor/u-index-anchor.vue +0 -1
  42. package/components/u-index-item/u-index-item.vue +0 -1
  43. package/components/u-index-list/u-index-list.vue +0 -1
  44. package/components/u-input/u-input.vue +0 -2
  45. package/components/u-keyboard/u-keyboard.vue +0 -1
  46. package/components/u-lazy-load/u-lazy-load.vue +0 -2
  47. package/components/u-line/u-line.vue +0 -1
  48. package/components/u-line-progress/u-line-progress.vue +0 -1
  49. package/components/u-link/u-link.vue +0 -1
  50. package/components/u-list/u-list.vue +0 -1
  51. package/components/u-list-item/u-list-item.vue +0 -1
  52. package/components/u-loading-icon/u-loading-icon.vue +0 -1
  53. package/components/u-loading-page/u-loading-page.vue +0 -2
  54. package/components/u-loadmore/u-loadmore.vue +0 -1
  55. package/components/u-modal/u-modal.vue +0 -1
  56. package/components/u-navbar/u-navbar.vue +0 -1
  57. package/components/u-navbar-mini/u-navbar-mini.vue +0 -1
  58. package/components/u-no-network/u-no-network.vue +0 -1
  59. package/components/u-notice-bar/u-notice-bar.vue +0 -1
  60. package/components/u-notify/u-notify.vue +0 -1
  61. package/components/u-number-box/u-number-box.vue +0 -2
  62. package/components/u-number-keyboard/u-number-keyboard.vue +0 -1
  63. package/components/u-overlay/u-overlay.vue +0 -1
  64. package/components/u-picker/u-picker.vue +0 -1
  65. package/components/u-picker-column/u-picker-column.vue +0 -1
  66. package/components/u-popup/u-popup.vue +0 -1
  67. package/components/u-qrcode/qrcode.js +120 -57
  68. package/components/u-qrcode/u-qrcode.vue +121 -17
  69. package/components/u-radio/u-radio.vue +0 -1
  70. package/components/u-radio-group/u-radio-group.vue +0 -1
  71. package/components/u-rate/u-rate.vue +0 -1
  72. package/components/u-read-more/u-read-more.vue +0 -2
  73. package/components/u-row/u-row.vue +0 -1
  74. package/components/u-row-notice/u-row-notice.vue +0 -1
  75. package/components/u-scroll-list/u-scroll-list.vue +0 -2
  76. package/components/u-search/u-search.vue +0 -1
  77. package/components/u-skeleton/u-skeleton.vue +0 -1
  78. package/components/u-slider/u-slider.vue +0 -1
  79. package/components/u-steps/u-steps.vue +0 -1
  80. package/components/u-steps-item/u-steps-item.vue +0 -1
  81. package/components/u-subsection/u-subsection.vue +0 -2
  82. package/components/u-swipe-action-item/u-swipe-action-item.vue +0 -1
  83. package/components/u-swiper/u-swiper.vue +0 -1
  84. package/components/u-swiper-indicator/u-swiper-indicator.vue +0 -1
  85. package/components/u-switch/u-switch.vue +0 -1
  86. package/components/u-tabbar/u-tabbar.vue +0 -1
  87. package/components/u-tabbar-item/u-tabbar-item.vue +0 -1
  88. package/components/u-table/u-table.vue +0 -1
  89. package/components/u-tabs/u-tabs.vue +0 -1
  90. package/components/u-tag/u-tag.vue +0 -1
  91. package/components/u-td/u-td.vue +0 -1
  92. package/components/u-text/u-text.vue +4 -6
  93. package/components/u-textarea/u-textarea.vue +9 -11
  94. package/components/u-th/u-th.vue +0 -1
  95. package/components/u-toast/u-toast.vue +2 -2
  96. package/components/u-toolbar/u-toolbar.vue +0 -1
  97. package/components/u-tooltip/u-tooltip.vue +0 -1
  98. package/components/u-tr/u-tr.vue +0 -1
  99. package/components/u-transition/u-transition.vue +114 -3
  100. package/components/u-upload/u-upload.vue +0 -1
  101. package/components/u-view/u-view.vue +0 -2
  102. package/components/u-waterfall/u-waterfall.vue +0 -2
  103. package/index.scss +2 -1
  104. package/libs/util/gcanvas/bridge/bridge-weex.js +0 -0
  105. package/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js +0 -0
  106. package/libs/util/gcanvas/context-2d/FillStylePattern.js +0 -0
  107. package/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js +0 -0
  108. package/libs/util/gcanvas/context-2d/RenderingContext.js +0 -0
  109. package/libs/util/gcanvas/context-webgl/ActiveInfo.js +0 -0
  110. package/libs/util/gcanvas/context-webgl/Buffer.js +0 -0
  111. package/libs/util/gcanvas/context-webgl/Framebuffer.js +0 -0
  112. package/libs/util/gcanvas/context-webgl/GLenum.js +0 -0
  113. package/libs/util/gcanvas/context-webgl/GLmethod.js +0 -0
  114. package/libs/util/gcanvas/context-webgl/GLtype.js +0 -0
  115. package/libs/util/gcanvas/context-webgl/Program.js +0 -0
  116. package/libs/util/gcanvas/context-webgl/Renderbuffer.js +0 -0
  117. package/libs/util/gcanvas/context-webgl/RenderingContext.js +0 -0
  118. package/libs/util/gcanvas/context-webgl/Shader.js +0 -0
  119. package/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js +0 -0
  120. package/libs/util/gcanvas/context-webgl/Texture.js +0 -0
  121. package/libs/util/gcanvas/context-webgl/UniformLocation.js +0 -0
  122. package/libs/util/gcanvas/context-webgl/classUtils.js +0 -0
  123. package/libs/util/gcanvas/env/canvas.js +0 -0
  124. package/libs/util/gcanvas/env/image.js +0 -0
  125. package/libs/util/gcanvas/env/tool.js +0 -0
  126. package/libs/util/gcanvas/index.js +0 -0
  127. package/package.json +1 -1
  128. package/types/comps/qrcode.d.ts +77 -0
  129. package/types/comps.d.ts +1 -0
@@ -1037,6 +1037,9 @@ let QRCode = {};
1037
1037
  showLoading: opt.showLoading,
1038
1038
  loadingText: opt.loadingText,
1039
1039
  };
1040
+
1041
+ let canvas = null;
1042
+
1040
1043
  if (typeof opt === 'string') { // 只编码ASCII字符串
1041
1044
  opt = {
1042
1045
  text: opt
@@ -1083,8 +1086,24 @@ let QRCode = {};
1083
1086
  }
1084
1087
  return options.foreground;
1085
1088
  }
1089
+
1090
+ let getCanvas = async (id) => {
1091
+ return new Promise((resolve, reject)=>{
1092
+ try {
1093
+ const query = uni.createSelectorQuery().in(this.options.context);
1094
+ query.select(`#${id}`)
1095
+ .fields({ node: true, size: true })
1096
+ .exec((res) => {
1097
+ resolve(res[0].node)
1098
+ })
1099
+ }
1100
+ catch (e) {
1101
+ console.error("createCanvasContextFail",e)
1102
+ }
1103
+ })
1104
+ }
1086
1105
  // 创建canvas
1087
- let createCanvas = function (options) {
1106
+ let createCanvas = async function (options) {
1088
1107
  if(options.showLoading){
1089
1108
  uni.showLoading({
1090
1109
  title: options.loadingText,
@@ -1094,9 +1113,21 @@ let QRCode = {};
1094
1113
  var ctx = '';
1095
1114
  if (options.nvueContext) {
1096
1115
  ctx = options.nvueContext;
1097
- } else {
1098
- ctx = uni.createCanvasContext(options.canvasId, options.context);
1099
1116
  }
1117
+ else {
1118
+ // 获取canvas node节点
1119
+ canvas = await getCanvas(options.canvasId);
1120
+ // #ifdef MP
1121
+ // 不清楚是小程序的bug还是什么原因,canvas的node节点宽高和设置的宽高不一致 重新设置下
1122
+ canvas.width = options.size;
1123
+ canvas.height = options.size;
1124
+ // #endif
1125
+ ctx = canvas.getContext('2d');
1126
+ }
1127
+ // 设置组件中data里面的ctx
1128
+ options.context.ctx = ctx;
1129
+ options.context.canvas = canvas;
1130
+
1100
1131
  var count = qrCodeAlg.getModuleCount();
1101
1132
  var ratioSize = options.size;
1102
1133
  var ratioImgSize = options.imageSize;
@@ -1107,14 +1138,18 @@ let QRCode = {};
1107
1138
  for (var row = 0; row < count; row++) {
1108
1139
  for (var col = 0; col < count; col++) {
1109
1140
  var w = (Math.ceil((col + 1) * tileW) - Math.floor(col * tileW));
1110
- var h = (Math.ceil((row + 1) * tileW) - Math.floor(row * tileW));
1141
+ var h = (Math.ceil((row + 1) * tileH) - Math.floor(row * tileH));
1111
1142
  var foreground = getForeGround({
1112
1143
  row: row,
1113
1144
  col: col,
1114
1145
  count: count,
1115
1146
  options: options
1116
1147
  });
1117
- ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options.background);
1148
+ if (options.nvueContext) {
1149
+ ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options.background);
1150
+ } else {
1151
+ ctx.fillStyle = qrCodeAlg.modules[row][col] ? foreground : options.background;
1152
+ }
1118
1153
  ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w, h);
1119
1154
  }
1120
1155
  }
@@ -1122,12 +1157,33 @@ let QRCode = {};
1122
1157
  var x = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
1123
1158
  var y = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
1124
1159
  drawRoundedRect(ctx, x, y, ratioImgSize, ratioImgSize, 2, 6, true, true)
1125
- ctx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize);
1160
+ if (options.nvueContext) {
1161
+ ctx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize);
1162
+ }
1163
+ else {
1164
+ // #ifdef H5
1165
+ const img = new Image();
1166
+ // #endif
1167
+ // #ifndef H5
1168
+ const img = canvas.createImage();
1169
+ // #endif
1170
+ img.onload = () => {
1171
+ ctx.drawImage(img, x, y, ratioImgSize, ratioImgSize);
1172
+ };
1173
+ img.src = options.image;
1174
+ }
1126
1175
  // 画圆角矩形
1127
1176
  function drawRoundedRect(ctxi, x, y, width, height, r, lineWidth, fill, stroke) {
1128
- ctxi.setLineWidth(lineWidth);
1129
- ctxi.setFillStyle(options.background);
1130
- ctxi.setStrokeStyle(options.background);
1177
+ if (options.nvueContext) {
1178
+ ctxi.setLineWidth(lineWidth);
1179
+ ctxi.setFillStyle(options.background);
1180
+ ctxi.setStrokeStyle(options.background);
1181
+ }
1182
+ else {
1183
+ ctxi.lineWidth = lineWidth;
1184
+ ctxi.fillStyle = options.background;
1185
+ ctxi.strokeStyle = options.background;
1186
+ }
1131
1187
  ctxi.beginPath(); // draw top and top right corner
1132
1188
  ctxi.moveTo(x + r, y);
1133
1189
  ctxi.lineTo(x + width, y); // move to top-right corner
@@ -1152,57 +1208,64 @@ let QRCode = {};
1152
1208
  }
1153
1209
  }
1154
1210
  setTimeout(() => {
1155
- ctx.draw(true, () => {
1156
- // 保存到临时区域
1157
- setTimeout(() => {
1158
- if (options.nvueContext) {
1159
- ctx.toTempFilePath(
1160
- 0,
1161
- 0,
1162
- options.width,
1163
- options.height,
1164
- options.width,
1165
- options.height,
1166
- "",
1167
- 1,
1168
- function(res) {
1169
- if (options.cbResult) {
1170
- options.cbResult(res.tempFilePath)
1171
- }
1172
- }
1173
- );
1174
- } else {
1175
- uni.canvasToTempFilePath({
1176
- width: options.width,
1177
- height: options.height,
1178
- destWidth: options.width,
1179
- destHeight: options.height,
1180
- canvasId: options.canvasId,
1181
- quality: Number(1),
1182
- success: function (res) {
1183
- if (options.cbResult) {
1184
- // 由于官方还没有统一此接口的输出字段,所以先判定下 支付宝为 res.apFilePath
1185
- if (!empty(res.tempFilePath)) {
1186
- options.cbResult(res.tempFilePath)
1187
- } else if (!empty(res.apFilePath)) {
1188
- options.cbResult(res.apFilePath)
1189
- } else {
1211
+ // canvas2 绘制是自动的不需要手动绘制
1212
+ if(options.nvueContext){
1213
+ ctx.draw(true, () => {
1214
+ // 保存到临时区域
1215
+ setTimeout(() => {
1216
+ if (options.nvueContext) {
1217
+ ctx.toTempFilePath(
1218
+ 0,
1219
+ 0,
1220
+ options.width,
1221
+ options.height,
1222
+ options.width,
1223
+ options.height,
1224
+ "",
1225
+ 1,
1226
+ function(res) {
1227
+ if (options.cbResult) {
1190
1228
  options.cbResult(res.tempFilePath)
1191
1229
  }
1192
1230
  }
1193
- },
1194
- fail: function (res) {
1195
- if (options.cbResult) {
1196
- options.cbResult(res)
1197
- }
1198
- },
1199
- complete: function () {
1200
- uni.hideLoading();
1201
- },
1202
- }, options.context);
1203
- }
1204
- }, options.text.length + 100);
1205
- });
1231
+ );
1232
+ } else {
1233
+ uni.canvasToTempFilePath({
1234
+ width: options.width,
1235
+ height: options.height,
1236
+ destWidth: options.width,
1237
+ destHeight: options.height,
1238
+ canvasId: options.canvasId,
1239
+ quality: Number(1),
1240
+ success: function (res) {
1241
+ if (options.cbResult) {
1242
+ // 由于官方还没有统一此接口的输出字段,所以先判定下 支付宝为 res.apFilePath
1243
+ if (!empty(res.tempFilePath)) {
1244
+ options.cbResult(res.tempFilePath)
1245
+ } else if (!empty(res.apFilePath)) {
1246
+ options.cbResult(res.apFilePath)
1247
+ } else {
1248
+ options.cbResult(res.tempFilePath)
1249
+ }
1250
+ }
1251
+ },
1252
+ fail: function (res) {
1253
+ if (options.cbResult) {
1254
+ options.cbResult(res)
1255
+ }
1256
+ },
1257
+ complete: function () {
1258
+ uni.hideLoading();
1259
+ },
1260
+ }, options.context);
1261
+ }
1262
+ }, options.text.length + 100);
1263
+ });
1264
+ }
1265
+ else{
1266
+ options.cbResult("")
1267
+ }
1268
+
1206
1269
  }, options.usingComponents ? 0 : 150);
1207
1270
  }
1208
1271
  createCanvas(this.options);
@@ -1,24 +1,31 @@
1
1
  <template>
2
- <view class="u-qrcode" @longpress="longpress">
2
+ <view class="u-qrcode"
3
+ :id="rootId"
4
+ :style="{
5
+ width: useRootHeightAndWidth ? '100%' : 'auto',
6
+ height: useRootHeightAndWidth ? '100%' : 'auto',
7
+ }"
8
+ @longpress="longpress">
3
9
  <view class="u-qrcode__content" @click="preview">
4
10
  <!-- #ifndef APP-NVUE -->
5
- <canvas class="u-qrcode__canvas"
6
- :id="cid" :canvas-id="cid" :style="{ width: size + unit, height: size + unit }" />
11
+ <canvas
12
+ class="u-qrcode__canvas"
13
+ :id="cid"
14
+ :canvas-id="cid"
15
+ type="2d"
16
+ :style="{ width: sizeLocal + unit, height: sizeLocal + unit }" />
7
17
  <!-- #endif -->
8
18
  <!-- #ifdef APP-NVUE -->
9
19
  <gcanvas class="u-qrcode__canvas" ref="gcanvess"
10
- :style="{ width: size + unit, height: size + unit }">
20
+ :style="{ width: sizeLocal + unit, height: sizeLocal + unit }">
11
21
  </gcanvas>
12
22
  <!-- #endif -->
13
23
  <view v-if="showLoading && loading" class="u-qrcode__loading"
14
- :style="{ width: size + unit, height: size + unit }">
24
+ :style="{ width: sizeLocal + unit, height: sizeLocal + unit }">
15
25
  <up-loading-icon vertical :text="loadingText" textSize="14px"></up-loading-icon>
16
26
  </view>
17
- <!-- <image v-show="show" :src="result" :style="{ width: size + unit, height: size + unit }" /> -->
18
27
  </view>
19
- <!-- <up-action-sheet :actions="list" cancelText="取消"
20
- v-model:show="popupShow" @select="selectClick">
21
- </up-action-sheet> -->
28
+
22
29
  </view>
23
30
  </template>
24
31
 
@@ -103,8 +110,13 @@ export default {
103
110
  type: Boolean,
104
111
  default: false
105
112
  },
113
+ // 是否使用根节点宽高
114
+ useRootHeightAndWidth: {
115
+ type: Boolean,
116
+ default: () => false
117
+ },
106
118
  },
107
- emits: ['result', 'longpress'],
119
+ emits: ['result', 'longpressCallback'],
108
120
  data() {
109
121
  return {
110
122
  loading: false,
@@ -115,12 +127,21 @@ export default {
115
127
  name: '保存二维码',
116
128
  }
117
129
  ],
130
+ rootId: `rootId${Number(Math.random() * 100).toFixed(0)}`,
118
131
  ganvas: null,
119
132
  context: '',
120
- canvasObj: {}
133
+ canvasObj: {},
134
+ sizeLocal: this.size,
135
+ ctx: null, // ctx 在new Qrcode 时js文件内部设置
136
+ canvas: null, // ctx 在new Qrcode 时js文件内部设置
121
137
  }
122
138
  },
123
- mounted: function () {
139
+ async mounted(){
140
+ // 如果使用根节点的宽高 则 重新设置 size
141
+ if(this.useRootHeightAndWidth){
142
+ await this.setNewSize()
143
+ }
144
+
124
145
  // #ifdef APP-NVUE
125
146
  /*获取元素引用*/
126
147
  this.ganvas = this.$refs["gcanvess"]
@@ -135,7 +156,9 @@ export default {
135
156
  if (this.loadMake) {
136
157
  if (!this._empty(this.val)) {
137
158
  setTimeout(() => {
138
- this._makeCode()
159
+ setTimeout(()=>{
160
+ this._makeCode()
161
+ })
139
162
  }, 0);
140
163
  }
141
164
  }
@@ -155,7 +178,7 @@ export default {
155
178
  showLoading: false, // 是否显示loading
156
179
  loadingText: that.loadingText, // loading文字
157
180
  text: that.val, // 生成内容
158
- size: that.size, // 二维码大小
181
+ size: that.sizeLocal, // 二维码大小
159
182
  background: that.background, // 背景色
160
183
  foreground: that.foreground, // 前景色
161
184
  pdground: that.pdground, // 定位角点颜色
@@ -219,9 +242,90 @@ export default {
219
242
  url: this.result
220
243
  }, e)
221
244
  },
222
- longpress() {
223
- this.$emit('longpress', this.result)
245
+ async longpress() {
246
+ if (this.context) {
247
+ this.ctx.toTempFilePath(
248
+ 0,
249
+ 0,
250
+ this.sizeLocal,
251
+ this.sizeLocal,
252
+ this.sizeLocal,
253
+ this.sizeLocal,
254
+ "",
255
+ 1,
256
+ res => {
257
+ this.$emit('longpressCallback', res.tempFilePath)
258
+ }
259
+ );
260
+ }
261
+ else {
262
+ const canvas = await this.getNode(this.cId,true);
263
+ // #ifdef MP-TOUTIAO || H5
264
+ this.$emit('longpressCallback', this.ctx.canvas.toDataURL("image/png", 1));
265
+ // #endif
266
+
267
+ // #ifndef MP-TOUTIAO || H5
268
+ uni.canvasToTempFilePath(
269
+ {
270
+ canvas,
271
+ success :res => {
272
+ console.log(res.tempFilePath)
273
+ this.$emit('longpressCallback', res.tempFilePath)
274
+ },
275
+ fail: err =>{
276
+ }
277
+ },
278
+ this)
279
+ // #endif
280
+
281
+ }
282
+
224
283
  },
284
+
285
+ /**
286
+ * 使用根节点宽高 设置新的size
287
+ * @return {Promise<void>}
288
+ */
289
+ async setNewSize(){
290
+ const rootNode = await this.getNode(this.rootId,false);
291
+ const { width , height } = rootNode;
292
+ // 将最短的设置为二维码 的size
293
+ if(width > height){
294
+ this.sizeLocal = height
295
+ }
296
+ else{
297
+ this.sizeLocal = width
298
+ }
299
+ },
300
+
301
+ /**
302
+ * 获取节点
303
+ * @param id 节点id
304
+ * @param isCanvas 是否为Canvas节点
305
+ * @return {Promise<unknown>}
306
+ */
307
+ async getNode(id,isCanvas){
308
+ return new Promise((resolve, reject)=>{
309
+ try {
310
+ const query = uni.createSelectorQuery().in(this);
311
+ query.select(`#${id}`)
312
+ .fields({ node: true, size: true })
313
+ .exec((res) => {
314
+ if(isCanvas){
315
+ resolve(res[0].node)
316
+ }
317
+ else{
318
+ resolve(res[0])
319
+ }
320
+
321
+ })
322
+ }
323
+ catch (e) {
324
+ console.error("获取节点失败",e)
325
+ }
326
+ })
327
+ },
328
+
225
329
  selectClick(index) {
226
330
  switch (index) {
227
331
  case 0:
@@ -250,7 +354,7 @@ export default {
250
354
  rt = false
251
355
  }
252
356
  return rt
253
- }
357
+ },
254
358
  },
255
359
  watch: {
256
360
  size: function (n, o) {
@@ -246,7 +246,6 @@
246
246
  </script>
247
247
 
248
248
  <style lang="scss" scoped>
249
- @import "../../libs/css/components.scss";
250
249
  $u-radio-wrap-margin-right:6px !default;
251
250
  $u-radio-wrap-font-size:20px !default;
252
251
  $u-radio-wrap-border-width:1px !default;
@@ -118,7 +118,6 @@
118
118
  </script>
119
119
 
120
120
  <style lang="scss" scoped>
121
- @import "../../libs/css/components.scss";
122
121
 
123
122
  .u-radio-group {
124
123
  flex: 1;
@@ -287,7 +287,6 @@
287
287
  </script>
288
288
 
289
289
  <style lang="scss" scoped>
290
- @import "../../libs/css/components.scss";
291
290
  $u-rate-margin: 0 !default;
292
291
  $u-rate-padding: 0 !default;
293
292
  $u-rate-item-icon-wrap-half-top: 0 !default;
@@ -140,8 +140,6 @@
140
140
  </script>
141
141
 
142
142
  <style lang="scss" scoped>
143
- @import "../../libs/css/components.scss";
144
-
145
143
  .u-read-more {
146
144
 
147
145
  &__content {
@@ -89,7 +89,6 @@
89
89
  </script>
90
90
 
91
91
  <style lang="scss" scoped>
92
- @import "../../libs/css/components.scss";
93
92
 
94
93
  .u-row {
95
94
  @include flex;
@@ -282,7 +282,6 @@
282
282
  </script>
283
283
 
284
284
  <style lang="scss" scoped>
285
- @import "../../libs/css/components.scss";
286
285
 
287
286
  .u-notice {
288
287
  @include flex;
@@ -198,8 +198,6 @@ export default {
198
198
  </script>
199
199
 
200
200
  <style lang="scss" scoped>
201
- @import "../../libs/css/components.scss";
202
-
203
201
  .u-scroll-list {
204
202
  padding-bottom: 10px;
205
203
 
@@ -233,7 +233,6 @@
233
233
  </script>
234
234
 
235
235
  <style lang="scss" scoped>
236
- @import "../../libs/css/components.scss";
237
236
  $u-search-content-padding: 0 10px !default;
238
237
  $u-search-label-color: $u-main-color !default;
239
238
  $u-search-label-font-size: 14px !default;
@@ -187,7 +187,6 @@
187
187
  </script>
188
188
 
189
189
  <style lang="scss" scoped>
190
- @import "../../libs/css/components.scss";
191
190
 
192
191
  @mixin background {
193
192
  /* #ifdef APP-NVUE */
@@ -420,7 +420,6 @@
420
420
  </script>
421
421
 
422
422
  <style lang="scss" scoped>
423
- @import "../../libs/css/components.scss";
424
423
  .u-slider {
425
424
  position: relative;
426
425
  display: flex;
@@ -69,7 +69,6 @@
69
69
  </script>
70
70
 
71
71
  <style lang="scss" scoped>
72
- @import "../../libs/css/components.scss";
73
72
 
74
73
  .u-steps {
75
74
  @include flex;
@@ -228,7 +228,6 @@
228
228
  </script>
229
229
 
230
230
  <style lang="scss" scoped>
231
- @import "../../libs/css/components.scss";
232
231
 
233
232
  .u-steps-item {
234
233
  flex: 1;
@@ -226,8 +226,6 @@ export default {
226
226
  </script>
227
227
 
228
228
  <style lang="scss" scoped>
229
- @import "../../libs/css/components.scss";
230
-
231
229
  .u-subsection {
232
230
  @include flex;
233
231
  position: relative;
@@ -201,7 +201,6 @@
201
201
  </script>
202
202
 
203
203
  <style lang="scss" scoped>
204
- @import "../../libs/css/components.scss";
205
204
 
206
205
  .u-swipe-action-item {
207
206
  position: relative;
@@ -214,7 +214,6 @@
214
214
  </script>
215
215
 
216
216
  <style lang="scss" scoped>
217
- @import "../../libs/css/components.scss";
218
217
 
219
218
  .u-swiper__wrapper {
220
219
  flex: 1;
@@ -79,7 +79,6 @@
79
79
  </script>
80
80
 
81
81
  <style lang="scss" scoped>
82
- @import "../../libs/css/components.scss";
83
82
 
84
83
  .u-swiper-indicator {
85
84
 
@@ -165,7 +165,6 @@
165
165
  </script>
166
166
 
167
167
  <style lang="scss" scoped>
168
- @import "../../libs/css/components.scss";
169
168
 
170
169
  .u-switch {
171
170
  @include flex(row);
@@ -117,7 +117,6 @@
117
117
  </script>
118
118
 
119
119
  <style lang="scss" scoped>
120
- @import "../../libs/css/components.scss";
121
120
 
122
121
  .u-tabbar {
123
122
  @include flex(column);
@@ -120,7 +120,6 @@
120
120
  </script>
121
121
 
122
122
  <style lang="scss" scoped>
123
- @import "../../libs/css/components.scss";
124
123
  .u-tabbar-item {
125
124
  @include flex(column);
126
125
  align-items: center;
@@ -100,6 +100,5 @@
100
100
  </script>
101
101
 
102
102
  <style lang="scss" scoped>
103
- @import "../../libs/css/components.scss";
104
103
 
105
104
  </style>
@@ -346,7 +346,6 @@
346
346
  </script>
347
347
 
348
348
  <style lang="scss" scoped>
349
- @import "../../libs/css/components.scss";
350
349
 
351
350
  .u-tabs {
352
351
 
@@ -193,7 +193,6 @@
193
193
  lang="scss"
194
194
  scoped
195
195
  >
196
- @import "../../libs/css/components.scss";
197
196
 
198
197
  .u-tag-wrapper {
199
198
  position: relative;
@@ -56,7 +56,6 @@
56
56
  </script>
57
57
 
58
58
  <style lang="scss" scoped>
59
- @import "../../libs/css/components.scss";
60
59
  .u-td {
61
60
  @include flex;
62
61
  flex-direction: column;
@@ -120,11 +120,11 @@ export default {
120
120
  }
121
121
  // 占满剩余空间
122
122
  if (this.flex1) {
123
- style.flex = 1;
124
- // #ifndef APP-NVUE
125
- style.width = '100%';
123
+ style.flex = 1;
124
+ // #ifndef APP-NVUE
125
+ style.width = '100%';
126
126
  // #endif
127
- }
127
+ }
128
128
  return style;
129
129
  },
130
130
  valueStyle() {
@@ -175,8 +175,6 @@ export default {
175
175
  </script>
176
176
 
177
177
  <style lang="scss" scoped>
178
- @import '../../libs/css/components.scss';
179
-
180
178
  .u-text {
181
179
  @include flex(row);
182
180
  align-items: center;