@dcloudio/uni-shared 3.0.0-5000420260318001 → 3.0.0-5000520260324002

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.
@@ -163,7 +163,7 @@ const UVUE_WEB_BUILT_IN_TAGS = [
163
163
  'sticky-header',
164
164
  'cloud-db-element',
165
165
  'loading-element',
166
- 'loading'
166
+ 'loading',
167
167
  ].map((tag) => 'uni-' + tag);
168
168
  const UVUE_MP_BUILT_IN_TAGS = [
169
169
  'list-view',
@@ -205,7 +205,9 @@ function isBuiltInComponent(tag) {
205
205
  }
206
206
  // h5 平台会被转换为 v-uni-
207
207
  const realTag = 'uni-' + tag.replace('v-uni-', '');
208
- // TODO 区分x和非x
208
+ if (process.env.UNI_APP_X !== 'true') {
209
+ return BUILT_IN_TAGS.indexOf(realTag) !== -1;
210
+ }
209
211
  return (BUILT_IN_TAGS.indexOf(realTag) !== -1 ||
210
212
  UVUE_WEB_BUILT_IN_TAGS.indexOf(realTag) !== -1);
211
213
  }
@@ -215,7 +217,9 @@ function isWebBuiltInComponent(tag) {
215
217
  }
216
218
  // h5 平台会被转换为 v-uni-
217
219
  const realTag = 'uni-' + tag.replace('v-uni-', '');
218
- // TODO 区分x和非x
220
+ if (process.env.UNI_APP_X !== 'true') {
221
+ return BUILT_IN_TAGS.indexOf(realTag) !== -1;
222
+ }
219
223
  return (BUILT_IN_TAGS.indexOf(realTag) !== -1 ||
220
224
  UVUE_WEB_BUILT_IN_TAGS.indexOf(realTag) !== -1);
221
225
  }
@@ -161,7 +161,7 @@ const UVUE_WEB_BUILT_IN_TAGS = [
161
161
  'sticky-header',
162
162
  'cloud-db-element',
163
163
  'loading-element',
164
- 'loading'
164
+ 'loading',
165
165
  ].map((tag) => 'uni-' + tag);
166
166
  const UVUE_MP_BUILT_IN_TAGS = [
167
167
  'list-view',
@@ -203,7 +203,9 @@ function isBuiltInComponent(tag) {
203
203
  }
204
204
  // h5 平台会被转换为 v-uni-
205
205
  const realTag = 'uni-' + tag.replace('v-uni-', '');
206
- // TODO 区分x和非x
206
+ if (process.env.UNI_APP_X !== 'true') {
207
+ return BUILT_IN_TAGS.indexOf(realTag) !== -1;
208
+ }
207
209
  return (BUILT_IN_TAGS.indexOf(realTag) !== -1 ||
208
210
  UVUE_WEB_BUILT_IN_TAGS.indexOf(realTag) !== -1);
209
211
  }
@@ -213,7 +215,9 @@ function isWebBuiltInComponent(tag) {
213
215
  }
214
216
  // h5 平台会被转换为 v-uni-
215
217
  const realTag = 'uni-' + tag.replace('v-uni-', '');
216
- // TODO 区分x和非x
218
+ if (process.env.UNI_APP_X !== 'true') {
219
+ return BUILT_IN_TAGS.indexOf(realTag) !== -1;
220
+ }
217
221
  return (BUILT_IN_TAGS.indexOf(realTag) !== -1 ||
218
222
  UVUE_WEB_BUILT_IN_TAGS.indexOf(realTag) !== -1);
219
223
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-shared",
3
- "version": "3.0.0-5000420260318001",
3
+ "version": "3.0.0-5000520260324002",
4
4
  "description": "@dcloudio/uni-shared",
5
5
  "main": "./dist/uni-shared.cjs.js",
6
6
  "module": "./dist/uni-shared.es.js",